Routing
Highlighted
Routing

how to chenage next hop path .

‎01-08-2014 04:14 AM

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/

Attachments

3 REPLIES 3
Highlighted
Routing
Solution
Accepted by topic author shigupt4@in.ibm.com
‎08-26-2015 01:27 AM

Re: how to chenage next hop path .

‎01-08-2014 04:17 AM
Hello, you can apply an import policy at the neighbor level and change MED or localpref
Highlighted
Routing

Re: how to chenage next hop path .

‎01-08-2014 04:51 AM

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;
            }
        }
    }
}

Highlighted
Routing

Re: how to change next hop path .

[ Edited ]
‎01-09-2014 11:21 AM

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

 

Please mark this as accepted solution if it works for you

A kudos is a good way of appreciation



Kashif Nawaz


JNCIE-Sec #170, JNCIE-SP#2492

JNCSP Ent/ Sec
https://packet-expert.org
Feedback