OSPFv3配置 、 特殊区域之NSSA 、 OSPF安全认证 、 IPv6协议介绍 、 OSPF 虚链路 、 OSPF 路由汇总

1 案例:配置NSSA区域

1.1 问题

  1. 如图配置设备IP地址和OSPF区域
  2. R4去往ISP,使用的是静态的默认路由
  3. R1去往合作公司,使用的也是静态路由,仅需要访问 PC-1 即可
  4. 区域 123 不允许出现 5类 LSA
  5. 确保 PC-1 和 Server-1 互通

1.2 方案

搭建实验环境,如图-1所示。

OSPFv3配置 、 特殊区域之NSSA 、 OSPF安全认证 、 IPv6协议介绍 、 OSPF 虚链路 、 OSPF 路由汇总图-1

1.3 步骤

实现此案例需要按照如下步骤进行。[hidecontent type=”payshow”]

1)配置终端设备

  1. PC-1
  2. 192.168.10.1
  3. 255.255.255.0
  4. 192.168.10.254
  5. Server-1:
  6. 192.168.20.1
  7. 255.255.255.0
  8. 192.168.20.254

2)配置IP地址和基本OSPF

  1. <Huawei>undo terminal monitor
  2. <Huawei>systemview
  3. [Huawei]sysname R1
  4. [R1]interface GigabitEthernet 0/0/0
  5. [R1GigabitEthernet0/0/0]ip address 192.168.12.1 24
  6. [R1GigabitEthernet0/0/0]quit
  7. [R1]interface GigabitEthernet 0/0/1
  8. [R1GigabitEthernet0/0/1]ip address 192.168.16.1 24
  9. [R1GigabitEthernet0/0/1]quit
  10. [R1]ospf 1 routerid 1.1.1.1
  11. [R1ospf-1]area 123
  12. [R1ospf-1area-0.0.0.123]network 192.168.12.0 0.0.0.255
  13. [R1ospf-1area-0.0.0.123]quit
  14. [R1ospf-1]quit
  15. <Huawei>undo terminal monitor
  16. <Huawei>systemview
  17. [Huawei]sysname R2
  18. [R2]interface GigabitEthernet 0/0/1
  19. [R2GigabitEthernet0/0/1]ip address 192.168.12.2 24
  20. [R2GigabitEthernet0/0/1]q
  21. [R2]interface GigabitEthernet 0/0/0
  22. [R2GigabitEthernet0/0/0]ip address 192.168.23.2 24
  23. [R2GigabitEthernet0/0/0]q
  24. [R2]ospf 1 routerid 2.2.2.2
  25. [R2ospf-1]area 123
  26. [R2ospf-1area-0.0.0.123]network 192.168.12.0 0.0.0.255
  27. [R2ospf-1area-0.0.0.123]network 192.168.23.0 0.0.0.255
  28. [R2ospf-1area-0.0.0.123]quit
  29. [R2ospf-1]quit
  30. <Huawei>undo terminal monitor
  31. <Huawei>systemview
  32. [Huawei]sysname R3
  33. [R3]interface GigabitEthernet 0/0/1
  34. [R3GigabitEthernet0/0/1]ip address 192.168.23.3 24
  35. [R3GigabitEthernet0/0/1]quit
  36. [R3]interface GigabitEthernet 0/0/0
  37. [R3GigabitEthernet0/0/0]ip address 192.168.34.3 24
  38. [R3GigabitEthernet0/0/0]quit
  39. [R3]ospf 1 routerid 3.3.3.3
  40. [R3ospf-1]area 123
  41. [R3ospf-1area-0.0.0.123]network 192.168.23.0 0.0.0.255
  42. [R3ospf-1area-0.0.0.123]quit
  43. [R3ospf-1]area 0
  44. [R3ospf-1area-0.0.0.0]network 192.168.34.0 0.0.0.255
  45. [R3ospf-1]quit
  46. <Huawei>undo terminal monitor
  47. <Huawei>systemview
  48. [Huawei]sysname R4
  49. [R4]interface GigabitEthernet 0/0/1
  50. [R4GigabitEthernet0/0/1]ip address 192.168.34.4 24
  51. [R4GigabitEthernet0/0/1]quit
  52. [R4]interface GigabitEthernet 0/0/0
  53. [R4GigabitEthernet0/0/0]ip address 192.168.45.4 24
  54. [R4GigabitEthernet0/0/0]quit
  55. [R4]ospf 1 routerid 4.4.4.4
  56. [R4ospf-1]area 0
  57. [R4ospf-1area-0.0.0.0]network 192.168.34.0 0.0.0.255
  58. [R4ospf-1]quit
  59. <Huawei>undo terminal monitor
  60. <Huawei>systemview
  61. [Huawei]sysname ISP
  62. [ISP]interface GigabitEthernet 0/0/1
  63. [ISPGigabitEthernet0/0/1]ip address 192.168.45.5 24
  64. [ISPGigabitEthernet0/0/1]quit
  65. [ISP]interface GigabitEthernet 0/0/2
  66. [ISPGigabitEthernet0/0/2]ip address 192.168.20.254 24
  67. [ISPGigabitEthernet0/0/2]quit
  68. [ISP] ip routestatic 192.168.0.0 16 192.168.45.4
  69. <Huawei>undo terminal monitor
  70. <Huawei>systemview
  71. [Huawei]sysname R6
  72. [R6]interface GigabitEthernet 0/0/0
  73. [R6GigabitEthernet0/0/1]ip address 192.168.16.6 24
  74. [R6GigabitEthernet0/0/1]quit
  75. [R6]interface GigabitEthernet 0/0/2
  76. [R6GigabitEthernet0/0/2]ip address 192.168.10.254 24
  77. [R6GigabitEthernet0/0/2]quit
  78. [R6] ip routestatic 192.168.0.0 255.255.0.0 192.168.16.1

3)配置区域123为 NSSA 区域

  1. [R1]ospf 1
  2. [R1ospf-1]area 123
  3. [R1ospf-1area-0.0.0.123]nssa
  4. [R1ospf-1area-0.0.0.123]quit
  5. [R2]ospf 1
  6. [R2ospf-1]area 123
  7. [R2ospf-1area-0.0.0.123]nssa
  8. [R2ospf-1area-0.0.0.123]quit
  9. [R3]ospf 1
  10. [R3ospf-1]area 123
  11. [R3ospf-1area-0.0.0.123]nssa
  12. [R3ospf-1area-0.0.0.123]quit

4)配置 R1 引入 合作公司的外部路由

  1. [R1]ip routestatic 192.168.10.0 24 192.168.16.6
  2. [R1]ospf 1
  3. [R1ospf-1]importroute static

5)配置 R4 引入 去往外部网络的路由

  1. [R4]ip routestatic 0.0.0.0 0 192.168.45.5
  2. [R4]ospf 1
  3. [R4ospf-1]defaultrouteadvertise

6)测试 PC1 和 Server-1的连通性

  1. PC-1>ping 192.168.20.1
  2. Ping 192.168.20.1: 32 data bytes, Press Ctrl_C to break
  3. From 192.168.20.1: bytes=32 seq=1 ttl=125 time=31 ms
  4. From 192.168.20.1: bytes=32 seq=2 ttl=125 time=31 ms
  5. From 192.168.20.1: bytes=32 seq=3 ttl=125 time=16 ms
  6. From 192.168.20.1: bytes=32 seq=4 ttl=125 time=16 ms
  7. From 192.168.20.1: bytes=32 seq=5 ttl=125 time=31 ms
  8. 192.168.20.1 ping statistics
  9. 5 packet(s) transmitted

2 案例:配置OSPF汇总

2.1 问题

  1. 对区域 12 进行3类LSA汇总,汇总后为 10.10.0.0/16
  2. 对区域 45 的直连链路进行5类汇总,进行精确汇总

2.2 方案

搭建实验环境,如图-2所示。

OSPFv3配置 、 特殊区域之NSSA 、 OSPF安全认证 、 IPv6协议介绍 、 OSPF 虚链路 、 OSPF 路由汇总图-2

2.3 步骤

实现此案例需要按照如下步骤进行。

1)配置IP地址和OSPF

  1. <Huawei>undo terminal monitor
  2. <Huawei>systemview
  3. [Huawei]sysname R1
  4. [R1]interface GigabitEthernet 0/0/0
  5. [R1GigabitEthernet0/0/0]ip add 192.168.12.1 24
  6. [R1GigabitEthernet0/0/0]quit
  7. [R1]interface LoopBack 1
  8. [R1LoopBack1]ip address 10.10.1.1 24
  9. [R1LoopBack1]quit
  10. [R1]interface LoopBack 2
  11. [R1LoopBack2]ip address 10.10.2.2 24
  12. [R1LoopBack2]quit
  13. [R1]interface LoopBack 3
  14. [R1LoopBack3]ip address 10.10.3.3 24
  15. [R1LoopBack3]quit
  16. [R1]interface LoopBack 4
  17. [R1LoopBack4]ip address 10.10.4.4 24
  18. [R1LoopBack4]quit
  19. [R1]ospf 1 routerid 1.1.1.1
  20. [R1ospf-1]area 12
  21. [R1ospf-1area-0.0.0.12]network 192.168.12.0 0.0.0.255
  22. [R1ospf-1area-0.0.0.12]network 10.10.1.0 0.0.0.255
  23. [R1ospf-1area-0.0.0.12]network 10.10.2.0 0.0.0.255
  24. [R1ospf-1area-0.0.0.12]network 10.10.3.0 0.0.0.255
  25. [R1ospf-1area-0.0.0.12]network 10.10.4.0 0.0.0.255
  26. [R1ospf-1area-0.0.0.12]quit
  27. <Huawei>undo terminal monitor
  28. <Huawei>systemview
  29. [Huawei]sysname R2
  30. [R2]interface GigabitEthernet 0/0/1
  31. [R2GigabitEthernet0/0/1]ip add 192.168.12.2 24
  32. [R2GigabitEthernet0/0/1]quit
  33. [R2]interface GigabitEthernet 0/0/0
  34. [R2GigabitEthernet0/0/0]ip add 192.168.23.2 24
  35. [R2GigabitEthernet0/0/0]quit
  36. [R2]ospf 1 routerid 2.2.2.2
  37. [R2ospf-1]area 12
  38. [R2ospf-1area-0.0.0.12]network 192.168.12.0 0.0.0.255
  39. [R2ospf-1area-0.0.0.12]quit
  40. [R2ospf-1]area 0
  41. [R2ospf-1area-0.0.0.0]network 192.168.23.0 0.0.0.255
  42. [R2ospf-1area-0.0.0.0]quit
  43. <Huawei>undo terminal monitor
  44. <Huawei>systemview
  45. [Huawei]sysname R3
  46. [R3]interface GigabitEthernet 0/0/1
  47. [R3GigabitEthernet0/0/1]ip add 192.168.23.3 24
  48. [R3GigabitEthernet0/0/1]quit
  49. [R3]interface GigabitEthernet 0/0/0
  50. [R3GigabitEthernet0/0/0]ip add 192.168.34.3 24
  51. [R3GigabitEthernet0/0/0]quit
  52. [R3]ospf 1 routerid 3.3.3.3
  53. [R3ospf-1]area 0
  54. [R3ospf-1area-0.0.0.0]network 192.168.23.0 0.0.0.255
  55. [R3ospf-1area-0.0.0.0]network 192.168.34.0 0.0.0.255
  56. [R3ospf-1area-0.0.0.0]quit
  57. <Huawei>undo terminal monitor
  58. <Huawei>systemview
  59. [Huawei]sysname R4
  60. [R4]interface GigabitEthernet 0/0/1
  61. [R4GigabitEthernet0/0/1]ip add 192.168.34.4 24
  62. [R4GigabitEthernet0/0/1]quit
  63. [R4]interface GigabitEthernet 0/0/0
  64. [R4GigabitEthernet0/0/0]ip add 192.168.45.4 24
  65. [R4GigabitEthernet0/0/0]quit
  66. [R4]ospf 1 routerid 4.4.4.4
  67. [R4ospf-1]area 0
  68. [R4ospf-1area-0.0.0.0]network 192.168.34.0 0.0.0.255
  69. [R4ospf-1area-0.0.0.0]quit
  70. [R4ospf-1]area 45
  71. [R4ospf-1area-0.0.0.0]network 192.168.45.0 0.0.0.255
  72. <Huawei>undo terminal monitor
  73. <Huawei>systemview
  74. [Huawei]sysname R5
  75. [R5]interface GigabitEthernet 0/0/1
  76. [R5GigabitEthernet0/0/1]ip add 192.168.45.5 24
  77. [R5GigabitEthernet0/0/1]quit
  78. [R1]interface LoopBack 51
  79. [R1LoopBack1]ip address 10.50.1.1 24
  80. [R1LoopBack1]quit
  81. [R1]interface LoopBack 52
  82. [R1LoopBack2]ip address 10.50.2.2 24
  83. [R1LoopBack2]quit
  84. [R1]interface LoopBack 53
  85. [R1LoopBack3]ip address 10.50.3.3 24
  86. [R1LoopBack3]quit
  87. [R1]interface LoopBack 54
  88. [R1LoopBack4]ip address 10.50.4.4 24
  89. [R1LoopBack4]quit
  90. [R5]ospf 1 routerid 5.5.5.5
  91. [R5ospf-1]importroute direct
  92. [R5ospf-1]area 45
  93. [R5ospf-1area-0.0.0.56]network 192.168.45.0 0.0.0.255
  94. [R5ospf-1area-0.0.0.56]quit

2)对区域12进行3类LSA汇总

  1. [R2]ospf 1
  2. [R2ospf-1]area 12
  3. [R2ospf-1area-0.0.0.12]abrsummary 10.10.0.0 255.255.0.0

3)对区域45的5类LSA进行精确汇总

  1. [R5]ospf 1
  2. [R5ospf-1]asbrsummary 10.50.0.0 255.255.248.0

3 案例:OSPF虚链路配置

3.1 问题

  1. 公司网络扩容,新区域与骨干区域无法相连
  2. 通过配置虚链路解决问题

3.2 方案

搭建实验环境,如图-3所示。

OSPFv3配置 、 特殊区域之NSSA 、 OSPF安全认证 、 IPv6协议介绍 、 OSPF 虚链路 、 OSPF 路由汇总图-3

3.3 步骤

实现此案例需要按照如下步骤进行。

1)配置IP地址和OSPF网络

  1. <Huawei>undo terminal monitor
  2. <Huawei>systemview
  3. [Huawei]sysname R1
  4. [R1]interface GigabitEthernet 0/0/0
  5. [R1GigabitEthernet0/0/0]ip add 192.168.14.1 24
  6. [R1GigabitEthernet0/0/0]quit
  7. [R1]interface GigabitEthernet 0/0/1
  8. [R1GigabitEthernet0/0/1]ip add 192.168.12.1 24
  9. [R1GigabitEthernet0/0/1]quit
  10. [R1]ospf 1 routerid 1.1.1.1
  11. [R1ospf-1]area 0
  12. [R1ospf-1area-0.0.0.0]network 192.168.14.0 0.0.0.255
  13. [R1ospf-1area-0.0.0.0]quit
  14. [R1ospf-1]area 1
  15. [R1ospf-1area-0.0.0.1]network 192.168.12.0 0.0.0.255
  16. [R1ospf-1area-0.0.0.1]quit
  17. <Huawei>undo terminal monitor
  18. <Huawei>systemview
  19. [Huawei]sysname R4
  20. [R4]interface GigabitEthernet 0/0/0
  21. [R4GigabitEthernet0/0/0]ip add 192.168.14.4 24
  22. [R4GigabitEthernet0/0/0]quit
  23. [R4]ospf 1 routerid 4.4.4.4
  24. [R4ospf-1]area 0
  25. [R4ospf-1area-0.0.0.0]network 192.168.14.0 0.0.0.255
  26. [R4ospf-1area-0.0.0.0]quit
  27. <Huawei>undo terminal monitor
  28. <Huawei>systemview
  29. [Huawei]sysname R2
  30. [R2]interface GigabitEthernet 0/0/1
  31. [R2GigabitEthernet0/0/1]ip add 192.168.12.2 24
  32. [R2GigabitEthernet0/0/1]quit
  33. [R2]interface GigabitEthernet 0/0/0
  34. [R2GigabitEthernet0/0/0]ip add 192.168.23.2 24
  35. [R2GigabitEthernet0/0/0]quit
  36. [R2]ospf 1 routerid 2.2.2.2
  37. [R2ospf-1]area 1
  38. [R2ospf-1area-0.0.0.1]network 192.168.12.0 0.0.0.255
  39. [R2ospf-1area-0.0.0.1]quit
  40. [R2ospf-1]area 2
  41. [R2ospf-1area-0.0.0.2]network 192.168.23.0 0.0.0.255
  42. [R2ospf-1area-0.0.0.2]quit

2)在R1和R2之间配置虚链路

  1. [R2]ospf 1
  2. [R2ospf-1]area 1
  3. [R2ospf-1area-0.0.0.1]vlinkpeer 1.1.1.1
  4. [R1]ospf 1
  5. [R1ospf-1]area 1
  6. [R1ospf-1area-0.0.0.1]vlinkpeer 2.2.2.2

3)验证 R3 和 R4 可以互相 Ping 通

  1. [R3]ping 192.168.14.4
  2. PING 192.168.14.4: 56 data bytes, press CTRL_C to break
  3. Reply from 192.168.14.4: bytes=56 Sequence=1 ttl=255 time=30 ms
  4. Reply from 192.168.14.4: bytes=56 Sequence=2 ttl=255 time=20 ms
  5. Reply from 192.168.14.4: bytes=56 Sequence=3 ttl=255 time=10 ms
  6. Reply from 192.168.14.4: bytes=56 Sequence=4 ttl=255 time=30 ms
  7. Reply from 192.168.14.4: bytes=56 Sequence=5 ttl=255 time=10 ms
  8. 192.168.14.4 ping statistics
  9. 5 packet(s) transmitted
  10. 5 packet(s) received
  11. 0.00% packet loss
  12. roundtrip min/avg/max = 10/20/30 ms
  13. [R4]ping 192.168.23.3
  14. PING 192.168.23.3: 56 data bytes, press CTRL_C to break
  15. Reply from 192.168.23.3: bytes=56 Sequence=1 ttl=255 time=30 ms
  16. Reply from 192.168.23.3: bytes=56 Sequence=2 ttl=255 time=20 ms
  17. Reply from 192.168.23.3: bytes=56 Sequence=3 ttl=255 time=10 ms
  18. Reply from 192.168.23.3: bytes=56 Sequence=4 ttl=255 time=30 ms
  19. Reply from 192.168.23.3: bytes=56 Sequence=5 ttl=255 time=10 ms
  20. 192.168.23.3 ping statistics
  21. 5 packet(s) transmitted
  22. 5 packet(s) received
  23. 0.00% packet loss
  24. roundtrip min/avg/max = 10/20/30 ms

4 案例:配置 OSPF 认证

4.1 问题

  1. 如图配置IP地址和OSPF区域
  2. 区域12启用密文的链路认证,密码为HCIE
  3. 区域56启用明文的区域认证,密码为HCIP
  4. 区域0启用最安全区域认证,密码为 HCIA
  5. R3-R4使用最安全密码为:HuaWei

4.2 方案

搭建实验环境,如图-4所示。

OSPFv3配置 、 特殊区域之NSSA 、 OSPF安全认证 、 IPv6协议介绍 、 OSPF 虚链路 、 OSPF 路由汇总图-4

4.3 步骤

实现此案例需要按照如下步骤进行。

1)配置IP地址和OSPF网络

  1. <Huawei>undo terminal monitor
  2. <Huawei>systemview
  3. [Huawei]sysname R1
  4. [R1]interface GigabitEthernet 0/0/0
  5. [R1GigabitEthernet0/0/0]ip add 192.168.12.1 24
  6. [R1GigabitEthernet0/0/0]quit
  7. [R1]ospf 1 routerid 1.1.1.1
  8. [R1ospf-1]area 12
  9. [R1ospf-1area-0.0.0.12]network 192.168.12.0 0.0.0.255
  10. [R1ospf-1area-0.0.0.12]quit
  11. <Huawei>undo terminal monitor
  12. <Huawei>systemview
  13. [Huawei]sysname R2
  14. [R2]interface GigabitEthernet 0/0/1
  15. [R2GigabitEthernet0/0/1]ip add 192.168.12.2 24
  16. [R2GigabitEthernet0/0/1]quit
  17. [R2]interface GigabitEthernet 0/0/0
  18. [R2GigabitEthernet0/0/0]ip add 192.168.23.2 24
  19. [R2GigabitEthernet0/0/0]quit
  20. [R2]ospf 1 routerid 2.2.2.2
  21. [R2ospf-1]area 12
  22. [R2ospf-1area-0.0.0.12]network 192.168.12.0 0.0.0.255
  23. [R2ospf-1area-0.0.0.12]quit
  24. [R2ospf-1]area 0
  25. [R2ospf-1area-0.0.0.0]network 192.168.23.0 0.0.0.255
  26. [R2ospf-1area-0.0.0.0]quit
  27. <Huawei>undo terminal monitor
  28. <Huawei>systemview
  29. [Huawei]sysname R3
  30. [R3]interface GigabitEthernet 0/0/1
  31. [R3GigabitEthernet0/0/1]ip add 192.168.23.3 24
  32. [R3GigabitEthernet0/0/1]quit
  33. [R3]interface GigabitEthernet 0/0/0
  34. [R3GigabitEthernet0/0/0]ip add 192.168.34.3 24
  35. [R3GigabitEthernet0/0/0]quit
  36. [R3]ospf 1 routerid 3.3.3.3
  37. [R3ospf-1]area 0
  38. [R3ospf-1area-0.0.0.0]network 192.168.23.0 0.0.0.255
  39. [R3ospf-1area-0.0.0.0]network 192.168.34.0 0.0.0.255
  40. [R3ospf-1area-0.0.0.0]quit
  41. <Huawei>undo terminal monitor
  42. <Huawei>systemview
  43. [Huawei]sysname R4
  44. [R4]interface GigabitEthernet 0/0/1
  45. [R4GigabitEthernet0/0/1]ip add 192.168.34.4 24
  46. [R4GigabitEthernet0/0/1]quit
  47. [R4]interface GigabitEthernet 0/0/0
  48. [R4GigabitEthernet0/0/0]ip add 192.168.45.4 24
  49. [R4GigabitEthernet0/0/0]quit
  50. [R4]ospf 1 routerid 4.4.4.4
  51. [R4ospf-1]area 0
  52. [R4ospf-1area-0.0.0.0]network 192.168.34.0 0.0.0.255
  53. [R4ospf-1area-0.0.0.0]network 192.168.45.0 0.0.0.255
  54. [R4ospf-1area-0.0.0.0]quit
  55. <Huawei>undo terminal monitor
  56. <Huawei>systemview
  57. [Huawei]sysname R5
  58. [R5]interface GigabitEthernet 0/0/1
  59. [R5GigabitEthernet0/0/1]ip add 192.168.45.5 24
  60. [R5GigabitEthernet0/0/1]quit
  61. [R5]interface GigabitEthernet 0/0/0
  62. [R5GigabitEthernet0/0/0]ip add 192.168.56.5 24
  63. [R5GigabitEthernet0/0/0]quit
  64. [R5]ospf 1 routerid 5.5.5.5
  65. [R5ospf-1]area 56
  66. [R5ospf-1area-0.0.0.56]network 192.168.56.0 0.0.0.255
  67. [R5ospf-1area-0.0.0.56]quit
  68. [R5ospf-1]area 0
  69. [R5ospf-1area-0.0.0.0]network 192.168.45.0 0.0.0.255
  70. [R5ospf-1area-0.0.0.0]quit
  71. <Huawei>undo terminal monitor
  72. <Huawei>systemview
  73. [Huawei]sysname R6
  74. [R6]interface GigabitEthernet 0/0/1
  75. [R6GigabitEthernet0/0/1]ip add 192.168.56.6 24
  76. [R6GigabitEthernet0/0/1]quit
  77. [R6]ospf 1 routerid 6.6.6.6
  78. [R6ospf-1]area 56
  79. [R6ospf-1area-0.0.0.56]network 192.168.56.0 0.0.0.255
  80. [R6ospf-1area-0.0.0.56]quit

2)配置区域12的认证

  1. [R1]interface GigabitEthernet 0/0/0
  2. [R1GigabitEthernet0/0/0]ospf authenticationmode md5 1 cipher HCIE
  3. [R2]interface GigabitEthernet 0/0/1
  4. [R2GigabitEthernet0/0/1]ospf authenticationmode md5 1 cipher HCIE

3)配置区域56的认证

  1. [R5]ospf 1
  2. [R5ospf-1]area 56
  3. [R5ospf-1area-0.0.0.56]authenticationmode simple cipher HCIP
  4. [R6]ospf 1
  5. [R6ospf-1]area 56
  6. [R6ospf-1area-0.0.0.56]authenticationmode simple cipher HCIP

4)配置区域0的认证

  1. [R2]ospf 1
  2. [R2ospf-1]area 0
  3. [R2ospf-1area-0.0.0.0]authenticationmode md5 1 cipher HCIA
  4. [R3]ospf 1
  5. [R3ospf-1]area 0
  6. [R3ospf-1area-0.0.0.0]authenticationmode md5 1 cipher HCIA
  7. [R4]ospf 1
  8. [R4ospf-1]area 0
  9. [R4ospf-1area-0.0.0.0]authenticationmode md5 1 cipher HCIA
  10. [R5]ospf 1
  11. [R5ospf-1]area 0
  12. [R5ospf-1area-0.0.0.0]authenticationmode md5 1 cipher HCIA

5)配置R3-R4之间的认证

  1. [R3]interface GigabitEthernet 0/0/0
  2. [R3GigabitEthernet0/0/0]ospf authenticationmode md5 1 cipher HuaWei
  3. [R4]interface GigabitEthernet 0/0/1
  4. [R4GigabitEthernet0/0/1]ospf authenticationmode md5 1 cipher HuaWei

5 案例:IPv6 基本配置

5.1 问题

  1. 如图配置IPv6地址
  2. 查看并测试IPv6接口和连通性
  3. 确保 PC-1 和 PC-2 互通

5.2 方案

搭建实验环境,如图-5所示。

OSPFv3配置 、 特殊区域之NSSA 、 OSPF安全认证 、 IPv6协议介绍 、 OSPF 虚链路 、 OSPF 路由汇总图-5

5.3 步骤

实现此案例需要按照如下步骤进行。

1)配置终端设备

  1. PC-1
  2. 2001:11::1
  3. 64
  4. 2001:11::254
  5. PC-2
  6. 2001:22::1
  7. 64
  8. 2001:22::254

2)配置网络设备

  1. <Huawei>undo terminal monitor
  2. <Huawei>systemview
  3. [Huawei]sysname R1
  4. [R1]ipv6
  5. [R1]interface GigabitEthernet 0/0/0
  6. [R1GigabitEthernet0/0/0]ipv6 enable
  7. [R1GigabitEthernet0/0/0]ipv6 address 2001:12::1 64
  8. [R1GigabitEthernet0/0/0]quit
  9. [R1]interface GigabitEthernet 0/0/2
  10. [R1GigabitEthernet0/0/2]ipv6 enable
  11. [R1GigabitEthernet0/0/2]ipv6 address 2001:11::254 64
  12. [R1GigabitEthernet0/0/2]quit
  13. <Huawei>undo terminal monitor
  14. <Huawei>systemview
  15. [Huawei]sysname R2
  16. [R2]ipv6
  17. [R2]interface GigabitEthernet 0/0/01
  18. [R2GigabitEthernet0/0/1]ipv6 enable
  19. [R2GigabitEthernet0/0/1]ipv6 address 2001:12::2 64
  20. [R2GigabitEthernet0/0/1]quit
  21. [R2]interface GigabitEthernet 0/0/0
  22. [R2GigabitEthernet0/0/0]ipv6 enable
  23. [R2GigabitEthernet0/0/0]ipv6 address 2001:23::2 64
  24. [R2GigabitEthernet0/0/0]quit
  25. <Huawei>undo terminal monitor
  26. <Huawei>systemview
  27. [Huawei]sysname R3
  28. [R3]ipv6
  29. [R3]interface GigabitEthernet 0/0/0
  30. [R3GigabitEthernet0/0/0]ipv6 enable
  31. [R3GigabitEthernet0/0/0]ipv6 address 2001:23::3 64
  32. [R3GigabitEthernet0/0/0]quit
  33. [R3]interface GigabitEthernet 0/0/2
  34. [R3GigabitEthernet0/0/2]ipv6 enable
  35. [R3GigabitEthernet0/0/2]ipv6 address 2001:22::254 64
  36. [R3GigabitEthernet0/0/2]quit

3)配置IPv6路由条目

  1. [R1]ipv6 routestatic :: 0 2001:12::2
  2. [R3]ipv6 routestatic :: 0 2001:23::2
  3. [R2] ipv6 routestatic 2001:11:: 64 2001:12::1
  4. [R2] ipv6 routestatic 2001:22:: 64 2001:23::3

4)测试 PC-1 与 PC2 的连通性

  1. PC-1>ping 2001:22::1
  2. Ping 2001:22::1: 32 data bytes, Press Ctrl_C to break
  3. From 2001:22::1: bytes=32 seq=1 hop limit=254 time<1 ms
  4. From 2001:22::1: bytes=32 seq=2 hop limit=254 time=15 ms
  5. From 2001:22::1: bytes=32 seq=3 hop limit=254 time=16 ms
  6. From 2001:22::1: bytes=32 seq=4 hop limit=254 time=15 ms
  7. From 2001:22::1: bytes=32 seq=5 hop limit=254 time=16 ms
  8. 2001:22::1 ping statistics
  9. 5 packet(s) transmitted
  10. 5 packet(s) received
  11. 0.00% packet loss
  12. roundtrip min/avg/max = 0/12/16 ms
  13. PC-2>ping 2001:11::1
  14. Ping 2001:11::1: 32 data bytes, Press Ctrl_C to break
  15. From 2001:11::1: bytes=32 seq=1 hop limit=254 time=16 ms
  16. From 2001:11::1: bytes=32 seq=2 hop limit=254 time=16 ms
  17. From 2001:11::1: bytes=32 seq=3 hop limit=254 time=15 ms
  18. From 2001:11::1: bytes=32 seq=4 hop limit=254 time=16 ms
  19. From 2001:11::1: bytes=32 seq=5 hop limit=254 time=15 ms
  20. 2001:11::1 ping statistics
  21. 5 packet(s) transmitted
  22. 5 packet(s) received
  23. 0.00% packet loss
  24. roundtrip min/avg/max = 15/15/16 ms

6 案例:配置 OSPFv3 网络

6.1 问题

  1. 如图配置IPv6地址和OSPFv3区域
  2. 查看OSPFv3邻居和数据库LSA
  3. 确保 R1 和 R3 可以互相访问

6.2 方案

搭建实验环境,如图-6所示。

OSPFv3配置 、 特殊区域之NSSA 、 OSPF安全认证 、 IPv6协议介绍 、 OSPF 虚链路 、 OSPF 路由汇总图-6

6.3 步骤

实现此案例需要按照如下步骤进行。

1)配置R1 地址,并启用 OSPFv3

  1. <Huawei>undo terminal monitor
  2. <Huawei>systemview
  3. [Huawei]sysname R1
  4. [R1]ipv6
  5. [R1]interface GigabitEthernet 0/0/0
  6. [R1GigabitEthernet0/0/0]ipv6 enable
  7. [R1GigabitEthernet0/0/0]ipv6 address 2001:12::1 64
  8. [R1GigabitEthernet0/0/0]quit
  9. [R1]ospfv3 1
  10. [R1ospfv3-1]routerid 1.1.1.1
  11. [R1ospfv3-1]quit
  12. [R1]interface GigabitEthernet 0/0/0
  13. [R1GigabitEthernet0/0/0]ospfv3 1 area 0
  14. [R1GigabitEthernet0/0/0]quit

2)配置R2 地址,并启用 OSPFv3

  1. <Huawei>undo terminal monitor
  2. <Huawei>systemview
  3. [Huawei]sysname R2
  4. [R2]ipv6
  5. [R2]interface GigabitEthernet 0/0/0
  6. [R2GigabitEthernet0/0/0]ipv6 enable
  7. [R2GigabitEthernet0/0/0]ipv6 address 2001:23::2 64
  8. [R2GigabitEthernet0/0/0]quit
  9. [R2]interface GigabitEthernet 0/0/1
  10. [R2GigabitEthernet0/0/1]ipv6 enable
  11. [R2GigabitEthernet0/0/1]ipv6 address 2001:12::2 64
  12. [R2GigabitEthernet0/0/1]quit
  13. [R2]ospfv3 1
  14. [R2ospfv3-1]routerid 2.2.2.2
  15. [R2ospfv3-1]quit
  16. [R2]interface GigabitEthernet 0/0/1
  17. [R2GigabitEthernet0/0/1]ospfv3 1 area 0
  18. [R2GigabitEthernet0/0/1]quit
  19. [R2]interface GigabitEthernet 0/0/0
  20. [R2GigabitEthernet0/0/0]ospfv3 1 area 1
  21. [R2GigabitEthernet0/0/0]quit

3)配置R3 地址,并启用 OSPFv3

  1. <Huawei>undo terminal monitor
  2. <Huawei>systemview
  3. [Huawei]sysname R3
  4. [R3]ipv6
  5. [R3]interface GigabitEthernet 0/0/1
  6. [R3GigabitEthernet0/0/1]ipv6 enable
  7. [R3GigabitEthernet0/0/1]ipv6 address 2001:23::3 64
  8. [R3GigabitEthernet0/0/1]quit
  9. [R3]ospfv3 1
  10. [R3ospfv3-1]routerid 3.3.3.3
  11. [R3ospfv3-1]quit
  12. [R3]interface GigabitEthernet 0/0/1
  13. [R3GigabitEthernet0/0/1]ospfv3 1 area 1
  14. [R3GigabitEthernet0/0/1]quit

4)验证PC-1与PC-2之间的互通性

  1. [R1]ping ipv6 2001:23::3
  2. PING 2001:23::3 : 56 data bytes, press CTRL_C to break
  3. Reply from 2001:23::3
  4. bytes=56 Sequence=1 hop limit=63 time = 30 ms
  5. Reply from 2001:23::3
  6. bytes=56 Sequence=2 hop limit=63 time = 30 ms
  7. Reply from 2001:23::3
  8. bytes=56 Sequence=3 hop limit=63 time = 40 ms
  9. Reply from 2001:23::3
  10. bytes=56 Sequence=4 hop limit=63 time = 30 ms
  11. Reply from 2001:23::3
  12. bytes=56 Sequence=5 hop limit=63 time = 30 ms
  13. 2001:23::3 ping statistics
  14. 5 packet(s) transmitted
  15. 5 packet(s) received
  16. 0.00% packet loss
  17. roundtrip min/avg/max = 30/32/40 ms [/hidecontent]

给TA打赏
共{{data.count}}人
人已打赏
华为数通

OSPF数据库概述 、 4/5类LSA介绍 、 特殊区域之stub 、 OSFP路由引入 、 3类LSA介绍 、 1/2 类LSA介绍

2021-12-27 14:38:31

华为数通

DHCP工作原理 、 DHCP中继代理 、 全局模式DHCP 、 DHCP综合实战 、 三层交换机DHCP

2021-12-28 13:05:51

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索