BGP CHAPTER 1
QUESTIONS:
1. What BGP ASNs Values?
2. What is iBGP & eBGP ?
3. How BGP form iBGP relationship ,which port it uses for transport ?
4. What are bgp Packets & bgp States ?
Solution:
1. What BGP ASNs Values?
-->
BGP ASN VALUES
. Originally 2-byte field
- Values 0-65535
- Public ASNs 1 - 64511
- Private ASNs 64512 - 65535
. Currently 4-byte field
- RFC 4893 "BGP Support for Four-octet AS Number Space"
- IOS support as of 12.4(24)T
4-Byte BGP ASNs
. 0.0 - 65535.65535 notation
- 0.[0-65535] denote original 2byte ASNs
. Requires backwards compatibility with old code
- 4 Byte ASN support negotiated during capability excha
- "old" BGP speakers are sent ASdot numbers encoded as
ASN "23456"
- Real AS-path encoded with optional transitive
attributes AS4_AGGREGATOR and AS4_PATH
2. What is iBGP & eBGP ?
--->
BGP Peering Types:
. External BGP (EBGP) Peers
- Neighbours outside my Autonomous System
. Internal BGP (iBGP) Peers
-Neighbours inside my Autonomous System
. Update and path selection rules change depending
on what type of peer a route is being sent to/received from
3. How BGP form iBGP relationship ,which port it uses for transport ?
--->
refer the diagram create iBGP relationship between R1 & R2
!
router bgp 123
no synchronization
bgp log-neighbor-changes
neighbor 2.2.2.2 remote-as 123
neighbor 2.2.2.2 update-source Loopback1
!
R2#sh run | se bgp
router bgp 123
no synchronization
bgp log-neighbor-changes
neighbor 1.1.1.1 remote-as 123
neighbor 1.1.1.1 update-source Loopback1
!
Debug ip bgp all
R2#debu ip bgp all
BGP debugging is on for all address families
R2#
*Mar 1 00:31:55.143: BGP: 1.1.1.1 remote close, state CLOSEWAIT
*Mar 1 00:31:55.143: BGP: 1.1.1.1 -reset the session
*Mar 1 00:31:55.147: BGPNSF state: 1.1.1.1 went from nsf_not_active to nsf_not_active
*Mar 1 00:31:55.147: BGP: 1.1.1.1 went from Established to Idle
*Mar 1 00:31:55.147: %BGP-5-ADJCHANGE: neighbor 1.1.1.1 Down Peer closed the session
R2#
*Mar 1 00:31:55.147: BGP: 1.1.1.1 closing
*Mar 1 00:31:55.923: BGP: 1.1.1.1 passive open to 2.2.2.2
*Mar 1 00:31:55.923: BGP: 1.1.1.1 went from Idle to Connect
*Mar 1 00:31:55.931: BGP: 1.1.1.1 rcv message type 1, length (excl. header) 26
*Mar 1 00:31:55.931: BGP: 1.1.1.1 rcv OPEN, version 4, holdtime 180 seconds
*Mar 1 00:31:55.931: BGP: 1.1.1.1 went from Connect to OpenSent
*Mar 1 00:31:55.931: BGP: 1.1.1.1 sending OPEN, version 4, my as: 123, holdtime 180 seconds
*Mar 1 00:31:55.931: BGP: 1.1.1.1 rcv OPEN w/ OPTION parameter len: 16
*Mar 1 00:31:55.931: BGP: 1.1.1.1 rcvd OPEN w/ optional parameter type 2 (Capability) len 6
*Mar 1 00:31:55.935: BGP: 1.1.1.1 OPEN has CAPABILITY code: 1, length 4
*Mar 1 00:31:55.935: BGP: 1.1.1.1 OPEN has MP_EXT CAP for afi/safi: 1/1
*Mar 1 00:31:55.935: BGP: 1.1.1.1 rcvd OPEN w/ optional parameter type 2 (Capability) len 2
*Mar 1 00:31:55.935: BGP: 1.1.1.1 OPEN has CAPABILITY code: 128, length 0
*Mar 1 00:31:55.935: BGP: 1.1.1.1 OPEN has ROUTE-REFRESH capability(old) for all address-families
*Mar 1 00:31:55.939: BGP: 1.1.1.1 rcvd OPEN w/ optional parameter type 2 (Capability) len 2
*Mar 1 00:31:55.939: BGP: 1.1.1.1 OPEN has CAPABILITY code: 2, length 0
*Mar 1 00:31:55.939: BGP: 1.1.1.1 OPEN has ROUTE-REFRESH capability(new) for all address-families
BGP: 1.1.1.1 rcvd OPEN w/ remote AS 123
*Mar 1 00:31:55.939: BGP: 1.1.1.1 went from OpenSent to OpenConfirm
*Mar 1 00:31:55.939: BGP: 1.1.1.1 send message type 1, length (incl. header) 45
*Mar 1 00:31:56.011: BGP: 1.1.1.1 went from OpenConfirm to Established
*Mar 1 00:31:56.015: %BGP-5-ADJCHANGE: neighbor 1.1.1.1 Up
R2#
R1#sh tcp brief
TCB Local Address Foreign Address (state)
65C5AFFC 1.1.1.1.54578 2.2.2.2.179 TIMEWAIT
65C5B78C 1.1.1.1.61545 2.2.2.2.179 ESTAB
R2#sh tcp brief
TCB Local Address Foreign Address (state)
64DD3C24 2.2.2.2.179 1.1.1.1.61545 ESTAB
R2 is bgp-server because it uses port nos 179.
4. What are bgp Packets & bgp States ?
BGP Packets
> OPEN
> UPDATE
> KEEPALIVE
> NOTIFICATION
BGP STATES:
> IDLE
> ACTIVE
> OPEN SENT
> OPEN CONFIRM
> ESTABLISHED
QUESTIONS:
1. What BGP ASNs Values?
2. What is iBGP & eBGP ?
3. How BGP form iBGP relationship ,which port it uses for transport ?
4. What are bgp Packets & bgp States ?
Solution:
1. What BGP ASNs Values?
-->
BGP ASN VALUES
. Originally 2-byte field
- Values 0-65535
- Public ASNs 1 - 64511
- Private ASNs 64512 - 65535
. Currently 4-byte field
- RFC 4893 "BGP Support for Four-octet AS Number Space"
- IOS support as of 12.4(24)T
4-Byte BGP ASNs
. 0.0 - 65535.65535 notation
- 0.[0-65535] denote original 2byte ASNs
. Requires backwards compatibility with old code
- 4 Byte ASN support negotiated during capability excha
- "old" BGP speakers are sent ASdot numbers encoded as
ASN "23456"
- Real AS-path encoded with optional transitive
attributes AS4_AGGREGATOR and AS4_PATH
2. What is iBGP & eBGP ?
--->
BGP Peering Types:
. External BGP (EBGP) Peers
- Neighbours outside my Autonomous System
. Internal BGP (iBGP) Peers
-Neighbours inside my Autonomous System
. Update and path selection rules change depending
on what type of peer a route is being sent to/received from
3. How BGP form iBGP relationship ,which port it uses for transport ?
--->
refer the diagram create iBGP relationship between R1 & R2
!
router bgp 123
no synchronization
bgp log-neighbor-changes
neighbor 2.2.2.2 remote-as 123
neighbor 2.2.2.2 update-source Loopback1
!
R2#sh run | se bgp
router bgp 123
no synchronization
bgp log-neighbor-changes
neighbor 1.1.1.1 remote-as 123
neighbor 1.1.1.1 update-source Loopback1
!
Debug ip bgp all
R2#debu ip bgp all
BGP debugging is on for all address families
R2#
*Mar 1 00:31:55.143: BGP: 1.1.1.1 remote close, state CLOSEWAIT
*Mar 1 00:31:55.143: BGP: 1.1.1.1 -reset the session
*Mar 1 00:31:55.147: BGPNSF state: 1.1.1.1 went from nsf_not_active to nsf_not_active
*Mar 1 00:31:55.147: BGP: 1.1.1.1 went from Established to Idle
*Mar 1 00:31:55.147: %BGP-5-ADJCHANGE: neighbor 1.1.1.1 Down Peer closed the session
R2#
*Mar 1 00:31:55.147: BGP: 1.1.1.1 closing
*Mar 1 00:31:55.923: BGP: 1.1.1.1 passive open to 2.2.2.2
*Mar 1 00:31:55.923: BGP: 1.1.1.1 went from Idle to Connect
*Mar 1 00:31:55.931: BGP: 1.1.1.1 rcv message type 1, length (excl. header) 26
*Mar 1 00:31:55.931: BGP: 1.1.1.1 rcv OPEN, version 4, holdtime 180 seconds
*Mar 1 00:31:55.931: BGP: 1.1.1.1 went from Connect to OpenSent
*Mar 1 00:31:55.931: BGP: 1.1.1.1 sending OPEN, version 4, my as: 123, holdtime 180 seconds
*Mar 1 00:31:55.931: BGP: 1.1.1.1 rcv OPEN w/ OPTION parameter len: 16
*Mar 1 00:31:55.931: BGP: 1.1.1.1 rcvd OPEN w/ optional parameter type 2 (Capability) len 6
*Mar 1 00:31:55.935: BGP: 1.1.1.1 OPEN has CAPABILITY code: 1, length 4
*Mar 1 00:31:55.935: BGP: 1.1.1.1 OPEN has MP_EXT CAP for afi/safi: 1/1
*Mar 1 00:31:55.935: BGP: 1.1.1.1 rcvd OPEN w/ optional parameter type 2 (Capability) len 2
*Mar 1 00:31:55.935: BGP: 1.1.1.1 OPEN has CAPABILITY code: 128, length 0
*Mar 1 00:31:55.935: BGP: 1.1.1.1 OPEN has ROUTE-REFRESH capability(old) for all address-families
*Mar 1 00:31:55.939: BGP: 1.1.1.1 rcvd OPEN w/ optional parameter type 2 (Capability) len 2
*Mar 1 00:31:55.939: BGP: 1.1.1.1 OPEN has CAPABILITY code: 2, length 0
*Mar 1 00:31:55.939: BGP: 1.1.1.1 OPEN has ROUTE-REFRESH capability(new) for all address-families
BGP: 1.1.1.1 rcvd OPEN w/ remote AS 123
*Mar 1 00:31:55.939: BGP: 1.1.1.1 went from OpenSent to OpenConfirm
*Mar 1 00:31:55.939: BGP: 1.1.1.1 send message type 1, length (incl. header) 45
*Mar 1 00:31:56.011: BGP: 1.1.1.1 went from OpenConfirm to Established
*Mar 1 00:31:56.015: %BGP-5-ADJCHANGE: neighbor 1.1.1.1 Up
R2#
R1#sh tcp brief
TCB Local Address Foreign Address (state)
65C5AFFC 1.1.1.1.54578 2.2.2.2.179 TIMEWAIT
65C5B78C 1.1.1.1.61545 2.2.2.2.179 ESTAB
R2#sh tcp brief
TCB Local Address Foreign Address (state)
64DD3C24 2.2.2.2.179 1.1.1.1.61545 ESTAB
R2 is bgp-server because it uses port nos 179.
4. What are bgp Packets & bgp States ?
BGP Packets
> OPEN
> UPDATE
> KEEPALIVE
> NOTIFICATION
BGP STATES:
> IDLE
> ACTIVE
> OPEN SENT
> OPEN CONFIRM
> ESTABLISHED
No comments:
Post a Comment