当前位置:   article > 正文

OSPF小实验

OSPF小实验

根据题目完成下列实验: 

 

拓扑图详细设计如下: 

1.基础配置 

 R1:

  1. [R1]interface s4/0/0
  2. [R1-Serial4/0/0]ip address 12.1.1.1 24
  3. [R1]interface LoopBack 0
  4. [R1-LoopBack0]ip address 1.1.1.1 24

 

R2:

  1. [R2]interface s4/0/1
  2. [R2-Serial4/0/1]ip address 12.1.1.2 2
  3. [R2]interface s4/0/0
  4. [R2-Serial4/0/0]ip address 23.1.1.1 24
  5. [R2]interface LoopBack 0
  6. [R2-LoopBack0]ip address 2.2.2.2 24

 

R3:

  1. [R3]interface s4/0/1
  2. [R3-Serial4/0/1]ip address 23.1.1.2 24
  3. [R3]interface g0/0/0
  4. [R3-GigabitEthernet0/0/0]ip address 34.1.1.1 24
  5. [R3]interface LoopBack 0
  6. [R3-LoopBack0]ip address 3.3.3.3 24

R4:

  1. [R4]interface g0/0/0
  2. [R4-GigabitEthernet0/0/0]ip address 34.1.1.2 24
  3. [R4]interface g0/0/1
  4. [R4-GigabitEthernet0/0/1]ip address 45.1.1.1 24
  5. [R4]interface g0/0/2
  6. [R4-GigabitEthernet0/0/2]ip address 46.1.1.1 24

 

R5:

  1. [R5]interface g0/0/0
  2. [R5-GigabitEthernet0/0/0]ip address 45.1.1.2 24
  3. [R5]interface LoopBack 0
  4. [R5-LoopBack0]ip address 5.5.5.5 24

R6: 

  1. [R6]interface g0/0/0
  2. [R6-GigabitEthernet0/0/0]ip address 46.1.1.2 24
  3. [R6]interface LoopBack 0
  4. [R6-LoopBack0]ip address 6.6.6.6 24

2.启用ospf

R1:

  1. [R1]ospf 100 router-id 91.1.1.1
  2. [R1-ospf-100]area 0
  3. [R1-ospf-100-area-0.0.0.0]network 1.1.1.1 0.0.0.0
  4. [R1-ospf-100-area-0.0.0.0]network 12.1.1.1 0.0.0.0
  5. ospf enable 100 area 0

 

R2:

  1. [R2]ospf 100 router-id 92.2.2.2
  2. [R2-ospf-100]area 0
  3. [R2-ospf-100-area-0.0.0.0]network 12.1.1.1 0.0.0.0
  4. [R2-ospf-100-area-0.0.0.0]network 23.1.1.1 0.0.0.0
  5. [R2-ospf-100-area-0.0.0.0]network 2.2.2.2 0.0.0.0
  6. ospf enable 100 area 0

 

R3:

  1. [R3]ospf 100 router-id 93.3.3.3
  2. [R3-ospf-100]area 0
  3. [R3-ospf-100-area-0.0.0.0]network 23.1.1.2 0.0.0.0
  4. [R3-ospf-100-area-0.0.0.0]network 34.1.1.1 0.0.0.0
  5. [R3-ospf-100-area-0.0.0.0]network 3.3.3.3 0.0.0.0
  6. ospf enable 100 area 0

 

R4:

  1. [R4]ospf 100 router-id 94.4.4.4
  2. [R4-ospf-100]area 0
  3. [R4-ospf-100-area-0.0.0.0]network 34.1.1.2 0.0.0.0
  4. [R4-ospf-100-area-0.0.0.0]network 45.1.1.1 0.0.0.0
  5. [R4-ospf-100-area-0.0.0.0]network 46.1.1.1 0.0.0.0 
  6. ospf enable 100 area 0

 

R5:

  1. [R5]ospf 100 router-id 95.5.5.5
  2. [R5-ospf-100]area 0
  3. [R5-ospf-100-area-0.0.0.0]network 5.5.5.5 0.0.0.0
  4. [R5-ospf-100-area-0.0.0.0]network 45.1.1.2 0.0.0.0
  5. ospf enable 100 area 0

 

R6:

  1. [R6]ospf 100 router-id 96.6.6.6
  2. [R6-ospf-100]area 0
  3. [R6-ospf-100-area-0.0.0.0]network 6.6.6.6 0.0.0.0
  4. [R6-ospf-100-area-0.0.0.0]network 46.1.1.2 0.0.0.0
  5. ospf enable 100 area 0

 

3.R1和R2之间启用PPP的PAP的单向认证 

R1:

  1. [R1]aaa
  2. [R1-aaa]local-user hcip password cipher 123
  3. Info: Add a new user.
  4. [R1-aaa]local-user hcip service-type ppp
  5. [R1]interface s4/0/0
  6. [R1-Serial4/0/0]ppp authentication-mode pap

R2:

  1. [R2]interface s4/0/1
  2. [R2-Serial4/0/1]link-protocol ppp
  3. [R2-Serial4/0/1]ppp pap local-user hcip password cipher 123

 

 

4.R2和R3之间启用PPP的chap的双向认证 

R2:

  1. [R2]aaa
  2. [R2-aaa]local-user hcia password cipher 123
  3. Info: Add a new user.
  4. [R2-aaa]q
  5. [R2]interface s4/0/0
  6. [R2-Serial4/0/0]link-protocol ppp
  7. [R2-Serial4/0/0]ppp authentication-mode chap
  8. [R2]interface s4/0/0
  9. [R2-Serial4/0/0]link-protocol ppp
  10. [R2-Serial4/0/0]ppp chap user hcie
  11. [R2-Serial4/0/0]ppp chap password cipher 123

R3:

  1. [R3]interface s4/0/1
  2. [R3-Serial4/0/1]link-protocol ppp
  3. [R3-Serial4/0/1]ppp chap user hcia
  4. [R3-Serial4/0/1]ppp chap password cipher 123
  5. [R3]aaa
  6. [R3-aaa]local-user hcie password cipher 123
  7. Info: Add a new user.
  8. [R3-aaa]q
  9. [R3]interface s4/0/1
  10. [R3-Serial4/0/1]link-protocol ppp
  11. [R3-Serial4/0/1]ppp authentication-mode chap

 5.R3-R5-R6之间的MGRE

R3:

  1. [R3]interface Tunnel 0/0/0
  2. [R3-Tunnel0/0/0]ip address 100.1.1.1 24
  3. [R3-Tunnel0/0/0]tunnel-protocol gre p2mp
  4. [R3-Tunnel0/0/0]source 34.1.1.1
  5. Aug 7 2024 21:00:57-08:00 R3 %%01IFNET/4/LINK_STATE(l)[34]:The line protocol IP
  6. on the interface Tunnel0/0/0 has entered the UP state.
  7. [R3-Tunnel0/0/0]nhrp network-id 100
  8. [R3-Tunnel0/0/0]nhrp entry multicast dynamic
  9. [R3-Tunnel0/0/0]ospf network-type broadcast
  10. [R3]ip route-static 0.0.0.0 0 34.1.1.2

R5:

  1. [R5]interface Tunnel 0/0/0
  2. [R5-Tunnel0/0/0]ip address 100.1.1.2 24
  3. [R5-Tunnel0/0/0]tunnel-protocol gre p2mp
  4. [R5-Tunnel0/0/0]source 45.1.1.2
  5. Aug 7 2024 21:07:36-08:00 R5 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
  6. on the interface Tunnel0/0/0 has entered the UP state.
  7. [R5-Tunnel0/0/0]nhrp network-id 100
  8. [R5-Tunnel0/0/0]nhrp entry 100.1.1.1 34.1.1.1 register
  9. [R5-Tunnel0/0/0]ospf network-type broadcast
  10. [R5]ip route-static 0.0.0.0 0 45.1.1.1

R6:

  1. [R6]interface Tunnel 0/0/0
  2. [R6-Tunnel0/0/0]ip address 100.1.1.3 24
  3. [R6-Tunnel0/0/0]source 46.1.1.2
  4. Aug 7 2024 21:12:17-08:00 R6 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
  5. on the interface Tunnel0/0/0 has entered the UP state.
  6. [R6-Tunnel0/0/0]tunnel-protocol gre p2mp
  7. [R6-Tunnel0/0/0]nhrp network-id 100
  8. [R6-Tunnel0/0/0]nhrp entry 100.1.1.1 34.1.1.1 register
  9. [R6-Tunnel0/0/0]ospf network-type broadcast
  10. [R6]ip route-static 0.0.0.0 0 46.1.1.1

6.实现全网通 

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小惠珠哦/article/detail/987823
推荐阅读
相关标签
  

闽ICP备14008679号