动态路由实验——RIP的基本配置

步骤:

第一步:地址规划

设备接口地址
R1G0/0/0192.168. 1.1/24
R2G0/0/0192.168.1.2/24
R2G0/0/1192.168.2.1/24
R3G0/0/0192.168.2.2/24
R3G0/0/1192.168.3.1/24
R4G0/0/0192.168.3.2/24
R4G0/0/1192.168.4.1/24
R5G0/0/0192.168.4.2/24
R5G0/0/1192.168.1.3/24

第二步:设备配置

R1地址配置:

[R1]interface g0/0/0    
[R1-GigabitEthernet0/0/0]ip address 192.168.1.1 24         

R2地址配置:

[R2]interface g0/0/0 [R2-GigabitEthernet0/0/0]ip address 192.168.1.2 24 [R2]interface g0/0/1 [R2-GigabitEthernet0/0/1]ip address 192.168.2.1 24

R3地址配置:

[R3]interface g0/0/0 [R3-GigabitEthernet0/0/0]ip address 192.168.2.2 24

[R3]interface g0/0/1 [R3-GigabitEthernet0/0/1]ip address 192.168.3.1 24

R4地址配置:

[R4]interface g0/0/0 [R4-GigabitEthernet0/0/0]ip address 192.168.3.2 24 [R4]interface g0/0/1 [R4-GigabitEthernet0/0/1]ip address 192.168.4.1 24

R5地址配置:

[R5]interface g0/0/0 [R5-GigabitEthernet0/0/0]ip address 192.168.4.2 24

[R5]interface g0/0/1 [R5-GigabitEthernet0/0/1]ip address 192.168.1.3 24

第三部:测试直连设备间通讯

R1与R2和R5间通信

<R1>ping 192.168.1.2 PING 192.168.1.2: 56 data bytes, press CTRL_C to break Reply from 192.168.1.2: bytes=56 Sequence=1 ttl=255 time=150 ms Reply from 192.168.1.2: bytes=56 Sequence=2 ttl=255 time=50 ms Reply from 192.168.1.2: bytes=56 Sequence=3 ttl=255 time=40 ms Reply from 192.168.1.2: bytes=56 Sequence=4 ttl=255 time=50 ms Reply from 192.168.1.2: bytes=56 Sequence=5 ttl=255 time=50 ms

--- 192.168.1.2 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 40/68/150 ms

<R1>ping 192.168.1.3

PING 192.168.1.3: 56 data bytes, press CTRL_C to break Reply from 192.168.1.3: bytes=56 Sequence=1 ttl=255 time=90 ms Reply from 192.168.1.3: bytes=56 Sequence=2 ttl=255 time=50 ms Reply from 192.168.1.3: bytes=56 Sequence=3 ttl=255 time=50 ms Reply from 192.168.1.3: bytes=56 Sequence=4 ttl=255 time=60 ms Reply from 192.168.1.3: bytes=56 Sequence=5 ttl=255 time=40 ms

--- 192.168.1.3 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 40/58/90 ms

<R2>ping 192.168.1.3 PING 192.168.1.3: 56 data bytes, press CTRL_C to break Reply from 192.168.1.3: bytes=56 Sequence=1 ttl=255 time=100 ms Reply from 192.168.1.3: bytes=56 Sequence=2 ttl=255 time=40 ms Reply from 192.168.1.3: bytes=56 Sequence=3 ttl=255 time=30 ms Reply from 192.168.1.3: bytes=56 Sequence=4 ttl=255 time=40 ms Reply from 192.168.1.3: bytes=56 Sequence=5 ttl=255 time=40 ms

--- 192.168.1.3 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 30/50/100 ms

第四步:配置路由

R1配置

[R1]rip 1 [R1-rip-1]version 2 [R1-rip-1]network 192.168.1.0

R2配置

[R2]rip 1 [R2-rip-1]version 2 [R2-rip-1]network 192.168.1.0 [R2-rip-1]network 192.168.2.0

R3配置

[R3]rip 1 [R3-rip-1]version 2 [R3-rip-1]network 192.168.2.0 [R3-rip-1]network 192.168.3.0

R4配置

[R4]rip 1 [R4-rip-1]version 2 [R4-rip-1]network 192.168.3.0 [R4-rip-1]network 192.168.4.0

R5配置

[R5]rip 1 [R5-rip-1]version 2 [R5-rip-1]network 192.168.4.0 [R5-rip-1]network 192.168.1.0

第五步:查看路由表

R1路由表

[R1]display ip routing-table protocol rip

Route Flags: R - relay, D - download to fib

Public routing table : RIP Destinations : 3 Routes : 4

RIP routing table status : <Active> Destinations : 3 Routes : 4

Destination/Mask Proto Pre Cost Flags NextHop Interface

192.168.2.0/24  RIP     100  1           D   192.168.1.2     GigabitEthernet

0/0/0 192.168.3.0/24 RIP 100 2 D 192.168.1.2 GigabitEthernet 0/0/0 RIP 100 2 D 192.168.1.3 GigabitEthernet 0/0/0 192.168.4.0/24 RIP 100 1 D 192.168.1.3 GigabitEthernet 0/0/0

RIP routing table status : <Inactive> Destinations : 0 Routes : 0

R2路由表

[R2]display ip routing-table protocol rip

Route Flags: R - relay, D - download to fib

Public routing table : RIP Destinations : 2 Routes : 2

RIP routing table status : <Active> Destinations : 2 Routes : 2

Destination/Mask Proto Pre Cost Flags NextHop Interface

192.168.3.0/24  RIP     100  1           D   192.168.2.2     GigabitEthernet

0/0/1 192.168.4.0/24 RIP 100 1 D 192.168.1.3 GigabitEthernet 0/0/0

RIP routing table status : <Inactive> Destinations : 0 Routes : 0

其他省略

第六步:测试连通性

R1和R4之间的连通性测试

[R1]ping 192.168.3.2 PING 192.168.3.2: 56 data bytes, press CTRL_C to break Request time out Request time out Reply from 192.168.3.2: bytes=56 Sequence=3 ttl=254 time=90 ms Reply from 192.168.3.2: bytes=56 Sequence=4 ttl=254 time=50 ms Reply from 192.168.3.2: bytes=56 Sequence=5 ttl=254 time=40 ms

--- 192.168.3.2 ping statistics --- 5 packet(s) transmitted 3 packet(s) received 40.00% packet loss round-trip min/avg/max = 40/60/90 ms

实验到此结束
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值