大网数据广告活动
服务器运维问答

Can Centos be configured to route private vlans?

· 52CE 我爱测

So you can configure eth0 with vlan100: VLAN=yes VLAN_NAME_TYPE=VLAN_PLUS_VID_NO_PAD DEVICE=vlan100 PHYSDEV=eth0 BOOTPROTO=static ONBOOT=yes TYPE=Ethernet IPADDR=10.10.10.1 NETMASK=255.255.255.0 Now the interface will see traffic…

问题原文

原帖链接 · Dre_Dre · CC BY-SA 3.0

So you can configure eth0 with vlan100:

VLAN=yes
VLAN_NAME_TYPE=VLAN_PLUS_VID_NO_PAD
DEVICE=vlan100
PHYSDEV=eth0
BOOTPROTO=static
ONBOOT=yes
TYPE=Ethernet
IPADDR=10.10.10.1
NETMASK=255.255.255.0

Now the interface will see traffic tagged with vlan 100.

I can configure Centos to forward vlan100 packets to where ever.

Now suppose I have multiple private vlans inside of vlan 100?

Vlan 103, vlan 104.

How would I get the interface to see the private vlans?

已采纳解答

原帖链接 · Erik · CC BY-SA 3.0

You want 802.1q tunneling, or QinQ. See this:

http://www.microhowto.info/howto/configure_an_ethernet_interface_as_a_qinq_vlan_trunk.html

ip link add link eth0 eth0.100 type vlan proto 802.1ad id 100
ip link add link eth0.100 eth0.100.103 type vlan proto 802.1Q id 103
ip link set eth0 up
ip link set eth0.100 up

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-01-24)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。