Switch>
Switch>en
Switch>enable
Switch#conf
Switch#configure termin
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 10 //创建一个vlan 10
Switch(config-vlan)#ex
Switch(config)#vlan 20 //创建一个vlan 20
Switch(config-vlan)#ex
Switch(config)#interface fas
Switch(config)#interface fastEthernet 0/1
Switch(config-if)#switc
Switch(config-if)#switchport acc
Switch(config-if)#switchport access vlan 10 //端口1接入vlan 10
Switch(config-if)#ex
Switch(config)#iter
Switch(config)#inter
Switch(config)#interface fas
Switch(config)#interface fastEthernet 0/3
Switch(config-if)#switchport access vlan 10 //端口3接入vlan 10
Switch(config-if)#ex
Switch(config)#
Switch(config)#iner
Switch(config)#inter
Switch(config)#interface fas
Switch(config)#interface fastEthernet 0/2 //端口2接入vlan 20
Switch(config-if)#swi
Switch(config-if)#switchport acc
Switch(config-if)#switchport access vlan 20
Switch(config-if)#
Switch(config-if)#end
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#show vlan //查看配置情况
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active 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/24
10 VLAN0010 active Fa0/1, Fa0/3
20 VLAN0020 active Fa0/2
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 100001 1500 - - - - - 0 0
10 enet 100010 1500 - - - - - 0 0
20 enet 100020 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
Switch#conf
Switch#configure termin
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 10 //创建一个vlan 10
Switch(config-vlan)#ex
Switch(config)#vlan 20 //创建一个vlan 20
Switch(config-vlan)#ex
Switch(config)#
Switch(config)#inter
Switch(config)#interface fas
Switch(config)#interface fastEthernet 0/1
Switch(config-if)#swit
Switch(config-if)#switchport acc
Switch(config-if)#switchport access vlan 10 //端口1接入vlan 10
Switch(config-if)#ex
Switch(config)#inter
Switch(config)#interface fas
Switch(config)#interface fastEthernet 0/2
Switch(config-if)#swi
Switch(config-if)#switchport acc
Switch(config-if)#switchport access vlan 20 //端口2接入vlan 20
Switch(config-if)#ex
Switch(config)#
Switch>en
Switch>enable
Switch#conf
Switch#configure termin
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#inter
Switch(config)#interface fas
Switch(config)#interface fastEthernet 0/24
Switch(config-if)#swi
Switch(config-if)#switchport mode tr
Switch(config-if)#switchport mode trunk //这句是重点!!
Switch(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to up
Switch(config-if)#
Router>enable
Router#conf
Router#configure
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#inter
Router(config)#interface fas
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip addres
Router(config-if)#ip address 192.168.1.1 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 on Interface FastEthernet0/0, changed state to up
Router(config-if)#
Router>enable
Router#conf
Router#configure
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#inter
Router(config)#interface fa
Router(config)#interface fastE、0
% Incomplete command.
Router(config)#
Router(config)#inte
Router(config)#interface fas
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip add
Router(config-if)#ip address 192.168.2.1 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 on Interface FastEthernet0/0, changed state to up
Router(config-if)#
Router#configure
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#inte
Router(config)#interface fas
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip add
Router(config-if)#ip address 192.168.3.1 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 on Interface FastEthernet0/0, changed state to up
Router(config-if)#
//R1
Router(config)#interface serial 1/0
Router(config-if)#ip add
Router(config-if)#ip address 192.168.4.1 255.255.255.0
Router(config-if)#clock rate 64000
This command applies only to DCE interfaces
Router(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial1/0, changed state to down
Router(config-if)#
//R2
Router(config)#interface serial 1/0 //先配置1/0接口
Router(config-if)#ip add
Router(config-if)#ip address 192.168.4.2 255.255.255.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown //这个不要忘记了
Router(config-if)#
%LINK-5-CHANGED: Interface Serial1/0, changed state to up
Router(config-if)#ex
Router(config)#
Router(config)#inter
Router(config)#interface
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up
% Incomplete command.
Router(config)#inter
Router(config)#interface serial 1/1 //先配置1/1接口
Router(config-if)#ip add
Router(config-if)#ip address 192.168.5.2 255.255.255.0
Router(config-if)#clock rate 64000 //设置时钟时间
This command applies only to DCE interfaces
Router(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial1/1, changed state to down
Router(config-if)#
Router(config-if)#
//R3
Router(config)#interface serial 1/0
Router(config-if)#ip addd
Router(config-if)#ip add
Router(config-if)#ip add
Router(config-if)#ip add
Router(config-if)#ex
Router(config)#
Router(config)#
Router(config)#inte
Router(config)#interface ser
Router(config)#interface serial 1/0
Router(config-if)#ip add
Router(config-if)#ip address 192.168.5.1 255.255.255.0
Router(config-if)#clock rate 64000
Router(config-if)#no shut
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface Serial1/0, changed state to up
Router(config)# ip route network-address subnet-mask ip-address
Router(config)#ip route 192.168.2.0 255.255.255.0 192.168.4.2
Router(config)#ip route 192.168.3.0 255.255.255.0 192.168.4.2
Router(config)#ip route 192.168.1.0 255.255.255.0 192.168.4.1
Router(config)#ip route 192.168.3.0 255.255.255.0 192.168.5.1
Router(config)#ip route 192.168.2.0 255.255.255.0 192.168.5.2
Router(config)#ip route 192.168.1.0 255.255.255.0 192.168.5.2
Router(config)#ip route 0.0.0.0 0.0.0.0 { ip-address | interface }
Router(config)#ip route 0.0.0.0 0.0.0.0 192.168.4.2 //R1
Router(config)#ip route 0.0.0.0 0.0.0.0 192.168.4.1 //R2
Router(config)#ip route 0.0.0.0 0.0.0.0 192.168.5.1 //R2
Router(config)#ip route 0.0.0.0 0.0.0.0 192.168.5.2 //R3
R1(config)#router rip
R1(config)#network 网络地址
R1(config)#version 2
R1(config)#no auto-summary //路由器将不会在主网边界处总结路由
//R1
Router(config)#router rip
Router(config-router)#no network 192.168.1.0
Router(config-router)#no network 192.168.4.1
Router(config-router)#no network 192.168.6.0 //可以一起配
Router(config-router)#ex
Router(config-router)#ex
Router(config)#
Router(config)#router rip
Router(config-router)#network 192.168.1.0
Router(config-router)#network 192.168.6.0
Router(config-router)#version 2
Router(config-router)#no auto-su
Router(config-router)#no auto-summary
//R2
Router(config)#router rip
Router(config-router)#network 192.168.4.2
Router(config-router)#network 192.168.5.2
Router(config-router)#network 192.168.2.0
Router(config-router)#version 2
Router(config-router)#no auto-summary
//R3
Router(config)#router rip
Router(config-router)#network 192.168.5.1
Router(config-router)#network 192.168.3.0
Router(config-router)#version 2
Router(config-router)#no auto-summary
以上就是本文要介绍的所有内容,希望对正在阅读的您有帮助