Routing

Expand all | Collapse all

how to chenage next hop path .

Jump to Best Answer
  • 1.  how to chenage next hop path .

    Posted 01-08-2014 04:14
      |   view attached

    One of my customer wants to receive 10.1.162.0/25 route from 172.21.56.2 inplace of 10.100.0.1 neighvor .Please some help how to achieve this .I am attaching router current configuration .

     

    UPC-DCDN-R01> show route 10.1.162.1

    inet.0: 420 destinations, 785 routes (419 active, 0 holddown, 1 hidden)
    Restart Complete
    + = Active Route, - = Last Active, * = Both

    10.1.162.0/25      *[BGP/160] 2d 00:31:13, localpref 100
                          AS path: 65500 65500 65000 65000 65000 I
                        > to 10.100.0.1 via ge-2/0/0.0
                        [BGP/170] 2d 00:31:02, localpref 100
                          AS path: 65000 65000 65000 I
                        > to 172.21.56.2 via ge-2/1/

    Attachment(s)

    txt
    m320routerconfig.txt   167 KB 1 version


  • 2.  RE: how to chenage next hop path .
    Best Answer

    Posted 01-08-2014 04:18
    Hello, you can apply an import policy at the neighbor level and change MED or localpref


  • 3.  RE: how to chenage next hop path .

    Posted 01-08-2014 04:51

    Thanks for prompt response .I tried this but not happening .

     

    policy-statement tata_import_test {
            term 1 {
                from {
                    protocol bgp;
                    local-preference 90;
                    route-filter 10.1.162.0/25 orlonger;
                }
                then accept;
            }
        }
    }

    and applied the same to bgp group but it is not happening .please check and suggest .

    group tata-ebgp {
                type external;
                local-address 172.21.56.1;
                family inet {
                    unicast;
                }
                peer-as 65000;
                local-as 65101;
                neighbor 172.21.56.2 {
                    local-preference 150;
                    import tata_import_test;
                    export TATA_DC_LAN;
                }
            }
        }
    }



  • 4.  RE: how to chenage next hop path .

    Posted 01-09-2014 11:22

    Your policy currently following this sequence of action while executing , "select route received through protocol BGP having local-preference of 90 and then route-filter 10.1.162.0/25 orlonger and simply accepting  routes matching these conditions" . Which is obviously  null as local-preference of routes receiving from both peers is 100 .

    Your Policy should be like "select routes received through protocol BGP from neighbor 10.100.0.1 and route filiter 10.1.162.0/25 orlonger and in then stanza use set the local-preference 90 ". This will set local preference of routes equal to 90 making this neighbor less preferred. Configuration for required scenario is as under:-

    Policy-statement tata_import_test {
            term 1 {
                from {
                    protocol BGP;
                    neighbor 10.100.0.1
                    route-filter 10.1.162.0/25 orlonger;
                }
                then local-preference 90;
            }
        }

     

    Please mark this as accepted solution if it works for you

    A kudos is a good way of appreciation

     

    Kashif Nawaz

    JNCIP-Sec ,JNCIP-Ent

    JNCIS-Ent, JNCIS-Sec

    JNCIA-Junos