O ile wiem, wchodzi podstawowa konfiguracja sieci /etc/network/interfacesi system generuje tablicę routingu na podstawie tych informacji. Nauczono mnie również, że ogólnie /etc/network/interfacesjest to miejsce, w którym można na stałe dodawać niestandardowe polecenia w celu manipulowania tabelą routingu (czasami sugerowane jest także użycie /etc/rc.localniestandardowego skryptu /etc/network/if-up.d/). Ponadto można określić niestandardowe tabele routingu w /etc/iproute2/rt_tables.
- Czy są jakieś inne miejsca, które wpłyną na (główną) tabelę routingu?
- W szczególności, czy są jeszcze inne możliwości,
/etc/network/interfacesaby ręcznie dodawać / usuwać trasy na stałe?
- W szczególności, czy są jeszcze inne możliwości,
- Czy system z wieloma kartami sieciowymi ma koncepcję pierwotnych i drugorzędnych interfejsów sieciowych, czy tylko te sformułowania są pomocne dla użytkownika? (Podczas instalacji należy wybrać podstawowy, jeśli i
/etc/network/interfacesbędzie zawierać odpowiedni komentarz.) Jeśli taka koncepcja istnieje, gdzie można ją skonfigurować? - Czy są jakieś różnice w koncepcji tabeli routingu między Debian Squeeze a Debian Jessie?
Tłem mojego pytania jest to, że mam starszy system Debian Squeeze i nowy system Debian Jessie, które uruchamiają się z różnymi tabelami routingu, ale są (o ile wiem) skonfigurowane identycznie. Mógłbym ręcznie manipulować tabelą routingu, aby dopasować ją do moich potrzeb i sprawić, by zmiany były trwałe, /etc/network/interfacesale chcę zrozumieć, co się dzieje.
EDYTOWAĆ
Oto pliki konfiguracyjne obu komputerów. Zmieniłem pierwsze części każdego adresu IP ze względów prywatności. Jednak podsieci i części adresowe odpowiednich sieci nie uległy zmianie. /etc/network/interfaces.d/Katalogu na komputerze Jessie jest pusty.
/etc/iproute2/rt_tables na Jessie
#
# reserved values
#
255 local
254 main
253 default
0 unspec
#
# local
#
#1 inr.ruhep
/etc/iproute2/rt_tables na Squeeze
#
# reserved values
#
255 local
254 main
253 default
0 unspec
#
# local
#
#1 inr.ruhep
/etc/rc.local na Jessie
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
exit 0
/etc/rc.local na Squeeze
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
exit 0
/etc/network/interfaces na Jessie
# 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
auto eth1
iface eth1 inet static
address 143.103.155.254
netmask 255.255.255.0
network 143.103.155.0
gateway 143.103.155.254
# The primary network interface
auto eth2
iface eth2 inet static
address 27.126.19.194
netmask 255.255.255.248
network 27.126.19.192
broadcast 27.126.19.199
gateway 27.126.19.193
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 143.103.5.1
dns-search subdomain.domain.de
/etc/network/interfaces na Squeeze
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 143.103.155.254
netmask 255.255.255.0
network 143.103.155.0
gateway 143.103.155.254
auto eth2
iface eth2 inet static
address 27.126.19.194
netmask 255.255.255.248
network 27.126.19.192
broadcast 27.126.19.199
gateway 27.126.19.193
wyjście z ip route show table mainJessie
default via 143.103.155.254 dev eth1
143.103.155.0/24 dev eth1 proto kernel scope link src 143.103.155.254
27.126.19.192/29 dev eth2 proto kernel scope link src 27.126.19.194
wyjście z ip route show table mainSqueeze
27.126.19.192/29 dev eth2 proto kernel scope link src 27.126.19.194
143.103.155.0/24 dev eth0 proto kernel scope link src 143.103.155.254
default via 27.126.19.193 dev eth2
default via 143.103.155.254 dev eth0 scope link
wyjście z route -nJessie
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 143.103.155.254 0.0.0.0 UG 0 0 0 eth1
143.103.155.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
27.126.19.192 0.0.0.0 255.255.255.248 U 0 0 0 eth2
wyjście z route -nSqueeze
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
27.126.19.192 0.0.0.0 255.255.255.248 U 0 0 0 eth2
143.103.155.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 27.126.19.193 0.0.0.0 UG 0 0 0 eth2
0.0.0.0 143.103.155.254 0.0.0.0 UG 0 0 0 eth0
gatewayopcji jest ona rozumiana jako domyślna trasa przez ten interfejs. Czy na pewno chcesz domyślną trasę za pośrednictwem 2 interfejsów? Także dla eth0 / eth1 bramą jest sam serwer ... dlaczego?
gateway 143...z Jessie, nie ma w ogóle żadnego wpisu dla domyślnej trasy w route -nlub ip route?