--- System Configuration Dialog ---
Continuewith configuration dialog? [yes/no]: no
Press RETURNtoget started!
Router>enable
Router#configure terminal
Enter configuration commands, one per line. Endwith CNTL/Z.
Router(config)#interface f0/0
Router(config-if)#ip add
Router(config-if)#ip address 192.168.1.254 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol onInterface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#interface f0/1
Router(config-if)#ip address 192.168.2.254 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol onInterface FastEthernet0/1, changed state to up
Router(config-if)#^Z
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#wr
Building configuration...
[OK]
Router#
Switch>
Switch>enable
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 2Switch(config-vlan)#name vlan2Switch(config-vlan)#vlan 3Switch(config-vlan)#name vlan3Switch(config-vlan)#vlan 4Switch(config-vlan)#name vlan4Switch(config)#exit Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1default active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/242 vlan2 active
3 vlan3 active
4 vlan4 active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 1000011500 - - - - - 002 enet 1000021500 - - - - - 003 enet 1000031500 - - - - - 004 enet 1000041500 - - - - - 001002 fddi 1010021500 - - - - - 001003 tr 1010031500 - - - - - 001004 fdnet 1010041500 - - - ieee - 001005 trnet 1010051500 - - - ibm - 00
Remote SPAN VLANs
------------------------------------------------------------------------------
Primary Secondary Type Ports
------- --------- ----------------- ------------------------------------------
Switch#Switch(config)#interface range f0/1-2Switch(config-if-range)#switchport mode access Switch(config-if-range)#switchport access vlan 2Switch(config-if-range)#interface range f0/10-11Switch(config-if-range)#switchport access vlan 3Switch(config-if-range)#interface range f0/20-21Switch(config-if-range)#switchport access vlan 4Switch(config-if-range)#^ZSwitch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1default active Fa0/3, Fa0/4, Fa0/5, Fa0/6
Fa0/7, Fa0/8, Fa0/9, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/22
Fa0/23, Fa0/242 vlan2 active Fa0/1, Fa0/23 vlan3 active Fa0/10, Fa0/114 vlan4 active Fa0/20, Fa0/211002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 1000011500 - - - - - 002 enet 1000021500 - - - - - 003 enet 1000031500 - - - - - 004 enet 1000041500 - - - - - 001002 fddi 1010021500 - - - - - 001003 tr 1010031500 - - - - - 001004 fdnet 1010041500 - - - ieee - 001005 trnet 1010051500 - - - ibm - 00
Remote SPAN VLANs
------------------------------------------------------------------------------
Primary Secondary Type Ports
------- --------- ----------------- ------------------------------------------
Switch#Switch#wr
Building configuration...
[OK]
Switch#Switch#enSwitch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface f0/24Switch(config-if)#switchport mode trunk Switch(config-if)#^ZSwitch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#wr
Building configuration...
[OK]
Switch#Switch#
路由器配置
--- System Configuration Dialog ---
Continuewith configuration dialog? [yes/no]: no
Press RETURNtoget started!
Router>en
Router#conf t
Enter configuration commands, one per line. Endwith CNTL/Z.
Router(config)#int f0/0
Router(config-if)#no sh
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol onInterface FastEthernet0/0, changed state to up
Router(config-if)#
Router(config-if)#int f0/0.1
Router(config-subif)#
%LINK-5-CHANGED: Interface FastEthernet0/0.1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol onInterface FastEthernet0/0.1, changed state to up
Router(config-subif)#encapsulation dot1Q 2
Router(config-subif)#ip add 192.168.1.254 255.255.255.0
Router(config-subif)#int f0/0.2
Router(config-subif)#
%LINK-5-CHANGED: Interface FastEthernet0/0.2, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol onInterface FastEthernet0/0.2, changed state to up
Router(config-subif)#encapsulation dot1Q 3
Router(config-subif)#ip add 192.168.2.254 255.255.255.0
Router(config-subif)#int f0/0.3
Router(config-subif)#
%LINK-5-CHANGED: Interface FastEthernet0/0.3, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol onInterface FastEthernet0/0.3, changed state to up
Router(config-subif)#encapsulation dot1Q 4
Router(config-subif)#ip add 192.168.3.254 255.255.255.0
Router(config-subif)#
Router(config-subif)#
Router(config-subif)#^Z
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#
Router#wr
Building configuration...
[OK]
Router#