Introduction to BGP

(Lorenzo A) #13

No, it wasn’t ASA. In case of ASA was just in between two routers, and it only passed through bgp packets which two routers were sending to each other.

(Rene Molenaar) #14

Hi Lorenzo,

That’s right, the empty update message also has a function. This is called the EOR (End of RIB) marker and it’s always 23 bytes (you can see it in the screenshot). It’s an empty update to tell the other side that all routes have been sent.

The “double keepalive” and “open keepalive” don’t make much sense to me…I haven’t seen this before, very strange. I searched around if I could find anything about it but nothing…


(Lorenzo A) #15

Hi Rene,

Thank you for response! I think it’s not so important to know why bgp sends “double keepalive” and “open keepalive”, but I wanted to know it just out of curiosity and for better understanding bgp, but really it’s not so important. And by the way, you can find “double keepalive” and “open keepalive” also in the cloudshark bgp captures, for example: and I tried to understand the need of those “double keepalive” and “open keepalive” by looking inside, but I couldn’t find nothing special about, for example, second keepalive. Two keepalive in one packets are absolute identical! Thank you for providing useful information about “double update” messages.

(Rene Molenaar) #16

Hi Lorenzo,

No problem. It was interesting to take a look at that capture file, the two keepalive messages are indeed exactly the same so I have no idea why they are there :slight_smile:


(Jie C) #17

Hi Rene,
A question regarding to bgp redundance for isp. The isp is using as number as 1 for example, they har deliver two line to the customer. The ISP has decided to use as 65000 for ebgp peering with the customer. In this case since the as is not unique, other as 65000 is existing in other location anywhere in the world. Because of the loop prevention, the customer for sure can not reach some locations right? Or should i say the private as nr like public ip address will not be visable from the internet bgp point of view?

  1. In this scenario, i would assume if the isp is using the 65000 for another customer this two customer could not reach each other via internett right? To solve this we use as-overide or we have better option to solve this?

(Andrew P) #18

I think you are asking two questions:

  1. unless you are assigned an ASN by an Internet authority, like ARIN, then it is common practice for ISPs to use a private BGP AS when they peer with you. These AS numbers are not allowed on the Internet, so the ISP will translate them into their own AS number before routes leave their AS to another ISP or organization. Think of it like BGP “NAT” where inside the ISP a private range is used, and gets translated to a publicly recognized range. Because of this, the customer will not have any problems with loop prevention with BGP

  2. It is also possible (and common) for ISPs to use the same private AS number among many of their customers. They can get away with this by use VRFs (virtual routing and forwarding). The setup of this feature can get a little complex because you have to use things called Route Distinguishers and Route Targets (both import and export). Here is a link where Cisco talks about how BGP works with VRF

(Nanu N) #19

Hi Rene,

In one of the scenario which you have discussed above,where we have only one ISP and we want our web servers and mail servers to be reachable from the internet.for this you said we still dont need the only option for our web servers to be reachable from internet is that the ISP need to configure static routes to our servers which are having public IPs…right?


(Rene Molenaar) #20

Hi Nanu,

If we are connected to a single ISP then we could use a couple of IP addresses from the public address space of the ISP and be done with it. We need a default route on our end towards the ISP and the ISP can use a static route towards us.

Once you are connected to multiple ISPs and you want to use your own address space then it would be a good idea to use BGP. This allows you to advertise your own address space to both ISPs.


(Nanu N) #21

Thanks Rene

(Paul L) #22

Hello Rene,

Will a BGP Neighbor adjacency form if keepalives are set to 0?

Thanks in advance


(Andrew P) #23

Yes they will.

BGP neighbor is,  remote AS 100, external link
  BGP version 4, remote router ID
  BGP state = Established, up for 00:00:58
  Last read 00:00:58, last write 00:00:58, hold time is 0, keepalive interval is 0 seconds
  Configured hold time is 0, keepalive interval is 0 seconds
  Minimum holdtime from neighbor is 0 seconds
  Neighbor sessions:
    1 active, is not multisession capable (disabled)

(Paul L) #24

Andrew P - Thanks for the response. So I image from the output with all timers set to 0, additional traffic will be generated between the peers and any instability in the link shared between the peers will cause the adjacency to reset causing unnecessary periods of no usable bgp routes. Paul

(aditya k) #25

you said router decides to use default route to ISP 1 rather than ISP 2, how does it decide ISP 1 over ISP 2?

(Hoan N) #26

Hi Rene

can you explain if the customer has two ISP1 and ISP2 connections and the customer has his own /24 and ASN.
how does the customer advertise /24 to ISP1 and ISP2, and choose ISP1 as primary for incoming traffic and ISP2 as

Thank you


(Andrew P) #27

The most common way of doing this is by using a route-map that prepends the customer’s own ASN several times to the as-path. You would then use this route-map towards ISP2 (the LESS desirable source of traffic). For example, for ASN 65000 for double pre-pending, the route-map statement to do this would be:
set as-path prepend 65000 65000

(Jason W) #28

Do you have a lesson on BGP MD5 authentication? Is it the same for EIGRP - make a keychain, make a key etc etc?

(Rene Molenaar) #29

Hi Jason,

It’s much easier. You only need one command:

R1(config)#router bgp 1
R1(config-router)#neighbor password MYPASS

You can see an example here:

EBGP configuration


(Networklessons Admin) #30

19 posts were merged into an existing topic: Introduction to BGP

(Brian C) #31

Great lesson so far its simple and straight forward. I have read further in the book though and I will have questions but first trying to catch up on the web pages to see if that helps push some ideas that I stalled a little bit on. Its more along the lines of using Internal with external and some differences with BGP not seeing networks like the others. I don’t want to ask that question here though as I want to put the question under the right lesson if I still have confusion after reading.

great stuff!

(shiva r) #32

i use ospf route to advertised loopbacks and afterwards i config BGP but if i give sh ip route means they send packets based on ospf only not BGP why ? AD VALUE of ospf 120,BGP 20 but it prefer only ospf…not BGP … second time i try static and BGP means it prefer only static …not BGP why ?? explain this topology