минимальный вариант конфига
# PORT
config ports 12 speed auto flow_control enable learning enable state enable
config ports 15 speed auto flow_control enable learning enable state enable
config ports 16 speed auto flow_control enable learning enable state enable
# VLAN
config vlan default delete 1-28
config vlan default add tagged 15-16
config vlan default advertisement disable
create vlan VLAN011 tag 11
config vlan VLAN011 add tagged 15-16
config vlan VLAN011 advertisement disable
create vlan VLAN012 tag 12
config vlan VLAN012 add tagged 15
config vlan VLAN012 add untagged 10
config vlan VLAN012 advertisement disable
# IP
config ipif System vlan default ipaddress 192.168.254.6/24 state enable proxy_arp disable
create ipif vl011 192.168.1.6/24 VLAN011 state enable proxy_arp disable
create ipif vl012 192.168.2.6/24 VLAN012 state enable proxy_arp disable
хост включен в п15,
Код:
gw2# ifconfig vlan11
vlan11: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet 192.168.1.5 netmask 0xffffff00 broadcast 192.168.1.255
ether 00:e0:4c:88:02:ad
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
vlan: 11 parent interface: rl1
gw2# route -n get 192.168.2.248
route to: 192.168.2.248
destination: 192.168.0.0
mask: 255.255.128.0
gateway: 192.168.1.6
interface: vlan11
flags: <UP,GATEWAY,DONE,STATIC>
recvpipe sendpipe ssthresh rtt,msec rttvar hopcount mtu expire
0 0 0 0 0 0 1500 0
$ ping -c1 192.168.2.248
PING 192.168.2.248 (192.168.2.248): 56 data bytes
--- 192.168.2.248 ping statistics ---
1 packets transmitted, 0 packets received, 100% packet loss
gw2# tcpdump -neXXvvvirl1 ether dst ff:ff:ff:ff:ff:ff and less 64
tcpdump: WARNING: rl1: no IPv4 address assigned
tcpdump: listening on rl1, link-type EN10MB (Ethernet), capture size 96 bytes
15:36:29.227485 00:19:5b:15:85:43 > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 64: vlan 12, p 7, ethertype ARP, arp who-has 192.168.2.248 tell 192.168.2.6
0x0000: ffff ffff ffff 0019 5b15 8543 8100 e00c ........[..C....
0x0010: 0806 0001 0800 0604 0001 0019 5b15 8543 ............[..C
0x0020: c0a8 0206 0000 0000 0000 c0a8 02f8 0000 ................
0x0030: 0000 0000 0000 0000 0000 0000 0000 0000 ................
gw2# tshark -V
Frame 8 (64 bytes on wire, 64 bytes captured)
Arrival Time: Jan 10, 2008 16:44:21.755566000
[Time delta from previous captured frame: 0.005208000 seconds]
[Time delta from previous displayed frame: 0.005208000 seconds]
[Time since reference or first frame: 4.052219000 seconds]
Frame Number: 8
Frame Length: 64 bytes
Capture Length: 64 bytes
[Frame is marked: False]
[Protocols in frame: eth:vlan:arp]
Ethernet II, Src: D-Link_15:85:43 (00:19:5b:15:85:43), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
Destination: Broadcast (ff:ff:ff:ff:ff:ff)
Address: Broadcast (ff:ff:ff:ff:ff:ff)
.... ...1 .... .... .... .... = IG bit: Group address (multicast/broadcast)
.... ..1. .... .... .... .... = LG bit: Locally administered address (this is NOT the factory default)
Source: D-Link_15:85:43 (00:19:5b:15:85:43)
Address: D-Link_15:85:43 (00:19:5b:15:85:43)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
Type: 802.1Q Virtual LAN (0x8100)
802.1Q Virtual LAN
111. .... .... .... = Priority: 7
...0 .... .... .... = CFI: 0
.... 0000 0000 1100 = ID: 12
Type: ARP (0x0806)
Trailer: 000000000000000000000000000000000000
Address Resolution Protocol (request)
Hardware type: Ethernet (0x0001)
Protocol type: IP (0x0800)
Hardware size: 6
Protocol size: 4
Opcode: request (0x0001)
Sender MAC address: D-Link_15:85:43 (00:19:5b:15:85:43)
Sender IP address: 192.168.2.6 (192.168.2.6)
Target MAC address: 00:00:00_00:00:00 (00:00:00:00:00:00)
Target IP address: 192.168.2.248 (192.168.2.248)