JIR - Chapter 5: BGP Flashcards

1
Q

What are the six BGP neighbor states?

V2-5-7

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

What are the five BGP message types and how big is the fixed header size?
(V2-5-9)

A
  1. Open
  2. Update
  3. Keepalive
  4. Notification message
  5. Refresh

Each BGP message type uses the same fix header size which is 19 bytes.

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

What happens when a BGP neighbor goes down?

V2-5-10

A

The BGP speaker deletes all routes learned from that peer and updates its other peers accordingly.

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

Define the Update message type:

V2-5-9

A

BGP uses update messages to transport routing information between BGP peers.

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

Define the Open message type:

V2-5-9

A

The Open message is sent once the TCP three-way handshake is complete. The open message initiates the BGP session and contains details about the BGP neighbor and information about supported and negotiated options.

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

Define the Keepalive message type:

V2-5-9

A

Peers exchange keepalives as often as needed to ensure that the hold timer does not expire.

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

Define the Notification message type:

V2-5-9

A

BGP uses Notification messages to signal when something is wrong with the BGP session. A notification is sent when an unsupported option is sent in an Open message and when a peer fails to send an update or keepalive. When an error is detected, the BGP session is closed.

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

Define the Refresh message type:

V2-5-9

A

Normally a BGP speaker can’t be made to re-advertise routes that have already been sent and acknowledged (using TCP). The route refresh message supports soft-clearing of BGP sessions by allowing a peer to re-advertise routes that have already been sent.

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

List and describe the four BGP attribute classes defined in RFC-1771
(V2-5-17)

A
  1. Well-known mandatory: Must be supported by all BGP implementations and must be included in every BGP update.
  2. Well-known discretionary: Must be supported by all BGP implementations but does not have to be included in every BGP update.
  3. Optional transitive: Not required to be supported by all BGP implementations, but if they are, they should be passed along, unchanged, to other BGP peers.
  4. Optional nontransitive: Not required to be supported by all BGP implementations. If an optional nontransitive attribute is un recognized, it is ignored and not passed down to other peers.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

List the ten BGP attributes and their associated attribute class:
(V2-5-17)

A
  1. AS Path / well-known mandatory
  2. Local Preference / well-known mandatory
  3. MED / Optional nontransitive
  4. Origin / well-known mandatory
  5. Next Hop / well-known mandatory
  6. Community / Optional transitive
  7. Aggregator / Optional transitive
  8. Atomic Aggregator / Well-known discretionary
  9. Cluster List / Optional nontransitive
  10. Originator ID / Optional nontransitive
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Describe the “Next Hop” BGP attribute

V2-5-19

A
  • The Next-hop attribute is an IP address of a BGP peer.
  • It is used to verify connectivity of a remote BGP peer.
  • A BGP peer can be an immediately connected host or remote host.
  • The IP address specified in the next-hop field must be reachable by the local router before the route becomes active in the routing table
  • By default, the router that originally sourced the route into BGP places its peer address into the attribute field; the next-hop value is then typically changed when the route is transmitted across EBGP links.
  • BGP routes for which the next-hop is not reachable are placed into the routing table as hidden routes.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the command to view hidden routes?

A

> show route hidden

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

Describe the “Local-preference” attribute

V2-5-20

A
  • You can use the local-preference attribute to direct all outbound traffic through a specific peer.
  • The designated peer sets the local-preference value on all routes received to control how all routes leave the AS, then all peers use those routes in their RIB-Local tables.
  • The default value is 100; the higher the value the better the metric
  • JunOS allows you to set the local-preference value using BGP configuration or through routing policy; if you configure both, the system will use routing policy.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Describe the “AS Path” attribute

V2-5-22

A
  • The AS Path attribute describes the path of autonomous systems the route has been through since it was sourced into BGP.
  • When a router receives routes in an Update message, the first action is to examine the current AS Path to see if the local AS number is in the path. If it’s in the path, it indicates the route has been through the AS already; accepting it would create a loop, therefor BGP drops the route.
  • By default, the AS-path value is changed as a route transitions between autonomous systems.
  • The AS-path value is null until the associated route is advertised out of the originating system.
  • Using routing policy you can prepend your ANS information to the AS-Path attribute; by doing this multiple times you can affect the routing decision made by other routers in other ASs and discourage them from using that path because of the longer AS-Path.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Describe the “Origin” attribute

V2-5-23

A
  • The BGP router that injects the route into the BGP process is responsible for placing the Origin attribute into the route; this attribute describes where the original router received the route:
  • IGP: BGP assigns a value of 0. Examples of IGP routes include OSPF, IS-IS, static, and aggregate
  • EGP: BGP assigns a value of 1. EGP routes are from the original EGP protocol which was the predecessor to BGP.
  • Incomplete: BGP assigns a value of 2. These are routes that did not come from IGP or EGP.
  • By default, JunOS assigns all routes injected into BGP an origin value of “I” for IGP; you can alter this default value using routing policy.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Describe the “MED” attribute

V2-5-24

A
  • By default, BGP uses the Multiple Exit Discriminator (MED) value only when the BGP’s router AS has two or more connections to the same upstream AS.
  • An AS uses the MED value in an attempt to influence data traffic headed back towards the AS.
  • The remote AS picks routes based on the lowest MED values it finds.
  • BGP assumes the MED value to be 0 if its missing.

-

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

What commands can configure a BGP MED metric?

V2-5-24

A
  • You can use the “metric-out” statement at the BGP protocol, group, or neighbor level.
  • You can define and apply a routing policy that alters the MED value using “metric” as an action in the “then” statement.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Describe the “Community” attribute

V2-5-25

A
  • A BGP identifier is an identifier that represents a group of destination prefixes that share a common property.
  • Communities are used to tag specific routes that can be easily identified later for various purposes.
  • BGP includes Community attributes as a path attribute in BGP update messages.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Under what hierarchy do you define BGP Communities?

V2-5-25

A

[edit policy-options]

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

List the BGP route selection process in order (9 steps):

V2-5-26

A

The route preference is evaluated (if multiple routes to the same prefix exists, the lower route preference is preferred).

  1. Prefer the HIGHEST “local preference” router (the only choice based on a higher vs. lower number).
  2. Prefer the shortest AS-Path length. This is often a common tiebreaker for routes.
  3. Prefer the lowest “Origin” value (I [IGP] < E [EGP] < ? [incomplete])
  4. Prefer the lowest “MED” value. The absence of a MED value is interpreted as 0.
  5. Prefer routes learned from an EBGP peer over an IBGP peer. If all remaining routes were learned from EBGP the router skips to Step 9.
  6. Prefer best exit from AS
  7. Prefer routes from the peer with the lowest RID.
  8. Prefer paths with lowest cluster length
  9. The router prefers routes from the router with the lowest peer-ID
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What happens if the BGP next-hop can’t be resolved or if a loop is detected?
(V2-5-26)

A

The route is not evaluated in the BGP selection process or installed in the route table.

22
Q

What is IBGP?

V2-5-29

A

Internal BGP

23
Q

What is EBGP?

V2-5-29

A

External BGP

24
Q

Typically, what type of BGP session uses loopbacks to peer?

V2-5-30

A

IBGP

25
Q

Typically, what type of BGP session uses IP addresses to peer?
(V2-5-30)

A

EBGP

26
Q

What type of routes does an IBGP speaker never send to other IBGP peers?
(V2-5-31)

A

Routes that were learned from other IBGP peers.

27
Q

What type of routes do IBGP speakers send to other IBGP peers?
(V2-5-31)

A
  • Routes that were learned through EBGP

- Routes that they originated themselves.

28
Q

What would happen if IBGP routers re-advertised IBGP routes to other IBGP peers?
(V2-5-31)

A

A loop would form

29
Q

What is needed for all IBGP speakers in an AS to have consistent routing information.
(V2-5-31)

A

There must be a full mesh of IBGP sessions between all BGP speakers.

30
Q

True or False: By default, IBGP peers change the next-hop for routes received by EBGP peers
(V2-5-32)

A

False

31
Q

What is the “next-hop self” action?

V2-5-32

A

This causes the router to send BGP routes to its peers using the IP address it uses to establish that BGP session; For a BGP session to remain established, that peer must have a route to that IP address.

32
Q

True or False: By default, only active BGP routes are advertised.
(V2-5-33)

A

True

33
Q

What are the three default BGP advertisement rules and what is their purpose?
(V2-5-33)

A
  • The purpose of the advertisement rules is to prevent loops on a BGP network.
    1. IBGP peers advertise routes received from EBGP to other IBGP peers.
    2. EBGP peers advertise routes learned from other EBGP or IBGP peers to other EBGP peers.
    3. IBGP peers never advertise routes learned from other IBGP peers.
34
Q

What is the command for setting the “router-id” and the system’s local AS number?
(V2-5-36)

A

set routing-options router-id x.x.x.x;

set routing-options autonomous-system #####;

35
Q

What is the command for setting an IBGP peering session with another IBGP peer?
(V2-5-36)

A

set protocols bgp group [group-name] type internal;
set protocols bgp group [group-name] local-address x.x.x.x;
set protocols bgp group [group-name] neighbor x.x.x.x;

36
Q

What is the command for setting an EBGP peering session with another EBGP peer?
(V2-5-36)

A

set protocols bgp group [group-name] type external;
set protocols bgp group [group-name] peer-AS #####;
set protocols bgp group [group-name] neighbor x.x.x.x;

37
Q

When setting up a BGP peer, if you omit the session type (internal/external) what must take its place and how does the session decide if it’s IBGP or EBGP?
(V2-5-37)

A
  • Instead of the session “type” you must specify the “peer-as” number, which can be a remote AS or local AS number.
  • If the specified AS number matches the local AS, the session is considered Internal.
  • If the specified AS number doesn’t match the local AS, the session is considered external.
38
Q

What is the command to create a “next-hop self” policy and how do you add this as an export policy to an Internal BGP group?
(V2-5-38)

A

set policy-options policy-statement [policy-name] term [term-name] then next-hop self;

set protocols bgp group [group-name] export [policy-name]

39
Q

List the commands/steps to advertise an aggregate route to EBGP peers?
(V2-5-39)

A
  1. Define the aggregate
    a) set routing-options aggregate route x.x.x.x/##
  2. Define a redistribution policy
    a) set policy-options policy-statement [policy-name] term [term-name] from protocol aggregate;
    b) set policy-options policy-statement [policy-name] term [term-name] from route-filter x.x.x.x/## exact;
    c) set policy-options policy-statement [policy-name] term [term-name] then accept;
  3. Apply redistribution policy as an export policy to the EBGP group
    a) set protocol bgp group [group-name] export [policy-name]
40
Q

At what hierarchy level can you apply BGP import/export policies and which policy in the hierarchy takes precedence?
(V2-5-40)

A
  • You can apply import/export policies at the [protocol], [group] and [neighbor] levels.
  • Only the most specific policy is applied: Protocol < Group < Neighbor
41
Q

What do Import Policies do?

V2-5-41

A
  • Import policies control the ways routes are imported into the routing table.
  • The router applies these policies before the routes are placed in the routing table.
42
Q

What do Export Policies do?

V2-5-41

A
  • Export policies control the way routes are exported from the routing table.
  • The router applies these policies as routes are exported from the routing table to dynamic routing protocols or the forwarding table.
43
Q

True or False: Only active routes can be exported with the use of an export policy.
(V2-5-41)

A

True

44
Q

What does the “advertise-inactive” command do?

V2-5-41

A

It advertises BGP routes that are inactive because of route preference.

45
Q

What command shows an overview (summary) of a system’s BGP information?
(V2-5-42)

A

> show bgp summary

46
Q

What command shows the bgp neighbor database?

V2-5-43

A

> show bgp neighbor

47
Q

What command show the BGP group database?

V2-5-45

A

> show bgp group

48
Q

What command will display only BGP routes?

What switch will include routes that are hidden
V2-5-46

A

> show route protocol bgp

> show route protocol bgp hidden

49
Q

What does the > show route received-protocol bgp [neighbor] do?
(V2-5-47)

A

-This shows the BGP routing information as it was received from the neighbor before any import policy processing occurs.

50
Q

What does the > show route advertising-protocol bgp [neighbor] do?
(V2-5-48)

A

-This shows the BGP routing information in the RIB-Out table that has not yet been filtered.