目录
网络拓扑图如下所示:
由上图可知,现在交换机上划分四个VLAN ,每个VLAN的接口地址如上图所示,现将交换机VLAN1接口与海蜘蛛路由LAN口相连,各VLAN通过VLAN1上网。
这里以华为s3526c为例,配置如下:
# vlan 1 # vlan 2 # vlan 3 # vlan 4 # interface Vlan-interface1 ip address 172.16.1.1 255.255.255.0 # interface Vlan-interface2 ip address 172.16.2.1 255.255.255.0 # interface Vlan-interface3 ip address 172.16.3.1 255.255.255.0 # interface Vlan-interface4 ip address 172.16.4.1 255.255.255.0 # interface Aux0/0 # interface Ethernet0/1 flow-control # interface Ethernet0/2 flow-control # interface Ethernet0/3 # interface Ethernet0/4 # interface Ethernet0/5 # interface Ethernet0/6 # interface Ethernet0/7 port access vlan 2 # interface Ethernet0/8 port access vlan 2 # interface Ethernet0/9 port access vlan 2 # interface Ethernet0/10 port access vlan 2 # interface Ethernet0/11 port access vlan 2 # interface Ethernet0/12 port access vlan 2 # interface Ethernet0/13 port access vlan 3 # interface Ethernet0/14 port access vlan 3 # interface Ethernet0/15 port access vlan 3 # interface Ethernet0/16 port access vlan 3 # interface Ethernet0/17 port access vlan 3 # interface Ethernet0/18 port access vlan 3 # interface Ethernet0/19 port access vlan 4 # interface Ethernet0/20 port access vlan 4 # interface Ethernet0/21 port access vlan 4 # interface Ethernet0/22 port access vlan 4 # interface Ethernet0/23 port access vlan 4 # interface Ethernet0/24 port access vlan 4 # interface GigabitEthernet1/1 # interface NULL0 # ip route-static 0.0.0.0 0.0.0.0 172.16.1.2 preference 60