虚拟化的Linux防火墙作为Cisco交换机上的路由器

我有:

Linux(virtual maschine on esxi) <---trunk---> cisco Switch. 

在虚拟机上vSwitch设置:

 VLAN ID 4095 Enables trunking on port group (VGT Mode) 

LINUX接口文件:

 auto eth0 iface eth0 inet static address xxx.xx.xx.x netmask 255.255.255.0 gateway xxx.xx.xx.z auto eth1 iface eth1 inet static address 192.168.63.254 netmask 255.255.192.0 auto eth1.10 iface eth1.10 inet static address 192.168.63.254 netmask 255.255.192.0 auto eth1.99 iface eth1.99 inet static address 10.50.50.1 netmask 255.255.255.0 

modprobe 8021q已启用。 当我做 :

 cat /proc/net/vlan/config 

我懂了:

 VLAN Dev name | VLAN ID Name-Type: VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD eth1.10 | 10 | eth1 eth1.99 | 99 | eth1 

所以我想vlans是积极的。

思科交换机设置端口连接到Linux:

 switchport mode trunk switchport trunk native vlan 1 

客户端连接到开关在VLAN 10端口:

 ip 192.168.3.57 gateway 192.168.63.254 

无法ping 192.168.63.254 – 这个VLAN的网关。 我需要启用更多的东西或configuration是错误的?

您不能在两个单独的广播域中拥有相同的IP地址。 从eth1删除192.168.63.254

一旦你的路由sorting,我会假设你已经closures了防火墙,或允许合适的服务。从防火墙closures,然后如果需要,一旦事情正常工作,打开它。

您可能需要设置sysctl -w net.ipv4.ip_forward=1以便Linux系统在连接的子网之间路由。