Mam dwa komputery z Linuksem, oba widzą się poprzez interfejs eth2 (jeden pinguję drugiego na interfejsie eth2). Postanowiłem stworzyć połączenie pomiędzy tymi komputerami przez interfejs VLAN. No i niestety nie pingują się na tym interfejsie. Wszystko działa na VirtualBoxie. Poniżej konfiguracja. Doradźcie coś...
Komputer1: ifconfig eth2
Kod: Zaznacz cały
[root@localhost network-scripts]# ifconfig eth2
eth2 Link encap:Ethernet HWaddr 08:00:05:01:02:AB
inet addr:172.16.0.1 Bcast:172.16.0.255 Mask:255.255.255.0
inet6 addr: fe80::a00:5ff:fe01:2ab/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:104 errors:0 dropped:0 overruns:0 frame:0
TX packets:173 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9880 (9.6 KiB) TX bytes:10714 (10.4 KiB)
Base address:0xd048 Memory:f0840000-f0860000
Kod: Zaznacz cały
[root@localhost network-scripts]# ifconfig eth2.5
eth2.5 Link encap:Ethernet HWaddr 08:00:05:01:02:AB
inet addr:10.0.0.1 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::a00:5ff:fe01:2ab/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:720 (720.0 b)
Kod: Zaznacz cały
[root@localhost network-scripts]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 * 255.255.255.0 U 0 0 0 eth2.5
172.16.0.0 * 255.255.255.0 U 0 0 0 eth2
Kod: Zaznacz cały
[root@localhost network-scripts]# ifconfig eth2
eth2 Link encap:Ethernet HWaddr 08:00:11:02:02:AB
inet addr:172.16.0.2 Bcast:172.16.0.255 Mask:255.255.255.0
inet6 addr: fe80::a00:11ff:fe02:2ab/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:113 errors:0 dropped:0 overruns:0 frame:0
TX packets:138 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7654 (7.4 KiB) TX bytes:11320 (11.0 KiB)
Base address:0xd048 Memory:f0840000-f0860000
Kod: Zaznacz cały
[root@localhost network-scripts]# ifconfig eth2.5
eth2.5 Link encap:Ethernet HWaddr 08:00:11:02:02:AB
inet addr:10.0.0.2 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::a00:11ff:fe02:2ab/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:1098 (1.0 KiB)
Kod: Zaznacz cały
[root@localhost network-scripts]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 * 255.255.255.0 U 0 0 0 eth2.5
172.16.0.0 * 255.255.255.0 U 0 0 0 eth2
Kod: Zaznacz cały
[root@localhost network-scripts]# ping -c 3 -I eth2 172.16.0.1
PING 172.16.0.1 (172.16.0.1) from 172.16.0.2 eth2: 56(84) bytes of data.
64 bytes from 172.16.0.1: icmp_seq=1 ttl=64 time=1.36 ms
64 bytes from 172.16.0.1: icmp_seq=2 ttl=64 time=1.28 ms
64 bytes from 172.16.0.1: icmp_seq=3 ttl=64 time=0.791 ms
--- 172.16.0.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.791/1.144/1.360/0.251 ms
Kod: Zaznacz cały
[root@localhost network-scripts]# ping -c 3 -I eth2.5 10.0.0.1
PING 10.0.0.1 (10.0.0.1) from 10.0.0.2 eth2.5: 56(84) bytes of data.
From 10.0.0.2 icmp_seq=1 Destination Host Unreachable
From 10.0.0.2 icmp_seq=2 Destination Host Unreachable
From 10.0.0.2 icmp_seq=3 Destination Host Unreachable
--- 10.0.0.1 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2010ms
, pipe 3