BGP Messages

Hello Narad

There is no predefined specific length of BGP messages except fo the maximum message length. You can find out more about that here:

https://notes.networklessons.com/bgp-maximum-message-size

The total path attribute length is a field in the update message of BGP. According to RFC4271, when this value is 0, it indicates that neither the Network Layer Reachability Information (NRLI) field nor the Path Attribute field is present in this update message.

When a BGP peer goes down, it can’t send any messages, because it has failed. That’s the definition of “going down”. In such a case, it is the lack of keepalives that causes the other end to realize that the peering has failed. Take a look at this lesson for more info:

I hope this has been helpful!

Laz

Hi Rene,

There seems to be a mistake in the very last part -

R2(config)#no router bgp 2
R2(config)#router bgp 22
R2(config-router)#neighbor 192.168.12.1 remote-as 1

AS 1 seems to be the correct remote AS for R2 so why is there a notification with a bad peer AS error?

Am I missing something?

Thanks,
Anky

Hello Ankur

This is the topology we’re looking at:

Now on R2, Rene changed the AS number of the BGP configuration from AS 2 to AS 22. He then issued the neighbor 192.168.12.1 remote-as 1 command. Now you are correct, that the AS number of 1 that was used in this command is correct. However, R1 still has this neighbor command in its BGP configuration:

neighbor 192.168.12.2 remote-as 2

However, the AS value of “2” for the remote peer is now incorrect, because this has been changed to “22” on R2. So R2 sends an update message to R1 indicating its own AS of 22 and the remote AS of 1. R1 responds saying “hey, that’s the wrong AS number because I’m configured to peer with a remote AS of 2, not 22!” So that’s why the bad peer subtype appears. Does that make sense?

I hope this has been helpful!

Laz

Ohh sorry, my bad. Had a brain snooze event :slight_smile:
Missed the part where the local AS was being changed on R2.
Somehow kept looking at it as the OSPF process ID (irrelevant).
That’s why late nights are bad… :slight_smile:

Thanks bud !

Hello Ankur

No problem, we all have those brain snoozes once in a while, it happens… Glad to know it’s clear!

Laz