第四次作业

一.要求:

1.如图搭建网络拓扑,所有路由器各自创建一个环回接口,合理规划IP地址

2.Rl-R2-R3-R4-R6之间使用0SPF协议,R4-R5-R6之间使用 RIP协议
3.R1环回重发布方式引入0SPF网络

4.R4/R6上进行双点双向重发布

5.分析网络中出现路由环路的原因

6.路由优化

二.配置过程

1.配置IP地址

R1

[R1-GigabitEthernet0/0/0]ip add 12.1.1.1 24
[R1-LoopBack0]ip add 1.1.1.1 32

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              12.1.1.1/24          up         up        
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         1.1.1.1/32           up         up(s)     
NULL0                             unassigned           up         up(s)     

R2

[R2-GigabitEthernet0/0/0]ip add 23.1.1.2 24
[R2-GigabitEthernet0/0/1]ip add 12.1.1.2 24
[R2-LoopBack0]ip add 2.2.2.2 32

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              23.1.1.2/24          up         up        
GigabitEthernet0/0/1              12.1.1.2/24          up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         2.2.2.2/32           up         up(s)     
NULL0                             unassigned           up         up(s)   

R3

[R3-GigabitEthernet0/0/0]ip add 34.1.1.3 24
[R3-GigabitEthernet0/0/1]ip add 23.1.1.3 24
[R3-GigabitEthernet0/0/2]ip add 36.1.1.3 24
[R3-LoopBack0]ip add 3.3.3.3 32

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              34.1.1.3/24          up         up        
GigabitEthernet0/0/1              23.1.1.3/24          up         up        
GigabitEthernet0/0/2              36.1.1.3/24          up         up        
LoopBack0                         3.3.3.3/32           up         up(s)     
NULL0                             unassigned           up         up(s) 

R4

[R4-GigabitEthernet0/0/0]ip add 45.1.1.4 24
[R4-GigabitEthernet0/0/1]ip add 34.1.1.4 24
[R4-LoopBack0]ip add 4.4.4.4 32

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              45.1.1.4/24          up         up        
GigabitEthernet0/0/1              34.1.1.4/24          up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         4.4.4.4/32           up         up(s)     
NULL0                             unassigned           up         up(s)     

R5

[R5-GigabitEthernet0/0/0]ip add 56.1.1.5 24
[R5-GigabitEthernet0/0/1]ip add 45.1.1.5 24
[R5-LoopBack0]ip add 5.5.5.5 32

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              56.1.1.5/24          up         up        
GigabitEthernet0/0/1              45.1.1.5/24          up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         5.5.5.5/32           up         up(s)     
NULL0                             unassigned           up         up(s)     

R6

[R6-GigabitEthernet0/0/1]ip add 56.1.1.6 24
[R6-GigabitEthernet0/0/0]ip add 36.1.1.6 24
[R6-LoopBack0]ip add 6.6.6.6 32

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              36.1.1.6/24          up         up        
GigabitEthernet0/0/1              56.1.1.6/24          up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         6.6.6.6/32           up         up(s)     
NULL0                             unassigned           up         up(s)     

2.Rl-R2-R3-R4-R6之间使用0SPF协议

R3

[R3]ospf 100
[R3-ospf-100]dis this
[V200R003C00]
#
ospf 100 router-id 3.3.3.3 
 area 0.0.0.0 
  network 3.3.3.0 0.0.0.255 
  network 23.1.1.0 0.0.0.255 
  network 34.1.1.0 0.0.0.255 
  network 36.1.1.0 0.0.0.255 
#
return

用r2ping地址

[R2]ping 12.1.1.1
  PING 12.1.1.1: 56  data bytes, press CTRL_C to break
    Reply from 12.1.1.1: bytes=56 Sequence=1 ttl=255 time=30 ms
    Reply from 12.1.1.1: bytes=56 Sequence=2 ttl=255 time=20 ms
    Reply from 12.1.1.1: bytes=56 Sequence=3 ttl=255 time=10 ms
    Reply from 12.1.1.1: bytes=56 Sequence=4 ttl=255 time=20 ms
    Reply from 12.1.1.1: bytes=56 Sequence=5 ttl=255 time=20 ms

  --- 12.1.1.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 10/20/30 ms

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

  --- 36.1.1.6 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 20/28/30 ms

3.R4-R5-R6之间使用 RIP协议

R5

[R5]rip
[R5-rip-1]dis this
[V200R003C00]
#
rip 1
 version 2
 network 56.0.0.0
 network 45.0.0.0
#
return

用R4和R6ping

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

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

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

  --- 45.1.1.4 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 20/32/40 ms

4.R1环回重发布方式引入0SPF网络

[R1]route-policy c1 permit node 10
[R1-route-policy]if-match interface LoopBack 0
[R1-ospf-100]import-route direct route-policy c1

5.R4/R6上进行双点双向重发布

R4

[R4-ospf-100]import-route rip 
[R4-rip-1]import-route ospf 100

R5

[R6-ospf-100]import-route rip
[R6-rip-1]import-route ospf 100

6.分析网络中出现路由环路的原因

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值