实验二:RIP实验

 

第一步:配IP地址

R1

[R1]int g 0/0/0
[R1-GigabitEthernet0/0/0]ip add 1.0.0.1 24
[R1]int g 0/0/1
[R1-GigabitEthernet0/0/1]ip add 4.0.0.1 24
Sep 28 2021 21:30:15-08:00 R1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[R1-GigabitEthernet0/0/1]int l0
[R1-LoopBack0]ip add 1.1.1.1 24
[R1-LoopBack0]int l 1
[R1-LoopBack1]ip add 172.16.1.1 24
[R1]int l2
[R1-LoopBack2]ip add 172.16.2.1 24
[R1-LoopBack2]int l 3
[R1-LoopBack3]ip add 172.16.3.1 24

R2

[R2]int g 0/0/0
[R2-GigabitEthernet0/0/0]ip add 1.0.0.2 24
Sep 28 2021 21:32:18-08:00 R2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R2-GigabitEthernet0/0/0]int g 0/0/1
[R2-GigabitEthernet0/0/1]ip add 2.0.0.1 24
Sep 28 2021 21:32:42-08:00 R2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[R2-GigabitEthernet0/0/1]q
[R2]int l 0
[R2-LoopBack0]ip add 2.2.2.2 24

R3

[R3]int g 0/0/0
[R3-GigabitEthernet0/0/0]ip add 3.0.0.1 24
Sep 28 2021 21:34:48-08:00 R3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R3-GigabitEthernet0/0/0]int g 0/0/1
[R3-GigabitEthernet0/0/1]ip add 2.0.0.2 24
Sep 28 2021 21:35:04-08:00 R3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[R3-GigabitEthernet0/0/1]q
[R3]int l 0
[R3-LoopBack0]ip add 3.3.3.3 24

R4

[R4]int g 0/0/0
[R4-GigabitEthernet0/0/0]
[R4-GigabitEthernet0/0/0]ip add 4.0.0.2 24
Sep 28 2021 21:35:47-08:00 R4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R4-GigabitEthernet0/0/0]int g 0/0/1
[R4-GigabitEthernet0/0/1]ip add 3.0.0.2 24
[R4-GigabitEthernet0/0/1]
Sep 28 2021 21:36:04-08:00 R4 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[R4-GigabitEthernet0/0/1]q
[R4]int l0
[R4-LoopBack0]q
[R4]int g 0/0/2
[R4-GigabitEthernet0/0/2]ip add 5.0.0.1 24
Sep 28 2021 21:36:44-08:00 R4 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface GigabitEthernet0/0/2 has entered the UP state. 
[R4-GigabitEthernet0/0/2]int g 4/0/0
[R4-GigabitEthernet4/0/0]ip add 6.0.0.1 24
[R4-GigabitEthernet4/0/0]
Sep 28 2021 21:37:19-08:00 R4 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP 
on the interface GigabitEthernet4/0/0 has entered the UP state. 
[R4-GigabitEthernet4/0/0]q
[R4]int l0
[R4-LoopBack0]ip add 4.4.4.4 24

R5

[R5]int g 0/0/0
[R5-GigabitEthernet0/0/0]ip add 5.0.0.2 24
Sep 28 2021 21:39:33-08:00 R5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R5-GigabitEthernet0/0/0]q
[R5]int l0
[R5-LoopBack0]ip add 5.5.5.5 24

R6

[R6]int g 0/0/0
[R6-GigabitEthernet0/0/0]ip add 6.0.0.2 24
[R6-GigabitEthernet0/0/0]int g 0/0/1
[R6-GigabitEthernet0/0/1]ip add 7.0.0.1 24
Sep 28 2021 21:40:54-08:00 R6 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[R6-GigabitEthernet0/0/1]q
[R6]int l0
[R6-LoopBack0]ip add 6.6.6.6 24

R7

[R7]int g 0/0/0
[R7-GigabitEthernet0/0/0]ip add 7.0.0.2 24
Sep 28 2021 21:41:27-08:00 R7 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R7-GigabitEthernet0/0/0]q
[R7]int l0
[R7-LoopBack0]ip add 7.7.7.7 24

第二步:配置路由

R1
[R1]rip 1
[R1-rip-1]v 2
[R1-rip-1]net	
[R1-rip-1]network 1.0.0.0
[R1-rip-1]network 4.0.0.0
[R1-rip-1]network 172.0.0.0

R2
[R2]rip 1
[R2-rip-1]
[R2-rip-1]v 2
[R2-rip-1]net	
[R2-rip-1]network 1.0.0.0
[R2-rip-1]network 2.0.0.0

R3
[R3]rip 1
[R3-rip-1]v 2
[R3-rip-1]net	
[R3-rip-1]network 2.0.0.0
[R3-rip-1]network 3.0.0.0

R4
[R4]rip 1
[R4-rip-1]v 2
[R4-rip-1]net	
[R4-rip-1]network 4.0.0.0
[R4-rip-1]network 3.0.0.0
[R4-rip-1]network 5.0.0.0
[R4-rip-1]network 6.0.0.0

R5
[R5]rip 1
[R5-rip-1]v 2
[R5-rip-1]net	
[R5-rip-1]network 5.0.0.0

R6
[R6]rip 1
[R6-rip-1]v 1
[R6-rip-1]net	
[R6-rip-1]network 6.0.0.0
[R6-rip-1]network 7.0.0.0

R7
[R7]rip 1
[R7-rip-1]v 1
[R7-rip-1]net	
[R7-rip-1]network 7.0.0.0

路由测验如下:

 

 

 第三步:R3使用R2访问R1环回(先进行汇总)

[R1]int g 0/0/0
[R1-GigabitEthernet0/0/0]rip sun	
[R1-GigabitEthernet0/0/0]rip sum	
[R1-GigabitEthernet0/0/0]rip summary-address 172.16.0.0 255.255.252.0
[R1-GigabitEthernet0/0/0]int g 0/0/1
[R1-GigabitEthernet0/0/1]rip summary-address 172.16.0.0 255.255.252.0
[R1-GigabitEthernet0/0/1]

[R3]acl 2000
[R3-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[R3-acl-basic-2000]rule permit source 1.1.1.0  0
[R3-acl-basic-2000]int g 0/0/0
[R3-GigabitEthernet0/0/0]rip metricout 2000 10
[R3-GigabitEthernet0/0/0]q

 接口之间做认证口令

认证时标准(usual)与口令(123456)需一致
[R1]int g 0/0/0
[R1-GigabitEthernet0/0/0]rip auth	
[R1-GigabitEthernet0/0/0]rip authentication-mode md5 usual cip	
[R1-GigabitEthernet0/0/0]rip authentication-mode md5 usual cipher 123456
[R1-GigabitEthernet0/0/0]q
[R2]int g 0/0/0
[R2-GigabitEthernet0/0/0]rip auth	
[R2-GigabitEthernet0/0/0]rip authentication-mode md5 us	
[R2-GigabitEthernet0/0/0]rip authentication-mode md5 usual cip	
[R2-GigabitEthernet0/0/0]rip authentication-mode md5 usual cipher 123456

第四步:R4上配置缺省路由指向R5


[R4]ip route-static 0.0.0.0 0 5.0.0.2
[R4]rip 1
[R4-rip-1]default-route originate 

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

  --- 5.5.5.5 ping statistics ---
    5 packet(s) transmitted
    4 packet(s) received
    20.00% packet loss
    round-trip min/avg/max = 20/30/40 ms

 第五步:在R6的0/0/0端口添加rip version 2,

[R6]int g 0/0/0
[R6-GigabitEthernet0/0/0]rip ver	
[R6-GigabitEthernet0/0/0]rip version 2 --- R6,R7学到RIPV2里面的东西
[R6-GigabitEthernet0/0/0]q

 

第六步:在R7上创建 telnet

[R7]aaa	
[R7-aaa]local-user  admin privilege level 15 password cipher 123456	
[R7-aaa]local-user admin service-type telnet 

[R7]user-interface vty 0 4 --- 开启vty5个虚拟端口
[R7-ui-vty0-4]authentication-mode aaa --- 选择认证模式aaa
[R7-ui-vty0-4]
[R2]int g 0/0/0
[R2-GigabitEthernet0/0/0]nat server protocol tcp global interface loopback 0 23 
inside 7.7.7.7 23
Warning:The port 23 is well-known port. If you continue it may cause function fa
ilure.
Are you sure to continue?[Y/N]:y
[R2-GigabitEthernet0/0/0]q
因为负载均衡的缘故,所以将去与回的另一条道路开销值增大。
[R2]acl 2000	
[R2-acl-basic-2000]rule permit source 7.0.0.0 0
[R2-acl-basic-2000]q
[R2]int g 0/0/1
[R2-GigabitEthernet0/0/1]rip metricin 2000 5

[R4]acl 2000
[R4-acl-basic-2000]rule per	
[R4-acl-basic-2000]rule permit sou	
[R4-acl-basic-2000]rule permit source 1.0.0.0 0
[R4-acl-basic-2000]q
[R4]int g 0/0/0
[R4-GigabitEthernet0/0/0]rip met	
[R4-GigabitEthernet0/0/0]rip metricin 2000 10

 

最后一步:路由过滤 --- R6-R7路由器不能学习到达R1环回路由

[R6]acl 2000
[R6-acl-basic-2000]rule deny  source 1.1.1.0 0
[R6-acl-basic-2000]rule deny source 172.16.0.0 0.0.255.255
[R6-acl-basic-2000]rule permit source any
[R6-acl-basic-2000]q
[R6]rip 1
[R6-rip-1]filter-policy 2000 import 
[R6-rip-1]q

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值