Switch>en Switch#conf t Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#ho core-1 core-1(config)#int range f0/1 - 3 core-1(config-if-range)#switchport trunk enca ;修改封装类型 core-1(config-if-range)#switchport trunk encapsulation dot1q core-1(config-if-range)#sw m t core-1(config-if-range)#exit core-1(config)#vtp mode server Device mode already VTP SERVER. core-1(config)#vtp domain d1 Changing VTP domain name from NULL to d1 core-1(config)#vlan 10 core-1(config-vlan)#exit core-1(config)#vlan 20 core-1(config-vlan)#exit core-1(config)#vlan 30 core-1(config-vlan)#exit core-1(config)#vlan 40 core-1(config-vlan)#exit core-1(config)#vlan 50 core-1(config-vlan)#exit core-1(config)#vlan 60 core-1(config-vlan)#exit core-1(config)#no vlan 60
二层交换机配置vlan
1 2 3 4 5 6
Switch(config)#int range f0/1 - 2 Switch(config-if-range)#sw m t ;配置trunk Switch(config-if-range)#exit Switch(config)#int f0/3 Switch(config-if)#sw ac vl 10 ;配置switchport access Switch(config-if)#exit
core-1(config)#ip routing core-1(config)#int vlan 10 core-1(config-if)# %LINK-5-CHANGED: Interface Vlan10, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up
core-1(config-if)#ip add 10.1.1.252 255.255.255.0 core-1(config-if)#ip helper core-1(config-if)#ip helper-address 50.1.1.1 core-1(config-if)#standby 10 ip 10.1.1.254 255.255.255.0 ^ % Invalid input detected at '^' marker. core-1(config-if)#standby 10 ip 10.1.1.254 core-1(config-if)#standby 10 priority 200 core-1(config-if)#stand %HSRP-6-STATECHANGE: Vlan10 Grp 10 state Speak -> Standby
%HSRP-6-STATECHANGE: Vlan10 Grp 10 state Standby -> Active by core-1(config-if)#standby 10 preempt core-1(config-if)#standby 10 track f0/4 core-1(config-if)#no sh core-1(config-if)#int vlan 20 core-1(config-if)# %LINK-5-CHANGED: Interface Vlan20, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up
core-1(config-if)#ip add 20.1.1.252 255.255.255.0 core-1(config-if)#ip helper-address 50.1.1.1 core-1(config-if)#standby 20 ip 20.1.1.254 core-1(config-if)#standby 20 priority 200 core-1(config-if)#standby 20 %HSRP-6-STATECHANGE: Vlan20 Grp 20 state Speak -> Standby p %HSRP-6-STATECHANGE: Vlan20 Grp 20 state Standby -> Active reempt core-1(config-if)#standby 20 preempt core-1(config-if)#standby 20 track f0/4 core-1(config-if)#no sh core-1(config-if)#exit core-1(config)#int vlan 30 core-1(config-if)# %LINK-5-CHANGED: Interface Vlan30, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan30, changed state to up
core-1(config-if)#ip add 30.1.1.252 255.255.255.0 core-1(config-if)#ip helper-address 50.1.1.1 core-1(config-if)#standby 30 ip 30.1.1.254 core-1(config-if)#standby 30 priority 195 core-1(config-if)#s %HSRP-6-STATECHANGE: Vlan30 Grp 30 state Speak -> Standby tand %HSRP-6-STATECHANGE: Vlan30 Grp 30 state Standby -> Active by core-1(config-if)#standby 30 preempt core-1(config-if)#standby 30 track f0/4 core-1(config-if)#no sh core-1(config-if)#exit core-1(config)#int vlan 40 core-1(config-if)# %LINK-5-CHANGED: Interface Vlan40, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan40, changed state to up
Router>en Router#conf t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#int f0/0 Router(config-if)#ip add 60.1.1.2 255.255.255.0 Router(config-if)#no sh
Router(config-if)# %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up exit Router(config)#int f0/1 Router(config-if)#ip add 70.1.1.2 255.255.255.0 Router(config-if)#no sh Router(config-if)# %LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up exit Router(config)#int f1/0 Router(config-if)#ip add 80.1.1.1255.255.255.0 Router(config-if)#no sh Router(config-if)# %LINK-5-CHANGED: Interface FastEthernet1/0, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to up exit Router(config)#ip route 90.1.1.0255.255.255.080.1.1.2 Router(config)#ip route 100.1.1.0255.255.255.080.1.1.2 Router(config)#ip route 10.1.1.0255.255.255.060.1.1.1 Router(config)#ip route 10.1.1.0255.255.255.070.1.1.12 Router(config)#ip route 20.1.1.0255.255.255.060.1.1.1 Router(config)#ip route 20.1.1.0255.255.255.070.1.1.12 Router(config)#ip route 30.1.1.0255.255.255.070.1.1.1 Router(config)#ip route 30.1.1.0255.255.255.060.1.1.12 Router(config)#ip route 40.1.1.0255.255.255.070.1.1.1 Router(config)#ip route 40.1.1.0255.255.255.060.1.1.12 Router(config)#ip route 50.1.1.0255.255.255.060.1.1.1 Router(config)#ip route 50.1.1.0255.255.255.070.1.1.12 Router(config)#exit Router# %SYS-5-CONFIG_I: Configured from console by console