<?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
3560(vlan)#vtp server
Device mode already VTP SERVER.
3560(vlan)#vtp domain 100
Changing VTP domain name from NULL to 100
3560(vlan)#vlan 2 name 2
VLAN 2 added:
Name: 2
3560(vlan)#vlan 3 name 3
VLAN 3 added:
Name: 3
3560(config)#interface fa0/1
3560(config-if)#switchport mode trunk
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
2960#vlan database
2960(vlan)#vtp client
Setting device to VTP CLIENT mode.
2960(vlan)#vtp domain 100
Domain name already set to 100.
2960#config t
Enter configuration commands, one per line. End with CNTL/Z.
2960(config)#interface fa0/1
2960(config-if)#switchport mode trunk
2960(config-if)#interface fa0/2
2960(config-if)#switchport mode access
2960(config-if)#switchport access vlan 2
2960(config-if)#interface fa0/3
2960(config-if)#switchport mode access
2960(config-if)#switchport access vlan 2
2960(config-if)#interface fa0/4
2960(config-if)#switchport mode access
2960(config-if)#switchport access vlan 3
2960(config-if)#interface fa0/5
2960(config-if)#switchport mode access
2960(config-if)#switchport access vlan 3
3560(config)#ip routing
3560(config)#interface vlan 2
%LINK-5-CHANGED: Interface Vlan2, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan2, changed state to up3560(config-if)#
3560(config-if)#ip addr 192.168.20.1 255.255.255.0
3560(config-if)#no shut
3560(config-if)#interface vlan 3
%LINK-5-CHANGED: Interface Vlan3, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan3, changed state to up3560(config-if)#
3560(config-if)#ip addr 192.168.30.1 255.255.255.0
3560(config-if)#no shut
转载于:https://blog.51cto.com/jiangxinlong/293622