Guest User

MPLS VPN HUB Transit

a guest
Oct 9th, 2025
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.24 KB | Software | 0 0
  1. ********* PC1 *********
  2.  
  3. !
  4. interface Ethernet0/0
  5. ip address 100.0.0.1 255.255.255.0
  6. !
  7. ip route 0.0.0.0 0.0.0.0 100.0.0.254
  8. !
  9.  
  10. ********* PE1 *********
  11.  
  12. hostname PE1
  13. !
  14. vrf definition A
  15. rd 1.1.1.1:1
  16. route-target export 1:1
  17. route-target import 1:1
  18. !
  19. address-family ipv4
  20. import map DEFAULT
  21. exit-address-family
  22. !
  23. ip cef
  24. !
  25. !
  26. interface Loopback1
  27. ip address 1.1.1.1 255.255.255.255
  28. ip ospf 1 area 0
  29. !
  30. interface Ethernet0/0
  31. vrf forwarding A
  32. ip address 100.0.0.254 255.255.255.0
  33. !
  34. interface Ethernet0/1
  35. ip address 10.0.0.0 255.255.255.254
  36. ip ospf 1 area 0
  37. mpls ip
  38. !
  39. router ospf 1
  40. !
  41. router bgp 1
  42. bgp log-neighbor-changes
  43. no bgp default ipv4-unicast
  44. neighbor 5.5.5.5 remote-as 1
  45. neighbor 5.5.5.5 update-source Loopback1
  46. !
  47. address-family ipv4
  48. neighbor 5.5.5.5 activate
  49. exit-address-family
  50. !
  51. address-family vpnv4
  52. neighbor 5.5.5.5 activate
  53. neighbor 5.5.5.5 send-community extended
  54. exit-address-family
  55. !
  56. address-family ipv4 vrf A
  57. redistribute connected
  58. exit-address-family
  59. !
  60. ip prefix-list DEFAULT seq 5 permit 0.0.0.0/0
  61. !
  62. route-map DEFAULT permit 10
  63. match ip address prefix-list DEFAULT
  64.  
  65.  
  66. ********* P2 *********
  67.  
  68. interface Loopback1
  69. ip address 2.2.2.2 255.255.255.255
  70. ip ospf 1 area 0
  71. !
  72. interface Ethernet0/1
  73. ip address 10.0.0.1 255.255.255.254
  74. ip ospf 1 area 0
  75. mpls ip
  76. !
  77. interface Ethernet0/2
  78. ip address 10.0.0.2 255.255.255.254
  79. ip ospf 1 area 0
  80. mpls ip
  81. !
  82.  
  83. ********* HUB *********
  84.  
  85. vrf definition A
  86. rd 5.5.5.5:1
  87. route-target export 1:1
  88. route-target import 1:1
  89. !
  90. address-family ipv4
  91. exit-address-family
  92. !
  93. ip cef
  94.  
  95. !
  96. interface Loopback1
  97. ip address 5.5.5.5 255.255.255.255
  98. ip ospf 1 area 0
  99. !
  100. interface Ethernet0/0
  101. vrf forwarding A
  102. ip address 50.0.0.254 255.255.255.0
  103. !
  104. interface Ethernet0/1
  105. no ip address
  106. shutdown
  107. !
  108. interface Ethernet0/2
  109. ip address 10.0.0.3 255.255.255.254
  110. ip ospf 1 area 0
  111. mpls ip
  112. !
  113. interface Ethernet0/3
  114. ip address 10.0.0.5 255.255.255.254
  115. ip ospf 1 area 0
  116. mpls ip
  117. !
  118. router ospf 1
  119. !
  120. router bgp 1
  121. bgp log-neighbor-changes
  122. no bgp default ipv4-unicast
  123. neighbor 1.1.1.1 remote-as 1
  124. neighbor 1.1.1.1 update-source Loopback1
  125. neighbor 3.3.3.3 remote-as 1
  126. neighbor 3.3.3.3 update-source Loopback1
  127. !
  128. address-family ipv4
  129. exit-address-family
  130. !
  131. address-family vpnv4
  132. neighbor 1.1.1.1 activate
  133. neighbor 1.1.1.1 send-community extended
  134. neighbor 1.1.1.1 route-reflector-client
  135. neighbor 3.3.3.3 activate
  136. neighbor 3.3.3.3 send-community extended
  137. neighbor 3.3.3.3 route-reflector-client
  138. exit-address-family
  139. !
  140. address-family ipv4 vrf A
  141. redistribute connected
  142. redistribute static
  143. default-information originate
  144. exit-address-family
  145.  
  146. ip route vrf A 0.0.0.0 0.0.0.0 50.0.0.1
  147. !
  148. !
  149.  
  150. ********* P4 *********
  151.  
  152. interface Loopback1
  153. ip address 4.4.4.4 255.255.255.255
  154. ip ospf 1 area 0
  155. !
  156. interface Ethernet0/0
  157. no ip address
  158. shutdown
  159. !
  160. interface Ethernet0/1
  161. ip address 10.0.0.7 255.255.255.254
  162. ip ospf 1 area 0
  163. mpls ip
  164. !
  165. interface Ethernet0/2
  166. no ip address
  167. shutdown
  168. !
  169. interface Ethernet0/3
  170. ip address 10.0.0.4 255.255.255.254
  171. ip ospf 1 area 0
  172. mpls ip
  173. !
  174.  
  175. ********* P3 *********
  176.  
  177. hostname PE3
  178. !
  179. vrf definition A
  180. rd 3.3.3.3:1
  181. route-target export 1:1
  182. route-target import 1:1
  183. !
  184. address-family ipv4
  185. import map DEFAULT
  186. exit-address-family
  187. !
  188. ip cef
  189. !
  190. !
  191. interface Loopback1
  192. ip address 3.3.3.3 255.255.255.255
  193. ip ospf 1 area 0
  194. !
  195. interface Ethernet0/0
  196. vrf forwarding A
  197. ip address 200.0.0.254 255.255.255.0
  198. !
  199. interface Ethernet0/1
  200. ip address 10.0.0.6 255.255.255.254
  201. ip ospf 1 area 0
  202. mpls ip
  203. !
  204. router ospf 1
  205. !
  206. router bgp 1
  207. bgp log-neighbor-changes
  208. no bgp default ipv4-unicast
  209. neighbor 5.5.5.5 remote-as 1
  210. neighbor 5.5.5.5 update-source Loopback1
  211. !
  212. address-family ipv4
  213. exit-address-family
  214. !
  215. address-family vpnv4
  216. neighbor 5.5.5.5 activate
  217. neighbor 5.5.5.5 send-community extended
  218. exit-address-family
  219. !
  220. address-family ipv4 vrf A
  221. redistribute connected
  222. exit-address-family
  223. !
  224. ip prefix-list DEFAULT seq 5 permit 0.0.0.0/0
  225. !
  226. route-map DEFAULT permit 10
  227. match ip address prefix-list DEFAULT
  228.  
  229. ********* PC2 *********
  230.  
  231. interface Ethernet0/0
  232. ip address 200.0.0.1 255.255.255.0
  233. !
  234. ip route 0.0.0.0 0.0.0.0 200.0.0.254
  235. !
  236.  
  237.  
Advertisement
Add Comment
Please, Sign In to add comment