hcia第四天

1.使用ripv2全网可达

在AR1上:

[r8]interface g0/0/0
[r8-GigabitEthernet0/0/0]ip address 12.1.1.1 24

[r8]interface LoopBack 0
[r8-LoopBack0]ip address 1.1.1.1 32

[r8]rip 1
[r8-rip-1]version 2
[r8-rip-1]network 12.0.0.0

在AR2上:

[r9]interface g0/0/0
[r9-GigabitEthernet0/0/0]ip address 12.1.1.2 24
[r9-GigabitEthernet0/0/0]quit
[r9]interface g0/0/1
[r9-GigabitEthernet0/0/1]ip address 23.1.1.1 24

[r9]interface LoopBack 0
[r9-LoopBack0]ip address 2.2.2.2 32

[r9]rip 1
[r9-rip-1]version 2
[r9-rip-1]network 12.0.0.0
[r9-rip-1]network 23.0.0.0
[r9-rip-1]network 2.0.0.0

在AR3上

[r10]interface g0/0/0
[r10-GigabitEthernet0/0/0]ip address 23.1.1.2 24
[r10]interface g0/0/1
[r10-GigabitEthernet0/0/1]ip address 34.1.1.1 24

[r10]interface LoopBack 0
[r10-LoopBack0]ip address 192.168.1.1 24
[r10]interface LoopBack 1
[r10-LoopBack1]ip address 192.168.2.1 24

[r10]rip 1
[r10-rip-1]version 2
[r10-rip-1]network 23.0.0.0
[r10-rip-1]network 34.0.0.0
[r10-rip-1]network 192.168.1.0
[r10-rip-1]network 192.168.2.0

在AR4上

[r11]interface LoopBack 0
[r11-LoopBack0]ip address 4.4.4.4 32

[r11]interface g0/0/0
[r11-GigabitEthernet0/0/0]ip address 34.1.1.2 24

[r11]rip 1
[r11-rip-1]version 2
[r11-rip-1]network 34.0.0.0
[r11-rip-1]network 4.0.0.0

2保证更新安全 12之间使用明文 23之间使用密文

在AR1上

[r8]rip 1
[r8-rip-1]default-route originate
[r8-rip-1]quit
[r8]interface g0/0/0
[r8-GigabitEthernet0/0/0]rip authentication-mode simple cipher 123

在AR2上

[r9]interface g0/0/0
[r9-GigabitEthernet0/0/0]rip authentication-mode simple cipher 123
[r9-GigabitEthernet0/0/0]quit
[r9]interface g0/0/1
[r9-GigabitEthernet0/0/1]rip authentication-mode md5 usual cipher 123

在AR3上

[r10]interface g0/0/0
[r10-GigabitEthernet0/0/0]rip authentication-mode md5 usual cipher 123

3.r3的环回做汇总192.168.1.0/24 192.168.2.0/24 

[r10]interface g0/0/0
[r10-GigabitEthernet0/0/0]rip summary-address 192.168.0.0 255.255.252.0
[r10-GigabitEthernet0/0/0]quit
[r10]interface g0/0/1
[r10-GigabitEthernet0/0/1]rip summary-address 192.168.0.0 255.255.252.0

4.r1的环回不能宣告全网可达

[r1]ip route-static 0.0.0.0 0 1.1.1.1
[r1]rip 1
[r1-rip-1]default-route originate

测试

在AR1上

[r11]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 14       Routes : 14       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        0.0.0.0/0   RIP     100  3           D   34.1.1.1        GigabitEthernet
0/0/0
        2.2.2.2/32  RIP     100  2           D   34.1.1.1        GigabitEthernet
0/0/0
        4.4.4.4/32  Direct  0    0           D   127.0.0.1       LoopBack0
       12.1.1.0/24  RIP     100  2           D   34.1.1.1        GigabitEthernet
0/0/0
       23.1.1.0/24  RIP     100  1           D   34.1.1.1        GigabitEthernet
0/0/0
       34.1.1.0/24  Direct  0    0           D   34.1.1.2        GigabitEthernet
0/0/0
       34.1.1.2/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
     34.1.1.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
    192.168.1.0/24  RIP     100  1           D   34.1.1.1        GigabitEthernet
0/0/0
    192.168.2.0/24  RIP     100  1           D   34.1.1.1        GigabitEthernet
0/0/0
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0

[r11]ping 1.1.1.1
  PING 1.1.1.1: 56  data bytes, press CTRL_C to break
    Request time out
    Request time out
    Reply from 1.1.1.1: bytes=56 Sequence=3 ttl=253 time=30 ms
    Reply from 1.1.1.1: bytes=56 Sequence=4 ttl=253 time=30 ms
    Reply from 1.1.1.1: bytes=56 Sequence=5 ttl=253 time=40 ms

  --- 1.1.1.1 ping statistics ---
    5 packet(s) transmitted
    3 packet(s) received
    40.00% packet loss
    round-trip min/avg/max = 30/33/40 ms
在AR2上

[r8]ping 192.168.1.1
  PING 192.168.1.1: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.1: bytes=56 Sequence=1 ttl=254 time=60 ms
    Reply from 192.168.1.1: bytes=56 Sequence=2 ttl=254 time=20 ms
    Reply from 192.168.1.1: bytes=56 Sequence=3 ttl=254 time=30 ms
    Reply from 192.168.1.1: bytes=56 Sequence=4 ttl=254 time=30 ms
    Reply from 192.168.1.1: bytes=56 Sequence=5 ttl=254 time=40 ms

  --- 192.168.1.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 20/36/60 ms

[r8]ping 192.168.2.1
  PING 192.168.2.1: 56  data bytes, press CTRL_C to break
    Reply from 192.168.2.1: bytes=56 Sequence=1 ttl=254 time=40 ms
    Reply from 192.168.2.1: bytes=56 Sequence=2 ttl=254 time=30 ms
    Reply from 192.168.2.1: bytes=56 Sequence=3 ttl=254 time=50 ms
    Reply from 192.168.2.1: bytes=56 Sequence=4 ttl=254 time=10 ms
    Reply from 192.168.2.1: bytes=56 Sequence=5 ttl=254 time=30 ms

  --- 192.168.2.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 10/32/50 ms

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值