6.11
继续完成计网的实验,以及完善实验报告,下午对小组作业进行了最后的验收
①配置二层交换机S1
S1>enable
S1#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
S1(config)#vlan 11
S1(config-vlan)#interface fastethernet 0/1
S1(config-if)#switchport access vlan 11
S1(config-if)#interface fastethernet 0/2
S1(config-if)#switchport access vlan 11
S1(config-if)#interface fastethernet 0/3
S1(config-if)#switchport access vlan 11
S1(config-if)#exit
②配置二层交换机S2
S2>enable
S2#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
S2(config)#vlan 13
S2(config-vlan)#interface fastethernet 0/1
S2(config-if)#switchport access vlan 13
S2(config-if)#interface fastethernet 0/2
S2(config-if)#switchport access vlan 13
S2(config-if)#interface fastethernet 0/3
S2(config-if)#switchport access vlan 13
S2(config-if)#end
③配置二层交换机S3
Switch>enable
Switch#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname S3
S3(config)#vlan 15
S3(config-vlan)#exit
S3(config)#interface vlan 15
S3(config-if)#
%LINK-5-CHANGED: Interface Vlan15, changed state to up
S3(config-if)#interface fastethernet 0/1
S3(config-if)#switchport access vlan 15
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan15, changed state to upS3(config-if)#
S3(config-if)#exit
S3(config)#interface fastethernet 0/2
S3(config-if)#switchport access vlan 15
S3(config-if)# interface fastethernet 0/3
S3(config-if)#switchport access vlan 15
S3(config-if)#end
④配置二层交换机S4
Switch>enable
Switch#config
Configuring fr,om terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname S4
S4(config)#vlan 20
S4(config-vlan)#exit
S4(config)#interface vlan 20
S4(config-if)#
%LINK-5-CHANGED: Interface Vlan20, changed state to up
S4(config-if)#interface fastethernet 0/1
S4(config-if)#switchport access vlan 20
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to upS4(config-if)#
S4(config-if)#exit
S4(config)#interface fastethernet 0/2
S4(config-if)#switchport access vlan 20
S4(config-if)# interface fastethernet 0/3
S4(config-if)#switchport access vlan 20
S4(config-if)#end
第二步:配置三层交换机(划分vlan,配置rip协议)
① 配置三层交换机
三层交换机Switch0
Switch>enable
Switch#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 11
Switch(config)#interface fastethernet0/1
Switch(config-if)#switchport access vlan 11
Switch(config)#vlan 13
Switch(config)#interface fastethernet0/2
Switch(config-if)#switchport access vlan 13
Switch(config)#vlan 22
Switch(config)#interface fastethernet0/3
Switch(config-if)#switchport access vlan 22
Switch(config-if)#exit
Switch(config)#interface vlan 11
Switch(config-if)#ip address 192.168.1.1 255.255.255.0
Switch(config-if)#no shutdown
Switch(config)#interface vlan 13
Switch(config-if)#ip address 192.168.3.1 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#interface vlan 22
Switch(config-if)#ip address 192.168.2.2 255.255.255.0
Switch(config-if)#no shutdown
② 配置三层交换机Switch1
Switch>enable
Switch#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 25
Switch(config-vlan)#interface fastethernet 0/1
Switch(config-if)#switchport access vlan 25
Switch(config-if)#exit
Switch(config)#vlan 15
Switch(config-vlan)#interface fastethernet 0/2
Switch(config-if)#switchport access vlan 15
Switch(config-if)#exit
Switch(config)#interface vlan 25
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan10, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up
Switch(config-if)#ip address 192.168.8.2 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#interface vlan 15
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan20, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up
Switch(config-if)#ip address 192.168.4.1 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
③ 配置三层交换机Switch2
Switch>enable
Switch#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 50
Switch(config-vlan)#interface fastethernet 0/1
Switch(config-if)#switchport access vlan 50
Switch(config-if)#exit
Switch(config)#vlan 20
Switch(config-vlan)#interface fastethernet 0/2
Switch(config-if)#switchport access vlan 20
Switch(config-if)#exit
Switch(config)#interface vlan 50
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan10, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up
Switch(config-if)#ip address 192.168.9.2 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#interface vlan 20
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan20, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up
Switch(config-if)#ip address 192.168.6.1 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
第五步:配置路由器
①配置路由器R0
Router>enable
Router#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R0
R0(config)#interface fastethernet 0/0
R0(config-if)#ip address 192.168.2.1 255.255.255.0
R0(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R0(config-if)#exit
R0(config)#interface serial 2/0
R0(config-if)#ip address 192.168.5.1 255.255.255.0
R0(config-if)#clock rate 64000
R0(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial2/0, changed state to down
R0(config-if)#end
R0#
%SYS-5-CONFIG_I: Configured from console by console
R0#
②配置路由器R1
Router>enable
Router#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fastethernet 0/0
Router(config-if)#ip address 192.168.8.1 255.255.255.0
Router(config-if)#no shutdown
%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)#interface serial 2/0
Router(config-if)#ip address 192.168.5.2 255.255.255.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown
Router(config-if)#interface serial 3/0
Router(config-if)#ip address 192.168.7.1 255.255.255.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial2/0, changed state to down
Router(config-if)#end
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#
③配置路由器R2
Router>enable
Router#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fastethernet 0/0
Router(config-if)#ip address 192.168.9.1 255.255.255.0
Router(config-if)#no shutdown
%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)#interface serial 2/0
Router(config-if)#ip address 192.168.7.2 255.255.255.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial2/0, changed state to down
Router(config-if)#end
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#