Настраиваю VLAN. Изначально на компьютере есть только lo (см. /etc/network/interfaces)
auto lo
iface lo inet loopback
iskatel@iskatel-nb:$ netstat -ie
Kernel Interface table
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:47 errors:0 dropped:0 overruns:0 frame:0
TX packets:47 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2378 (2.3 KiB) TX bytes:2378 (2.3 KiB)
iskatel@iskatel-nb:~$ sudo ifconfig eth0 up
[sudo] password for root:
iskatel@iskatel-nb:~$ sudo vconfig add eth0 32
WARNING: Could not open /proc/net/vlan/config. Maybe you need to load the 8021q module, or maybe you are not using PROCFS??
Added VLAN with VID == 32 to IF -:eth0:-
iskatel@iskatel-nb:~$ ls /proc/net/vlan
config eth0.32
iskatel@iskatel-nb:~$ lsmod | grep '8021q'
8021q 19291 0
garp 13193 1 8021q
iskatel@iskatel-nb:~$ sudo ifconfig eth0.32 192.168.33.88 netmask 255.255.255.0 up
iskatel@iskatel-nb:~$ netstat -ie
Kernel Interface table
eth0 Link encap:Ethernet HWaddr f4:6d:04:a5:5c:99
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:159 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:13671 (13.3 KiB) TX bytes:0 (0.0 B)
Interrupt:40
eth0.32 Link encap:Ethernet HWaddr f4:6d:04:a5:5c:99
inet addr:192.168.33.88 Bcast:192.168.33.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:47 errors:0 dropped:0 overruns:0 frame:0
TX packets:47 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2378 (2.3 KiB) TX bytes:2378 (2.3 KiB)
Теперь через /etc/network/interfaces:
auto lo eth0 eth0.32
iface lo inet loopback
iface eth0.32 inet static
vlan-raw-device eth0
address 192.168.32.88
netmask 255.255.255.0
iskatel@iskatel-nb:~$ sudo invoke-rc.d networking restart
[....] Running /etc/init.d/networking restart is deprecated because it may not re-enable[warn interfaces ... (warning).
[....] Reconfiguring network interfaces...Ignoring unknown interface eth0=eth0.
Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
ERROR: trying to add VLAN #32 to IF -:eth0:- error: File exists
done.
В чём дело?