Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Software] [Solved] Networking for Beginners

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
karottenkopf
Posts: 5
Joined: 2023-01-27 10:41
Has thanked: 3 times

[Software] [Solved] Networking for Beginners

#1 Post by karottenkopf »

Hello,
I have a freshly installed Debian on my Server and now i ran into some issues.

- The Server ist attached to a Network Switch, which is connected to my Laptop and my Router. Thanks to DHCP i have an internet connection on interface eno1. But now I want to add another network interface on the Server with a static ip, to make a local network with my laptop and my server while keeping the server connected to the internet via the switch+Router with its configured eno1 network interface.

When i just add another interface e.g. eno2 in /etc/network/interfaces like this:

auto eno2
iface eno2 inet static
address 192.168.2.1
netmask 255.255.255.0

it just gives me an error after restarting networking.service that the interface eno2 is unknown.

How can i add multiple network interfaces separated from each other on the debian system?
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

other question would be:

How can i assign a static ipv6 adress to my server, so it is reachable from the internet?



Hope somebody can help me, thank you!
Last edited by karottenkopf on 2023-04-05 16:29, edited 1 time in total.

User avatar
fabien
Forum Helper
Forum Helper
Posts: 604
Joined: 2019-12-03 12:51
Location: Anarres (Toulouse, France actually)
Has thanked: 60 times
Been thanked: 141 times

Re: [Software] Networking for Beginners

#2 Post by fabien »

karottenkopf wrote: 2023-01-27 10:58How can i add multiple network interfaces separated from each other on the debian system?
Hello,
take a look at

Code: Select all

man 5 interfaces
VLAN INTERFACES
To ease the configuration of VLAN interfaces, interfaces having . (full stop character) in the name are configured as 802.1q tagged virtual LAN interface. For example, interface eth0.1 is a
virtual interface with VLAN ID 1 having eth0 as its parent interface.
karottenkopf wrote: 2023-01-27 10:58How can i assign a static ipv6 adress to my server, so it is reachable from the internet?
Does DHCP provide your server with an IPv6 address? If yes, this address should not change until the real interface (the network card) change.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: [Software] Networking for Beginners

#3 Post by p.H »

karottenkopf wrote: 2023-01-27 10:58 I want to add another network interface on the Server with a static ip
Do you want to configure a second existing physical network interface (if the server has two ethernet ports), or add a static IP address to eno1, or create IEEE802.1q tagged VLAN interfaces on eno1 (assuming the switch supports IEEE802.1q) ?
karottenkopf wrote: 2023-01-27 10:58 How can i assign a static ipv6 adress to my server

Code: Select all

iface eno1 inet6 static
address xxx:xxx/nn
gateway xxx:xxx
For details, see man interfaces.

User avatar
cds60601
df -h | participant
df -h | participant
Posts: 698
Joined: 2017-11-25 05:58
Location: Florida
Has thanked: 129 times
Been thanked: 59 times

Re: [Software] Networking for Beginners

#4 Post by cds60601 »

karottenkopf wrote: 2023-01-27 10:58 Hello,
I have a freshly installed Debian on my Server and now i ran into some issues.

- The Server ist attached to a Network Switch, which is connected to my Laptop and my Router. Thanks to DHCP i have an internet connection on interface eno1. But now I want to add another network interface on the Server with a static ip, to make a local network with my laptop and my server while keeping the server connected to the internet via the switch+Router with its configured eno1 network interface.
Couple things (30,000 foot view).

1. Is the network switch also dishing out a DHCP address (some do) along with your router?
2. If the server has been assigned an IP via DHCP, I would think that your laptop is on the same network as the server, no?

If 2 is true, then what you can do is hop on the server (assuming you have a monitor on it also) and simply remove the dhcp service and assign the nic a static IP within the range that either your switch or router is handing out).
If you can't access the console physically, and you already know the IP address and assuming you can ping it from the laptop, simply ssh into it and triple check your settings before you restart the network services. Not the best option to do but do-able.

For further reading on working with your interfaces, look here: https://wiki.debian.org/NetworkConfiguration
Supercalifragilisticexpialidocious

User avatar
Soapm
Posts: 602
Joined: 2012-05-22 04:23
Has thanked: 1 time

Re: [Software] Networking for Beginners

#5 Post by Soapm »

karottenkopf wrote: 2023-01-27 10:58

Code: Select all

iface eno1 inet6 static
address xxx:xxx/nn
gateway xxx:xxx
For details, see man interfaces.
Question, what command do you use or how do you get the gateway ipv6 address?

karottenkopf
Posts: 5
Joined: 2023-01-27 10:41
Has thanked: 3 times

Re: [Software] Networking for Beginners

#6 Post by karottenkopf »

VLAN was the solution to my problem! thank you all for the quick answers!

Aki
Global Moderator
Global Moderator
Posts: 2816
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 68 times
Been thanked: 382 times

Re: [Software] Networking for Beginners

#7 Post by Aki »

Hello,
karottenkopf wrote: 2023-03-31 19:30 VLAN was the solution to my problem! thank you all for the quick answers!
Can you share working configuration files ?
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

karottenkopf
Posts: 5
Joined: 2023-01-27 10:41
Has thanked: 3 times

Re: [Software] Networking for Beginners

#8 Post by karottenkopf »

It was a server i set up for testing, so I don't have the files anymore. But to connect to multiple networks with the same network interface, VLAN was the solution which worked for me.

Aki
Global Moderator
Global Moderator
Posts: 2816
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 68 times
Been thanked: 382 times

Re: [Software] Networking for Beginners

#9 Post by Aki »

Hello,

Thank you for updating the thread.

It could be useful for other viewers to mark the thread as "Solved" putting the prefix "[Solved]" before the subject of the first message of the thread, for example:
[Software] [Solved] Networking for Beginners
Thanks.
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

Post Reply