RIPv2 Key Point:

Simplest of all dynamic protocols for PE-CE routing
VRF configuration done under the address family for the VRF(identicak to BGP)
Commands applied to the golbal process can be inherited by the VRFs
   .Version
   .Passive-interface default
MP-BGP can carry the RIP metric between ××× sites by setting the MED equal to the RIP hop count.
Avoids sub-optional routing and/or routing loops.
Single command under the VRF RIP process
    - redistribute bps metric transparent

EIGRP Key Point:

Configuration indetical to RIP and BGP for VRFs
The autonomous system number can be manually set using the autonomous-system command under the EIGRP VRF routing process.
Commonly the same AS number is used between PE routers
   - Internal EIGRP routes from one ××× site will be learned as internal routes in other ××× sites.
    - External EIGRP rotues do not change between ××× sites
Different AS's can be used between ××× sites
   - Internal EIGRP roures from one ××× site will be learned as External EIGRP rotues
    - External EIGRP routes do not change between ××× sites
BGP MEDs extended communities are used to carry the AS number,route type,and EIGRP metric valus
    - Automatically donw by the PE rotuers
Sub-optional routing and/or loops can occur due to the fact the EIGRP metric is not altered when form PE to PE via MP-BGP
To overcome this issue the BGP cost community is used to compare EIGRP learned routes with MP-iBGP routes based on their metric and not the administrative distance between iBGP and EIGRP
The BGP cost community is advertised to iBGP and confederation peers
No configuration is required

EIGRP Site of Origin:

   Speeds up routing convergence when "backdoor" links are used along with mutal redistribution on the PE rotuers.
Prevent EIGRP routes from being learned from one ××× site to a PE,onto anthter ×××,and finally back to another PE
SoO feature must be supported by all PE and CE routers.
If the SoP value in an EIGRP update is the same value configured under for the VRF site map on the receing interface, the update is dropped.
Confiruration is applied inbound on the PE router's interfaces and the CE/C router's backdoor link interfaces.
   
interface Ethernet0/0
        ip vrf sitemap SoO-B
    !
    route-map SoO-B permit 10
        set extcommunity SoO 3:3

OSPF Key Point

Running OSPF as PE-CE imples redistribution of OSPF and BGP
   - Traditional OSPF to IPv4 Unicast BGP redistribution does not preserve OSPF route information.
OSPF to MP-BGP redistribution defines encoding of OSPF info as BGP extended community
    - Preserves OSPF route type
         Origination area
         LSA type
         E1 or E2 for external and N1 or N2 for NSSA
   - Preserves OSPF router-id
   - Defines OSPF domain-id
   OSPF Domain-ID
Domain-ID encodes where route was originated from.
   When domain-id matches on ××× sites the MPLS network is treated link OSPF area 0 (AKA "Superbackbone")
- OSPF routes from ××× site 1 seen as inter-area on ××× site 2
When domain-id is different OSPF routes from ××× site 1 seen as external on ××× site 2
Domain-ID inferred from process-id
     - Can be manually set with domain id process level command
OSPF Sham Links
Even if domain-ID matched and area is the same on both sides routes are seen as LSA3 between sites.
If a backdoor link running OSPF exists between ××× sites it will always be preferred
- Intra-Area
- Inter-Area
- External
   - NSSA External
OSPF "sham link" can be used as a virtual-link over MPLS network
- Routes learned via MP-BGP redistribution can be seen as intra-area routes
Configuring Sham Links
Create a new interface in the VRF on the PE routers and advertise it into MP-BGP
  
interface loopback1
     ip vrf forwarding ×××_A
     ip address 10.1.3.3 255.255.255.255
   router bgp 100
    !
     address-family ipv4 vrf ×××_A
        network 10.1.3.3 mask 255.255.255.255
Configure sham link between PE routers
   
router ospf 1 vrf ×××_A
      area 0 sham-link 10.1.3.3 10.1.6.6
OSPF MPLS ××× Notes
If the PE router's OSPF process ID's do not match the intra-area route learned via MP-BGP will be External Type-2;
If the PE router's OSPF process ID's do match,or the process's do not match but their domain-is's do match,the intra-area routes learned via MP-BGP will be inter-area;
If a sham-link is used,the intra-area routes learned via MP-BGP remain intra-area and the OSPF cost is 0 across the sham-link;
External OSPF routes will always be learned via MP-BGP as external.

iBGP, not OSPF, must always advertise the sham link endpoints. Otherwise, the sham link flaps.

重分发OSPF进BGP的时候有一点需要注意:Without the OSPF match keyword specified, only internal OSPF routes are redistributed into OSPF.

BGP as-override
    AS Override functionality. The functionality is made active only when the first AS number in the AS-PATH is equal to the AS number of the receiving BGP router, BGP allows-in
    Allows the learning of prefixes containing the local AS number in the as-path
    Commonly used on the CE router
BGP Allowas-in
   Overrides an eBGP peer router's AS number with the local router's AS number in the as-path for a prefix;
   IF the allowas-in feature is not used the eBGP peer would drop the prefix due to the standard BGP loop-prevention mechanism
   Commonly used on the PE router.
BGP SoO
    Basic theory similar to EIGRP SoO
    Used to prevent routing loops when dual homed PE to CE routing is being used along with the as-override feature;
BGP SoO is also useful when the as-override or allowas-in options are being used which means that the as-path loop prevention may not be reliable;
     If a ×××v4 route is received with the same SoO value used for the PE-CE peering,the route will not be installed into the VRF routing table or advertised to the CE.