日报79
五、实验过程:
1、基本配置
1)选择PC、路由器、三层交换机,并进行连接。
2)配置IP地址
3)三层交换机的基本配置
Switch(config)#vlan 100
Switch(config)#interface fastethernet0/2
Switch(config-if)#switchport access vlan 100
Switch(config)#vlan 500
Switch(config)#interface fastethernet0/1
Switch(config-if)#switchport access vlan 500
Switch(config-if)#exit
Switch(config)#interface vlan 100
Switch(config-if)#ip address 172.16.1.2 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#interface vlan 500
Switch(config-if)#ip address 172.16.5.1 255.255.255.0
Switch(config-if)#no shutdown
验证测试:
Switch#show vlan
VLAN Name Status Ports
1 default active 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/24,Gig0/1
Gig0/2
10 VLAN0010 active
100 VLAN0100 active
500 VLAN0500 active Fa0/1
1002 fadi-default active
1003 token-ring-default active
1004 fadi-default active
1005 token-ring-default active
Switch#show ip interface
Interface :VL100
Description :Vlan 100
OperStatus :UP
ManagementStatus :Enabled
Primary Internet address :172.16.1.2/24
Broadcast address :255.255.255.255
Physaddress :00d0.f8ff.8ab5
Interface :VL500
Description :Vlan 500
OperStatus :UP
ManagementStatus :Enabled
Primary Internet address :172.16.5.1/24
Broadcast address :255.255.255.255
Physaddress :00d0.f8ff.8ab6
4)路由器的基本配置
在路由器A上配置端口IP:
Router#enable
Router#config
Configuring from terminal,memory,or network [terminal]?
Enter configuration commands,one per line. End with CNTL/Z.
Router (config)#interface gigabitEthernet 0
Router (config-if)#ip address 172.16.1.1 255.255.255.0
Router (config-if) #no shutdown
Router (config-if)#
在路由器B上配置端口IP:
Router#enable
Router#config
Configuring from terminal,memory,or network [terminal]?
Enter configuration commands,one per line. End with CNTL/Z.
Router (config)#interface serial 0
Router (config-if)#ip address 172.16.2.2
%Incomplete command.
Router (config-if)#ip address 172.16.2.2 255.255.255.0
Router (config-if) #no shutdown
Router (config-if) #no shutdown
Router (config-if)#exit
Router (config) #exitRouter#
%sYS-5-CONFIG_I: Configured from console by console
验证测试:验证路由器接口的配置和状态
路由器A:
路由器B:
2、配置RIPv2路由协议
1)三层交换机配置RIP协议
Switch>enable
Switch#config
Configuring from terminal,memory,or network [terminal] ?
Enter configuration commands,one per line. End with CNTL/Z.
Switch (config)#ip routing
Switch (config) #router rip
Switch (config-router) #network 172.16.1.0
Switch (config-router) #network 172.16.5.0
Switch (config-router) #version 2
Switch (config-router)#
2)路由器A配置RIP v2协议
Router#config
Configuring from terminal,memory,or network [terminal]?
Enter configuration commands,one per line. End with CNTL/Z.
Router (config) #router rip
Router (config-router) #network 172.16.1.0
Router (config-router) #network 172.16.2.0
Router (config-router)#version 2
Router (config-router)#no auto-summary
Router (config-router)#
3)路由器3配置RIP v2协议
Router#config
Configuring from terminal,memory,or network [terminal]?
Enter configuration commands,one per line. End with CNTL/Z.
Router (config) #router rip
Router (config-router) #network 172.16.2.0
Router (config-router) #network 172.16.3.0
Router (config-router)#version 2
Router (config-router)#no auto-summary
3、验证三台路由设备的路由表,查看是否自动学习了其他网段的路由信息。
交换机:
路由器A:
路由器B:
4、配置OSPF路由协议。
交换机:
路由器A:
路由器B:
5、测试网络的连通性。
六、实验总结:
遇到问题:开始路由器没有端口,出现连接错误
浙公网安备 33010602011771号