11. BGP Flashcards

1
Q

What is a BGP session?

A

An esthablished adjacency between 2 BGP routers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the 2 types of BGP sessions?

A
  • iBGP (in the same ASN)

- eBGP (not in the same ASN)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the 4 BP path attributes (PAs)?

A
  • Well-known mandatory
  • Well-known discretionary
  • Optional transative
  • Optional non-transative
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the difference between well-known and optional PAs?

A

Well-known PAs need to be recognized by all BGP implementations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the difference between well-known mandatory and discretionary?

A

Mandatory must be included in every prefix advertisement, discretionary may of may not

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the difference between transative and non-transative PAs?

A

Transative stay with the route advertisement. Non-transative cannot be shared from AS to AS.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the Network Layer Reachability Information?

A

The NLRI is the routing update that consists of:

  • The network prefix
  • Prefix length
  • Any BGP PAs for that specific route
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What type of routing protocol is BGP?

A

A path vector, but behaves as a distance vector.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the AS_path attribute?

A

A well-know mandatory that prevents routing loops. If a router receives an advertisement with his AS, it discards

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is AFI?

A

Address family identifier, it correlates to a specific network protocol

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is SAFI?

A

Subsequent address family identifier, such as unicast or multicast

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the MP_REACH_NRLI?

A

A multiprotocol attribute to allow advertisement of various protocols

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the MP_UNREACH_NRLI?

A

Used to withdraw routes or removing them from advertisement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the BGP port number?

A

179

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Can BGP run over multiple hops?

A

Yes, but an underlaying route is needed for this. This can be static or via a routing protocol.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How do BGP neighbors connect?

A

They use the ARP table, or routing table for Multi-hop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What are the 4 BGP messages?

A
  • Open
  • Update
  • Notification
  • Keepalive
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is in the open message?

A
  • BGP version
  • ASN
  • Hold time
  • BGP identifier (RID)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is the hold time attribute?

A

It sets the hold timer. Upon receipt of an update or keepalive the timer will resets. If the timer reaches 0 the session will be torn down.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is the default hold time?

A

180 seconds, must be at least 3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is the BGP identifier?

A

The RID which must be higher than 0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is in the keepalive message?

A

Messages that are exchanged every 1/3 between peers. Can be turned of by placing the hold timer on 0. KEEPALIVE is also used as ACK.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is in the update message?

A

The NLRI, routing updates etc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What is the finite-state machine?

A

FSM is used to maintain a table of all BGP peers and their status.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

What are the 6 BGP states?

A
  • Idle
  • Connect
  • Active
  • OpenSent
  • OpenConfirm
  • Established
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

What happens in the Idle stage?

A

BGP detects a start event, tries to initiate a TCP connection, and listens for a new connection from another peer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

What happens if an error causes BGP to go back to the Idle state for the second time?

A

The ConnectRetry timers is set to 60 seconds and must decrement to 0 before a new connection can be initiated. Further errors wil double the timer in legnth of the previous one

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

What happens in the Connect stage?

A

BGP initiates the connection. If the three-way handshake completes, the ConnectRetry timer resets, an OPEN message will be send to the neighbor. The status will be changed to OpenSent

29
Q

What happens if the ConnectRetry timer depletes before the Connect stage has completed?

A

A new TCP connection is attempted, the ConnectRetry timer is reset and the state is set to Active. The neighbor with the higher IP manages the connection

30
Q

What happens in the Active stage?

A

BGP start a new three-way handshake,. If succesful an OPEN message is send, the hold timer placed 4 minutes and the status changed to OpenSent.

31
Q

What happens if the connection attempt fails in the Active state?

A

The state moves back to Connect and the ConnectRetry timer is reset

32
Q

What happens in the OpenSent stage?

A

The router will wait for an open message and will compare:

  • BGP version
  • Source IP
  • AS
  • RID
  • Security parameters

The hold timer is negotiated (lower wins) and a KEEPALIVE is send (if not set to 0). The state if moved to OpenConfirm

33
Q

What happens when an error is found in the OPEN message during the OpenSent stage?

A

A notification message is sent, and the state is moved back to Idle

34
Q

What happens when TCP receives a disconnect message in the OpenSent state?

A

BGP closes the connection and goes back to Active

35
Q

What happens in the OpenConfirm stage?

A

BGP waits for a KEEPALIVE of NOTIFICATION. If a KEEPALIVE is received the state will move to established. With NOTIFICATION back to idle

36
Q

What happens in the Established stage?

A

Routes will be exchanged with UPDATE messages.

37
Q

What are the steps to activate BGP?

A
  • Router BGP
  • RID
  • Neighbor IP
  • Neighbor interface (optional)
  • Authentication (optional)
  • Modify timers (optional)
  • Address family
  • Activate
38
Q

What differs the IPv4 address family from the others?

A

The IPv4 address family is activated by default

39
Q

What is the command to turn off automatic address family activation?

A

no bgp default ip4-unicast

40
Q

What is the command to verify BGP sessions?

A

show bgp afi safi summary

41
Q

What are the three types of tables that BGP uses and how many are there?

A
  • Adj-RIB-in (1 per peer)
  • Loc-RIB
  • Adj-RIB-out (1 per peer)
42
Q

What is in the Adj-RIB-in ?

A

NLRI routes before inbound policies have been applied. The table is cleared after all route policies are processed. All unprocessed routes.

43
Q

What is in the Loc-RIB?

A

Contains the NLRI routes originated locally or received from other peers. After the validity and next-hop reachability check, BGP best path algorithm selects the best NLRI for a prefix

44
Q

What is in the Adj-RIB-out?

A

Contains NLRI routes after policies have been applied. All processed routes.

45
Q

What happens if you use the network statement in BGP?

A

The BGP process will search the global RIB for an exact network prefix. If this is visible it will install the prefix in the Loc-RIB

46
Q

What are the PAs given to a prefix installed in the Loc-RIB?

A

Connected: Next-hop 0.0.0.0, Origin i for iBGP, weight 32,768 -> no metric

Static/protocol: Next-hop RIB, Origin i for iBGP, weight 32,768, MED is the IBP metric

47
Q

What is the process for advertisement to other peers in BGP?

A
  • Verify if the NLRI is valid and that it can be resolved in the RIB
  • Place in Loc-RIB
  • Validity check
  • Process outbound policies
  • Place in Adj-RIB-out
  • Advertise
48
Q

What is the BGP process for routes received from other peers?

A
  • Store the route in Adj-RIB-in
  • Apply inbound policies
  • Update the Loc-RIB and clear Adj-RIB-in
  • Validity check (if fails the route remains in the loc-RIB)
  • Identify best path and pass only the best path and its attributes
  • Install best path in the global RIB
  • Apply outbound policies
  • Place in Adj-RIB-out
  • Advertise to other peers
49
Q

What command shows the Loc-RIB?

A

show bgp afi safi

50
Q

What does the asterix indicatie in the Loc-RIB table?

A

That the route is valid

51
Q

What does the angle bracket indicatie in the Loc-RIB table?

A

That this is the best path

52
Q

What type of PA is next hop?

A

Well-known mandatory

53
Q

What type of PA is Multiple-exit discriminator (MED) ‘metric’?

A

Optional non-transative

54
Q

What type of PA is LocPrf (local preference)?

A

Well-known discretionary

55
Q

With what command can you check the Adj-RIB-out table?

A

Show bgp afi safi neighbors A.A.A.A advertised routes

56
Q

What is the AD of BGP?

A

20 for EBGP

200 for IBGP

57
Q

Why must iBGP require full mesh?

A

iBGP is not allowed to advertise routes received by other BGP peers. To overcome this BGP peers must establish connections to all BGP peers in the AS

58
Q

What are the reserved 2-octet ASNs?

A
  • 0
  • 23456
  • 64496 - 64511
  • 64512 - 65534 (private)
  • 65535
59
Q

What is the capability code of the 4-octet ASN?

A

65

60
Q

What are the reserved 4-octet ASNs?

A

4,200.000.000 - 4,294,967,295

61
Q

What are the public 4-octet ASNs?

A

1.16 - 4,199,999,999

62
Q

What is the differene between ASDOT and ASPLAIN notations?

A

ASPLAIN is decimal and default

ASDOT is binairy

63
Q

What are type of PAs are AS4_PATH & AS4_AGGREGATOR?

A

Optional transative that provide backwards compatibility

64
Q

Where is the ASN 23456 for?

A

To provide transition between 2-octet and 4-octet systems

65
Q

Where do the TCP messages FIN, PSH, RST & ECN stand for?

A

FIN - Finish session
PSH - Needs to happen right now
RST - Reset
ECN - network congestion

66
Q

What is the command to turn on the neighbors received routes?

A

neighbors NETWORK soft-reconfiguration inbound

67
Q

How can you connect not directly connected peers in eBGP?

A
  • Enable the eBGP multihop

- Disable the connected-check

68
Q

What is the default eBGP TTL?

A

1