实验四路由器及其动态路由协议实验目的
1、熟练掌握启动RIP协议配置动态路由的调试方法;
2、掌握路由器中提供的网络连通性测试命令;
实验要求
1、掌握动态路由的设置步骤以及方法;
2、验证动态路由的设置结果,加深对路由概念的理解;
实验内容
1、路由器配置模式及其转换;
2、一些常用的配置命令和状态查询命令;
3、配置路由器接口的IP地址;
4、根据实验室网络拓扑结构配置动态路由;
5、总结静态路由与RIP动态路由的区别;
实验实现
H3C MSR路由器基本配置命令
表H3C MSR路由器基本配置命令
图路由器基本配置示意图
路由器动态路由1
图路由器动态路由配置示意图1
System View: return to User View with Ctrl+Z.
[H3C]sysname RouterA
[RouterA]interface Ethernet 0/0
[RouterA-Ethernet0/0]ip addr 192.168.100.1 255.255.255.0
[RouterA-Ethernet0/0]quit
[RouterA]interface Serial 0/0
[RouterA-Serial0/0]link-protocol hdlc
// 配置接口封装HDLC协议。缺省情况下,接口封装PPP协议。[RouterA-Serial0/0]ip addr 10.0.0.1 255.0.0.0
[RouterA-Serial0/0]quit
[RouterA]rip
[RouterA-rip-1]network 192.168.100.0
[RouterA-rip-1]network 10.0.0.0
[RouterA]display ip routing-table
图路由器Router A路由表
System View: return to User View with Ctrl+Z.
[H3C]sysname RouterB
[RouterB]interface Ethernet 0/0
[RouterB-Ethernet0/0]ip address 192.168.200.1 255.255.255.0
[RouterB-Ethernet0/0]quit
[RouterB]interface Serial 0/0
[RouterB-Serial0/0]link-protocol hdlc
// 配置接口封装HDLC协议。缺省情况下,接口封装PPP协议。[RouterB-Serial0/0]ip address 10.0.0.2 255.0.0.0
[RouterB-Serial0/0]quit
[RouterB]rip
[RouterB-rip-1]network 192.168.200.0
[RouterB-rip-1]network 10.0.0.0
[RouterB]display ip routing-table
图路由器Router B路由表
路由器动态路由2
图路由器动态路由配置示意图2
说明:
(1)Pc2、Pc3分别连接SwitchA的3号和5号端口;
(2)SwitchA的3号端口和5号端口分别在VLAN2和VLAN3中;
(3)Pc4、Pc5分别连接SwitchB的3号和5号端口;
(4)SwitchB的3号端口和5号端口分别在VLAN4和VLAN5中;
(5)SwitchA的24号端口连接RouterA的以太网口Ethernet0/0;
(6)SwitchB的24号端口连接RouterB的以太网口Ethernet0/0;
(7)RouterA的以太网口Ethernet0/0的两个虚拟子接口分别为:Ethernet0/0.1 192.168.2.1
Ethernet0/0.2 192.168.3.1
(8)RouterB的以太网口Ethernet0/0的两个虚拟子接口分别为:Ethernet0/0.1 192.168.4.1
Ethernet0/0.2 192.168.5.1
[SwitchA]vlan 2
[SwitchA-vlan2]port GigabitEthernet 1/0/3
[SwitchA-vlan2]quit
[SwitchA]vlan 3
[SwitchA-vlan3]port GigabitEthernet 1/0/5
[SwitchA-vlan3]quit
[SwitchA]interface Vlan-interface 2
[SwitchA-Vlan-interface2]ip address 192.168.2.100 255.255.255.0 [SwitchA-Vlan-interface2]quit
[SwitchA]interface Vlan-interface 3
[SwitchA-Vlan-interface3]ip address 192.168.3.100 255.255.255.0 [SwitchA-Vlan-interface3]quit
[SwitchA]interface GigabitEthernet 1/0/24
[SwitchA-GigabitEthernet1/0/24]port link-type trunk
// 配置端口的链路类型为Trunk类型
[SwitchA-GigabitEthernet1/0/24]port trunk permit vlan all
// 允许指定的VLAN(所有)通过当前Trunk端口Please wait........................................... Done.
[SwitchA-GigabitEthernet1/0/24]quit
[SwitchA]