Prawidlowy plik /etc/network/interfaces dla konf z VLAN i BRIDGE dla XENa
Witam,
chcialbym sie dowiedziec, czy ponizszy plik
ma prawidlowa budowe/konstrukcje, poniewaz
przy probie rekonfiguracji ustawien sieciowych
zawsze dostaje pewne bledy (ale rekonfiguracja udaje sie).
Na maszynce siedzi sobie XEN, ktorego virtualki korzystaja
z roznych VLANow
~# cat /etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback
########################################################
#karta wbudowana - eth0 - TRUNK
auto eth0
iface eth0 inet manual
#karta 100Mb 3Com - eth1
auto eth1
iface eth1 inet manual
#karta 1Gb INTEL - eth2 - TRUNK
auto eth2
iface eth2 inet manual
########################################################
# VLANy
auto eth0.19
iface eth0.19 inet manual
vlan_raw_device eth0
auto eth0.20
iface eth0.20 inet manual
vlan_raw_device eth0
auto eth0.21
iface eth0.21 inet manual
vlan_raw_device eth0
# interfejsy dla virtualek mostkowane z VLANami
auto br19
iface br19 inet manual
bridge_ports eth0.19
bridge_fd 2
auto br20
iface br20 inet manual
bridge_ports eth0.20
bridge_fd 2
auto br21
iface br21 inet manual
bridge_ports eth0.21
bridge_fd 2
# interfejs zarzadzajacy serwerem
auto eth2.211
iface eth2.211 inet static
address 192.168.73.170
netmask 255.255.255.0
network 192.168.73.0
gateway 192.168.73.254
broadcast 192.168.73.255
vlan_raw_device eth2
~# /etc/init.d/networking restart
Reconfiguring network interfaces...
Removed VLAN -:eth0.19:-
Removed VLAN -:eth0.20:-
Removed VLAN -:eth0.21:-
eth0.19: ERROR while getting interface flags: No such device
eth0.20: ERROR while getting interface flags: No such device
eth0.21: ERROR while getting interface flags: No such device
Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
Added VLAN with VID == 19 to IF -:eth0:-
Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
Added VLAN with VID == 20 to IF -:eth0:-
Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
Added VLAN with VID == 21 to IF -:eth0:-
Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
Added VLAN with VID == 211 to IF -:eth0:-
Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
ERROR: trying to add VLAN #19 to IF -:eth0:- error: File exists
Waiting for br19 to get ready (MAXWAIT is 6 seconds).
Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
ERROR: trying to add VLAN #20 to IF -:eth0:- error: File exists
Waiting for br20 to get ready (MAXWAIT is 6 seconds).
Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
ERROR: trying to add VLAN #21 to IF -:eth0:- error: File exists
Waiting for br211 to get ready (MAXWAIT is 6 seconds).
Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
Added VLAN with VID == 211 to IF -:eth2:-
done.
Stan po rekonfiguracji:
~# cat /proc/net/vlan/config
VLAN Dev name | VLAN ID
Name-Type: VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD
eth0.19 | 19 | eth0
eth0.20 | 20 | eth0
eth0.21 | 21 | eth0
eth2.211 | 211 | eth2
i wszystko dziala jak nalezy.
--
Tomasz Czachorowski
Reply to: