Network Interfaces

dynfulldomain hosted @ home

Network Interfaces

Netzwerk Schnittstellen werden in /etc/network/interfaces definiert.

meine sieht aus wie folgt :

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

 

# The loopback network interface
auto lo
iface lo inet loopback

 

# GiGE NET 1 Speedport Router0

iface enp2s0 inet static
address 192.168.0.5
netmask 255.255.255.0
gateway 192.168.0.1
post-up ip route add address 192.168.0.0/24 dev enp2s0 src address 192.168.0.5 table rt1
post-up ip route add default via address 192.168.0.1 dev enp2s0 table rt1
post-up ip rule add from address 192.168.0.5/32 table rt1 priority 100
post-up ip rule add to address 192.168.0.5/32 table rt1 priority 100
post-up ip route flush cache
pre-down ip rule del from 192.168.0.5/32 table rt1 priority 100
pre-down ip rule del to 192.168.0.5/32 table rt1 priority 100
pre-down ip route flush table rt1
pre-down ip route flush cache

 

# GiGE Net 2 Mikrotik Router1

iface enp3s0 inet static
address 192.168.1.7
netmask 255.255.255.0
gateway 192.168.1.1
post-up ip route add address 192.168.1.0/24 dev enp3s0 src address 192.168.1.7 table rt2
post-up ip route add default via address 192.168.1.1 dev enp3s0 table rt2
post-up ip rule add from address 192.168.1.7/32 table rt2 priority 110
post-up ip rule add to address 192.168.1.7/32 table rt2 priority 110
post-up ip route flush cache
pre-down ip rule del from 192.168.1.7/32 table rt2 priority 110
pre-down ip rule del to 192.168.1.7/32 table rt2 priority 110
pre-down ip route flush table rt2
pre-down ip route flush cache

 

# GigE NET 3 NC

iface enp4s0 inet manual

 

# This is an autoconfigured IPv6 interface
iface enp2s0 inet6 manual
pre-up /sbin/modprobe -q ipv6 ; /bin/true
iface enp3s0 inet6 manual
pre-up /sbin/modprobe -q ipv6 ; /bin/true