Cnange next-hop
Alexander Shikov
a.shikov at dtel-ix.net
Fri Apr 4 17:41:11 CEST 2014
Thanks all for quick replies!
It works now as expected.
On Fri, Apr 04, 2014 at 06:13:01PM +0200, Ondrej Zajicek wrote:
> On Fri, Apr 04, 2014 at 06:19:28PM +0300, Alexander Shikov wrote:
> > Hi,
> >
> > continuing the implemetation of blackhole in our IXP, I've faced with problem of
> > changing next-hop for the route.
> >
> > Construction looks like
> >
> > if (net.len = 32 && bgp_community ~ [ (31210,*) ] && bgp_community ~ [ (0,666) ] ) then {
> > gw = 193.25.181.253;
> > return true;
> > }
> >
> > results in :
> >
> > bird> show route for 95.67.13.2/32 all
> > 95.67.13.2/32 via 193.25.181.253 on bge0 [COSMONOVA2 2014-04-04 17:59:19 from 193.25.180.133] * (50) [AS34867i]
> > Type: BGP unicast univ
> > BGP.origin: IGP
> > BGP.as_path: 34867
> > BGP.next_hop: 193.25.180.133
> > BGP.local_pref: 100
> > BGP.community: (0,666) (31210,31210)
> >
> >
> > And when this route is announced to other peer, next-hop remains unchanged:
> >
> > Peerings.inet.0: 16708 destinations, 50556 routes (16627 active, 0 holddown, 88 hidden)
> > + = Active Route, - = Last Active, * = Both
> >
> > 95.67.13.2/32 *[BGP/170] 00:12:14, localpref 100, from 193.25.180.255
> > AS path: 34867 I
> > > to 193.25.180.133 via xe-1/0/0.777
> >
> > As far as I understand from User's Guide, gw is an read-write attribute,
> > so why it didn't change next-hop?
>
> Because gw and bgp_next_hop are related but separate attributes. You
> have to change bgp_next_hop.
>
> --
> Elen sila lumenn' omentielvo
>
> Ondrej 'SanTiago' Zajicek (email: santiago at crfreenet.org)
> OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
> "To err is human -- to blame it on a computer is even more so."
--
Alexander Shikov
Technical Staff, Digital Telecom IX
Tel.: +380 44 201 14 07
http://dtel-ix.net/
More information about the Bird-users
mailing list