The fourth BGP attribute is called AS Path:
- BGP prefers the shortest AS path to get to a destination. Less is more!
- We can manipulate this by using AS path prepending.
Let me show you an example:
In my example AS 1 wants to make sure traffic enters the autonomous system through R2. We can add our own autonomous system number multiple times so the as-path becomes longer. Since BGP prefers a shorter AS path we can influence our routing. This is called AS path prepending. Let’s see what this looks like on Cisco routers, this is the topology that I will use:
Above we have 3 routers. R1 and R3 are both in AS 1 advertising the same network (1.1.1.0/24) to R2. We can use AS Path prepending to make R2 prefer a certain path.
http://i66.tinypic.com/33w3x29.jpg
http://i66.tinypic.com/33w3x29.jpg
Hello Rene,
This is the setup I am using to configure BGP multihoming.
AS 100 has two exit points to reach R5 which is hosting a subnet: 8.8.8.8
My Question is what difference does it make if I advertise directly connected subnets in BGP.
For example:
R1(config-router)#network 192.168.1.0 mask 255.255.255.252
R2(config-router)#network 192.168.2.0 mask 255.255.255.252
One thing which I have noticed is if I do not advertise 192.168.1.0 subnet on R1, R2 did not know about it at all so advertising
... Continue reading in our forumThanks a lot for the explanation Rene.
I would like you to clarify one more thing.
For the LAN segment: 192.168.100.0 : R1 is the active router to reach 8.8.8.8 and R2 is the standby as the priority for R1 is 150.
I am not using interface for tracking as i want the failover to happen on the basis of reachability of 8.8.8.8.
I have set a tracking object with IP SLA1 for type: echo to ping 8.8.8.8 and mapped it with Standby 1 on R1 to decrement priority by 90 if the ping fails.
To verify this, I did a “Shut” on the interface of R1 connecting to R3, what happened
... Continue reading in our forumHello Chris
BGP will choose the router ID based first on if the router-id command is present. It is not in this case. Secondly, it will choose the highest IPv4 IP address of a loopback interface. You are correct, that both R1 and R3 have the same loopback address (seen in the configs), and thus would be advertising the same router-id. So the next step would be to determine the lowest neighbour IP address, which is indeed 192.168.12.1. So you are correct, it does prefer 192.168.12.1 but not because of the router ID but because of the lowest neighbour IP add
... Continue reading in our forumThat’s very helpful. Thank you Laz.
Thank you Lazaros, this is very helpful.