vconfig创build的虚拟接口和中继 – 是否为该VLAN ID标记或标记的接口?

图

我正在尝试在基于Debian的路由器/防火墙(作为Hyper-V上的虚拟机存在),我们的核心交换机(HP Procurve 5406)以及通过WAN连接的远程HP ProCurve 2610上安装额外的VLAN透明局域网服务(TLS)链接。

让我们从networking边缘向后工作:Debian服务器有一个连接到eth0的外部连接。 内部接口是eth1,它直接从我们的Hyper-V主机连接到5406. eth1连接到的端口设置为Trk12。 2610连接到Trk9(中继了一大堆VLAN – Trk9是我们的TLS头)。 我可以从两台交换机上成功ping通我的VLAN的pipe理IP地址,但是我无法从任何一台交换机ping到基于Debian的路由器和防火墙上的新VLAN的虚拟接口。 现有的VLAN工作正常。

是什么赋予了? 端口eth1附加为中继,中继上的现有VLAN(ID 98)未标记,新的VLAN(标识198)被标记。 VLAN198在5406和2610上的Trk9上被标记。我可以从另一个交换机上ping其他交换机的pipe理IP(10.100.198.2和10.100.198.3)。 这个VLAN的工作原理 – 但是我不能和eth1.198的10.100.198.1通信。 我觉得我错过了一些基本的东西,但是这对我来说还是虚幻的。 我怀疑这个问题是用vconfig创build的eth1.198。 它应该通过标记的VLAN 198包正确? 但他们似乎无法比5406更进一步。

现有的VLAN 98上的通信正常工作。

从Debian框中:

eth1的:

eth1 Link encap:Ethernet HWaddr 00:15:5d:34:5e:03 inet addr:10.100.0.1 Bcast:10.100.255.255 Mask:255.255.0.0 inet6 addr: fe80::215:5dff:fe34:5e03/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:12179786 errors:0 dropped:0 overruns:0 frame:0 TX packets:20210532 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1586498028 (1.4 GiB) TX bytes:26154226278 (24.3 GiB) Interrupt:9 Base address:0xec00 

eth1.198:

 eth1.198 Link encap:Ethernet HWaddr 00:15:5d:34:5e:03 inet addr:10.100.198.1 Bcast:10.100.198.255 Mask:255.255.255.0 inet6 addr: fe80::215:5dff:fe34:5e03/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1496 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:72 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:3528 (3.4 KiB) 

#cat /proc/net/vlan/eth1.198:

 eth1.198 VID: 198 REORDER_HDR: 0 dev->priv_flags: 1 total frames received 0 total bytes received 0 Broadcast/Multicast Rcvd 0 total frames transmitted 72 total bytes transmitted 3528 total headroom inc 0 total encap on xmit 39 Device: eth1 INGRESS priority mappings: 0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0 EGRESS priority mappings: 

#ip路由

 10.100.198.0/24 dev eth1.198 proto kernel scope link src 10.100.198.1 206.174.64.0/20 dev eth0 proto kernel scope link src 206.174.66.14 10.100.0.0/16 dev eth1 proto kernel scope link src 10.100.0.1 default via 206.174.64.1 dev eth0 

#iptables -L -v

 Chain INPUT (policy DROP 6875 packets, 637K bytes) pkts bytes target prot opt in out source destination 41 4320 ACCEPT all -- lo any anywhere anywhere 11481 1560K ACCEPT all -- any any anywhere anywhere state RELATED,ESTABLISHED 107 8058 ACCEPT icmp -- any any anywhere anywhere 0 0 ACCEPT tcp -- eth1 any 10.100.0.0/24 anywhere tcp dpt:ssh 701 317K ACCEPT udp -- eth1 any anywhere anywhere udp dpts:bootps:bootpc Chain FORWARD (policy DROP 1 packets, 40 bytes) pkts bytes target prot opt in out source destination 156K 25M ACCEPT all -- eth1 any anywhere anywhere 215K 248M ACCEPT all -- eth0 eth1 anywhere anywhere state RELATED,ESTABLISHED 0 0 ACCEPT all -- eth1.198 any anywhere anywhere 0 0 ACCEPT all -- eth0 eth1.198 anywhere anywhere state RELATED,ESTABLISHED Chain OUTPUT (policy ACCEPT 13048 packets, 1640K bytes) pkts bytes target prot opt in out source destination 

从5406:

#show vlan ports trk12 detail

  Status and Counters - VLAN Information - for ports Trk12 VLAN ID Name | Status Voice Jumbo Mode ------- -------------------- + ---------- ----- ----- -------- 98 WIFI | Port-based No No Untagged 198 VLAN198 | Port-based No No Tagged 

您的Linux机器是Hyper-V虚拟机,所以我会假设它是Hyper-V的虚拟交换机,它正在过滤您的标记stream量。 您可以简单地解决这个问题:使用与eth1相同的虚拟networking为Hyper-V中的Debian VM创build新接口,并将VLAN ID设置为198。

为虚拟网络适配器设置VLAN ID

(取自social.technet.microsoft.com )

它会暴露在你的debian虚拟机作为eth2(大概),并有未标记的帧。 如果你更喜欢一个不同的名字(比如eth1.198),你应该可以使用ifrename或者udev来重命名它。