Resources
    MPLS and EIGRP, going the ...
    19 July 10

    MPLS and EIGRP, going the Distance, (Admin Distance).

    Posted byINE
    facebooktwitterlinkedin
    news-featured

    Can you solve this puzzle?

    R2, R3 and R4 create the service provider network, with MPLS on all three routers, and iBGP at the PE routers.  R1 and R5 are the CE routers.

    R2, prefers the BGP next hop of 4.4.4.4 for network 5.5.5.5 (R5 loopback). R4, at 4.4.4.4 is an iBGP neighbor.

    R2#show ip route vrf v | inc 5.5.5.0
    B 5.5.5.0 [200/409600] via 4.4.4.4, 00:06:47

    Is R2 preferring an iBGP learned route, which has an AD of 200, over a EIGRP route, which would have an AD of 90?

    Can you identify why the routing for 5.5.5.0 on the VRF of R2 is using BGP instead of EIGRP?

    EIGRP PATH with MPLS

    Below are the relevant portions of the configuration, which also can serve as a great review of how to configure MPLS VPNs.
    R1, CE router:

    R1#show run
    interface Loopback0
    ip address 1.1.1.1 255.255.255.0
    !
    interface FastEthernet0/0
    ip address 10.1.12.1 255.255.255.0
    duplex auto
    speed auto
    !
    interface Serial0/0
    ip address 10.1.215.1 255.255.255.0
    !

    router eigrp 1
    network 0.0.0.0
    no auto-summary

    R2, PE Router:

    R2#show run
    !
    ip vrf v
    rd 1:1
    route-target export 1:1
    route-target import 1:1
    !
    !
    interface Loopback0
    ip address 2.2.2.2 255.255.255.255
    ip ospf 1 area 0
    !
    interface FastEthernet0/0
    ip vrf forwarding v
    ip address 10.1.12.2 255.255.255.0
    !
    interface FastEthernet0/1
    ip address 10.1.23.2 255.255.255.0
    ip ospf 1 area 0
    mpls ip
    !
    router eigrp 1
    no auto-summary
    !
    address-family ipv4 vrf v
    redistribute bgp 234 metric 1 10000 1 1 1
    network 10.1.12.2 0.0.0.0
    auto-summary
    autonomous-system 1
    exit-address-family
    !
    router ospf 1
    log-adjacency-changes
    !
    router bgp 234
    no bgp default ipv4-unicast
    bgp log-neighbor-changes
    neighbor 4.4.4.4 remote-as 234
    neighbor 4.4.4.4 update-source Loopback0
    !
    address-family vpnv4
    neighbor 4.4.4.4 activate
    neighbor 4.4.4.4 send-community extended
    exit-address-family
    !
    address-family ipv4 vrf v
    redistribute eigrp 1
    no synchronization
    exit-address-family
    !
    ip forward-protocol nd
    !

    R3, P router:

    R3#show run
    

    interface Loopback0
    ip address 3.3.3.3 255.255.255.255
    !
    interface FastEthernet0/0
    ip address 10.1.34.3 255.255.255.0
    mpls ip
    !
    interface FastEthernet0/1
    ip address 10.1.23.3 255.255.255.0
    mpls ip
    !
    router ospf 1
    log-adjacency-changes
    network 0.0.0.0 255.255.255.255 area 0
    !

    R4: PE Router

    R4#show run
    !
    ip vrf v
    rd 1:1
    route-target export 1:1
    route-target import 1:1
    !
    !
    interface Loopback0
    ip address 4.4.4.4 255.255.255.255
    ip ospf 1 area 0
    !
    interface FastEthernet0/0
    ip address 10.1.34.4 255.255.255.0
    ip ospf 1 area 0
    mpls ip
    !
    interface FastEthernet0/1
    ip vrf forwarding v
    ip address 10.1.45.4 255.255.255.0
    !
    router eigrp 1
    no auto-summary
    !
    address-family ipv4 vrf v
    redistribute bgp 234 metric 1 1 1 1 1
    network 10.1.45.4 0.0.0.0
    auto-summary
    autonomous-system 1
    exit-address-family
    !
    router ospf 1
    log-adjacency-changes
    !
    router bgp 234
    no bgp default ipv4-unicast
    bgp log-neighbor-changes
    neighbor 2.2.2.2 remote-as 234
    neighbor 2.2.2.2 update-source Loopback0
    !
    address-family vpnv4
    neighbor 2.2.2.2 activate
    neighbor 2.2.2.2 send-community extended
    exit-address-family
    !
    address-family ipv4 vrf v
    redistribute eigrp 1
    no synchronization
    exit-address-family

    R5: CE Router

    R5#show run
    !
    interface Loopback0
    ip address 5.5.5.5 255.255.255.0
    !
    interface Serial0/0
    ip address 10.1.215.5 255.255.255.0
    clock rate 64000
    !
    interface FastEthernet0/1
    ip address 10.1.45.5 255.255.255.0
    !
    router eigrp 1
    network 0.0.0.0
    no auto-summary
    !

    Now for a couple show commands on R1:

    R1#show ip route eigrp
    5.0.0.0/24 is subnetted, 1 subnets
    D 5.5.5.0 [90/435200] via 10.1.12.2, 00:19:08, FastEthernet0/0
    10.0.0.0/24 is subnetted, 3 subnets
    D 10.1.45.0 [90/307200] via 10.1.12.2, 00:19:08, FastEthernet0/0
    R1#

    R1#show ip eigrp topology
    IP-EIGRP Topology Table for AS(1)/ID(10.1.215.1)

    Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
    r - reply Status, s - sia Status

    P 1.1.1.0/24, 1 successors, FD is 128256
    via Connected, Loopback0
    P 5.5.5.0/24, 1 successors, FD is 435200
    via 10.1.12.2 (435200/409600), FastEthernet0/0
    via 10.1.215.5 (2297856/128256), Serial0/0
    P 10.1.12.0/24, 1 successors, FD is 281600
    via Connected, FastEthernet0/0
    P 10.1.45.0/24, 1 successors, FD is 307200
    via 10.1.12.2 (307200/281600), FastEthernet0/0
    via 10.1.215.5 (2195456/281600), Serial0/0
    P 10.1.215.0/24, 1 successors, FD is 2169856
    via Connected, Serial0/0
    R1#

    And some on R2, the PE router:

    R2#show ip route vrf v
    

    Routing Table: v
    Codes: 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

    Gateway of last resort is not set

    1.0.0.0/24 is subnetted, 1 subnets
    D 1.1.1.0 [90/409600] via 10.1.12.1, 00:31:48, FastEthernet0/0
    5.0.0.0/24 is subnetted, 1 subnets
    B 5.5.5.0 [200/409600] via 4.4.4.4, 00:02:34
    10.0.0.0/24 is subnetted, 3 subnets
    C 10.1.12.0 is directly connected, FastEthernet0/0
    B 10.1.45.0 [200/0] via 4.4.4.4, 00:31:48
    D 10.1.215.0 [90/2195456] via 10.1.12.1, 00:31:21, FastEthernet0/0

    R2#show ip eigrp vrf v topology
    IP-EIGRP Topology Table for AS(1)/ID(10.1.12.2) Routing Table: v

    Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
    r - reply Status, s - sia Status

    P 1.1.1.0/24, 1 successors, FD is 409600
    via 10.1.12.1 (409600/128256), FastEthernet0/0
    P 5.5.5.0/24, 1 successors, FD is 409600
    via VPNv4 Sourced (409600/0)
    P 10.1.12.0/24, 1 successors, FD is 281600
    via Connected, FastEthernet0/0
    P 10.1.45.0/24, 1 successors, FD is 281600
    via VPNv4 Sourced (281600/0)
    P 10.1.215.0/24, 1 successors, FD is 2195456
    via 10.1.12.1 (2195456/2169856), FastEthernet0/0
    R2#

    Take a minute to post your thoughts, and as always, happy studies.

    ....

     

    It has been a few days, and we have received lots of great ideas.   Thank you.

    When R4 receives the routes in VRF v, the EIGRP metrics are copied into extended BGP attributes, and include the information for metric, AS, route-type and more.  The iBGP updates from R4 to R2 contain all those attributes.   When R2 receives the updates, if the route type is internal (from EIGRP attributes) and the source EIGRP AS matches the local EIGRP AS we are importing to, it will then be up to the  metric to determine the best path.

    If we decreased the bandwidth statement on R4 Fa0/1, or used an offset list (2,000,000 more should do the trick) on R5 out Fa0/1 (towards R4), the increase in metric would cause R2 to prefer the path through R1 for 5.5.5.0/24 instead of using the MPLS backbone.

    BGP updates that contain the cost community attribute will use the EIGRP AD instead of the iBGP AD of 200 to compare routes on metric alone. In that light, another option, would be to tell R2 to ignore cost-community, with the BGP router command:

    bgp bestpath cost-community ignore

    Let's take a look at the results.

    Here is the baseline for before any changes:

    R2#show ip route vrf v | inc 5.5.5
    B 5.5.5.0 [200/409600] via 4.4.4.4, 00:02:29
    R2#show ip bgp vpnv4 all 5.5.5.0
    BGP routing table entry for 1:1:5.5.5.0/24, version 8
    Paths: (1 available, best #1, table v)
    Flag: 0x820
    Not advertised to any peer
    Local
    4.4.4.4 (metric 21) from 4.4.4.4 (4.4.4.4)
    Origin incomplete, metric 409600, localpref 100, valid, internal, best
    Extended Community: RT:1:1 Cost:pre-bestpath:128:409600 0x8800:32768:0
    0x8801:1:153600 0x8802:65281:256000 0x8803:65281:1500
    mpls labels in/out nolabel/19
    R2#

    Now we will remove the default behavior

    R2(config)#router bgp 234
    R2(config-router)#bgp bestpath cost-community ignore

    Cleared BGP sessions and routing tables, and waited a minute before the following show commands:

    R2#show ip route vrf v | inc 5.5.5
    D 5.5.5.0 [90/2323456] via 10.1.12.1, 00:00:08, FastEthernet0/0
    R2#show ip bgp vpnv4 all 5.5.5.0
    BGP routing table entry for 1:1:5.5.5.0/24, version 8
    Paths: (2 available, best #2, table v)
    Flag: 0x820
    Advertised to update-groups:
    1
    Local
    4.4.4.4 (metric 21) from 4.4.4.4 (4.4.4.4)
    Origin incomplete, metric 409600, localpref 100, valid, internal
    Extended Community: RT:1:1 Cost:pre-bestpath:128:409600 0x8800:32768:0
    0x8801:1:153600 0x8802:65281:256000 0x8803:65281:1500
    mpls labels in/out 20/19
    Local
    10.1.12.1 from 0.0.0.0 (2.2.2.2)
    Origin incomplete, metric 2323456, localpref 100, weight 32768, valid, sourced, best
    Extended Community: RT:1:1
    Cost:pre-bestpath:128:2323456 (default-2145160191) 0x8800:32768:0
    0x8801:1:665600 0x8802:65282:1657856 0x8803:65281:1500
    mpls labels in/out 20/nolabel
    R2#

    After setting it back to defaults, we could then try an offset list on R5 advertising to R4:

    R5(config)#router eigrp 1
    R5(config-router)#offset-list 0 out 2000000 fastEthernet 0/1

    Cleared BGP sessions and routing tables, and waited a minute before the following show commands:

    R2#show ip route vrf v | inc 5.5.5
    D 5.5.5.0 [90/2323456] via 10.1.12.1, 00:06:28, FastEthernet0/0
    R2#show ip bgp vpnv4 all 5.5.5.0
    BGP routing table entry for 1:1:5.5.5.0/24, version 12
    Paths: (1 available, best #1, table v)
    Flag: 0x820
    Advertised to update-groups:
    1
    Local
    10.1.12.1 from 0.0.0.0 (2.2.2.2)
    Origin incomplete, metric 2323456, localpref 100, weight 32768, valid, sourced, best
    Extended Community: RT:1:1
    Cost:pre-bestpath:128:2323456 (default-2145160191) 0x8800:32768:0
    0x8801:1:665600 0x8802:65282:1657856 0x8803:65281:1500
    mpls labels in/out 31/nolabel
    R2#

    After resetting all that, implementing the following on R4, and then clearing BGP and routing, we issue the show commands again.

    R4(config)#int fa 0/1
    R4(config-if)#bandwidth 100

    R2#show ip route vrf v | inc 5.5.5
    D 5.5.5.0 [90/2323456] via 10.1.12.1, 00:00:05, FastEthernet0/0
    R2#show ip bgp vpnv4 all 5.5.5.0
    BGP routing table entry for 1:1:5.5.5.0/24, version 20
    Paths: (1 available, best #1, table v)
    Flag: 0x820
    Advertised to update-groups:
    1
    Local
    10.1.12.1 from 0.0.0.0 (2.2.2.2)
    Origin incomplete, metric 2323456, localpref 100, weight 32768, valid, sourced, best
    Extended Community: RT:1:1
    Cost:pre-bestpath:128:2323456 (default-2145160191) 0x8800:32768:0
    0x8801:1:665600 0x8802:65282:1657856 0x8803:65281:1500
    mpls labels in/out 23/nolabel
    R2#

    Thanks again to all who contributed. I encourage all RS candidates to lab this up, as well as practice MPLS with OSPF at the CEs.

    Marcel posted a comment, reminding us of an excellent document written by Petr, on this topic and more. The original post from Petr which includes the link to free .PDF for this document may be found by clicking here. Thanks Marcel!

    © 2024 INE. All Rights Reserved. All logos, trademarks and registered trademarks are the property of their respective owners.
    instagram Logofacebook Logotwitter Logolinkedin Logoyoutube Logo