08-26-2009 02:24 AM - edited 03-04-2019 05:51 AM
I have network that I am sending route about to my BGP peer. Is it possible to have route for one IP to have as path prepended. For example how can I get my peer to see this
- path for my network is AS 5
- but path for one host from my network is 5 5
Solved! Go to Solution.
08-26-2009 11:49 AM
Hi,
let's say you've got 10.10.10.0/24 connected to your router interface fa0 and you want to advertise your host 10.10.10.100 with as-prepend 5 to your BGP neighbor x.x.x.x.
So to fulfil the task 1), you might try to add
ip route 10.10.10.100 255.255.255.255 fa0
to your config.
This should bring the host route to your routing table.
To finish your config, you can add
router bgp 5
network 10.10.10.100 mask 255.255.255.255
neighbor x.x.x.x route-map advertise-to-xxxx out
ip prefix-list my-host seq 5 permit 10.10.10.100/32
route-map advertise-to-xxxx permit 10
match ip address prefix-list my-host
set as-path prepend 5
route-map advertise-to-xxxx permit 20
I hope this should work.
BR,
Milan
08-26-2009 03:25 AM
Hi,
you would need to
1) get the host route to your routing table (configure a static route to your host, e.g.)
2) advertise this host route to your BGP peer with as-prepend (by a route-map, e.g.)
But some peers are filtering the length of BGP prefixes received - permitting /24 or /19 as the maximum prefix length, e.g.
BR,
Milan
08-26-2009 03:43 AM
well .... this subnet is directly connected to this router and I am NATing some internal private IP hosts to this subnet, so how can I do what you ae proposing in 1)?
2) what is the default BGP seting for this? I am testing this in LAB and it is not working
08-26-2009 11:49 AM
Hi,
let's say you've got 10.10.10.0/24 connected to your router interface fa0 and you want to advertise your host 10.10.10.100 with as-prepend 5 to your BGP neighbor x.x.x.x.
So to fulfil the task 1), you might try to add
ip route 10.10.10.100 255.255.255.255 fa0
to your config.
This should bring the host route to your routing table.
To finish your config, you can add
router bgp 5
network 10.10.10.100 mask 255.255.255.255
neighbor x.x.x.x route-map advertise-to-xxxx out
ip prefix-list my-host seq 5 permit 10.10.10.100/32
route-map advertise-to-xxxx permit 10
match ip address prefix-list my-host
set as-path prepend 5
route-map advertise-to-xxxx permit 20
I hope this should work.
BR,
Milan
08-27-2009 01:37 AM
ok, this static route helps and especially this route-map advertise-to-xxxx permit 20 entry :-)))
thanks for the help and have a nice day
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: