/*auto readmore*/ /*auto readmore*/ /* an hien script*/ // an hien password /*an hien ma chuong trinh cong tru */ /*Scrollbox thanh cuon*/ /***Nhung CODE***/ /* dòng xanh dòng trắng */ /* https://cdnjs.com/libraries/prism lay thu vien, can vao ten file ma goi 1. copy link vao vi du:prism-python.min.js 2. ten ngon nua la python */ /*=== New posts ===*/ /*header slider*/ /*=== bai viet lien quan===*/ /*===tabcode===*/
Showing posts with label EIGRP. Show all posts
Showing posts with label EIGRP. Show all posts

Bài 5: MPLS Layer 3 VPN PE_CE BGP_EIGRP

Giới thiệu:

đang cập nhật ...

Sơ đồ lab:




Yêu cầu:

1. Cấu hình MPLS Layer 3 VPN core

2. Kiểm tra các kết nối đảm bảo:
   - R1A, R1B có thể ping đến R2 và ngược lại
   - R6A, R6B có thể ping đến R5 và ngược lại
   - Loopback 0 của R2 và R5 có thể giao tiếp được với nhau

3. Cấu hình route giữa các router CE và PE:
  • BGP: Customer_A (R1A và R2 với AS 12; R6A và R5 với AS 56) đảm bảo loopback 0 của R1A và R6A có thể giao tiếp được với nhau.
  • BGP AS - override: Customer_A (R1A và R2 với AS 12; R6A và R5 với AS 12) đảm bảo loopback 0 của R1A và R6A có thể giao tiếp được với nhau.
  • EIGRP: Customer_B (R1B và R2; R6B và R5) đảm bảo loopback 0 của R1B và R6B có thể giao tiếp được với nhau.


Các kiến thức sử dụng trong bài: Static route, OSPF, Redistribute, MPLS, VRF, BGP

Cấu hình:

1. Cấu hình MPLS Layer 3 VPN core (thừa kế bài 3, tham khảo tại đây)


2. Kiểm tra các kết nối đảm bảo:


   - R1A, R1B có thể ping đến R2 và ngược lại
   - R6A, R6B có thể ping đến R5 và ngược lại
   - Loopback 0 của R2 và R5 có thể giao tiếp được với nhau
Tương tự yêu cầu 2 của bài 4:



- R1A, R1B có thể ping đến R2 và ngược lại

R1A#ping 192.168.12.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R1B#ping 192.168.12.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.12.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 3/4/6 ms

R2#ping vrf Customer_A 192.168.12.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.12.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R2#ping vrf Customer_B 192.168.12.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.12.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms

- R6A, R6B có thể ping đến R5 và ngược lại

R6A#ping 192.168.56.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.56.5, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms
R6B#ping 192.168.56.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.56.5, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms

R5#ping vrf Customer_A 192.168.56.6
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.56.6, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R5#ping vrf Customer_B 192.168.56.6
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.56.6, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms

- Loopback 0 của R2 và R5 có thể giao tiếp được với nhau

R2#ping 5.5.5.5 source 2.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
Packet sent with a source address of 2.2.2.2
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms

R5#ping 2.2.2.2 source 5.5.5.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
Packet sent with a source address of 5.5.5.5
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
3. Cấu hình route giữa các router CE và PE:
  • BGP: Customer_A (R1A và R2 với AS 12; R6A và R5 với AS 56) đảm bảo loopback 0 của R1A và R6A có thể giao tiếp được với nhau.
* Cấu hình:

R1A:
router bgp 12
neighbor 192.168.12.2 remote-as 2345
network 1.1.1.0 mask 255.255.255.0

R2:
router bgp 2345
  address-family ipv4 vrf Customer_A
  neighbor 192.168.12.1 remote-as 12
  neighbor 192.168.12.1 activate

R6A:
router bgp 56
 neighbor 192.168.56.5 remote-as 2345
 network 6.6.6.0 mask 255.255.255.0

R5:
router bgp 2345
address-family ipv4 vrf Customer_A
neighbor 192.168.56.6 remote-as 56
neighbor 192.168.56.6 activate


* Kiểm tra:

R1A#show ip bgp summary
BGP router identifier 1.1.1.1, local AS number 12
BGP table version is 3, main routing table version 3
2 network entries using 296 bytes of memory
2 path entries using 128 bytes of memory
2/2 BGP path/bestpath attribute entries using 272 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 720 total bytes of memory
BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.12.2    4         2345           28           29            3      0        0  00:21:51           1

R2#show ip bgp vpnv4 vrf Customer_A summary 
BGP router identifier 2.2.2.2, local AS number 2345
BGP table version is 4, main routing table version 4
2 network entries using 336 bytes of memory
2 path entries using 128 bytes of memory
3/2 BGP path/bestpath attribute entries using 432 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
2 BGP extended community entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 992 total bytes of memory
BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs
Neighbor         V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.12.1    4           12              32              32        4     0          0     00:25:23        1
R2#show ip bgp vpnv4 vrf Customer_A
BGP table version is 4, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
     Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 16:16 (default for vrf Customer_A)
 *>  1.1.1.0/24       192.168.12.1             0                        0 12 i
 *>i 6.6.6.0/24       5.5.5.5                       0    100              0 56 i

R5#show ip bgp vpnv4 vrf Customer_A summary 
BGP router identifier 5.5.5.5, local AS number 2345
BGP table version is 4, main routing table version 4
2 network entries using 336 bytes of memory
2 path entries using 128 bytes of memory
3/2 BGP path/bestpath attribute entries using 432 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
2 BGP extended community entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 992 total bytes of memory
BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.56.6         4       56                    19      19            4    0    0 00:13:11        1

R6A#show ip bgp summary 
BGP router identifier 6.6.6.6, local AS number 56
BGP table version is 3, main routing table version 3
2 network entries using 296 bytes of memory
2 path entries using 128 bytes of memory
2/2 BGP path/bestpath attribute entries using 272 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 720 total bytes of memory
BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.56.5    4       2345           14              13        3    0    0 00:08:29        1

R5#show ip bgp vpnv4 vrf Customer_A
BGP table version is 4, local router ID is 5.5.5.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
     Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 16:16 (default for vrf Customer_A)
 *>i 1.1.1.0/24       2.2.2.2                       0      100      0      12 i
 *>  6.6.6.0/24       192.168.56.6             0                  0      56 i

R1A#show ip route bgp 
(...)
      6.0.0.0/24 is subnetted, 1 subnets
B        6.6.6.0 [20/0] via 192.168.12.2, 00:10:26

R6A#show ip route bgp 
(...)
      1.0.0.0/24 is subnetted, 1 subnets
B        1.1.1.0 [20/0] via 192.168.56.5, 00:15:00

R1A#ping 6.6.6.6 source 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 6.6.6.6, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/2/2 ms

R6A#ping 1.1.1.1 source 6.6.6.6
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 6.6.6.6
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms

Đã đáp ứng yêu cầu loopback 0 của R1A và R6A có thể giao tiếp được với nhau
  • BGP AS - override: Customer_A (R1A và R2 với AS 12; R6A và R5 với AS 12) đảm bảo loopback 0 của R1A và R6A có thể giao tiếp được với nhau.
Cấu hình lại BGP trên R5 và R6A

R6A:
no router bgp 56
router bgp 12
neighbor 192.168.56.5 remote-as 2345
network 6.6.6.0 mask 255.255.255.0

R5:
router bgp 2345
address-family ipv4 vrf Customer_A
no neighbor 192.168.56.6 remote-as 56
neighbor 192.168.56.6 remote-as 12

Kiểm tra

R6A#show ip bgp summary 
BGP router identifier 6.6.6.6, local AS number 12
BGP table version is 2, main routing table version 2
1 network entries using 148 bytes of memory
1 path entries using 64 bytes of memory
1/1 BGP path/bestpath attribute entries using 136 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 348 total bytes of memory
BGP activity 1/0 prefixes, 1/0 paths, scan interval 60 secs
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.56.5    4         2345      11      10        2    0    0 00:05:25        0

R5#show ip bgp vpnv4 vrf Customer_A summary 
BGP router identifier 5.5.5.5, local AS number 2345
BGP table version is 6, main routing table version 6
2 network entries using 336 bytes of memory
2 path entries using 128 bytes of memory
3/2 BGP path/bestpath attribute entries using 432 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
2 BGP extended community entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 968 total bytes of memory
BGP activity 3/1 prefixes, 3/1 paths, scan interval 60 secs
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.56.6    4           12      12      12        6    0    0 00:06:35        1


R5 và R6A đã thiết lập được neighbor

R2#show ip bgp vpnv4 vrf Customer_A 
BGP table version is 7, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
     Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 16:16 (default for vrf Customer_A)
 *>  1.1.1.0/24       192.168.12.1             0                   0   12 i
 *>i 6.6.6.0/24       5.5.5.5                       0    100         0   
12 i

R5#show ip bgp vpnv4 vrf Customer_A 
BGP table version is 6, local router ID is 5.5.5.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
     Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 16:16 (default for vrf Customer_A)
 *>i 1.1.1.0/24       2.2.2.2                       0    100          0   12 i
 *>  6.6.6.0/24       192.168.56.6             0                    0   
12 i

R2 và R6 đã học được loopback 0 của R1A và R6A


R1A#show ip route   
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override
Gateway of last resort is not set
      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.1.1.0/24 is directly connected, Loopback0
L        1.1.1.1/32 is directly connected, Loopback0
      192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.12.0/24 is directly connected, Ethernet0/2
L        192.168.12.1/32 is directly connected, Ethernet0/2

R6A#show ip route 
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override
Gateway of last resort is not set
      6.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        6.6.6.0/24 is directly connected, Loopback0
L        6.6.6.6/32 is directly connected, Loopback0
      192.168.56.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.56.0/24 is directly connected, Ethernet0/2
L        192.168.56.6/32 is directly connected, Ethernet0/2


Tuy nhiên R1A và R6A không thể học được route 1.1.1.0/24 và 6.6.6.0/24 mặt dù đã quảng bá.

R6A:
debug ip bgp updates
clear ip bgp * soft
*Oct 18 06:46:47.149: BGP(0): (base) 192.168.56.5 send UPDATE (format) 6.6.6.0/24, next 192.168.56.6, metric 0, path Local
*Oct 18 06:46:48.086: BGP: nbr_topo global 192.168.56.5 IPv4 Unicast:base (0xC295FD10:1) rcvd Refresh Start-of-RIB
*Oct 18 06:46:48.086: BGP: nbr_topo global 192.168.56.5 IPv4 Unicast:base (0xC295FD10:1) refresh_epoch is 6
*Oct 18 06:46:48.091: BGP(0): 192.168.56.5 rcv UPDATE w/ attr: nexthop 192.168.56.5, origin i, originator 0.0.0.0, merged path 2345 12, AS_PATH , community , extended community , SSA attribute
*Oct 18 06:46:48.091: BGPSSA ssacount is 0
*Oct 18 06:46:48.091: BGP(0): 192.168.56.5 rcv UPDATE about 1.1.1.0/24 -- DENIED due to:AS-PATH contains our own AS;
*Oct 18 06:46:48.091: BGP: nbr_topo global 192.168.56.5 IPv4 Unicast:base (0xC295FD10:1) rcvd Refresh End-of-RIB

Ta thấy R6A nhận update từ R5 với AS_PATH 12 và R6A cũng thuộc về AS 12 nên nó không tiếp nhận mọi route BGP (hiện tại là 1.1.1.0/24) có thuộc tính AS-PATH = 12 (theo cơ chế chống loop). Và cũng tương tự trên R1A sẽ không học được routing 6.6.6.0/24. Đó là lý do cả 2 site của Customer_A không thấy được subnet của nhau.

Để giải quyết vấn đề này có thể:

  • Dùng câu lệnh neighbor 192.168.56.5 allow-as-in x (x từ 1 - 10) trên các router CE (R1A, R6A) để override AS_PATH (lúc này AS_PATH trên R6A sẽ là x 12).
  • Hoặc có thể dùng neighbor 192.168.x.x as-override trên router PE (R2, R5), bài lab này ta chọn AS-OVERRIDE
* Cấu hình:

R2:
router bgp 2345
address-family ipv4 vrf Customer_A
neighbor 192.168.12.1 as-override

R5:
router bgp 2345
address-family ipv4 vrf Customer_A
neighbor 192.168.56.6 as-override 


R6A#
*Oct 18 08:10:17.309: BGP(0): 192.168.56.5 rcvd UPDATE w/ attr: nexthop 192.168.56.5, origin i, merged path 2345 2345, AS_PATH
*Oct 18 08:10:17.309: BGP(0): 192.168.56.5 rcvd 1.1.1.0/24
*Oct 18 08:10:17.309: BGP(0): 192.168.56.5 rcv UPDATE about 6.6.6.0/24 -- withdrawn
*Oct 18 08:10:17.309: BGP(0): Revise route installing 1 of 1 routes for 1.1.1.0/24 -> 192.168.56.5(global) to main IP table

Lúc này cả R1A và R6A đã nhận được subnet của nhau. Vì khi các PE khi quảng bá route của có học học cho neighbor và thấy AS Number của neighbor trùng với AS của mình quảng bá thì nó sẽ thực hiện thay thế AS của nó trước khi quảng bá (thay thế 12 thành 2345).


* Kiểm tra:
R1A#show ip bgp 
BGP table version is 5, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
     Network          Next Hop            Metric LocPrf   Weight  Path
 *>  1.1.1.0/24       0.0.0.0                  0                     32768 i
 *>  6.6.6.0/24       192.168.12.2                                      0  2345 2345 i

R6A#show ip bgp 
BGP table version is 3, local router ID is 6.6.6.6
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
     Network          Next Hop            Metric LocPrf   Weight  Path
 *>  1.1.1.0/24       192.168.56.5                                     0  2345 2345 i
 *>  6.6.6.0/24       0.0.0.0                  0                    32768 i


R1A#ping 6.6.6.6 source 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 6.6.6.6, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms

R6A#ping 1.1.1.1 source 6.6.6.6
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 6.6.6.6
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms

  • EIGRP Customer_B (R1B và R2; R6B và R5) đảm bảo loopback 0 của R1B và R6B có thể giao tiếp được với nhau.

R1B:
router eigrp 100
 network 1.0.0.0
 network 192.168.12.0

R2:
router eigrp 1
  address-family ipv4 vrf Customer_B autonomous-system 100
  network 192.168.12.0
 exit-address-family

Noted: autonomous-system 100 là số AS của CE router neighbor

R6B:

router eigrp 100
 network 6.0.0.0
 network 192.168.56.0

R5:
router eigrp 1
 address-family ipv4 vrf Customer_B autonomous-system 100
  network 192.168.56.0
 exit-address-family

Kiểm tra:


R1B#show ip eigrp neighbors
EIGRP-IPv4 Neighbors for AS(100)
H   Address                 Interface              Hold Uptime   SRTT   RTO  Q  Seq
                                                   (sec)         (ms)       Cnt Num
0   192.168.12.2            Et0/2                    12 00:07:46    6   100  0  3

R6B#show ip eigrp neighbors
EIGRP-IPv4 Neighbors for AS(100)
H   Address                 Interface              Hold Uptime   SRTT   RTO  Q  Seq
                                                   (sec)         (ms)       Cnt Num
0   192.168.56.5            Et0/2                    10 00:12:32   10   100  0  3

Đã thấy được neighbor là các PE router


R2#show ip route vrf Customer_B eigrp
(...)
Gateway of last resort is not set
      1.0.0.0/24 is subnetted, 1 subnets
D        1.1.1.0 [90/409600] via 192.168.12.1, 00:02:33, Ethernet0/1

R5#show ip route vrf Customer_B eigrp 
(...)
Gateway of last resort is not set
      6.0.0.0/24 is subnetted, 1 subnets
D        6.6.6.0 [90/409600] via 192.168.56.6, 00:08:03, Ethernet0/1


Các PE đã học được route do CE láng giềng quảng bá vào.

Redistribute EIGRP 100 vào MP-BGP để các PE có thể học route EIGRP từ đầu bên kia

* Cấu hình:

R2, R5:
router bgp 2345
address-family ipv4 vrf Customer_B
redistribute eigrp 100


* Kiểm tra:


R2#show ip bgp vpnv4 vrf Customer_B
BGP table version is 16, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
     Network          Next Hop               Metric    LocPrf Weight Path
Route Distinguisher: 11:66 (default for vrf Customer_B)
 *>  1.1.1.0/24       192.168.12.1        409600                  32768   ?
 *>i 6.6.6.0/24         5.5.5.5                409600         100           0   ?
 *>  192.168.12.0     0.0.0.0                  0                         32768   ?
 *>i 192.168.56.0     5.5.5.5                  0                100           0   ?


R5#show ip bgp vpnv4 vrf Customer_B
BGP table version is 14, local router ID is 5.5.5.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
     Network          Next Hop            Metric    LocPrf   Weight  Path
Route Distinguisher: 11:66 (default for vrf Customer_B)
 *>i 1.1.1.0/24          2.2.2.2               409600   100              0     ?
 *>  6.6.6.0/24       192.168.56.6        409600               32768     ?
 *>i 192.168.12.0     2.2.2.2                  0          100              0     ?
 *>  192.168.56.0     0.0.0.0                  0                       32768    ?


Redistribute BGP vào EIGRP 1 trên PE để đảm bảo rằng các router CE (R1B, R6B) có thể học được route của nhau

* Cấu hình:

R2, R5:
router eigrp 1
address-family ipv4 vrf Customer_B
redistribute bgp 2345 metric 1 1 1 1 1

* Kiểm tra:


R1B#show ip route eigrp 
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override
Gateway of last resort is not set
      6.0.0.0/24 is subnetted, 1 subnets
D        6.6.6.0 [90/435200] via 192.168.12.2, 00:03:36, Ethernet0/2
D     192.168.56.0/24 [90/307200] via 192.168.12.2, 00:03:36, Ethernet0/2

R6B#show ip route eigrp
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override
Gateway of last resort is not set
      1.0.0.0/24 is subnetted, 1 subnets
D        1.1.1.0 [90/435200] via 192.168.56.5, 00:02:20, Ethernet0/2
D     192.168.12.0/24 [90/307200] via 192.168.56.5, 00:02:20, Ethernet0/2


R1B#ping 6.6.6.6
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 6.6.6.6, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms


R6B#ping 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms
Vậy là hai mạng 1.1.1.1 và 6.6.6.6 có thể liên lạc được với nhau.

Xong!



Bài 5: MPLS Layer 3 VPN PE_CE BGP_EIGRP

Giới thiệu:

đang cập nhật ...

Sơ đồ lab:




Yêu cầu:

1. Cấu hình MPLS Layer 3 VPN core

2. Kiểm tra các kết nối đảm bảo:
   - R1A, R1B có thể ping đến R2 và ngược lại
   - R6A, R6B có thể ping đến R5 và ngược lại
   - Loopback 0 của R2 và R5 có thể giao tiếp được với nhau

3. Cấu hình route giữa các router CE và PE:
  • BGP: Customer_A (R1A và R2 với AS 12; R6A và R5 với AS 56) đảm bảo loopback 0 của R1A và R6A có thể giao tiếp được với nhau.
  • BGP AS - override: Customer_A (R1A và R2 với AS 12; R6A và R5 với AS 12) đảm bảo loopback 0 của R1A và R6A có thể giao tiếp được với nhau.
  • EIGRP: Customer_B (R1B và R2; R6B và R5) đảm bảo loopback 0 của R1B và R6B có thể giao tiếp được với nhau.


Các kiến thức sử dụng trong bài: Static route, OSPF, Redistribute, MPLS, VRF, BGP

Cấu hình:

1. Cấu hình MPLS Layer 3 VPN core (thừa kế bài 3, tham khảo tại đây)


2. Kiểm tra các kết nối đảm bảo:


   - R1A, R1B có thể ping đến R2 và ngược lại
   - R6A, R6B có thể ping đến R5 và ngược lại
   - Loopback 0 của R2 và R5 có thể giao tiếp được với nhau
Tương tự yêu cầu 2 của bài 4:



- R1A, R1B có thể ping đến R2 và ngược lại

R1A#ping 192.168.12.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R1B#ping 192.168.12.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.12.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 3/4/6 ms

R2#ping vrf Customer_A 192.168.12.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.12.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R2#ping vrf Customer_B 192.168.12.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.12.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms

- R6A, R6B có thể ping đến R5 và ngược lại

R6A#ping 192.168.56.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.56.5, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms
R6B#ping 192.168.56.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.56.5, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms

R5#ping vrf Customer_A 192.168.56.6
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.56.6, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R5#ping vrf Customer_B 192.168.56.6
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.56.6, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms

- Loopback 0 của R2 và R5 có thể giao tiếp được với nhau

R2#ping 5.5.5.5 source 2.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
Packet sent with a source address of 2.2.2.2
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms

R5#ping 2.2.2.2 source 5.5.5.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
Packet sent with a source address of 5.5.5.5
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
3. Cấu hình route giữa các router CE và PE:
  • BGP: Customer_A (R1A và R2 với AS 12; R6A và R5 với AS 56) đảm bảo loopback 0 của R1A và R6A có thể giao tiếp được với nhau.
* Cấu hình:

R1A:
router bgp 12
neighbor 192.168.12.2 remote-as 2345
network 1.1.1.0 mask 255.255.255.0

R2:
router bgp 2345
  address-family ipv4 vrf Customer_A
  neighbor 192.168.12.1 remote-as 12
  neighbor 192.168.12.1 activate

R6A:
router bgp 56
 neighbor 192.168.56.5 remote-as 2345
 network 6.6.6.0 mask 255.255.255.0

R5:
router bgp 2345
address-family ipv4 vrf Customer_A
neighbor 192.168.56.6 remote-as 56
neighbor 192.168.56.6 activate


* Kiểm tra:

R1A#show ip bgp summary
BGP router identifier 1.1.1.1, local AS number 12
BGP table version is 3, main routing table version 3
2 network entries using 296 bytes of memory
2 path entries using 128 bytes of memory
2/2 BGP path/bestpath attribute entries using 272 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 720 total bytes of memory
BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.12.2    4         2345           28           29            3      0        0  00:21:51           1

R2#show ip bgp vpnv4 vrf Customer_A summary 
BGP router identifier 2.2.2.2, local AS number 2345
BGP table version is 4, main routing table version 4
2 network entries using 336 bytes of memory
2 path entries using 128 bytes of memory
3/2 BGP path/bestpath attribute entries using 432 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
2 BGP extended community entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 992 total bytes of memory
BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs
Neighbor         V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.12.1    4           12              32              32        4     0          0     00:25:23        1
R2#show ip bgp vpnv4 vrf Customer_A
BGP table version is 4, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
     Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 16:16 (default for vrf Customer_A)
 *>  1.1.1.0/24       192.168.12.1             0                        0 12 i
 *>i 6.6.6.0/24       5.5.5.5                       0    100              0 56 i

R5#show ip bgp vpnv4 vrf Customer_A summary 
BGP router identifier 5.5.5.5, local AS number 2345
BGP table version is 4, main routing table version 4
2 network entries using 336 bytes of memory
2 path entries using 128 bytes of memory
3/2 BGP path/bestpath attribute entries using 432 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
2 BGP extended community entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 992 total bytes of memory
BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.56.6         4       56                    19      19            4    0    0 00:13:11        1

R6A#show ip bgp summary 
BGP router identifier 6.6.6.6, local AS number 56
BGP table version is 3, main routing table version 3
2 network entries using 296 bytes of memory
2 path entries using 128 bytes of memory
2/2 BGP path/bestpath attribute entries using 272 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 720 total bytes of memory
BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.56.5    4       2345           14              13        3    0    0 00:08:29        1

R5#show ip bgp vpnv4 vrf Customer_A
BGP table version is 4, local router ID is 5.5.5.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
     Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 16:16 (default for vrf Customer_A)
 *>i 1.1.1.0/24       2.2.2.2                       0      100      0      12 i
 *>  6.6.6.0/24       192.168.56.6             0                  0      56 i

R1A#show ip route bgp 
(...)
      6.0.0.0/24 is subnetted, 1 subnets
B        6.6.6.0 [20/0] via 192.168.12.2, 00:10:26

R6A#show ip route bgp 
(...)
      1.0.0.0/24 is subnetted, 1 subnets
B        1.1.1.0 [20/0] via 192.168.56.5, 00:15:00

R1A#ping 6.6.6.6 source 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 6.6.6.6, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/2/2 ms

R6A#ping 1.1.1.1 source 6.6.6.6
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 6.6.6.6
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms

Đã đáp ứng yêu cầu loopback 0 của R1A và R6A có thể giao tiếp được với nhau
  • BGP AS - override: Customer_A (R1A và R2 với AS 12; R6A và R5 với AS 12) đảm bảo loopback 0 của R1A và R6A có thể giao tiếp được với nhau.
Cấu hình lại BGP trên R5 và R6A

R6A:
no router bgp 56
router bgp 12
neighbor 192.168.56.5 remote-as 2345
network 6.6.6.0 mask 255.255.255.0

R5:
router bgp 2345
address-family ipv4 vrf Customer_A
no neighbor 192.168.56.6 remote-as 56
neighbor 192.168.56.6 remote-as 12

Kiểm tra

R6A#show ip bgp summary 
BGP router identifier 6.6.6.6, local AS number 12
BGP table version is 2, main routing table version 2
1 network entries using 148 bytes of memory
1 path entries using 64 bytes of memory
1/1 BGP path/bestpath attribute entries using 136 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 348 total bytes of memory
BGP activity 1/0 prefixes, 1/0 paths, scan interval 60 secs
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.56.5    4         2345      11      10        2    0    0 00:05:25        0

R5#show ip bgp vpnv4 vrf Customer_A summary 
BGP router identifier 5.5.5.5, local AS number 2345
BGP table version is 6, main routing table version 6
2 network entries using 336 bytes of memory
2 path entries using 128 bytes of memory
3/2 BGP path/bestpath attribute entries using 432 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
2 BGP extended community entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 968 total bytes of memory
BGP activity 3/1 prefixes, 3/1 paths, scan interval 60 secs
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.56.6    4           12      12      12        6    0    0 00:06:35        1


R5 và R6A đã thiết lập được neighbor

R2#show ip bgp vpnv4 vrf Customer_A 
BGP table version is 7, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
     Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 16:16 (default for vrf Customer_A)
 *>  1.1.1.0/24       192.168.12.1             0                   0   12 i
 *>i 6.6.6.0/24       5.5.5.5                       0    100         0   
12 i

R5#show ip bgp vpnv4 vrf Customer_A 
BGP table version is 6, local router ID is 5.5.5.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
     Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 16:16 (default for vrf Customer_A)
 *>i 1.1.1.0/24       2.2.2.2                       0    100          0   12 i
 *>  6.6.6.0/24       192.168.56.6             0                    0   
12 i

R2 và R6 đã học được loopback 0 của R1A và R6A


R1A#show ip route   
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override
Gateway of last resort is not set
      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.1.1.0/24 is directly connected, Loopback0
L        1.1.1.1/32 is directly connected, Loopback0
      192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.12.0/24 is directly connected, Ethernet0/2
L        192.168.12.1/32 is directly connected, Ethernet0/2

R6A#show ip route 
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override
Gateway of last resort is not set
      6.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        6.6.6.0/24 is directly connected, Loopback0
L        6.6.6.6/32 is directly connected, Loopback0
      192.168.56.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.56.0/24 is directly connected, Ethernet0/2
L        192.168.56.6/32 is directly connected, Ethernet0/2


Tuy nhiên R1A và R6A không thể học được route 1.1.1.0/24 và 6.6.6.0/24 mặt dù đã quảng bá.

R6A:
debug ip bgp updates
clear ip bgp * soft
*Oct 18 06:46:47.149: BGP(0): (base) 192.168.56.5 send UPDATE (format) 6.6.6.0/24, next 192.168.56.6, metric 0, path Local
*Oct 18 06:46:48.086: BGP: nbr_topo global 192.168.56.5 IPv4 Unicast:base (0xC295FD10:1) rcvd Refresh Start-of-RIB
*Oct 18 06:46:48.086: BGP: nbr_topo global 192.168.56.5 IPv4 Unicast:base (0xC295FD10:1) refresh_epoch is 6
*Oct 18 06:46:48.091: BGP(0): 192.168.56.5 rcv UPDATE w/ attr: nexthop 192.168.56.5, origin i, originator 0.0.0.0, merged path 2345 12, AS_PATH , community , extended community , SSA attribute
*Oct 18 06:46:48.091: BGPSSA ssacount is 0
*Oct 18 06:46:48.091: BGP(0): 192.168.56.5 rcv UPDATE about 1.1.1.0/24 -- DENIED due to:AS-PATH contains our own AS;
*Oct 18 06:46:48.091: BGP: nbr_topo global 192.168.56.5 IPv4 Unicast:base (0xC295FD10:1) rcvd Refresh End-of-RIB

Ta thấy R6A nhận update từ R5 với AS_PATH 12 và R6A cũng thuộc về AS 12 nên nó không tiếp nhận mọi route BGP (hiện tại là 1.1.1.0/24) có thuộc tính AS-PATH = 12 (theo cơ chế chống loop). Và cũng tương tự trên R1A sẽ không học được routing 6.6.6.0/24. Đó là lý do cả 2 site của Customer_A không thấy được subnet của nhau.

Để giải quyết vấn đề này có thể:

  • Dùng câu lệnh neighbor 192.168.56.5 allow-as-in x (x từ 1 - 10) trên các router CE (R1A, R6A) để override AS_PATH (lúc này AS_PATH trên R6A sẽ là x 12).
  • Hoặc có thể dùng neighbor 192.168.x.x as-override trên router PE (R2, R5), bài lab này ta chọn AS-OVERRIDE
* Cấu hình:

R2:
router bgp 2345
address-family ipv4 vrf Customer_A
neighbor 192.168.12.1 as-override

R5:
router bgp 2345
address-family ipv4 vrf Customer_A
neighbor 192.168.56.6 as-override 


R6A#
*Oct 18 08:10:17.309: BGP(0): 192.168.56.5 rcvd UPDATE w/ attr: nexthop 192.168.56.5, origin i, merged path 2345 2345, AS_PATH
*Oct 18 08:10:17.309: BGP(0): 192.168.56.5 rcvd 1.1.1.0/24
*Oct 18 08:10:17.309: BGP(0): 192.168.56.5 rcv UPDATE about 6.6.6.0/24 -- withdrawn
*Oct 18 08:10:17.309: BGP(0): Revise route installing 1 of 1 routes for 1.1.1.0/24 -> 192.168.56.5(global) to main IP table

Lúc này cả R1A và R6A đã nhận được subnet của nhau. Vì khi các PE khi quảng bá route của có học học cho neighbor và thấy AS Number của neighbor trùng với AS của mình quảng bá thì nó sẽ thực hiện thay thế AS của nó trước khi quảng bá (thay thế 12 thành 2345).


* Kiểm tra:
R1A#show ip bgp 
BGP table version is 5, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
     Network          Next Hop            Metric LocPrf   Weight  Path
 *>  1.1.1.0/24       0.0.0.0                  0                     32768 i
 *>  6.6.6.0/24       192.168.12.2                                      0  2345 2345 i

R6A#show ip bgp 
BGP table version is 3, local router ID is 6.6.6.6
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
     Network          Next Hop            Metric LocPrf   Weight  Path
 *>  1.1.1.0/24       192.168.56.5                                     0  2345 2345 i
 *>  6.6.6.0/24       0.0.0.0                  0                    32768 i


R1A#ping 6.6.6.6 source 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 6.6.6.6, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms

R6A#ping 1.1.1.1 source 6.6.6.6
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 6.6.6.6
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms

  • EIGRP Customer_B (R1B và R2; R6B và R5) đảm bảo loopback 0 của R1B và R6B có thể giao tiếp được với nhau.

R1B:
router eigrp 100
 network 1.0.0.0
 network 192.168.12.0

R2:
router eigrp 1
  address-family ipv4 vrf Customer_B autonomous-system 100
  network 192.168.12.0
 exit-address-family

Noted: autonomous-system 100 là số AS của CE router neighbor

R6B:

router eigrp 100
 network 6.0.0.0
 network 192.168.56.0

R5:
router eigrp 1
 address-family ipv4 vrf Customer_B autonomous-system 100
  network 192.168.56.0
 exit-address-family

Kiểm tra:


R1B#show ip eigrp neighbors
EIGRP-IPv4 Neighbors for AS(100)
H   Address                 Interface              Hold Uptime   SRTT   RTO  Q  Seq
                                                   (sec)         (ms)       Cnt Num
0   192.168.12.2            Et0/2                    12 00:07:46    6   100  0  3

R6B#show ip eigrp neighbors
EIGRP-IPv4 Neighbors for AS(100)
H   Address                 Interface              Hold Uptime   SRTT   RTO  Q  Seq
                                                   (sec)         (ms)       Cnt Num
0   192.168.56.5            Et0/2                    10 00:12:32   10   100  0  3

Đã thấy được neighbor là các PE router


R2#show ip route vrf Customer_B eigrp
(...)
Gateway of last resort is not set
      1.0.0.0/24 is subnetted, 1 subnets
D        1.1.1.0 [90/409600] via 192.168.12.1, 00:02:33, Ethernet0/1

R5#show ip route vrf Customer_B eigrp 
(...)
Gateway of last resort is not set
      6.0.0.0/24 is subnetted, 1 subnets
D        6.6.6.0 [90/409600] via 192.168.56.6, 00:08:03, Ethernet0/1


Các PE đã học được route do CE láng giềng quảng bá vào.

Redistribute EIGRP 100 vào MP-BGP để các PE có thể học route EIGRP từ đầu bên kia

* Cấu hình:

R2, R5:
router bgp 2345
address-family ipv4 vrf Customer_B
redistribute eigrp 100


* Kiểm tra:


R2#show ip bgp vpnv4 vrf Customer_B
BGP table version is 16, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
     Network          Next Hop               Metric    LocPrf Weight Path
Route Distinguisher: 11:66 (default for vrf Customer_B)
 *>  1.1.1.0/24       192.168.12.1        409600                  32768   ?
 *>i 6.6.6.0/24         5.5.5.5                409600         100           0   ?
 *>  192.168.12.0     0.0.0.0                  0                         32768   ?
 *>i 192.168.56.0     5.5.5.5                  0                100           0   ?


R5#show ip bgp vpnv4 vrf Customer_B
BGP table version is 14, local router ID is 5.5.5.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
     Network          Next Hop            Metric    LocPrf   Weight  Path
Route Distinguisher: 11:66 (default for vrf Customer_B)
 *>i 1.1.1.0/24          2.2.2.2               409600   100              0     ?
 *>  6.6.6.0/24       192.168.56.6        409600               32768     ?
 *>i 192.168.12.0     2.2.2.2                  0          100              0     ?
 *>  192.168.56.0     0.0.0.0                  0                       32768    ?


Redistribute BGP vào EIGRP 1 trên PE để đảm bảo rằng các router CE (R1B, R6B) có thể học được route của nhau

* Cấu hình:

R2, R5:
router eigrp 1
address-family ipv4 vrf Customer_B
redistribute bgp 2345 metric 1 1 1 1 1

* Kiểm tra:


R1B#show ip route eigrp 
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override
Gateway of last resort is not set
      6.0.0.0/24 is subnetted, 1 subnets
D        6.6.6.0 [90/435200] via 192.168.12.2, 00:03:36, Ethernet0/2
D     192.168.56.0/24 [90/307200] via 192.168.12.2, 00:03:36, Ethernet0/2

R6B#show ip route eigrp
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override
Gateway of last resort is not set
      1.0.0.0/24 is subnetted, 1 subnets
D        1.1.1.0 [90/435200] via 192.168.56.5, 00:02:20, Ethernet0/2
D     192.168.12.0/24 [90/307200] via 192.168.56.5, 00:02:20, Ethernet0/2


R1B#ping 6.6.6.6
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 6.6.6.6, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms


R6B#ping 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms
Vậy là hai mạng 1.1.1.1 và 6.6.6.6 có thể liên lạc được với nhau.

Xong!


Cisco, Dynamic Multipoint VPN - DMVPN Phase 1 EIGRP Routing

Giới thiệu: Trước đây chúng ta đã có chủ đề DMVPN Phase 1 căn bản để thiết lập tunnel giữa các site với nhau. Hôm nay chúng ta cùng nhau đi tiếp sau khi tunnel đã thiết lập chúng sẽ dùng giao thức EIGRP để quảng bá các loopback 0 của các router: R1, R2, R3, đảm bảo rằng các loopback 0 phải ping thấy nhau.

Bài Lab

Các kiến thức sử dụng trong bài: cấu hình DMVPN Phase 1 căn bản, EIGRP

/*header slide*/