实验 8X02 - CCNA Exam  Advanced @David - 图1

    • CE 和 PE 之间可以随便跑什么协议
    • 重点
      • 不同协议时,PE的设置方式
      • PE上需要在BGP 的address-family 中,对其他来源协议做重分布

    实验 8X02 - CCNA Exam  Advanced @David - 图2

    • PE1 配置
    1. R5_PE1(config-router)#do show run
    2. Building configuration...
    3. Current configuration : 4600 bytes
    4. !
    5. ! Last configuration change at 08:24:17 UTC Sat Aug 27 2022
    6. !
    7. version 15.9
    8. service timestamps debug datetime msec
    9. service timestamps log datetime msec
    10. no service password-encryption
    11. !
    12. hostname R5_PE1
    13. !
    14. boot-start-marker
    15. boot-end-marker
    16. !
    17. !
    18. !
    19. no aaa new-model
    20. !
    21. !
    22. !
    23. mmi polling-interval 60
    24. no mmi auto-configure
    25. no mmi pvc
    26. mmi snmp-timeout 180
    27. !
    28. !
    29. !
    30. !
    31. !
    32. no ip icmp rate-limit unreachable
    33. !
    34. !
    35. !
    36. ip vrf BLUE
    37. rd 65000:100
    38. route-target export 65000:111
    39. route-target import 65000:111
    40. !
    41. ip vrf GREEN
    42. rd 65000:200
    43. route-target export 65000:200
    44. route-target import 65000:200
    45. !
    46. ip vrf PURPLE
    47. rd 65000:300
    48. route-target export 65000:300
    49. route-target import 65000:300
    50. !
    51. !
    52. !
    53. !
    54. no ip domain lookup
    55. ip cef
    56. no ipv6 cef
    57. !
    58. multilink bundle-name authenticated
    59. no mpls ip propagate-ttl
    60. !
    61. !
    62. !
    63. !
    64. !
    65. redundancy
    66. !
    67. no cdp log mismatch duplex
    68. !
    69. ip tcp synwait-time 5
    70. !
    71. !
    72. !
    73. interface Loopback0
    74. ip address 5.5.5.5 255.255.255.255
    75. !
    76. interface GigabitEthernet0/0
    77. ip vrf forwarding BLUE
    78. ip address 172.16.1.1 255.255.255.252
    79. duplex auto
    80. speed auto
    81. media-type rj45
    82. !
    83. interface GigabitEthernet0/1
    84. ip address 57.1.1.5 255.255.255.0
    85. duplex auto
    86. speed auto
    87. media-type rj45
    88. mpls ip
    89. !
    90. interface GigabitEthernet0/2
    91. ip vrf forwarding GREEN
    92. ip address 172.16.1.1 255.255.255.252
    93. duplex auto
    94. speed auto
    95. media-type rj45
    96. !
    97. interface GigabitEthernet0/3
    98. ip vrf forwarding PURPLE
    99. ip address 172.16.1.1 255.255.255.252
    100. duplex auto
    101. speed auto
    102. media-type rj45
    103. !
    104. !
    105. router eigrp MY_VRF_EIGRP
    106. !
    107. address-family ipv4 unicast vrf PURPLE autonomous-system 300
    108. !
    109. topology base
    110. exit-af-topology
    111. network 172.16.1.1 0.0.0.0
    112. exit-address-family
    113. !
    114. router ospf 200 vrf GREEN
    115. redistribute bgp 65000 subnets
    116. network 172.16.1.1 0.0.0.0 area 0
    117. !
    118. router ospf 100
    119. network 5.5.5.5 0.0.0.0 area 0
    120. network 57.1.1.5 0.0.0.0 area 0
    121. !
    122. router bgp 65000
    123. bgp log-neighbor-changes
    124. no bgp default ipv4-unicast
    125. neighbor 6.6.6.6 remote-as 65000
    126. neighbor 6.6.6.6 update-source Loopback0
    127. !
    128. address-family ipv4
    129. exit-address-family
    130. !
    131. address-family vpnv4
    132. neighbor 6.6.6.6 activate
    133. neighbor 6.6.6.6 send-community extended
    134. exit-address-family
    135. !
    136. address-family ipv4 vrf BLUE
    137. neighbor 172.16.1.2 remote-as 65001
    138. neighbor 172.16.1.2 activate
    139. exit-address-family
    140. !
    141. address-family ipv4 vrf GREEN
    142. redistribute ospf 200
    143. exit-address-family
    144. !
    145. address-family ipv4 vrf PURPLE
    146. redistribute eigrp 300
    147. exit-address-family
    148. !
    149. ip forward-protocol nd
    150. !
    151. !
    152. no ip http server
    153. no ip http secure-server
    154. !
    155. ipv6 ioam timestamp
    156. !
    157. !
    158. !
    159. control-plane
    160. !
    161. banner exec ^C
    162. line con 0
    163. exec-timeout 0 0
    164. privilege level 15
    165. logging synchronous
    166. line aux 0
    167. exec-timeout 0 0
    168. privilege level 15
    169. logging synchronous
    170. line vty 0 4
    171. login
    172. transport input none
    173. !
    174. no scheduler allocate
    175. !
    176. end
    • PE1 上的BGP 路由
      • BLUE 是通过eBGP 学习到的
      • GREEN 是OSPF 重分布进来的,包括在PE2上的重分布
      • PURPLE 是通过EIGRP 重分布进来的

    实验 8X02 - CCNA Exam  Advanced @David - 图3

    • 终端可以学到对应终端路由

    实验 8X02 - CCNA Exam  Advanced @David - 图4

    • 注意在PE1 和 CE上的路由类型以及AD、Metric变化
      • PE 上的类型是B
      • CE 上是原协议类型

    实验 8X02 - CCNA Exam  Advanced @David - 图5