Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux_router:network [2023-07-08 Sat wk27 09:21] – [Debian / Ubuntu Network - Interface Setup] baumkplinux_router:network [2025-08-17 Sun wk33 08:23] (current) – [ipv6 Hurricane Electric Setup notes] baumkp
Line 1: Line 1:
 {{tag>linux Debian Ubuntu router network netplan interface vlan ipv6 ip}} {{tag>linux Debian Ubuntu router network netplan interface vlan ipv6 ip}}
-======Debian / Ubuntu Network Setup======+======Debian Server Network Setup======
  
-====Debian / Ubuntu Network - Interface Setup=====+====Debian Network - Server Interface Setup=====
  
 As of Debian 10 (Buster) Debian still by default uses this interface Setup.  It can be setup to use netplan inface.\\ As of Debian 10 (Buster) Debian still by default uses this interface Setup.  It can be setup to use netplan inface.\\
Line 19: Line 19:
   # This file describes the network interfaces available on your system   # This file describes the network interfaces available on your system
   # and how to activate them. For more information, see interfaces(5).   # and how to activate them. For more information, see interfaces(5).
-  source /etc/network/interfaces.d/*+   
 +  source /etc/network/interfaces.d/* 
 +  
   # The loopback network interface   # The loopback network interface
   auto lo   auto lo
Line 27: Line 29:
   auto eno1 eno1:0   auto eno1 eno1:0
   iface eno1 inet dhcp   iface eno1 inet dhcp
-  # dhcp for IP/DHCP WAN static for PPPOE+  # dhcp for IP/DHCP WAN (staticfor PPPOE)
   # set up static ip address to access modem web page on WAN NIC    # set up static ip address to access modem web page on WAN NIC 
   iface eno1:0 inet static   iface eno1:0 inet static
-    # set up ip address to access modem web page on WAN NIC  
     address 192.168.5.2/24     address 192.168.5.2/24
   
   # Then LAN networks are eno2 eno3 eno4 in bridged mode br1   # Then LAN networks are eno2 eno3 eno4 in bridged mode br1
   # on the 192.168.1.1 subnet   # on the 192.168.1.1 subnet
-  auto br1 +  auto br0 
-  iface br1 inet static+  iface br0 inet static
     bridge_ports eno2 eno3 eno4     bridge_ports eno2 eno3 eno4
     address 192.168.1.1/24     address 192.168.1.1/24
-    dns-nameservers 192.168.1.1+    dns-nameservers 192.168.1.14 192.168.1.2 9.9.9.9
     bridge_stp off  # disable Spanning Tree Protocol     bridge_stp off  # disable Spanning Tree Protocol
     #bridge_fd 9  # forwarding delay  # use default?     #bridge_fd 9  # forwarding delay  # use default?
Line 85: Line 86:
  
 =====Network - Netplan Setup===== =====Network - Netplan Setup=====
 +++++tl;dr;|
 Debian still defaults to the interface style network setup. It can be set up to use netplan.  It is very importqant to remember after installing and setting up netplan to disable the interfaces setup.  This can be simply done by deleting, renaming, empting or commenting out the interfaces setup file.\\ Debian still defaults to the interface style network setup. It can be set up to use netplan.  It is very importqant to remember after installing and setting up netplan to disable the interfaces setup.  This can be simply done by deleting, renaming, empting or commenting out the interfaces setup file.\\
  
Line 109: Line 110:
  
 The remaining 3 NICs are setup in bridge mode as router LAN ports. When setup in bridge mode the 3 ports effectively act as a switch with any able to access the router LAN on 192.168.1.1 . The remaining 3 NICs are setup in bridge mode as router LAN ports. When setup in bridge mode the 3 ports effectively act as a switch with any able to access the router LAN on 192.168.1.1 .
 +++++
 See the Netplan configuration below:  See the Netplan configuration below: 
 ++++''sudo vim /etc/netplan/network.yaml''| ++++''sudo vim /etc/netplan/network.yaml''|
Line 160: Line 161:
       gateway6: "2001:470:1f2c:10d::1"       gateway6: "2001:470:1f2c:10d::1"
 </code> </code>
-++++ 
   *''sudo netplan --debug apply'' To apply any changes to the network configuration.   *''sudo netplan --debug apply'' To apply any changes to the network configuration.
   *''sudo netplan --debug generate'' To generate backend specific configuration files.   *''sudo netplan --debug generate'' To generate backend specific configuration files.
Line 171: Line 171:
  
 The use of the stanza "optional: true" on the LAN bridged NICs means during startup the system does not need to wait for these NICs to come up, potentially saving some boot time. The WAN NIC is required, so the optional sanza is not used here. The use of the stanza "optional: true" on the LAN bridged NICs means during startup the system does not need to wait for these NICs to come up, potentially saving some boot time. The WAN NIC is required, so the optional sanza is not used here.
 +++++
 It is important that the network/interfaces method is disable or strange difficult to diagnose network affect may happen. It is important that the network/interfaces method is disable or strange difficult to diagnose network affect may happen.
 Basically ensure that all items in file /etc/network/interfaces are commented out. For example: Basically ensure that all items in file /etc/network/interfaces are commented out. For example:
Line 194: Line 194:
  
 ====ipv6 Hurricane Electric Setup notes==== ====ipv6 Hurricane Electric Setup notes====
 +++++tl;dr;|
 I set up the router network tunnel 6in4 to HEipv6.  I could IPv6 ping WAN from the router, but could not so ping WAN from elsewhere on the local area network (lan).\\ I set up the router network tunnel 6in4 to HEipv6.  I could IPv6 ping WAN from the router, but could not so ping WAN from elsewhere on the local area network (lan).\\
 The main tunnel connection is set up in the main network configuration file(s).\\ The main tunnel connection is set up in the main network configuration file(s).\\
 My routing table had ''2001:470:1f2c:10d::/64 dev he-ipv6 proto kernel metric 256 pref medium'', I found that removing this from the routing table allowed remote lan access to function: The one off command to do this: ''sudo ip r del 2001:470:1f2c:10d::/64 dev he-ipv6''.\\ My routing table had ''2001:470:1f2c:10d::/64 dev he-ipv6 proto kernel metric 256 pref medium'', I found that removing this from the routing table allowed remote lan access to function: The one off command to do this: ''sudo ip r del 2001:470:1f2c:10d::/64 dev he-ipv6''.\\
-I looked for ways to adjust the netplan configuration, either to stop this line from being added, or increase its metric, but to no avail.  So I created the following systemd service to perform this function on start-up after the network was up."\\+I looked for ways to adjust the netplan configuration, either to stop this line from being added, or increase its metric, but to no avail.  So I created the following systemd service to perform this function on start-up after the network was up."\\ ++++
 To create and edit the service: ''sudo systemctl edit --force --full ipv6_start.service'', ''man systemctl'' and search for  To create and edit the service: ''sudo systemctl edit --force --full ipv6_start.service'', ''man systemctl'' and search for 
 ++++ipv6_start.service| ++++ipv6_start.service|