Routing

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.
Expand all | Collapse all

How do I tag all direct routes?

  • 1.  How do I tag all direct routes?

    Posted 09-19-2014 06:25

    Hello,

     

    I am wondering how I can configure my EX8200 to assign a specific OSPF tag to direct routes. In my particular case, I would like this to be as dynamic as possible - meaning, if I add a new direct route on my 8200, is there a policy I can create to automatically assign that tag?

     

    What I'm trying to avoid is manually assigning the OSPF tag everytime a new direct route is added.

     

    Here is a diagram of what I'm trying to do:

     

     

    AT&T routing solution.jpg

     

     

    So to summarize:

     

    All BP direct routes would have an OSPF tag of 100.

    All CG direct routes would have an OSPF tag of 200.

    So on the CG 8200, all local routes would have a tag of 200, and BP routes would have a tag of 100.

     

    Is there a policy I can create to automatically assign these tags to direct routes?

     

     



  • 2.  RE: How do I tag all direct routes?

    Posted 09-19-2014 07:58

    Hi,

     

    Only OSPF external routes (Type-5 or Type-7 LSAs) can be tagged.

     

     

     

     

     

     

     



  • 3.  RE: How do I tag all direct routes?

    Posted 09-19-2014 12:43

    So I cannot tag any internal routes?

     

    Are you talking about routes external to the OSPF area? Or the AS?



  • 4.  RE: How do I tag all direct routes?

    Posted 09-19-2014 13:15

    Routes external to OSPF and which are represented as Type-5 or Type-7 LSAs.

    Only those LSAs include a tag field.

     

     

    --
    Click the star for kudos if you think I earned it.
    If this post solves your problem, please mark this post as "Accepted Solution".



  • 5.  RE: How do I tag all direct routes?

    Posted 10-07-2014 07:50

    Okay, that's a bummer.

     

    My objective is to hand off my OSPF routes to our ISP in such a way that the ISP routers will send traffic directly to it's destination. Let me explain...

     

    In the diagram below, any traffic from the AT&T cloud destined for the Bayport 8200 should go through the BP Cisco router, and the BP 4550. Similarly, any traffic destined for the CG 8200 should go through the CG Cisco router, and the CG 4550.

     

    However, this is not what's happening. Currently, all traffic goes through Cottage Grove, regardless of destination.

     

    AT&T has asked me to tag my OSPF routes so that their Cisco boxes can redistrubute the appropriate roue information via BGP. I am trying to tag all Bayport networks with tag 100, and all Cottage Grove networks with tag 200.

     

    What is the best way to do this?

     

    AT&T routing solution.jpg



  • 6.  RE: How do I tag all direct routes?
    Best Answer

    Posted 10-07-2014 08:24

    Hi retrowillshire,

     

     

    Just to be sure: what do you call "direct" routes? In Junos a "direct" route is what Certain vendor call "Connected".

     

    Do you run OSPF on these networks? I mean will there be OSPF adjacencies on these networks?

    If you do those routes will be advertised as Type-1 or Type-2 LSAs. Those LSAs do not have a "Tag" field.

     

     

    But maybe you don't need/want to run OSPF on these direct netowks and you really only need to distribute them. In that case there is a solution for your problem:  You can export those routes as external routes (Type-5 LSA) and thus you can add a tag.

     

     

    /* on the BP 8200 */
    protocols {
      ospf {
        export direct-routes-to-ospf;
      }
    }
    policy-options {
      policy-statement direct-routes-to-ospf {
        term 1 {
          from {
            prototocol direct;
            route-filter <bp-networks> exact;
          }
          then {
            tag 100
            accept;
          }
        }
      }
    }

     

    Similar configuration on the CG 8200

     

     

     --
    If this post solves your problem, please mark this post as "Accepted Solution".
    Kudos are appreciated

     



  • 7.  RE: How do I tag all direct routes?

    Posted 10-07-2014 09:40

    Hi pantunes,

     

    When I say "Direct," I am referring to networks local to the 8200. So for example, when I issue the the "show route" command, I get:

     

    10.31.0.0/16      *[Direct/0] 00:41:06
                        > via vlan.1723
    

     

     

    I want this network to have a tag of 100 when I export it via OSPF. Here is my current config for that network:

     

    show vlan
    
    BP10NET {
        vlan-id 1723;
        l3-interface vlan.1723;
    }
    

     

    show interfaces vlan
    
    unit 1723 {
        description BP10NET;
        family inet {
            address 10.31.0.1/16;
        }
    }
    

     

    show protocols
    
    ospf {
        export BP_DATA_CENTER_DIRECT_ROUTES;
        reference-bandwidth 100g;
        area 0.0.0.0 {
            interface lo0.0 {
                passive;
            }
            interface vlan.40 {
                passive;
            }
            interface vlan.81 {
                interface-type p2p;
                link-protection;
                metric 300;
            }
            interface vlan.85 {
                interface-type p2p;
                link-protection;
            }
            interface vlan.176 {
                passive;
            }
            interface vlan.1045 {
                passive;
            }
            interface vlan.1046 {
                passive;
            }
            interface vlan.1047 {
                passive;
            }
            interface vlan.407 {
                passive;
            }
            interface vlan.3048 {
                passive;
            }
            interface vlan.510 {
                passive;
            }
            interface vlan.501 {
                passive;
            }
            interface vlan.502 {
                passive;
            }
            interface vlan.503 {
                passive;
            }
            interface vlan.52 {
                passive;
            }
            interface vlan.122 {
                passive;
            }
            interface vlan.123 {
                passive;
            }
            interface vlan.1732 {
                passive;
            }
            interface vlan.1725 {
                passive;
            }
            interface vlan.1724 {
                passive;
            }
            interface vlan.1497 {
                passive;
            }
            interface vlan.1499 {
                passive;
            }
            interface vlan.1501 {
                passive;
            }
            interface vlan.1723 {
                passive;
            }
            interface vlan.1729 {
                passive;
            }
            interface vlan.1731 {
                passive;
            }
            interface vlan.1581 {
                passive;
            }
            interface vlan.1726 {
                passive;
            }
            interface vlan.1730 {
                passive;
            }
            interface vlan.1728 {
                passive;
            }
        }
        area 0.0.0.1 {
            interface vlan.86 {
                interface-type p2p;
                link-protection;
            }
        }
    }
    

     

    show policy-options
    
    policy-statement BP_DATA_CENTER_DIRECT_ROUTES {
        term TAG_100 {
            from {
                protocol direct;
                route-filter 10.31.0.0/16 exact;
            }
            then {
                tag 100;
                accept;
            }
        }
    }
    

     

    Unless I'm totally off track here, when I do a "show route" on the BP 4550 (which in this case is area 1), I should see 10.31.0.0/16 with a tag of 100.



  • 8.  RE: How do I tag all direct routes?

     
    Posted 10-07-2014 09:50

    Please deatcivate below part of config under protocol OSPF and see if it works.

     

     

            interface vlan.1723 {
                passive;
            }

     

    deactivate protocols ospf area 0.0.0.0 interface vlan.1723

     

    Regards

    Surya



  • 9.  RE: How do I tag all direct routes?

    Posted 10-07-2014 10:11

    Hi Surya,

     

    When I deactivate that line of configuration, I lose the route on my BP 4550.



  • 10.  RE: How do I tag all direct routes?

     
    Posted 10-07-2014 10:16

    Hi retrowillshire,

     

    I don't think so provided you keep the "OSPF" export policy as it is. Currently since you have this vlan.1723 under OSPF, it is sent as internal route and when you deactivate this config this would be sent as external route due to export policy and thus adding the tag.

     

    Regards

    Surya

     



  • 11.  RE: How do I tag all direct routes?

     
    Posted 10-07-2014 10:35

    To be more precise, with passive vlan.1723 under protocol ospf, the prefix would be part of "Type 1" internal LSA. And you deactivate thereby allowing export policy to kick in, the prefix would be "Type 5" external LSA.

     

     



  • 12.  RE: How do I tag all direct routes?

    Posted 10-07-2014 11:32

    Hi Surya,

     

    Understood. Here is my current OSPF configuration with vlan.1723 inactive:

     

    ospf {
        export BP_DATA_CENTER_DIRECT_ROUTES;
        reference-bandwidth 100g;
        area 0.0.0.0 {
            interface lo0.0 {
                passive;
            }
            interface vlan.40 {
                passive;
            }
            interface vlan.81 {
                interface-type p2p;
                link-protection;
                metric 300;
            }
            interface vlan.85 {
                interface-type p2p;
                link-protection;
            }
            interface vlan.176 {
                passive;
            }
            interface vlan.1045 {
                passive;
            }
            interface vlan.1046 {
                passive;
            }
            interface vlan.1047 {
                passive;
            }
            interface vlan.407 {
                passive;
            }
            interface vlan.3048 {
                passive;
            }
            interface vlan.510 {
                passive;
            }
            interface vlan.501 {
                passive;
            }
            interface vlan.502 {
                passive;
            }
            interface vlan.503 {
                passive;
            }
            interface vlan.52 {
                passive;
            }
            interface vlan.122 {
                passive;
            }
            interface vlan.123 {
                passive;
            }
            interface vlan.1732 {
                passive;
            }
            interface vlan.1725 {
                passive;
            }
            interface vlan.1724 {
                passive;
            }
            interface vlan.1497 {
                passive;
            }
            interface vlan.1499 {
                passive;
            }
            interface vlan.1501 {
                passive;
            }
            inactive: interface vlan.1723 {
                passive;
            }
            interface vlan.1729 {
                passive;
            }
            interface vlan.1731 {
                passive;
            }
            interface vlan.1581 {
                passive;
            }
            interface vlan.1726 {
                passive;
            }
            interface vlan.1730 {
                passive;
            }
            interface vlan.1728 {
                passive;
            }
        }
        area 0.0.0.1 {
            interface vlan.86 {
                interface-type p2p;
                link-protection;
            }
        }
    }
    

     

    You can see that I am exporting my BP_DATA_CENTER_DIRECT_ROUTES. I also have vlan.1723 inactive.

     

    However, when I look at my routing table on the BP 4550, I don't see the route for 10.31.0.0/16



  • 13.  RE: How do I tag all direct routes?

    Posted 10-07-2014 11:36

    Because the 4550 is in Area1, do I need to export that policy under area 0.0.0.1?



  • 14.  RE: How do I tag all direct routes?

     
    Posted 10-07-2014 11:43

    Hi,

     

    I take that back as the export-policy for OSPF is across area and Type-5 LSA should be flooded across areas unless it is STUB or NSSA area. Can you please attach the OSPF configs of 4550?

     

    Regards

    Surya



  • 15.  RE: How do I tag all direct routes?

    Posted 10-07-2014 11:54

    Certainly....

     

     

    Here is the OSPF config for my BP 4550:

     

    ospf {
        reference-bandwidth 200m;
        area 0.0.0.1 {
            interface lo0.0 {
                passive;
            }
            interface vlan.86 {
                interface-type p2p;
                link-protection;
            }
            interface ge-0/0/0.0 {
                metric 500;
            }
        }
    }
    

     



  • 16.  RE: How do I tag all direct routes?

     
    Posted 10-07-2014 12:04

    Hmm.. interesting.. Can I see the captures of below command from 8200?

     

    show ospf neighbor

    show ospf database area 0.0.0.0 detail

    show ospf database area 0.0.0.1 detail

     

    Regards

    Surya



  • 17.  RE: How do I tag all direct routes?

    Posted 10-07-2014 12:20

    Here is show ospf neighbor:

     

    Address          Interface              State     ID               Pri  Dead
    BP_8200          vlan.81                Full      CG_8200         128    33
    BP_8200          vlan.86                Full      BP_4550         128    39
    

     

    Please note that I will be removing/modifying the actual IP addresses



  • 18.  RE: How do I tag all direct routes?

     
    Posted 10-07-2014 12:28

    Hi,

     

    Also can you please check "show ospf datatbase area 0.0.0.1 external" to see if you have external route like below:

     

    show ospf database area 0.0.0.1 external

     

        OSPF AS SCOPE link state database
      Type     ID     Adv Rtr Seq Age    Opt Cksum Len
    Extern *10.31.0.0 X.X.X.X 0x80000001 16 0x22 0x51da 36

     

    Regards

    Surya



  • 19.  RE: How do I tag all direct routes?

    Posted 10-07-2014 12:50

    Looking through the OSPF detail commands, it looks like most of the routes are Type 3 (Stub)... which means I can't tag them, correct?



  • 20.  RE: How do I tag all direct routes?

    Posted 10-07-2014 12:44

    Here is the area 0.0.0.0 detail:

     

        OSPF database, Area 0.0.0.0
     Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
    Router  *BP_8200         BP_8200         0x8000001e  1884  0x22 0xebf  396
      bits 0x3, link count 31
      id BP_8200, data 255.255.255.255, Type Stub (3)
        Topology count: 0, Default metric: 0
      id vlan.1045, data 255.255.255.0, Type Stub (3)
        Topology count: 0, Default metric: 100
      id vlan.1046, data 255.255.255.0, Type Stub (3)
        Topology count: 0, Default metric: 100
      id vlan.1047, data 255.255.255.0, Type Stub (3)
        Topology count: 0, Default metric: 100
      id 158.107.248.112, data 255.255.255.248, Type Stub (3)
        Topology count: 0, Default metric: 100
      id 158.107.248.152, data 255.255.255.248, Type Stub (3)
        Topology count: 0, Default metric: 100
      id vlan.1497, data 255.255.252.0, Type Stub (3)
        Topology count: 0, Default metric: 100
      id vlan.1499, data 255.255.252.0, Type Stub (3)
        Topology count: 0, Default metric: 100
      id vlan.1501, data 255.255.252.0, Type Stub (3)
        Topology count: 0, Default metric: 100
      id vlan.1581, data 255.255.0.0, Type Stub (3)
        Topology count: 0, Default metric: 100
      id vlan.1724, data 255.255.252.0, Type Stub (3)
        Topology count: 0, Default metric: 100
      id vlan.1725, data 255.255.252.0, Type Stub (3)
        Topology count: 0, Default metric: 100
      id vlan.1726, data 255.255.252.0, Type Stub (3)
        Topology count: 0, Default metric: 100
      id vlan.1728, data 255.255.252.0, Type Stub (3)
        Topology count: 0, Default metric: 100
      id vlan.1729, data 255.255.252.0, Type Stub (3)
        Topology count: 0, Default metric: 100
      id vlan.1730, data 255.255.252.0, Type Stub (3)
        Topology count: 0, Default metric: 100
      id vlan.1731, data 255.255.252.0, Type Stub (3)
        Topology count: 0, Default metric: 100
      id vlan.1732, data 255.255.252.0, Type Stub (3)
        Topology count: 0, Default metric: 100
      id vlan.176, data 255.255.252.0, Type Stub (3)
        Topology count: 0, Default metric: 100
      id vlan.3048, data 255.255.252.0, Type Stub (3)
        Topology count: 0, Default metric: 100
      id vlan.40, data 255.255.252.0, Type Stub (3)
        Topology count: 0, Default metric: 100
      id vlan.407, data 255.255.255.0, Type Stub (3)
        Topology count: 0, Default metric: 100
      id vlan.501, data 255.255.255.0, Type Stub (3)
        Topology count: 0, Default metric: 100
      id vlan.502, data 255.255.255.0, Type Stub (3)
        Topology count: 0, Default metric: 100
      id 10.50.13.0, data 255.255.255.0, Type Stub (3)
        Topology count: 0, Default metric: 100
      id vlan.510, data 255.255.255.0, Type Stub (3)
        Topology count: 0, Default metric: 100
      id vlan.52, data 255.255.255.248, Type Stub (3)
        Topology count: 0, Default metric: 100
      id CG_8200, data 158.107.248.81, Type PointToPoint (1)
        Topology count: 0, Default metric: 300
      id vlan.81, data 255.255.255.248, Type Stub (3)
        Topology count: 0, Default metric: 300
      id OSPF_ROUTER, data OSPF_ROUTER, Type PointToPoint (1)
        Topology count: 0, Default metric: 100
        Type: PointToPoint, Node ID: CG_8200
          Metric: 300, Bidirectional
    

     

    I replaceed the IP addresess with the vlan tags. Note that vlan.1723 is not present.



  • 21.  RE: How do I tag all direct routes?

    Posted 10-07-2014 12:48

    Here is area 0.0.0.1 detail:

        OSPF database, Area 0.0.0.1
     Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
    Router  *BP_8200         BP_8200         0x80000024  1884  0x22 0x2443  48
      bits 0x3, link count 2
      id BP_4550, data BP_8200, Type PointToPoint (1)
        Topology count: 0, Default metric: 100
      id vlan.86, data 255.255.255.248, Type Stub (3)
        Topology count: 0, Default metric: 100
      Topology default (ID 0)
        Type: PointToPoint, Node ID: BP_4550
          Metric: 100, Bidirectional
    Router   BP_4550         BP_4550         0x8000004a  1859  0x22 0xbd5   60
      bits 0x0, link count 3
      id BP_4550, data 255.255.255.255, Type Stub (3)
        Topology count: 0, Default metric: 0
      id BP_8200, data BP_4550, Type PointToPoint (1)
        Topology count: 0, Default metric: 1
      id vlan.86, data 255.255.255.248, Type Stub (3)
        Topology count: 0, Default metric: 1
      Topology default (ID 0)
        Type: PointToPoint, Node ID: BP_8200
          Metric: 1, Bidirectional
    Summary *BP_8200         BP_8200         0x80000009  1804  0x22 0x66b4  28
      mask 255.255.255.255
      Topology default (ID 0) -> Metric: 0
    Summary *CG_8200         BP_8200         0x80000009  1777  0x22 0x1fcd  28
      mask 255.255.255.255
      Topology default (ID 0) -> Metric: 300
    

     

     

    When I do a "show ospf database area 0.0.0.1 external" I do not get any result...



  • 22.  RE: How do I tag all direct routes?

     
    Posted 10-07-2014 12:52
    Hmm.. I cannot find external Type-5 LSA in the database which should be the case with export policy.

    Not I doubt, but can you double confirm you still have this route in 8500?

    10.31.0.0/16 *[Direct/0] 00:41:06
    > via vlan.1723


  • 23.  RE: How do I tag all direct routes?

    Posted 10-07-2014 12:54

    Yes, I can confirm that. With the "show route" command on the BP 8200, I get:

     

    10.31.0.0/16      *[Direct/0] 04:02:44
                        > via vlan.1723
    10.31.0.1/32      *[Local/0] 04:03:42
                          Local via vlan.1723
    

     



  • 24.  RE: How do I tag all direct routes?

     
    Posted 10-07-2014 13:21
    Hi,

    I am not sure if you are hitting a bug here, but with the export policy and direct route in default inet.0 table we should have been seen this prefix being advertised as Type-5 LSA.

    Regards
    Surya


  • 25.  RE: How do I tag all direct routes?

    Posted 10-08-2014 11:31

    So just to be sure I understand:

     

    • The 10.31.0.0/16 network exists on the BP8200
    • The BP8200 is part of area 0.0.0.0
    • By removing vlan.1723 from OSPF area 0.0.0.0, and exporting it, I am making it an external route

    Is it possible that the policy is not correctly identifying that network? In that case, there would be nothing for that policy to export.



  • 26.  RE: How do I tag all direct routes?

     
    Posted 10-08-2014 11:54

    Hi,

     

    That's what looks to be the case here.

     

    For the policy that is configured, it just need "10.31.0.0/16" route to be active in inet.0 table to be exported as external Type-5 LSA.

     

    I did tested in my lab with vlan interface on EX it works fine.

     

    Regards

    Surya

     



  • 27.  RE: How do I tag all direct routes?

    Posted 07-22-2015 09:01

    I know this is almost a year late, but your solution did work. I had some policies in place that needed to be moved around before it worked. It was not a bug.

     

    thanks for your help!