环境:华为最新模拟器eNSP,下载地址:http://pan.baidu.com/s/1ntpy5ZF
1、要求:
现有三台路由器,三台路由器都分别连接一个网段,要求通过使用RIP2协议使各个网段能够相互通信,并且要求查看RIP1和RIP2的的区别。
2、网络拓扑图:
使用亿图工具绘制出的网络拓扑图如图1所示:
图1:网络拓扑图
3、物理拓扑图
4、实施
(1)路由器R1的配置
<Huawei>sys
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]int Eth0/0/0 //进入接口模式
[Huawei-Ethernet0/0/0]ip address 192.168.1.33 ?
INTEGER<0-32> Length of IP address mask
X.X.X.X IP address mask
//配置IP地址
[Huawei-Ethernet0/0/0]ip address 192.168.1.33 27
//进入接口eth0/0/1
[Huawei-Ethernet0/0/0]int eth0/0/1
[Huawei-Ethernet0/0/1]ip add
//配置IP地址
[Huawei-Ethernet0/0/1]ip address 192.168.2.1 24
//进入接口GigabitEthernet0/0/0
[Huawei]int GigabitEthernet0/0/0
[Huawei-GigabitEthernet0/0/0]ip add
//配置IP地址
[Huawei-GigabitEthernet0/0/0]ip address 192.168.3.1 24
//启动RIP协议
[Huawei]rip
[Huawei-rip-1]net
//通告相连网段
[Huawei-rip-1]network 192.168.1.32
[Huawei-rip-1]network 192.168.2.0
[Huawei-rip-1]network 192.168.3.0
(2)路由器R2的配置
//进入配置模式
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
//进入接口eth0/0/0
[Huawei]int eth0/0/0
//配置IP地址
[Huawei-Ethernet0/0/0]ip add 192.168.2.2 27
//进入接口eth0/0/1
[Huawei]interface eth0/0/1
[Huawei-Ethernet0/0/1]ip add
//配置IP地址
[Huawei-Ethernet0/0/1]ip address 192.168.1.65 27
//启动RIP协议
[Huawei]rip
[Huawei-rip-1]net
//通告相连网段
[Huawei-rip-1]network 192.168.2.0
[Huawei-rip-1]network 192.168.1.0
(3)路由器R3的配置
//进入配置模式
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
//进入接口eth0/0/0
[Huawei]int eth0/0/0
[Huawei-Ethernet0/0/0]ip add
//配置IP地址
[Huawei-Ethernet0/0/0]ip address 192.168.3.2 24
//进入接口eth0/0/1
[Huawei]int eth0/0/1
//配置IP地址
[Huawei-Ethernet0/0/1]ip address 192.168.1.97 27
//退出接口模式
[Huawei-Ethernet0/0/1]quit
//启动RIP协议
[Huawei]rip
//通告相连网段
[Huawei-rip-1]net
[Huawei-rip-1]network 192.168.3.0
[Huawei-rip-1]network 192.168.1.0
(4)PC1的配置
(5)PC2的配置
(6)PC3的配置
5、测试验证
(1)查看R1的路由表
(2)查看R2的路由表
(3)查看R3的路由表
从R1、R2、R3的路路由表可以看出RIP1具有自动汇总功能。
(3)PC1 ping PC2
从上面可知是ping不通的,因为RIP1不支持可变长子网不连续的,如果使它们相通还需要在接口上启动RIP2,RIP2支持可变长子网不连续。
6、在接口上启动RIP2,并验证
(1)在R1上配置RIP2
[Huawei]int eth0/0/0
//在接口eth0/0/0上启动RIP2
[Huawei-Ethernet0/0/0]rip version 2
[Huawei-Ethernet0/0/0]int eth0/0/1
[Huawei-Ethernet0/0/1]rip ve
//在接口eth0/0/1上启动RIP2
[Huawei-Ethernet0/0/1]rip version 2
[Huawei]int GigabitEthernet0/0/0
[Huawei-GigabitEthernet0/0/0]rip ve
//在接口GigabitEthernet0/0/0上启动RIP2
[Huawei-GigabitEthernet0/0/0]rip version 2
(2)在R2上配置RIP2
[Huawei]int eth0/0/0
[Huawei-Ethernet0/0/0]rip ve
//在接口eth0/0/0上启动RIP2
[Huawei-Ethernet0/0/0]rip version 2
[Huawei-Ethernet0/0/0]int eth0/0/1
[Huawei-Ethernet0/0/1]rip ve
//在接口eth0/0/1上启动RIP2
[Huawei-Ethernet0/0/1]rip version 2
(3)在R3上配置RIP2
[Huawei]int eth0/0/0
[Huawei-Ethernet0/0/0]rip ve
//在接口eth0/0/0上启动RIP2
[Huawei-Ethernet0/0/0]rip version 2
[Huawei-Ethernet0/0/0]int eth0/0/1
[Huawei-Ethernet0/0/1]rip ver
//在接口eth0/0/1上启动RIP2
[Huawei-Ethernet0/0/1]rip version 2
(4)验证:
1)查看R1的路由表:
2)PC1 ping PC2
2)PC1 ping PC3
从上图可以看出RIP2是支持可变长子网不连续的。