一。中心交换的VLAN配置
1.激活vlan路由
Switch1#config
Switch1(config)#ip routing
2.创建三个VLAN
Switch1#
Switch1#vlan database
Switch1(vlan)#vlan 2
Switch1(vlan)#vlan 3
Switch1(vlan)#vlan 10
Switch1(vlan)#exit
3.给VLAN分配IP
Switch1#config
Switch1(config)#config vlan2
Switch1(config-if)#ip address 192.168.2.1 255.255.255.0
Switch1(config-if)#no shutdown
Switch1#config
Switch1(config)#config vlan3
Switch1(config-if)#ip address 192.168.3.1 255.255.255.0
Switch1(config-if)#no shutdown
Switch1#config
Switch1(config)#config vlan10
Switch1(config-if)#ip address 192.168.10.1 255.255.255.0
Switch1(config-if)#no shutdown
4.配VTP
Switch1#
Switch1#config
Switch1(config)#vtp domain china_mobile
Switch1(config)#vtp mode server
Switch1(config)#end
5.配Trunk
Switch1#
Switch1#config
Switch1(config)#interface gigabitethernet0/1
Switch1(config-if)#switchport trunk encapsulation isl
Switch1(config-if)#switchport mode trunk
Switch1(config-if)#end
6.给中心交换机通往路由器的接口配IP
Switch1#
Switch1#config
Switch1(config)#interface fastethernet0/1
Switch1(config-if)#no switchport
Switch1(config-if)#ip address 200.1.1.1 255.255.255.0
Switch1(config-if)#no shutdown