Routing

 View Only
last person joined: yesterday 

Ask questions and share experiences about ACX Series, CTP Series, MX Series, PTX Series, SSR Series, JRR Series, and all things routing, including portfolios and protocols.
  • 1.  Tag routes from BGP to OSPF

    Posted 12-28-2010 04:12

    Hi,

    I have MPLS network with two sites.

    I tried to configure tagging for OSPF routes.

    I didn't succeed to do it.

    Does anybody have an idea ?

    Thanks, Sharon



  • 2.  RE: Tag routes from BGP to OSPF

    Posted 12-28-2010 04:17

    Can you paste your configs?

     

    In general you have to create a policy, which accepts and tags BGP routes (from protocol bgp, then tag 1000). Then the policy should be applied to the OSPF (as an export policy).

    Tagged routes should appear as external routes (LSA type 5).



  • 3.  RE: Tag routes from BGP to OSPF

    Posted 12-28-2010 04:29
      |   view attached

    Hi,

    I'd tried this, but at the OSPF database i still don't see the tag:

    root@qwer# ...instance CTS extensive | match tag                     
        Type: 1, Metric: 20, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
        Type: 1, Metric: 23, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
        Type: 1, Metric: 20, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
        Type: 1, Metric: 23, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
        Type: 1, Metric: 20, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
        Type: 1, Metric: 23, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
        Type: 1, Metric: 20, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
        Type: 1, Metric: 23, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
        Type: 1, Metric: 20, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
        Type: 1, Metric: 23, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
        Type: 1, Metric: 20, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
        Type: 1, Metric: 23, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
        Type: 1, Metric: 20, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
        Type: 1, Metric: 23, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
        Type: 1, Metric: 20, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
        Type: 1, Metric: 23, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
        Type: 1, Metric: 20, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
        Type: 1, Metric: 23, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
        Type: 1, Metric: 21, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
        Type: 1, Metric: 23, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
        Type: 2, Metric: 0, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
        Type: 1, Metric: 21, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
        Type: 1, Metric: 23, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
        Type: 1, Metric: 21, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
        Type: 1, Metric: 23, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
        Type: 1, Metric: 21, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
        Type: 1, Metric: 23, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
        Type: 1, Metric: 21, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
        Type: 1, Metric: 23, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
        Type: 2, Metric: 0, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
        Type: 2, Metric: 0, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
        Type: 1, Metric: 0, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
        Type: 1, Metric: 0, Fwd addr: 0.0.0.0, Tag: 0.0.0.0

    Attachment(s)

    txt
    config.txt   8 KB 1 version


  • 4.  RE: Tag routes from BGP to OSPF

    Posted 12-28-2010 04:45

    Try deleting domain-vpn-tag 0 in the CTS routing instance.



  • 5.  RE: Tag routes from BGP to OSPF

    Posted 12-28-2010 04:54

    still didn't help...



  • 6.  RE: Tag routes from BGP to OSPF

    Posted 12-29-2010 01:31

    just to make clear, this is the tag that need to be changed.

     

    10.170.170.0/24    *[BGP/149] 00:01:42, MED 23, localpref 100, from 10.1.1.2
                          AS path: I
                        > to 1.1.1.2 via ge-0/0/0.0, Push 17
                        [OSPF/150] 00:00:01, metric 23, tag 0
                        > to 192.168.2.20 via ge-0/0/2.2



  • 7.  RE: Tag routes from BGP to OSPF

    Posted 01-10-2011 06:47

    Hello,

    Please see RFC4577, specifically section 4.2.5.2.

    In short, VPN route tag MUST be present and because OSPF route can carry only 1 tag*, there is no way to add another custom tag to the OSPF route coming from PE VRF to CE.

    You can change the value of VPN route tag with comand:

     

     

    set routing-instances BLAH1 protocols ospf domain-vpn-tag <whatever>

     

     

    HTH

    Regards

    Alex

     

    *) Interestingly enough, RFC2328 defined multiple OSPF Type-5 route tags (and forwarding addresses), one per TOS value. However, only  TOS 0 is supported hence only 1 OSPF route tag per Type-5 route.



  • 8.  RE: Tag routes from BGP to OSPF

    Posted 01-13-2011 17:00

    I believe I know what you're trying to do.  You're attempting mutual redisitribution between OSPF and BGP via a PPVPN/MPLS WAN.  This is considered highwire networking.  There's a large margin for error with the mutual redistribution architecture.  It really depends on the topology and how many entry and exit points are in the network to build a good model for mutual redistribution.  It's very easy to create routing information loops and not even be aware of them unless you turn on traceoptions to observe the behavior.  If you do it right, you'll also have to adjust the router's preference for OSPF or BGP to ensure that BGP is always prefered on the WAN router.  It's a mess.  I would suggest just announce summaries.

     

    If this isn't the case, I will explain how to tag OSPF LSA 5 routes.

     

    When you build a routing policy there are import and export attributes.  The easiest way to understand import vesus export is to visualize the route table in the middle; the import on the left; and the export on the right.  When you import routes, it's always routes coming from a neighbor that would be installed into the RT.  When you export routes, it's always routes within the RT being announced to a neighbor.

     

    In your case you want to take BGP routes and have OSPF tag them and announce them to other OSPF speaking neighbors.

     

    You'll need to create an OSPF export policy that would match the specific routes you're looking to redistribute then the action type would be "tag" followed by "accept."

     

    Here's an example of what the WAN router would look like if it were connected to multiple WANs.

     

     

    policy-statement bgp-100-export {
        term already-tagged {
            from {
                protocol ospf;
                tag [ 100 200 ];
            }
            then reject;
        }
        term has-community {
            from {
                protocol bgp;
                community campus;
            }
            then reject;
        }
        term set-community {
            from protocol [ ospf direct ];
            then {
                community set 65100:100;
                accept;
            }
        }
    }
    policy-statement bgp-200-export {
        term already-tagged {
            from {
                protocol ospf;
                tag [ 100 200 ];
            }
            then reject;
        }
        term has-community {
            from {
                protocol bgp;
                community campus;
            }
            then reject;
        }
        term set-community {
            from protocol [ ospf direct ];
            then {
                community set 65100:200;
                accept;
            }
        }
    }
    policy-statement bgp-nhs {
        term 1 {
            then {
                next-hop self;
            }
        }
    }
    policy-statement lb {
        term 1 {
            then {
                load-balance per-packet;
            }
        }
    }
    policy-statement ospf-export {
        term AS100 {
            from {
                protocol bgp;
                community 65200:100;
            }
            then {
                tag 100;
                accept;
            }
        }
        term AS200 {
            from {
                protocol bgp;
                community 65200:200;
            }
            then {
                tag 200;
                accept;
            }
        }
        term reject {
            then reject;
        }
    }
    community 65100:100 members 65100:100;
    community 65100:200 members 65100:200;
    community 65200:100 members 65200:100;
    community 65200:200 members 65200:200;
    community campus members "^((65100)|(65200)):((100)|(200))$";

     

     



  • 9.  RE: Tag routes from BGP to OSPF

    Posted 01-24-2011 09:21

    Hi JNPRfnaks,

    you are right, I'm trying to do what you described at first.

    I still couldn't do it.

    do you have an idea?

     

    I think it not supported regarding RFC 4577, but I'm still check thi issue.

     

    Thanks, Sharon



  • 10.  RE: Tag routes from BGP to OSPF

    Posted 01-24-2011 23:17

    You aren't going to see it in the local router's RIB, but it should be in the LSDB.  Type "show ospf database external advertising-router self" and you should see the locally generated type 5 LSAs.

     

    If you stil don't see it, then you're writing your policy incorrect.

     

    What's the output of "show route" and what's the config?



  • 11.  RE: Tag routes from BGP to OSPF

    Posted 01-31-2011 08:14

    Hi,

    it was RFC issue, and i didn't saw the route because they come to me fro the CE.

    when the PE sends route to CE he put the Dn bit on this route and won't accept this route from CE.

     

    Sharon,