设定VLAN目让交换机同VLAN间互相通信若同VLAN间通信必须用三层交换或者依路由才能实现实现三层转发减少交换机内广播风暴
所VLAN10内部通 VLAN20内部通VLAN10VLAN20间若想再通信用面命令
前提交换机必须三层交换
int vlan 10
ip address 192.168.1.254 24
int vlan 20
ip address 192.168.2.254 24
int vlan 30
port eth0/24
ip address 192.168.0.2 255.255.255.252
int eth0/24
port link-type access
quit
ip route-static 0.0.0.0 0.0.0.0 192.168.0.1
quit
面交换机
路由配
int eth0/0
ip address 192.168.0.1 255.255.255.252
ip route-static 192.168.1.0 255.255.255.0 192.168.0.2
ip route-static 192.168.2.0 255.255.255.0 192.168.0.2