- 论坛徽章:
- 0
|
回复 3# 瀚海书香
回瀚海书香版主,具体情况是这样的。当数据通过网桥的时候(处理点需要在网桥上)需要将指定的数据包钩到三层去做IPSEC加密。
没有VLAN标签的时候 是将ipv4的数据包勾上去, 将arp 透过去,两条ebtables命令。
而有了VLAN标签之后 二层头后面的type已经设为VLAN ,8100. 此时如果想用ebtables redirect 重定向数据包的时候如何将 IPV4 和 ARP的数据包进行分类呢?
ebtables 中有提到过对vlan的处理
vlan
Specify 802.1Q Tag Control Information fields. The protocol must be specified as 802_1Q (0x8100).
--vlan-id [!] id
The VLAN identifier field (VID). Decimal number from 0 to 4095.
--vlan-prio [!] prio
The user priority field, a decimal number from 0 to 7. The VID should be set to 0 ("null VID") or unspecified (in the latter case the VID is deliberately set to 0).
--vlan-encap [!] type
The encapsulated Ethernet frame type/length. Specified as a hexadecimal number from 0x0000 to 0xFFFF or as a symbolic name from /etc/ethertypes.
而在我的网络中vlan没有优先级, arp和ip数据包的vlanid是相同的,
我启用了第三种情况--vlan-encap
ebtables -t broute -A BROUTING -p 802_1Q --logical-in br0 --vlan-encap IPv4 -j redirect
问题是 100.1 启用了这条命令。
100.100 却找不到他的arp了呢? 这条命令应该不会对arp进行处理才对呀。
而对端PC的地址100.200 的arp 。 在本端 PC是可以学到的。
|
|