Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
linux_router:network [2022-04-03 Sun wk13 11:12] – [Debian / Ubuntu Network - Interface Setup] baumkp | linux_router:network [2023-07-08 Sat wk27 10:13] (current) – [Debian / Ubuntu Network - Interface Setup] baumkp | ||
---|---|---|---|
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, | # and how to activate them. For more information, | ||
- | | + | |
+ | | ||
+ | | ||
# The loopback network interface | # The loopback network interface | ||
auto lo | auto lo | ||
Line 25: | Line 27: | ||
# The WAN network interface | # The WAN network interface | ||
- | auto eno1 | + | auto eno1 eno1:0 |
- | iface eno1 inet static | + | iface eno1 inet dhcp |
- | # set up ip address to access modem web page on WAN NIC | + | # dhcp for IP/DHCP WAN (static? for PPPOE) |
- | | + | # set up static |
- | netmask 255.255.255.0 | + | iface eno1:0 inet static |
- | | + | |
# 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 | + | address 192.168.1.1/24 |
- | | + | |
- | netmask 255.255.255.0 | + | |
- | broadcast | + | |
- | dns-nameservers 192.168.1.1 | + | |
bridge_stp off # disable Spanning Tree Protocol | bridge_stp off # disable Spanning Tree Protocol | ||
- | bridge_fd 9 # forwarding delay | + | |
- | bridge_hello 5 | + | |
- | bridge_maxage 60 | + | |
</ | </ | ||
++++ | ++++ | ||
Line 67: | Line 66: | ||
Each Ethernet hardware connection has its own defined unique MAC number, no need to define another. If Ethernet bonding were being used there maybe a need to use this stanza. | Each Ethernet hardware connection has its own defined unique MAC number, no need to define another. If Ethernet bonding were being used there maybe a need to use this stanza. | ||
#hwaddress ether xx: | #hwaddress ether xx: | ||
- | </ | ||
- | ++++ | ||
+ | The " | ||
+ | The old fashion way was to manual assign as follows: | ||
+ | address 192.168.1.32 | ||
+ | network 192.168.1.0 | ||
+ | netmask 255.255.255.0 | ||
+ | broadcast 192.168.1.255 | ||
+ | Perhaps this is still required in special cases? | ||
+ | |||
+ | </ | ||
+ | ++++ | ||
+ | Note: | ||
+ | *Use '' | ||
+ | *Use '' | ||
+ | References: | ||
+ | *[[https:// | ||
+ | *[[https:// | ||
=====Network - Netplan Setup===== | =====Network - Netplan Setup===== | ||
Line 107: | Line 120: | ||
ethernets: | ethernets: | ||
eno1: #start for pppoe and setup modem IP access | eno1: #start for pppoe and setup modem IP access | ||
- | dhcp4: no | + | dhcp4: |
- | dhcp6: no | + | dhcp6: |
addresses: | addresses: | ||
- [192.168.5.2/ | - [192.168.5.2/ | ||
Line 143: | Line 156: | ||
mode: sit | mode: sit | ||
remote: 216.218.142.50 | remote: 216.218.142.50 | ||
- | local: | + | local: |
addresses: | addresses: | ||
- " | - " | ||
Line 152: | Line 165: | ||
*'' | *'' | ||
*'' | *'' | ||
- | As this setup is for a router the gateway stanza must not be set "# | + | As this setup is for a router the gateway stanza must not be set "# |
+ | |||
+ | As the ipv6 tunnel uses the first to numerical ipv6/64 addresses; x:x:x:x::1 also the tunnel assigned gateway and x:x:x:x::2 the next simple ipv6 global static x:x:x:x::3 was used to identify the router. | ||
As this router has a DNS server the " | As this router has a DNS server the " | ||
Line 160: | Line 175: | ||
It is important that the network/ | It is important that the network/ | ||
Basically ensure that all items in file / | Basically ensure that all items in file / | ||
- | ++++'' | + | ++++'' |
< | < | ||
# This file describes the network interfaces available on your system | # This file describes the network interfaces available on your system | ||
Line 181: | Line 196: | ||
====ipv6 Hurricane Electric Setup notes==== | ====ipv6 Hurricane Electric Setup notes==== | ||
I set up the router network tunnel 6in4 to HEipv6. | I set up the router network tunnel 6in4 to HEipv6. | ||
+ | The main tunnel connection is set up in the main network configuration file(s).\\ | ||
My routing table had '' | My routing table had '' | ||
I looked for ways to adjust the netplan configuration, | I looked for ways to adjust the netplan configuration, | ||
To create and edit the service: '' | To create and edit the service: '' | ||
+ | ++++ipv6_start.service| | ||
< | < | ||
[Unit] | [Unit] | ||
Line 197: | Line 214: | ||
WantedBy=multi.user.target default.target | WantedBy=multi.user.target default.target | ||
</ | </ | ||
+ | ++++ | ||
*The final command is used to enable the command to run at start-up: '' | *The final command is used to enable the command to run at start-up: '' | ||
*This also needs to be performed after each time netplan apply is used: '' | *This also needs to be performed after each time netplan apply is used: '' | ||
Line 242: | Line 260: | ||
</ | </ | ||
Currently Ubuntu (20.04) defaults to netplan.io, where as Debian 10 does not. So in Debian the ''/ | Currently Ubuntu (20.04) defaults to netplan.io, where as Debian 10 does not. So in Debian the ''/ | ||
+ | |||
+ | I am using Debian 12 now and am moving back to / | ||
I wrote 2 scripts to switch between configuration: | I wrote 2 scripts to switch between configuration: | ||
++++ '' | ++++ '' | ||
< | < | ||
- | systemctl disable bind9 | + | #systemctl disable bind9 |
- | systemctl disable isc-dhcp-server | + | #systemctl disable isc-dhcp-server |
- | mv / | + | #systemctl disable nftables |
- | mv / | + | #systemctl disable pppoe |
+ | #mv / | ||
+ | #mv / | ||
+ | ln -sf / | ||
+ | #ln -sf / | ||
+ | ln -sf / | ||
+ | #ln -sf / | ||
</ | </ | ||
Line 256: | Line 282: | ||
++++ '' | ++++ '' | ||
< | < | ||
- | systemctl enable bind9 | + | #systemctl enable bind9 |
- | systemctl enable isc-dhcp-server | + | #systemctl enable isc-dhcp-server |
- | mv / | + | #systemctl enable nftables |
- | mv / | + | #systemctl enable pppoe |
+ | #mv / | ||
+ | #mv / | ||
+ | #mv / | ||
+ | #mv / | ||
+ | #ln -sf / | ||
+ | ln -sf / | ||
+ | #ln -sf / | ||
+ | ln -sf / | ||
</ | </ | ||
Use '' | Use '' |