0% found this document useful (0 votes)
3 views145 pages

3 IP Routing

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views145 pages

3 IP Routing

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link].

COM/C/NETWORKJOURNEY

TOPICS COVERED:

IP ROUTING ESSENTIALS

- ROUTING PROTOCOL OVERVIEW


- PATH SELECTION
- STATIC ROUTING
- EIGRP
- ADVANCE EIGRP
- OSPF
- ADVANCE OSPF
- BGP
- ADVANCE BGP
- REDISTRIBUTION
- POLICY BASED ROUTING (PBR)
- BIDIRECTIONAL FORWARDING DETECTION (BFD)
- VRF LITE

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

Contents
TOPICS COVERED: ................................................................................................................. 1
ROUTING PROTOCOL OVERVIEW ................................................................................. 3
STATIC ROUTING............................................................................................................... 13
EIGRP (ENHANCED INTERIOR GATEWAY ROUTING PROTOCOL) ................... 20
OSPF (Open Shortest Path First) ......................................................................................... 38
OSPF PACKET TYPES ......................................................................................................... 39
OSPF HELLO PACKET COMPONENTS ..................................................................... 40
ROUTER ID .......................................................................................................................... 40
OSPF SEVEN STATES NEIGHBORSHIP ..................................................................... 41
PASSIVE INTERFACES .......................................................................................................... 46
REQUIREMENTS FOR NEIGHBOR ADJACENCY ................................................................... 46
OSPF Networks Types ......................................................................................................... 50
Types of OSPF LSAs ........................................................................................................... 52
OSPF AREAS TYPES ....................................................................................................... 54
More Details on E, N, P bits: ............................................................................................. 56
OSPF PATH SELECTION .................................................................................................. 59
Equal-Cost Multipathing...................................................................................................... 60
METRIC: (COST) ............................................................................................................. 61
Summarization of Routes ..................................................................................................... 62
ROUTE FILTERING........................................................................................................... 64
DEFAULT ROUTE ORIGINATE ................................................................................... 66
VIRTUAL LINKS.............................................................................................................. 67
BGP (BORDER GATEWAY PROTOCOL)....................................................................... 71
BGP Key Points .................................................................................................................. 71
Autonomous System Numbers .......................................................................................... 73
Who Allots ASN To Organization? .............................................................................. 73
What is ASN? ................................................................................................................. 73
ASN FAQs....................................................................................................................... 74
4 bytes ASN (32-bit range) ............................................................................................ 75
ASN Allocation Policies ................................................................................................. 76
BGP Peering/Neighbor Formation States: ...................................................................... 77
BGP MESSAGE TYPE ..................................................................................................... 78
BGP LAB#1: ....................................................................................................................... 80
BGP ACTIVE AND PASSIVE ......................................................................................... 84
BGP Timers: ....................................................................................................................... 85
BGP Next-Hop-Self:........................................................................................................... 87

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

BGP Flavors: ...................................................................................................................... 89


BGP Multihop .................................................................................................................... 90
BGP UPDATE-SOURCE .................................................................................................. 91
BGP Peer Group: ............................................................................................................... 92
BGP Best Path Selection: .................................................................................................. 94
BGP Topologies: Full Mesh, Route Reflector, and Confederation [iBGP] .................. 94
1. Full Mesh (IBGP) ....................................................................................................... 94
2. Route Reflector (RR) ................................................................................................. 94
BGP Attributes: ................................................................................................................. 97
OTHER BGP ATTRIBUTES ......................................................................................... 109
Atomic Aggregate........................................................................................................... 109
BGP Communities ....................................................................................................... 109
BGP QUIZ ........................................................................................................................ 111
REDISTRIBUTION ............................................................................................................ 113
Seed Metrics....................................................................................................................... 114
POLICY BASED ROUTING (PBR) .................................................................................. 127
BIDIRECTIONAL FORWARDING DETECTION (BFD) ............................................ 135
VRF-LITE ............................................................................................................................ 140
VRF vs VRF LITE ........................................................................................................... 144

ROUTING PROTOCOL OVERVIEW


A router’s primary function is to move an IP packet from one network to a different network. A
router learns about non-attached networks through configuration of static routes or through
dynamic IP routing protocols.

Dynamic IP routing protocols distribute network topology information between routers and provide
updates without intervention when a topology change in the network occurs.

Design requirements or hardware limitations may restrict IP routing to static routes, which do not
accommodate topology changes very well and can burden network engineers, depending on the size
of the network. With dynamic routing protocols, routers try to select the best loop-free path on
which to forward a packet to its destination IP address.

The common dynamic routing protocols found on most routing platforms today are as follows:
• Routing Information Protocol Version 2 (RIPv2)
• Enhanced Interior Gateway Routing (EIGRP)

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

• Open Shortest Path First (OSPF)


• Intermediate System-to-Intermediate System (IS-IS)
• Border Gateway Protocol (BGP)

With the exception of BGP, the protocols in this list are designed and optimized for routing within an
autonomous system and are known as Interior Gateway Protocols (IGPs).

Exterior Gateway Protocols (EGPs) route between autonomous systems.

BGP is an EGP protocol but can also be used within an autonomous system. If BGP exchanges routes
within an autonomous system, it is known as an interior BGP (iBGP) session. If it
exchanges routes between different autonomous systems, it is known as an exterior BGP (eBGP)
session.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

4 Algorithms Used By Router To Determine Loop-Free Routing:


Each router in the network uses its distributed database to determine the best loop free path
through the network to reach any given destination.
1. Distance Vector Algorithms
2. Advanced Distance Vector Algorithms
3. Link-state Algorithms
4. Path Vector Algorithms

Distance Vector Algorithms

Distance vector routing protocols, such as RIP {Routing Information Protocol}, advertise routes as
vectors, where distance is a metric (or cost) such as hop count, and vector is the next-hop router’s IP
used to reach the destination:
• Distance: The distance is the route metric to reach the network.
• Vector: The vector is the interface or direction to reach the network.
When a router receives routing information from a neighbor, it stores it in a local routing database
as it is received, and the distance vector algorithm (such as the Bellman-Ford and Ford-Fulkerson
algorithms) is used to determine which paths are the best loop-free paths to each reachable
destination. When the best paths are determined, they are installed into the routing table and are
advertised to each neighbor router.
Routers running distance vector protocols advertise the routing information to their neighbors from
their own perspective, modified from the original route received.

Therefore, a distance vector protocol does not have a complete map of the whole network; instead,
its database reflects that a neighbor router knows how to reach the destination network and how
far the neighbor router is from the destination network.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

The advantage of distance vector protocols is that they require less CPU and memory and can run on
low-end routers.

A distance vector protocol selects paths purely based on distance. It does not account for link speeds
or other factors.
The link between R1 and R7 is a serial link with only 64 Kbps of bandwidth, and all of the other links
are 1 Gbps Ethernet links. RIP does not take this into consideration and forwards traffic across this
link, which will result in packet loss when that link is oversubscribed.

Advanced Distance Vector Algorithms

The diffusing update algorithm (DUAL) is an Advanced distance vector algorithm that EIGRP uses to
calculate the shortest path to a destination within a network.
EIGRP advertises network information to its neighbors as other distance vector protocols do, but it
has some enhancements, as its name suggests. The following are some of the enhancements
introduced into this algorithm compared to other distance vector algorithms:
• It offers rapid convergence time for changes in the network topology.
• It sends updates only when there is a change in the network. It does not send full routing
table updates in a periodic fashion, as distance vector protocols do.
• It uses hellos and forms neighbor relationships just as link-state protocols do.
• It uses bandwidth, delay, reliability, load, and maximum transmission unit (MTU) size instead
of hop count for path calculations.
• It has the option to load balance traffic across equal- or unequal-cost paths.
EIGRP is sometimes referred to as a hybrid routing protocol because it has characteristics of both
distance vector and link-state protocols.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

R3 is trying to forward packets to the [Link]/24 network. If the routing domain used a distance
vector routing protocol, it would take the R3→R1→R7 path, which is only two hops away, rather
than the path R3→R1→R2→R7 path, which is three hops away. But the R3→R1→R7 path cannot
support traffic over 64 kbps. While the R3→R1→R2→R7 path is longer, it provides more bandwidth
and does not have as much delay (because of the serialization process on lower-speed interfaces)
and is the path selected by EIGRP.

Link-State Algorithms

A link-state dynamic IP routing protocol advertises the link state and link metric for each of its
connected links and directly connected routers to every router in the network.
OSPF and IS-IS are two link-state routing protocols commonly used in enterprise and service
provider networks. OSPF advertisements are called link-state advertisements (LSAs), and IS-IS
uses link-state packets (LSPs) for its advertisements.

As a router receives an advertisement from a neighbor, it stores the information in a local database
called the link-state database (LSDB) and advertises the link-state information on to each of its
neighbor routers exactly as it was received. The link-state information is essentially flooded
throughout the network, unchanged, from router to router, just as the originating router advertised
it. This allows all the routers in the network to have a synchronized and identical map of the
network.

Using the complete map of the network, every router in the network then runs the Dijkstra shortest
path first (SPF) algorithm to calculate the best shortest loop-free paths. The link-state algorithm then
populates the routing table with this information.

Due to having the complete map of the network, link-state protocols usually require more CPU and
memory than distance vector protocols, but they are less prone to routing loops and make better
path decisions.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

Path Vector Algorithm

A path vector protocol such as BGP is similar to a distance vector protocol; the difference is that
instead of looking at the distance to determine the best loop-free path, it looks at various BGP path
attributes.

BGP path attributes include autonomous system path (AS_Path), multi-exit discriminator (MED),
origin, next hop, local preference, atomic aggregate, and aggregator.

A path vector protocol guarantees loop-free paths by keeping a record of each autonomous system
that the routing advertisement traverses.

Any time a router receives an advertisement in which it is already part of the AS_Path, the
advertisement is rejected because accepting the AS_Path would effectively result in a routing loop.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

1. R1 (AS 1) advertises the [Link]/24 network to R2 (AS 2). R1 adds the AS 1 to theAS_Path during the
network advertisement to R2.
2. R2 advertises the [Link]/24 network to R4 and adds AS 2 to the AS_Path during the network
advertisement to R4.
3. R4 advertises the [Link]/24 network to R3 and adds AS 4 to the AS_Path during the network
advertisement to R3.
4. R3 advertises the [Link]/24 network back to R1 and R2 after adding AS 3 to the AS_Path during the
network advertisement.
5. As R1 receives the [Link]/24 network advertisement from R3, it discards the route advertisement
because R1 detects its AS (AS 1) in the AS_Path “3 4 2 1” and considers the advertisement as a loop.
R2 discards the [Link]/24 network advertisement from R3 as it detects its AS (AS 2) in the AS_Path
“3 4 2 1” and considers it a loop, too.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

PATH SELECTION IN ROUTER

Switching Fabric: (Forwarding Information Base FIB)


1. router receives a packet on the first input port
2. when the packet was read by the router, and after performing LPM (Longest Prefix Match), it was
found that the packet should be forwarded to the next network through the third output port.
3. That’s where the switching fabric comes into the play. Example: Directly connected network, ARP
table

Routing Processor: (Routing Information Base RIB)


1. Routing processor maintains the routing table. Example: Static route, EIGRP, OSPF, BGP
2. When a network administrator implements a routing algorithm

The RIB is composed of routes presented from the routing protocol processes. Path selection has
three main components:

1. Longest Match: The prefix length represents the number of leading binary bits in the subnet
mask that are in the on position.
2. Administrative distance: Administrative distance (AD) is a rating of the trustworthiness of a
routing information source. If a router learns about a route to a destination from more than
one routing protocol, and all the routes have the same prefix length, then the AD is
compared.
3. Metrics: A metric is a unit of measure used by a routing protocol in the best-path
calculation. The metrics vary from one routing protocol to another.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

1. Longest match

In the figure, a packet is destined for [Link]. The router has three possible routes that
match this packet: [Link]/12, [Link]/18, and [Link]/26.
Of the three routes, [Link]/26 has the longest match and is therefore chosen to forward the
packet.
Remember, for any of these routes to be considered a match there must be at least the number
of matching bits indicated by the subnet mask of the route.

2. Administrative distance
Administrative distance is what is used to select the best path when a router has two different paths
to the same destination via two different routing protocols.
Most routing protocols are not compatible with other protocols.
In a network with multiple routing protocols, being able to select the best path between multiple
protocols is critical.
Administrative distance defines the reliability of a routing protocol.
Each routing protocol is prioritized in order of most to least reliable (believable) with the help of an
administrative distance value.
IPv6 uses the same distances as IPv4.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

Default Administrative Distances:

Routing Protocol Default Administrative Distance

Connected 0

Static 1

EIGRP summary route 5

External BGP (eBGP) 20

EIGRP (internal) 90

OSPF 110

IS-IS 115

RIP 120

EIGRP (external) 170

Internal BGP (iBGP) 200

3. Metric
The metric is a value produced by the routing protocol's algorithm. The metric value determines the
best path to a destination network within a routing protocol.
To determine the metric:
• RIP uses hop count
• EIGRP uses 256*(Bandwidth + Delay) for calculating cost(metric)
• OSPF uses {Reference bandwidth/Interface BW}
Reference BW=100Mbps
Metric is used to compare routes to a destination by the same routing protocol.
Lower values indicate preferred routes.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

STATIC ROUTING
Static routes provide precise control over routing but may create an administrative burden as the
number of routers and network segments grow.

Using static routing requires zero network bandwidth because implementing manual route entries
does not require communication with other routers.

Unfortunately, because the routers are not communicating, there is no network intelligence. If a link
goes down, other routers will not be aware that the network path is no longer valid. Static routes are
useful when
• Dynamic routing protocols cannot be used on a router because of limited router CPU or
memory
• Routes learned from dynamic routing protocols need to be superseded

Static Route Types


Static routes can be classified as one of the following:
1. Directly attached static routes
2. Recursive static route
3. Fully specified static route
4. Null0

Directly Attached Static Routes


Point-to-point interfaces do not have to worry about maintaining an adjacency table and do not use
Address Resolution Protocol (ARP), so static routes can directly reference the outbound interface of
a router.
A static route that uses only the outbound next-hop interface is known as a directly attached static
route, and it requires that the outbound interface be in an up state for the route to be installed into
the RIB.

R1# configure term


Enter configuration commands, one per line. End with CNTL/Z.
R1(config)# ip route [Link] [Link] Serial 1/0

R2# configure term


Enter configuration commands, one per line. End with CNTL/Z.
R2(config)# ip route [Link] [Link] Serial 1/0

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

R1# show ip route


! Output omitted for brevity
Gateway of last resort is not set

[Link]/8 is variably subnetted, 5 subnets, 2 masks


C [Link]/24 is directly connected, GigabitEthernet0/1
C [Link]/24 is directly connected, Serial1/0
S [Link]/24 is directly connected, Serial1/0
R2# show ip route
! Output omitted for brevity
Gateway of last resort is not set

[Link]/8 is variably subnetted, 5 subnets, 2 masks


S [Link]/24 is directly connected, Serial1/0
C [Link]/24 is directly connected, Serial1/0
C [Link]/24 is directly connected, GigabitEthernet0/1

R1 indicates that the [Link]/24 network is reachable via the S1/0 interface, and R2 indicates that
the [Link]/24 network is reachable via the S1/0 interface.

Recursive Static Routes


The forwarding engine on Cisco devices needs to know which interface an outbound packet should
use.
A recursive static route specifies the IP address of the next-hop address.

The recursive lookup occurs when the router queries the RIB to locate the route toward the next-
hop IP address (connected, static, or dynamic) and then cross-references the adjacency table.

Recursive static routes are configured with the command ip route network subnet-mask next-hop-ip.

Recursive static routes require the route’s next-hop address to exist in the routing table to install the
static route into the RIB.

R1# configure term


Enter configuration commands, one per line. End with CNTL/Z.
R1(config)# ip route [Link] [Link] [Link]

R2# configure term


Enter configuration commands, one per line. End with CNTL/Z.
R2(config)# ip route [Link] [Link] 10.12.1.

R1# show ip route


! Output omitted for brevity

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

[Link]/8 is variably subnetted, 5 subnets, 2 masks


C [Link]/24 is directly connected, GigabitEthernet0/1
C [Link]/24 is directly connected, GigabitEthernet0/0
S [Link]/24 [1/0] via [Link]

Advantage:
Static route recursion can simplify topologies if a link fails because it may allow the static route to
stay installed while it changes to a different outbound interface in the same direction as the
destination.

Disadvantage:
However, problems arise if the recursive lookup resolves to a different interface pointed in the
opposite direction.

Fully Specified Static Routes

To correct this issue, the static route configuration should use the outbound interface and the next-
hop IP address. A static route with both an interface and a next-hop IP address is known as a fully
specified static route.

If the interface listed is not in an up state, the router removes the static route from the RIB.
Specifying the next-hop address along with the physical interface removes the recursive lookup and
does not involve the ARP processing problems that occur when using only the outbound interface.
Fully specified static routes are configured with the command ip route network subnet-mask
interface-id next-hop-ip.

R1# configure term


Enter configuration commands, one per line. End with CNTL/Z.
R1(config)# ip route [Link] [Link] GigabitEthernet0/0 [Link]

R2# configure term


Enter configuration commands, one per line. End with CNTL/Z.
R2(config)# ip route [Link] [Link] GigabitEthernet0/0 10.12.1.

R1# show ip route


! Output omitted for brevity

[Link]/8 is variably subnetted, 5 subnets, 2 masks


C [Link]/24 is directly connected, GigabitEthernet0/1
C [Link]/24 is directly connected, GigabitEthernet0/0
S [Link]/24 [1/0] via [Link], GigabitEthernet0/0

Floating Static Routing


The default AD on a static route is 1, but a static route can be configured with an AD value of 1 to
255 for a specific route.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

The AD is set on a static route by appending the AD as part of the command structure.
Using a floating static route is a common technique for providing backup connectivity for prefixes
learned via dynamic routing protocols.

A floating static route is configured with an AD higher than that of the primary route. Because the
AD is higher than that of the primary route, it is installed in the RIB only when the primary route is
withdrawn.

R1# configure terminal


Enter configuration commands, one per line. End with CNTL/Z.
R1(config)# ip route [Link] [Link] [Link] 10
R1(config)# ip route [Link] [Link] Serial 1/0 210

R1# show ip route


! Output omitted for brevity

Gateway of last resort is not set

[Link]/8 is variably subnetted, 5 subnets, 2 masks


C [Link]/24 is directly connected, GigabitEthernet0/1
C [Link]/24 is directly connected, GigabitEthernet0/0
C [Link]/24 is directly connected, Serial1/0
S [Link]/24 [10/0] via [Link]

Static Null Routes


The null interface is a virtual interface that is always in an up state. Null interfaces do not forward or
receive network traffic and drop all traffic destined toward them without adding overhead to a
router’s CPU.
Configuring a static route to a null interface provides a method of dropping network traffic without
requiring the configuration of an access list.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

Creating a static route to the Null0 interface is a common technique to prevent routing loops.
The static route to the Null0 interface uses a summarized network range, and routes that are more
specific point toward the actual destination.

1. For example, a computer on the Internet sends a packet to [Link], and the
[Link]/24 network is not allocated on R1 or R2.
2. The ISP sends the packet to R1 because of the [Link]/20 static route; R1 looks into
the RIB, and the longest match for that prefix is the default route back to the ISP, so R1
sends the packet back to the ISP, creating the routing loop.
3. The service provider places a static route for the [Link]/20 network to R1’s interface
([Link]). R1 uses a static default route pointed toward the service provider
([Link]) and a static route to the [Link]/24 network via R2 ([Link]).
Because R2 accesses all other networks through R1, a static default route points toward
R1’s interface ([Link]).

R2# trace [Link] source GigabitEthernet 0/2


Type escape sequence to abort.
Tracing the route to [Link]
1 [Link] 0 msec 0 msec 0 msec
2 [Link] 0 msec 0 msec 0 msec
3 [Link] 0 msec 4 msec 0 msec
4 [Link] 0 msec 0 msec 0 msec
5 [Link] 0 msec 0 msec 0 msec
! Output omitted for brevity

To prevent the routing loop, a static route is added for [Link]/20, pointed to the Null0 interface
on R1.

Any packets matching the [Link]/20 network range that do not have a longer match in R1’s RIB
are dropped.

R1
ip route [Link] [Link] Gi0/0 [Link]
ip route [Link] [Link] Gi0/2 [Link]
ip route [Link] [Link] Null0

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

R2# trace [Link] source GigabitEthernet 0/2


Type escape sequence to abort.
Tracing the route to [Link]

1 [Link] * * *
2 [Link] * * *
! Output omitted for brevity

QUIZ

1. Which of the following routing protocols is classified as an EGP?


1. RIP
2. EIGRP
3. OSPF
4. IS-IS
5. BGP
2. Which of the following routing protocols are classified as IGPs? (Choose all that apply.)
1. RIP
2. EIGRP
3. OSPF
4. IS-IS
5. BGP
3. A path vector routing protocol finds the best loop-free path by using ______.
1. hop count
2. bandwidth
3. delay
4. interface cost
5. path attributes
4. A distance vector routing protocol finds the best loop-free path by using ______.
1. hop count
2. bandwidth
3. delay
4. interface cost
5. path attributes
5. A link-state routing protocol finds the best loop free path by using ______.
1. hop count
2. bandwidth
3. delay
4. interface cost
5. path attributes
6. A router uses _________ as the first criterion for forwarding packets.
1. path metric
2. administrative distance
3. longest match

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

4. hop count
7. A router uses _________ as the second criterion for forwarding packets.
1. path metric
2. administrative distance
3. longest match
4. hop count
8. The ability to install multiple paths from the same routing protocol with the same path metric into
the RIB is known as ______.
1. per-packet load balancing
2. round-robin load balancing
3. equal-cost multipathing
4. parallel link forwarding
9. Which static route should be used to avoid unintentional forwarding paths with an Ethernet link
failure?
1. A directly attached static route
2. A recursive static route
3. A fully specified static route
4. A static null route
10. Virtual routing and forwarding (VRF) is useful with _____ addresses.
1. MAC
2. IPv4
3. IPv6
4. IPv4 and IPv6

Answers to the “Do I Know This Already?” quiz:


1E
2 A, B, C, D
3E
4A
5E
6C
7B
8C
9C
10 D

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

EIGRP (ENHANCED INTERIOR GATEWAY ROUTING PROTOCOL)


EIGRP (Enhanced Interior Gateway Routing Protocol) - Key Technical Points

1. Definition:
o EIGRP stands for Enhanced Interior Gateway Routing Protocol.
2. Proprietary Status:
o Originally a Cisco proprietary protocol, it became open standard in 2013.
3. Protocol Type:
o EIGRP is a hybrid routing protocol, combining characteristics of both distance
vector and link-state protocols.
o Often referred to as an Advanced Distance Vector protocol.
4. Algorithm:
o Utilizes the DUAL (Diffusing Update Algorithm) for selecting the best path.
5. Supported Protocols:
o Supports both IPv4 and IPv6 routed protocols.
6. VLSM and CIDR:
o Fully supports Variable Length Subnet Masking (VLSM) and Classless Inter-Domain
Routing (CIDR).
7. Update Mechanism:
o Sends partial or full updates only when there are network changes, reducing
overhead.
o Supports triggered updates for faster convergence.
8. Administrative Distances:
o Default Internal Administrative Distance: 90.
o Default External Administrative Distance: 170.
9. Hop Count:
o Default maximum hop count is 100, adjustable up to 255.
10. Load Balancing:
o Supports both Equal Cost Load Balancing (ECLB) and Unequal Cost Load Balancing
(UCLB).
o Balances traffic over up to 4 paths by default, configurable to a maximum of 32
paths.
11. Timers:
o Default Hello Timer: 5 seconds.
o Default Hold (Dead) Timer: 15 seconds.
12. Multicast Communication:
o Uses the [Link] multicast address for sending routing updates.
13. Authentication:
o Supports MD5 Authentication for secure communication.
14. Auto Summarization:
o Enabled by default but can be manually disabled.

Some of the many advantages of EIGRP are:

• very low usage of network resources during normal operation; only hello packets are
transmitted on a stable network
• when a change occurs, only routing table changes are propagated, not the entire routing
table; this reduces the load the routing protocol itself places on the network
• rapid convergence times for changes in the network topology (in some situations
convergence can be almost instantaneous)

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

EIGRP is an advanced distance vector protocol, relying on the Diffused Update Algorithm (DUAL) to
calculate the shortest path to a destination within a network.

Major Revisions of the Protocol

There are two major revisions of EIGRP, versions 0 and 1. Cisco IOS versions earlier than 10.3(11),
11.0(8), and 11.1(3) run the earlier version of EIGRP; some explanations in this paper may not apply
to that earlier version. We highly recommend using the later version of EIGRP, as it includes many
performance and stability enhancements.

Basic Theory

R2 → R1 → Network A (better path as per Distance vector) (called successor in EIGRP)


R2 → R3 → R4 → Network A (second best path in EIGRP called as feasible successor)

- Since the path through Router Three is three hops, and the path through Router One is two
hops, Router Two chooses the path through One and discards the information it learned
through Three.
- In case of R1 failure, it will take 15 seconds for Router Two to switch the path from Router
One to Router Three.
- EIGRP, instead of counting on full periodic updates to re-converge, builds a topology table
from each of its neighbor's advertisements (rather than discarding the data), and converges
by either looking for a likely loop-free route in the topology table, or, if it knows of no other
route, by querying its neighbors.
- Router Two saves the information it received from both Routers One and Three.
- It chooses the path through One as its best path (the successor) and the path through Three
as a loop-free path (a feasible successor).
- When the path through Router One becomes unavailable, Router Two examines its topology
table and, finding a feasible successor, begins using the path through Three immediately.

EIGRP FACTS:
- The rate at which EIGRP sends hello packets is called the hello interval, and you can adjust it
per interface with the ip hello-interval eigrp command.
- The hold time is the amount of time that a router will consider a neighbor alive without
receiving a hello packet.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

- The hold time is typically three times the hello interval, by default, 15 seconds (5-second
hello) and 180 seconds (60-second hello). You can adjust the hold time with the ip hold-time
eigrp command.
- Note that if you change the hello interval, the hold time is not automatically adjusted to
account for this change - you must manually adjust the hold time to reflect the configured
hello interval.
- It is possible for two routers to become EIGRP neighbors even though the hello and hold
timers do not match.
- The hold time is included in the hello packets so each neighbor should stay alive even
though the hello interval and hold timers do not match.
- To check EIGRP hello and hold timers

TOKYOR7#show ip eigrp interfaces detail e0/2


EIGRP-IPv4 Interfaces for AS(1)
Xmit Queue PeerQ Mean Pacing Time Multicast Pending
Interface Peers Un/Reliable Un/Reliable SRTT Un/Reliable Flow Timer Routes
Et0/2 1 0/0 0/0 1 0/2 50 0
Hello-interval is 1, Hold-time is 15
Split-horizon is enabled
Next xmit serial <none>
Packetized sent/expedited: 28/0
Hello's sent/expedited: 600/7
Un/reliable mcasts: 0/24 Un/reliable ucasts: 21/16
Mcast exceptions: 0 CR packets: 0 ACKs suppressed: 0
Retransmissions sent: 9 Out-of-sequence rcvd: 3
Topology-ids on interface - 0
Authentication mode is not set

- EIGRP does not build peer relationships over secondary addresses. All EIGRP traffic is sourced
from the primary address of the interface.

There are no limitations on the number of neighbors that EIGRP can support. The actual number of
supported neighbors depends on the capability of the device, such as:

1. memory capacity
2. processing power
3. amount of exchanged information, such as the number of routes sent
4. topology complexity
5. network stability

THREE EIGRP STATES:

Neighbor Discovery:

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

To distribute routing information throughout a network, EIGRP uses non-periodic incremental


routing updates. That is, EIGRP only sends routing updates about paths that have changed when
those paths change.

The basic problem with sending only routing updates is that you may not know when a path through
a neighboring router is no longer available. You cannot time out routes, expecting to receive a new
routing table from your neighbors. EIGRP relies on neighbor relationships to reliably propagate
routing table changes throughout the network; two routers become neighbors when they see each
other's hello packets on a common network. Command: show ip eigrp neighbor

Topology Table:

EIGRP, unlike RIP and IGRP, does not rely on the routing (or forwarding) table in the router to hold
all of the information it needs to operate. Instead, it builds a second table, the topology table, from
which it installs routes in the routing table.

To see the basic format of the topology table on a router running EIGRP, issue the show ip eigrp
topology command. The topology table contains the information needed to build a set of distances
and vectors to each reachable network, including:

• lowest bandwidth on the path to this destination as reported by the upstream neighbor
• total delay
• path loading
• path reliability
• minimum path maximum transmission unit (MTU)
• feasible distance
• reported distance
• route source (external routes are marked)

EIGRP Metrics:

EIGRP uses the minimum bandwidth on the path to a destination network and the total delay to
compute routing metrics.

Although you can configure other metrics, we do not recommend it, as it can cause routing loops in
your network.

The bandwidth and delay metrics are determined from values configured on the interfaces of
routers in the path to the destination network.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

It starts with the two advertisements for this network: one through Router Four, with a minimum
bandwidth of 56 and a total delay of 2200; and the other through Router Three, with a minimum
bandwidth of 128 and a delay of 1200. Router One chooses the path with the lowest metric.

Let us compute the metrics. EIGRP calculates the total metric by scaling the bandwidth and delay
metrics. EIGRP uses the following formula to scale the bandwidth:

• bandwidth = (10000000/bandwidth(i)) * 256

where bandwidth(i) is the least bandwidth of all outgoing interfaces on the route to the
destination network represented in kilobits.

EIGRP uses the following formula to scale the delay:

• delay = delay(i) * 256

where delay(i) is the sum of the delays configured on the interfaces, on the route to the
destination network, in tens of microseconds. The delay as shown in the show ip eigrp
topology or show interface commands is in microseconds, so you must divide by 10 before
you use it in this formula. Throughout this paper, we use delay as it is configured and shown
on the interface.

EIGRP uses these scaled values to determine the total metric to the network:

• metric = ([K1 * bandwidth + (K2 * bandwidth) / (256 - load) + K3 * delay] * [K5 / (reliability +
K4)]) * 256

Note: These K values should be used after careful planning. Mismatched K values prevent a neighbor
relationship from being built, which can cause your network to fail to converge.

Note: If K5 = 0, the formula reduces to Metric = ([k1 * bandwidth + (k2 * bandwidth)/(256 - load) +
k3 * delay]) * 256.

The default values for K are: These K values are only numbers to scale numbers in the metric
calculation

• K1 = 1

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

• K2 = 0
• K3 = 1
• K4 = 0
• K5 = 0

For default behavior, you can simplify the formula as follows:

metric = ( bandwidth + delay ) * 256

In this example, the total cost through Router Four is:

minimum bandwidth = 56k


total delay = 100 + 100 + 2000 = 2200
[(10000000/56) + 2200] x 256 = (178571 + 2200) x 256 = 180771 x 256 = 46277376

And the total cost through Router Three is:

minimum bandwidth = 128k


total delay = 100 + 100 + 1000 = 1200
[(10000000/128) + 1200] x 256 = (78125 + 1200) x 256 = 79325 x 256 = 20307200

So, to reach Network A, Router One chooses the route through Router Three.

EIGRP Tables:

EIGRP maintains three tables. 1) Neighbor Table, 2) Topology Table and 3) Routing Table.
Neighbor Table:
Neighbor table includes all neighbors that is directly connected to router using EIGRP. In simple
words, next hop router and the interfaces.
Topology Table:
EIGRP uses this table to store all routes, which it learned from neighbors. It contains a list of all
destinations and routes advertised by neighboring routers. The EIGRP Topology table contains
everything that EIGRP has learned.
Routing Table:
EIGRP stores single best (Successor) route for each destination in this table. Router uses this table to
forward the packet. There is a separate routing table for each routed protocol.

EIGRP Neighbor Table Explanation:

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

H (Handle) Lists the neighbors in the order this router was learned
Address The IP address of the neighbors
Interface The interface of the local router on which this Hello packet was received
Hold The amount of time left before neighbor is considered in “down” status
Uptime How long the neighbor has been up
SRTT (Smooth Round Trip Time): The number of milliseconds it takes to send an EIGRP
packet to neighbor and receive an acknowledgment packet back
RTO (Retransmission Timeout): if a multicast has failed, then a unicast is sent to that
particular router, the RTO is the time in milliseconds that the router waits for an
acknowledgement of that unicast.
Q Cnt (Q Count): Shows the number of queued EIGRP packets. It is usually 0
Seq Num The sequence number of the last update EIGRP packet received

EIGRP Topology Table Explanation:

AS Autonomous System number 1


Codes Passive is good and Active is bad
Sia Status (Stuck in EIGRP has lost Successor and there is no Feasible Successor. EIGRP sends
Active) queries to neighbors and asking if they have another path, SIA timer starts
1 Successors The best path in this case only one way to get to the destination
FD is 2816 Feasible Distance: Total distance to get to the destination

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

28416/28160 First, one is Feasible Distance. [the local router’s metric of the best route to
reach a specific network] The second Value is Advertised Distance [the
metric advertised by the neighboring router for a specific route]

EIGRP Routing Table Explanation:

D Shows this is an EIGRP learnt route


[Link]/24 Destination learn network and 24 is subnet mask.
90 90, is the Administrative Distance of EIGRP.
3072 This is the metric, Total distance to get to the destination
[Link] The neighbor that advertised the route.
00:49:16 Time since the route was learnt.
GigabitE1/0 The outbound interface going towards the destination.

EIGRP Metric: (Example 2 for EIGRP Metric)

EIGRP uses metric to select the best route from all available routes for destination. Metric has five
[Link], [Link], [Link], [Link] and [Link]. From these only bandwidth and
delay are by default enabled.
K Value Component Description
K1 Bandwidth Lowest bandwidth of route
K2 Load Worst load on route based on packet rate
K3 Delay Cumulative interface delay of route
K4 Reliability Worst reliability of route based on keep alive
K5 MTU Smallest MTU in path [Not used in route calculation]

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

Bandwidth (K1):
EIGPR picks lowest bandwidth from all outing-going interfaces of route to the destination network.
Bandwidth is amount of data that can be transmitted in a fixed amount of time.
Load (K2):
Load is a dynamic value that changes frequently. It is based on packet rate and bandwidth of
interface. It calculates the volume of traffic passing through the interface in comparison of maximum
capacity. It is expressed on a scale of 255 where 1 represent that an interface is empty and 255
represent that an interface is fully utilized. Since data flows from both directions, router maintains
two separate metric counters; Txload for outgoing traffic and Rxload for incoming traffic.
Delay (K3):
Delay reflects the time taken by a packet in crossing the interface. It is measured in fractions of
seconds.
Reliability (K4):
Just like load, reliability is also a dynamic value. It compares all successfully received frames against
all received frames. 100 % reliability indicates that all the frames, which we received, were good. We
do not have any issue with physical link. If we have any issue with physical link, this value will be
decrease.
MTU (K5):
MTU stands for Maximum Transmission Unit. It is advertised with routing update but it does not
actively participate in metric calculation.

Path Metric Calculation: (Example 2 for EIGRP Metric)

EIGRP Metric = 256*((10^7 / min. BW) + Delay)


=256*((10000000/Minimum BW) + Sum of Interface Delays/10)

Where Bandwidth = 10000000/bandwidth (i), where bandwidth (i) is the least bandwidth of all
outgoing interfaces on the route to the destination network represented in kilobits.

Delay = delay (i) where delay (i) is the sum of the delays configured on the interfaces, on the route to
the destination network, in tens of microseconds.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

EIGRP Metric = 256*((10000000/Minimum BW) + Sum of Interface Delays/10)


EIGRP Metric = 256*(10000000/100000) + 100+5000/10)
EIGRP Metric = 256*(100) +5100/10)

EIGRP Metric = 256*(100) +510)


EIGRP Metric = 256*610
EIGRP Metric = 156160

Path Selection Optimization: (short lab for understanding K manipulations)


Change EIGRP metrics by manipulating the bandwidth and/or delay values. Changing the bandwidth
value is not recommended because that value is used for many other reasons and features in the
router. Also, configure the K-Values to influence the EIGRP metric calculation.

Commands Description
R6#show ip route eigrp First verify both routes in routing table
D [Link] [90/156160] via [Link], F0/1 Equal path load balancing
[90/156160] via [Link], F0/0
R6(config)#interface FastEthernet 0/0 Enter interface mode
R6(config-if)# bandwidth 10000 Decrease the bandwidth to 10000
R6#show ip route eigrp Verify again only one path now
R6(config)#interface FastEthernet 0/0 Enter interface mode

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

R6(config-if)#no bandwidth 10000 Make the default bandwidth again


R6#show ip route eigrp Check again both path back
R6(config)#interface FastEthernet 0/0 Enter interface mode
R6(config-if)#delay 200 Increase the delay this time
R6#show ip route eigrp Verify again only one path now
R6(config)#interface FastEthernet 0/0 Enter interface mode
R6(config-if)#no delay 200 Make the default delay again
R6#show ip route eigrp First verify both routes in routing table
D [Link] [90/156160] via [Link], F0/1 Equal path load balancing
[90/156160] via [Link], F0/0
R6(config)#router eigrp 1 Enter EIGRP mode
R6(config-router)#metric weights 0 1 1 1 1 1 Change k Values
R7(config)#router eigrp 1 Enter EIGRP mode
R7(config-router)#metric weights 0 1 1 1 1 1 Change K values
R6#show ip route eigrp Verify the eigrp routes different FD
D [Link] [90/610]
R6(config)#interface FastEthernet 0/0 Enter interface mode
R6(config-if)# bandwidth 10000 Decrease the bandwidth to 10000
R6(config-if)#delay 200 Increase the delay Change metric

EIGRP Packet Types:

EIGRP uses five packet types in communication with its neighbors. The packet types are below.
Packet Description
Hello Used to identify neighbors. They are sent as periodic multicasts.
Update Used to advertise routes, only sent as multicasts when something is changed.
Ack Acknowledges receipt of an update.
Query Used to find alternate paths when all paths to a destination have failed.
Reply Used to response to query packets about routing information.

Hello:
Hello packets are used for neighbor discovery. As soon as the hello packets send and receive EIGRP
routers will try to form the neighbor adjacency. They are multicast to [Link]. By default, EIGRP
sends hello packets every 5 seconds.
Update:

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

Update packets contain routing information for destinations. EIGRP unicasts update packets to
newly discovered neighbors; otherwise, it multicasts update packets to [Link] when a link or
metric changes. Update packets are acknowledged to ensure reliable transmission.
Query:
EIGRP sends query packets used to find alternate paths when all paths to a destination have failed.
Query packets are always multicast.
Reply:
EIGRP sends reply packets to respond to query packets. Reply packets provide a feasible successor to
the sender of the query. Reply packets are unicast to the sender of the query packet.
ACK:
ACK packets are used to acknowledge the receipt of update, query and reply packets. ACK packets
are sent by using unicast.

EIGRP Terminologies:

Advertised Distance (AD)/Reported Distance (RD): The cost from the neighbor to the destination.
Feasible Distance (FD): The total cost to reach a destination network.
Successor: The primary route used to reach a destination. The successor route is kept in the routing
table. Notice that successor is the best route to that destination.
Feasible Successor: The backup route. To be a feasible successor, the route must have an AD less
than the FD of the current successor route.

Router One sees that it has two routes to Network A: one through Router Three and another
through Router Four.

• The route through Router Four has a cost of 46277376 and a reported distance of 307200.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

• The route through Router Three has a cost of 20307200 and a reported distance of 307200.

FD here is through Router Four (best path placed in Routing table).


FS here is through Router Three (Backup path placed in Topology table)

EIGRP Summarization:

Auto-Summarization: : (short lab for understanding auto-summarization & manual-


summarization)
Auto Summarization is a feature, which allows Routing Protocols to summarize its routes to their
classful networks automatically. By default, EIGRP has auto summary feature enabled. Because of
this, routes are summarized to classful address at network boundaries in the routing updates. The
Auto-Summarization can be disabled with a command of no auto-summary from the router prompt.

Commands Description
R1(config)#router eigrp 1 Enter EIGRP mode
R1(config-router)#network [Link] Advertise all networks
R1(config-router)#no auto-summary Disable auto summary feature
R2(config)#router eigrp 1 Enter EIGRP mode
R2(config-router)#network [Link] Advertise all network
R2(config-router)#no auto-summary Disable auto summary feature
R1#show ip route eigrp View routing table for EIGRP all four networks of
172 present in table
R2(config)#router eigrp 1 Enter EIGRP mode
R2(config-router)#auto-summary Enable auto summary feature
R1#show ip route eigrp Again, view routing table for EIGRP
Only summary route [Link]/16

Advantages of Summarization:
Saves Memory Routing tables will be smaller which reduces memory requirements.
Saves Bandwidth There are less routes to advertise so we save some bandwidth.
Saves CPU Cycles Less packets to process and smaller routing tables to work on.
Stability Prevents routing table instability due to flapping networks.

Manual Summarization:
The manual summarization is a process of creating a summary route that will be used to represent
multiple routes and can be used to reduce the sizes of routing tables in a network. Manual
summarization is configured differently on different protocols.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

By default, EIGRP has auto summary feature enabled. Because of this, EIGRP automatically
summarizes networks at the classful boundary.

Advantages of EIGRP over other routing protocol like, OSPF doesn't support automatic
summarization and also OSFP can summarize routes only on ABRs and ASBRs.

EIGRP, where you can summarize routes on every router in an EIGRP network. Manual
summarization is configured on a per-interface basis on EIGRP.

The syntax of the command is (config-if) ip summary-address eigrp ASN SUMMARY_ADDRESS


SUBNET_MASK

Commands Description
R1(config)#router eigrp 1 Enter EIGRP mode
R1(config-router)#network [Link] Advertise all networks
R1(config-router)#no auto-summary Disable auto summary feature
R2(config)#router eigrp 1 Enter EIGRP mode
R2(config-router)#network [Link] Advertise only 1 network
R2(config-router)#no auto-summary Disable auto summary feature
R2#show ip route eigrp View routing table for EIGRP all four networks of
192.168. present
R1(config)#interface f0/0 Enter interface mode facing R2
R1(config-if)#ip summary-address eigrp 1 Enter summary route to send
[Link] [Link]
R2#show ip route eigrp Check again routing table only summary route
[Link]/21 only
R1#show ip route eigrp Checking summary route in R1
[Link]/21 is a summary, Null0
R1(config)#interface f0/0 Enter interface mode of R1
R1(config-if)#no ip summary-address eigrp 1 Remove the summary route configure before
[Link] [Link] 255 Set summary route again with AD 255 to remove
R1(config-if)#ip summary-address eigrp 1 Null0 in R1 table
[Link] [Link] 255

EIGRP Load Balancing:


Load balancing is a router's capability to distribute traffic over all of its network ports that are the
same metric from the destination address. By default, the Cisco IOS balances between a maximum
of four equal-cost paths for IP.

EIGRP Equal Cost:

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

By default, EIGRP supports equal-cost load balancing over four links. Equal-cost means that multiple
routes must have the same metric to reach a destination, so that router can choose to load balance
across equal cost links. Using maximum-path router configuration command, to request up to 16
equally good routes to be kept in the routing table. Set maximum-path to 1 to disable load
balancing.

(short lab to understand EIGRP equal load balancing)

Commands Description
(config)#router eigrp 1 Apply this on both R6 and R7
(config-router)#no auto-summary Disable auto summary
(config-router)#network [Link] Enable EIGRP for all networks
R6#show ip route eigrp Check routing table for EIGRP equal 2 paths
R6#show ip eigrp topology Check EIGRP topology table for all paths
R6(config)#router eigrp 1 Enters EIGRP routing mode
R6(config‐router)# maximum-paths 1 To disable equal cost load balancing set 1
R6#show ip route eigrp Check routing table for EIGRP now 1 path
R6(config)#router eigrp 1 Enters EIGRP routing mode
R6(config‐router)# maximum-paths 4 Enable back equal cost load balancing

EIGRP Unequal Cost:


EIGRP can also balance traffic across multiple routes that have different metrics; this is called
Unequal-Cost Load Balancing. The degree to which EIGRP performs load balancing is controlled by
the variance multiplier router configuration command. The multiplier is a variance value, between 1
and 128, used for load balancing. The default is 1, which means equal-cost load balancing. The
multiplier defines the range of metric values that are accepted for load balancing.

(short lab to understand EIGRP equal load balancing)

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

Commands Description
(config)#router eigrp 1 Apply this on all R1,R2,R3,R4 & R5
(config-router)#no auto-summary Disable auto summary
(config-router)#network [Link] Enable EIGRP for all networks
R1#show ip route eigrp Check routing table for EIGRP one path only
R1#show ip eigrp topology Check EIGRP topology table for all paths
412160 / 158720 = 2.6 Need variance 3 to install Ethernet1/0 path
R1(config)#router eigrp 1 Enters EIGRP routing mode
R1(config‐router)#variance 3 Set variance 3 to install other route
R1#show ip route eigrp Check routing table for EIGRP two path now
2300416 /158720 = 14.5 Need variance 15 to install S2/0 path
R1(config)#router eigrp 1 Enters EIGRP routing mode
R1(config‐router)#variance 15 Set variance 15 to install other route
R1#show ip route eigrp Check routing table for EIGRP three path now
R1#show ip route [Link] EIGRP is sharing traffic f0/1 240, S2/0 17 and E1/0 92
proportion
R1#traceroute [Link] Apply many time to check path changing

EIGRP Basic Configuration:

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

Let us do basic configuration of EIGRP protocols on cisco routers. Wildcard mask is 32 bits long. It is
inverted subnet masks, with the zero bits indicating that the corresponding bit position must match
the same bit position in the IP address. The one bits indicate that the corresponding bit position
does not have to match the bit position in the IP address.
To form a neighborship, EIGRP has these requirements:
1) Interface’s primary IP addresses must be on the same subnet.
2) Connected interface must not be passive.
3) Routers must use the same AS number.
4) Must pass authentication.
5) K-values must match.

Commands Description
R1(config)#router eigrp 1 Enter EIGRP mode
R1(config-router)#network [Link] Advertise [Link] network
R1(config-router)#network [Link] Advertise [Link] network
R1#show run | sec eigrp To verify by running configuration
router eigrp 1 EIGRP with AS 1
network [Link] Its convert [Link] network class A
network [Link]
R1(config)#router eigrp 1 Enter EIGRP mode
R1(config-router)#no network [Link] Remove network
R1(config-router)#network [Link] [Link] Advertise again with wild card
R1#show run | sec eigrp Verify by running configuration
router eigrp 1 EIGRP with AS 1
network [Link] [Link] This time it’s not converted
R1(config)#router eigrp 1 Enter EIGRP mode
R1(config-router)#no network [Link] [Link] Remove network
R1(config-router)#network [Link] [Link] With subnetmask not with wildcard
R1#show run | sec eigrp Verify by running configuration
router eigrp 1 EIGRP with AS 1
network [Link] [Link] IOS converted subnetmask to wildcard
R1(config)#router eigrp 1 Enter EIGRP mode with AS 1
R1(config-router)#network [Link] Advertise all networks
R2(config)#router eigrp 100 Enter EIGRP mode with AS 100
R2(config-router)#network [Link] Advertise all networks, no neighbor
adjacency because of different AS
R1(config)#router eigrp 1 Enter EIGRP mode with AS 1
R1(config-router)#network [Link] Advertise all networks
R1(config-router)# metric weights tos 1 1 1 1 1 Changing Metric Weights Again no neighbor
adjacency, K value mismatch
R2(config)#router eigrp 1 Enter EIGRP mode with AS 1
R2(config-router)#network [Link] Advertise all networks

EIGRP Commands:

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

Commands Description
R1(config-router)#auto-summary Enable auto summarization feature
R1(config-router)#no auto-summary Disable auto summarization feature
R1(config-router)# metric weights tos k1 k2 k3 Adjusting the EIGRP Metric Weights
k4 k5
R1(config-router)# metric maximum-hops <1- Advertise greater than hops
255>
R1(config-router)#maximum-paths <1-32> Set the maximum equal paths
R1(config-router)#variance <1-128> Control unequal load balancing
R1(config-if)# ip hello-interval eigrp <asn> Changing EIGRP hello interval
<interval>
R1(config-if)# ip hold-time eigrp <asn> Changing EIGRP hold time interval
<interval>
R1#show ip eigrp neighbors Display the neighbor table in brief
R1#show ip eigrp neighbors detail Display the neighbor table in detail. To verify the
neighbor is configured as stub router
R1#show ip eigrp interfaces Display info about all EIGRP interfaces
R1#show ip eigrp interfaces s0/0 Display info EIGRP interface
R1#show ip eigrp interfaces 20 Display info EIGRP interfaces AS 20
R1#show ip eigrp topology Displays the topology table
R1#show ip eigrp traffic Displays EIGEP different packets
R1#show ip route eigrp Display EIGRP route from routing table
R1#debug eigrp fsm Displays the events related to FSM
R1#debug eigrp packet Displays EIGRP event packets
R1#no debug eigrp fsm Turn off FSM debug
R1#no debug eigrp packet Turn off EIGRP packets debug

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

OSPF (Open Shortest Path First)


OSPF (Open Shortest Path First) - Technical Points

1. Definition:
o OSPF stands for Open Shortest Path First and is a link-state dynamic routing
protocol.
o It uses Dijkstra's Shortest Path First (SPF) algorithm for route calculation.
2. Standard Protocol:
o OSPF is an open-standard protocol supported by multiple vendors.
3. Protocol Type and Characteristics:
o OSPF is a classless protocol, allowing the use of VLSM (Variable Length Subnet
Masking).
o It uses cost as its metric, calculated based on the bandwidth of the link.
o There is no hop-count limitation, making it suitable for large networks.
4. Packet Handling and Updates:
o Sends updates using multicast addresses:
▪ [Link] for all OSPF routers.
▪ [Link] for all designated and backup designated routers.
o OSPF packets use IP protocol type 89, not TCP or UDP.
o Sends updates with a sequence number starting from 0x80000001.
o Sequence numbers increment by one with each update, resetting at 0x7FFFFFFF.
5. Timers:
o Default Hello Timer: 10 seconds.
o Default Dead Timer: 40 seconds.
6. Administrative Distance:
o Default Administrative Distance: 110 (for both internal and external routes).
7. Authentication:
o Supports MD5 and clear-text authentication for secure route exchange.
o Authentication enhances security in sensitive environments.
8. Load Balancing:
o Supports equal-cost load balancing across multiple paths to the same destination.
o Improves bandwidth utilization and network redundancy.
9. Convergence:
o OSPF achieves rapid convergence using triggered updates and reliable LSA
propagation.
10. Scalability and Hierarchical Design:
• Divides networks into smaller logical areas for scalability and efficiency.
• Area 0 serves as the backbone area, interconnecting all other areas.
• OSPF packets are exchanged only within their respective areas.
11. Memory and Processing Requirements:
• Requires more memory and CPU resources compared to distance vector protocols due to its
complex topology database and SPF computations.
12. Route Summarization:
• Summarization is supported at Area Border Routers (ABRs) and Autonomous System
Boundary Routers (ASBRs).
• OSPF does not perform automatic summarization; it must be configured manually.
13. Multicast and Reliable Communication:
• Uses multicast addresses for efficient routing updates.
• Reduces overhead by sending partial updates only when changes occur.
14. Tables and Databases:

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

• Maintains three key tables:


o Neighbor Table: Tracks OSPF neighbors.
o Topology Table: Stores LSAs received from neighbors.
o Routing Table: Contains the best routes to destinations.
15. Wildcard Mask:
• OSPF uses a wildcard mask, which is the inverse of the subnet mask.
16. Advanced Capabilities:
• Supports route tagging for external routes.
• Allows trigger updates to propagate changes quickly.
• No split horizon issues exist in OSPF.
17. IPv4 and IPv6 Support:
• OSPFv2 is used for IPv4 networks.
• OSPFv3 supports IPv6 and includes IPsec authentication.
18. Hello and Neighbor Relationships:
• Hello packets establish and maintain neighbor adjacencies.
• OSPF forms adjacencies only with routers in the same area.
19. Better Bandwidth Usage:
• Uses multicast for updates, reducing bandwidth consumption.
• Avoids periodic full routing updates, instead sending incremental updates as needed.
20. Complexity:
• OSPF is more complex to configure and troubleshoot compared to simpler protocols like
RIP or EIGRP.

This covers both the general functionality and specific technical details of OSPF. Let me know if you
need further edits or refinements!

3-main steps in OSPF:


--------|
1. Becoming Neighbours
2. Exchange Database Information
3. Choose Best Routes (SPF calculation)

OSPF PACKET TYPES


Type Packet Name Functional Overview
These packets are for discovering and maintaining neighbors. Packets are
1 Hello sent out periodically on all OSPF interfaces to discover new neighbors
while ensuring that other adjacent neighbors are still online.
Database These packets are for summarizing database contents. Packets are
2 description (DBD) exchanged when an OSPF adjacency is first being formed. These packets
or (DDP) are used to describe the contents of the LSDB.
These packets are for database downloads. When a router thinks that part
Link-state request
3 of its LSDB is stale, it may request a portion of a neighbor’s database by
(LSR)
using this packet type.
Link-state update These packets are for database updates. This is an explicit LSA for a
4
(LSU) specific network link and normally is sent in direct response to an LSR.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

These packets are for flooding acknowledgments. These packets are sent
5 Link-state ack in response to the flooding of LSAs, thus making flooding a reliable
transport feature.

OSPF HELLO PACKET COMPONENTS


OSPF hello packets are responsible for discovering and maintaining neighbors.
In most instances, a router sends hello packets to the AllSPFRouters address ([Link]).

Data Field Description


Router ID (RID) A unique 32-bit ID within an OSPF domain.
A field that allows secure communication between OSPF routers to
Authentication options prevent malicious activity. Options are none, clear text, or Message
Digest 5 (MD5) authentication.
The OSPF area that the OSPF interface belongs to. It is a 32-bit number
Area ID that can be written in dotted-decimal format ([Link]) or decimal
(256).
The network mask for the primary IP address for the interface out
Interface address mask
which the hello is sent.
Interface priority The router interface priority for DR elections.
The time span, in seconds, that a router sends out hello packets on the
Hello interval
interface.
The time span, in seconds, that a router waits to hear a hello from a
Dead interval
neighbor router before it declares that router down.
Designated router and
The IP address of the DR and backup DR (BDR) for the network link.
backup designated router
A list of OSPF neighbors seen on the network segment. A router must
Active neighbor
have received a hello from the neighbor within the dead interval.

ROUTER ID

The OSPF router ID (RID) is a 32-bit number that uniquely identifies an OSPF router.

In some OSPF output commands, neighbor ID refers to the RID; the terms are synonymous.

The RID must be unique for each OSPF process in an OSPF domain and must be unique between
OSPF processes on a router.

3-Ways to Configure Router-ID:


1. Manually Set. Example CLI command: router-id router-id
2. Highest ‘up’ Loopback interface IP address
3. Highest ‘up’ Physical Interface IP address

The command clear ip ospf process restarts the OSPF process on a router so that OSPF can use the
new RID.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

OSPF SEVEN STATES NEIGHBORSHIP

An OSPF neighbor is a router that shares a common OSPF-enabled network link.

OSPF routers discover other neighbors via the OSPF hello packets.

An adjacent OSPF neighbor is an OSPF neighbor that shares a synchronized OSPF database between
the two neighbors.

Each OSPF process maintains a table for adjacent OSPF neighbors and the state of each router.

OSPF Neighbor States

State Description
This is the first OSPF neighbor state. It means that no information (hellos)
has been received from this neighbor, but hello packets can still be sent to
the neighbor in this state.

1) Down During the fully adjacent neighbor state, if a router doesn't receive hello
packet from a neighbor within the RouterDeadInterval time
(RouterDeadInterval = 4*HelloInterval by default) or if the manually
configured neighbor is being removed from the configuration, then the
neighbor state changes from Full to Down.
This state specifies that the router has received a hello packet from its
neighbor, but the receiving router's ID was not included in the hello packet.
2) Init When a router receives a hello packet from a neighbor, it should list the
sender's router ID in its hello packet as an acknowledgment that it received
a valid hello packet.
This state designates that bi-directional communication has been
established between two routers. Bi-directional means that each router has
seen the other's hello packet. This state is attained when the router
receiving the hello packet sees its own Router ID within the received hello
packet's neighbor field. At this state, a router decides whether to become
adjacent with this neighbor. On broadcast media and non-broadcast
3) 2-Way multiaccess networks, a router becomes full only with the designated router
(DR) and the backup designated router (BDR); it stays in the 2-way state with
all other neighbors. On Point-to-point and Point-to-multipoint networks, a
router becomes full with all connected routers.

At the end of this stage, the DR and BDR for broadcast and non-broadcast
multiacess networks are elected.
Once the DR and BDR are elected, the actual process of exchanging link state
information can start between the routers and their DR and BDR.
4) ExStart
In this state, the routers and their DR and BDR establish a master-slave
relationship and choose the initial sequence number for adjacency

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

formation. The router with the higher router ID becomes the master and
starts the exchange, and as such, is the only router that can increment the
sequence number. Note that one would logically conclude that the DR/BDR
with the highest router ID will become the master during this process of
master-slave relation. Remember that the DR/BDR election might be purely
by virtue of a higher priority configured on the router instead of highest
router ID. Thus, it is possible that a DR plays the role of slave. And also note
that master/slave election is on a per-neighbor basis.
In the exchange state, OSPF routers exchange database descriptor (DBD)
packets. Database descriptors contain link-state advertisement (LSA)
headers only and describe the contents of the entire link-state database.
Each DBD packet has a sequence number which can be incremented only by
5) Exchange master which is explicitly acknowledged by slave. Routers also send link-
state request packets and link-state update packets (which contain the
entire LSA) in this state. The contents of the DBD received are compared to
the information contained in the routers link-state database to check if new
or more current link-state information is available with the neighbor.
In this state, the actual exchange of link state information occurs. Based on
the information provided by the DBDs, routers send link-state request
packets. The neighbor then provides the requested link-state information in
6) Loading
link-state update packets. During the adjacency, if a router receives an
outdated or missing LSA, it requests that LSA by sending a link-state request
packet. All link-state update packets are acknowledged.
In this state, routers are fully adjacent with each other. All the router and
network LSAs are exchanged and the routers' databases are fully
synchronized.

Full is the normal state for an OSPF router. If a router is stuck in another
7) Full state, it is an indication that there are problems in forming adjacencies. The
only exception to this is the 2-way state, which is normal in a broadcast
network. Routers achieve the FULL state with their DR and BDR in
NBMA/broadcast media and FULL state with every neighbor in the
remaining media such as point-to-point and point-to-multipoint.

DESIGNATED ROUTER AND BACKUP DESIGNATED ROUTER

Multi-access networks such as Ethernet (LANs) and Frame Relay allow more than two routers to
exist on a network segment.

Such a setup could cause scalability problems with OSPF as the number of routers on a segment
increases.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

Additional routers flood more LSAs on the segment, and OSPF traffic becomes excessive as OSPF
neighbor adjacencies increase.

If four routers share the same multi-access network, six OSPF adjacencies form, along with six
occurrences of database flooding on a network.

The number of edges formula, n(n – 1) / 2, where n represents the number of routers, is used to
identify the number of sessions in a full mesh topology.

If 5 routers were present on a segment, 5(5 – 1) / 2 = 10, then 10 OSPF adjacencies would exist for
that segment.

Continuing the logic, adding 1 additional router would makes 15 OSPF adjacencies on a network
segment.

Having so many adjacencies per segment consumes more bandwidth, more CPU processing, and
more memory to maintain each of the neighbor states.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

DESINGATED ROUTER:
OSPF overcomes this inefficiency by creating a pseudonode (virtual router) to manage the adjacency
state with all the other routers on that broadcast network segment.

A router on the broadcast segment, known as the designated router (DR), assumes the role of the
pseudonode.

The DR reduces the number of OSPF adjacencies on a multi-access network segment because
routers only form a full OSPF adjacency with the DR and not each other.

The DR is responsible for flooding updates to all OSPF routers on that segment as the updates occur.

BACKUP DESGINATED ROUTER:


If the DR were to fail, OSPF would need to form new adjacencies, invoking all new LSAs, and could
potentially cause a temporary loss of routes. In the event of DR failure, a backup designated router
(BDR) becomes the new DR; then an election occurs to replace the BDR. To minimize transition time,
the BDR also forms full OSPF adjacencies with all OSPF routers on that segment.

The DR/BDR process distributes LSAs in the following manner:

1. All OSPF routers (DR, BDR, and DROTHER) on a segment form full OSPF adjacency with the
DR and BDR.
2. As an OSPF router learns of a new route, it sends the updated LSA to the AllDRouters
([Link]) address, which only the DR and BDR receive and process, as illustrated in step 1.

The DR sends a unicast acknowledgment to the router that sent the initial LSA update, as
illustrated in step 2.

The DR floods the LSA to all the routers on the segment via the AllSPFRouters ([Link]) address,
as shown in step 3.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

OSPF CONFIGURATION

The configuration process for OSPF resides mostly under the OSPF process, but some OSPF options
go directly on the interface configuration submode. The command router ospf process-id defines
and initializes the OSPF process. The OSPF process ID is locally significant but is generally kept the
same for operational consistency. OSPF is enabled on an interface using two methods:

• An OSPF network statement


• Interface-specific configuration

OSPF Network Statement

The OSPF network statement identifies the interfaces that the OSPF process will use and the area
that those interfaces participate in. The network statements match against the primary IPv4 address
and netmask associated with an interface.

A common misconception is that the network statement advertises the networks into OSPF; in
reality, though, the network statement is selecting and enabling OSPF on the interface. The
interface is then advertised in OSPF through the LSA. The network statement uses a wildcard
mask, which allows the configuration to be as specific or vague as necessary. The selection of
interfaces within the OSPF process is accomplished by using the command network ip-address
wildcard-mask area area-id.

The concept is similar to the configuration of Enhanced Interior Gateway Routing Protocol (EIGRP),
except that the OSPF area is specified. If the IP address for an interface matches two network
statements with different areas, the most explicit network statement (that is, the longest match)
preempts the other network statements for area allocation.

The connected network for the OSPF-enabled interface is added to the OSPF LSDB under the
corresponding OSPF area in which the interface participates. Secondary connected networks are
added to the LSDB only if the secondary IP address matches a network statement associated with
the same area.

router ospf 1
network [Link] [Link] area 0
network [Link] [Link] area 0
network [Link] [Link] area 0
network [Link] [Link] area 0

Interface-Specific Configuration

The second method for enabling OSPF on an interface for IOS is to configure it specifically on an
interface with the command ip ospf process-id area area-id [secondaries none]. This method also
adds secondary connected networks to the LSDB unless the secondaries none option is used.

This method provides explicit control for enabling OSPF; however, the configuration is not
centralized and increases in complexity as the number of interfaces on the routers increases. If a

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

hybrid configuration exists on a router, interface-specific settings take precedence over the network
statement with the assignment of the areas.

interface GigabitEthernet 0/0


ip address [Link] [Link]
ip ospf 1 area

PASSIVE INTERFACES
Enabling an interface with OSPF is the quickest way to advertise a network segment to other
OSPF routers.

However, it might be easy for someone to plug in an unauthorized OSPF router on an OSPF-enabled
network segment and introduce false routes, thus causing havoc in the network.

Making the network interface passive still adds the network segment into the LSDB but prohibits the
interface from forming OSPF adjacencies.

A passive interface does not send out OSPF hellos and does not process any received OSPF packets.

The command passive interface-id under the OSPF process makes the interface passive, and the
command passive interface default makes all interfaces passive. To allow for an interface to process
OSPF packets, the command no passive interface-id is used.

REQUIREMENTS FOR NEIGHBOR ADJACENCY

The following list of requirements must be met for an OSPF neighborship to be formed:

• RIDs must be unique between the two devices. They should be unique for the entire OSPF
routing domain to prevent errors.
• The interfaces must share a common subnet. OSPF uses the interface’s primary IP address
when sending out OSPF hellos. The network mask (netmask) in the hello packet is used to
extract the network ID of the hello packet.
• The MTUs (maximum transmission units) on the interfaces must match. The OSPF protocol
does not support fragmentation, so the MTUs on the interfaces should match.
• The area ID must match for the segment.
• The DR enablement must match for the segment.
• OSPF hello and dead timers must match for the segment.
• Authentication type and credentials (if any) must match for the segment.
• Area type flags must match for the segment (for example, Stub, NSSA). (These are not
discussed in this book.)

Example: Configuring OSPF

! OSPF is enabled with a single command, and the passive interface is


! set individually
R1# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

R1(config)# interface Loopback0


R1(config-if)# ip address [Link] [Link]
R1(config-if)# interface GigabitEthernet0/1
R1(config-if)# ip address [Link] [Link]
R1(config-if)# interface GigabitEthernet0/2
R1(config-if)# ip address [Link] [Link]
R1(config-if)#
R1(config-if)# router ospf 1
R1(config-router)# router-id [Link]
R1(config-router)# passive-interface GigabitEthernet0/2
R1(config-router)# network [Link] [Link] area 0

A. Confirmation of Interfaces

It is a good practice to verify that the correct interfaces are running OSPF after making changes to
the OSPF configuration. The command show ip ospf interface [brief | interface-id] displays the
OSPF-enabled interfaces.

R1# show ip ospf interface


! Output omitted for brevity
Loopback0 is up, line protocol is up
Internet Address [Link]/32, Area 0, Attached via Network Statement
Process ID 1, Router ID [Link], Network Type LOOPBACK, Cost: 1
Topology-MTID Cost Disabled Shutdown Topology Name
0 1 no no Base
Loopback interface is treated as a stub Host
GigabitEthernet0/1 is up, line protocol is up
Internet Address [Link]/24, Area 0, Attached via Network Statement
Process ID 1, Router ID [Link], Network Type BROADCAST, Cost: 1
Topology-MTID Cost Disabled Shutdown Topology Name
0 1 no no Bas
Transmit Delay is 1 sec, State DROTHER, Priority 1
Designated Router (ID) [Link], Interface address [Link]
Backup Designated router (ID) [Link], Interface address [Link]
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
..
Neighbor Count is 3, Adjacent neighbor count is 2
Adjacent with neighbor [Link] (Backup Designated Router)
Adjacent with neighbor [Link] (Designated Router)
Suppress hello for 0 neighbor(s)

R1# show ip ospf interface brief


Interface PID Area IP Address/Mask Cost State Nbrs F/C
Lo0 1 0 [Link]/32 1 LOOP 0/0
Gi0/2 1 0 [Link]/24 1 DR 0/0
Gi0/1 1 0 [Link]/24 1 DROTH 2/3

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

OSPF Interface Columns

Field Description
Interface Interfaces with OSPF enabled
PID The OSPF process ID associated with this interface
Area The area that this interface is associated with
IP
The IP address and subnet mask for the interface
Address/Mask
Cost The cost metric assigned to an interface that is used to calculate a path metric
State The current interface state, which could be DR, BDR, DROTHER, LOOP, or Down
Nbrs F The number of neighbor OSPF routers for a segment that are fully adjacent
The number of neighbor OSPF routers for a segment that have been detected and
Nbrs C
are in a 2-Way state

The DROTHER is a router on the DR-enabled segment that is not the DR or the BDR; it is simply the
other router. DROTHERs do not establish full adjacency with other DROTHERs.

Verification of OSPF Neighbor Adjacencies


The command show ip ospf neighbor [detail] provides the OSPF neighbor table.

R1# show ip ospf neighbor


Neighbor ID Pri State Dead Time Address Interface
[Link] 1 2WAY/DROTHER 00:00:37 [Link] GigabitEthernet0/1
[Link] 1 FULL/BDR 00:00:35 [Link] GigabitEthernet0/1
[Link] 1 FULL/DR 00:00:33 [Link] GigabitEthernet0/1

OSPF Neighbor State Fields


Field Description
Neighbor
The router ID (RID) of the neighboring router.
ID
PRI The priority for the neighbor’s interface, which is used for DR/BDR elections.

State
The second field is the DR, BDR, or DROTHER role if the interface requires a DR. For
non-DR network links, the second field shows just a hyphen (-).
Dead Time The time left until the router is declared unreachable.
Address The primary IP address for the OSPF neighbor.
Interface The local interface to which the OSPF neighbor is attached.

Verification of OSPF Routes

The next step is to verify the OSPF routes installed in the IP routing table. OSPF routes that install
into the Routing Information Base (RIB) are shown with the command show ip route ospf.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

R1# show ip route ospf


! Output omitted for brevity
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
Gateway of last resort is not set
[Link]/8 is variably subnetted, 7 subnets, 2 masks
O [Link]/24 [110/2] via [Link], 00:35:03, GigabitEthernet0/1
O [Link]/24 [110/2] via [Link], 00:35:03, GigabitEthernet0/1
O [Link]/24 [110/2] via [Link], 00:35:03, GigabitEthernet0/1
[Link]/32 is subnetted, 1 subnets
O [Link] [110/2] via [Link], 00:35:03, GigabitEthernet0/1
[Link]/32 is subnetted, 1 subnets
O [Link] [110/2] via [Link], 00:35:03, GigabitEthernet0/1
[Link]/32 is subnetted, 1 subnets
O [Link] [110/2] via [Link], 00:35:03, GigabitEthernet0/1

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

DAY#3 OSPF
ADVANCE OSPF
OSPF Networks Types

1. Broadcast
- This type of Network is by default enabled on every Ethernet interfaces
- Elects DR/BDR
- Uses Multicast [Link]
- Allows more than 2 routers on a link
- Timers: Hello = 10sec, Dead = 40sec

2. Point-to-Point
- Default for Serial and Tunnel interfaces
- Do not Elects DR/BDR
- Uses Multicast [Link]
- Only 2 routers allowed on a link
- Timers: Hello = 10sec, Dead = 40sec

3. Point-to-Multipoint Broadcast
- Do not Elects DR/BDR
- Multicast [Link]
- Allows more than 2 routers on a link
- Timers: Hello = 30sec, Dead = 120sec
- Automatic neighbor discovery so no need to configure OSPF neighbors yourself.
- No DR/BDR election since OSPF sees the network as a collection of point-to-point
links.
- Only a single IP subnet is used in the topology below.
- Make sure your frame-relay network is configured with the broadcast keyword.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

4. Point-to-Multipoint Non-Broadcast
- Do not Elects DR/BDR
- Uses Unicast (neighbor statements)
- Allows more than 2 routers on a link
- Timers: Hello = 30sec, Dead = 120sec
- No Automatic neighbor discovery so you need to configure OSPF neighbors yourself!
- No DR/BDR election since OSPF sees the network as a collection of point-to-point
links.
- Only a single IP subnet is used in the topology above.

5. Non-Broadcast
- DR/BDR
- Timers: Hello = 30sec, Dead = 120sec
- Non-broadcast network type assume you are running a multi-access network.
- Couple of key things to remember here:
• Multi-access means we have to select a DR and BDR.
• Non-broadcast means that OSPF expects us to configure neighbors ourselves

6. Loopback
- Default enabled for loopback interfaces
- When used in OSPF, /32 is considered always
- To override this limitation, set network type to “point-to-point”

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

Types of OSPF LSAs

Router LSA (Type 1)


Originated from each router
Flooded within same area
Tells the area about all links participating in the OSPF process within that area

Network LSA (Type 2)


Originated by the DR
If there is no DR, the Type 2 LSA wouldn’t be seen

Network Summary LSA (Type 3)


Originated by ABR router
Carry the destination network prefixes from one area into another

ASBR Summary (Type 4)

Tells all the other areas about the ASBR


Tell all the other areas “to get to this Router-ID(ASBR) go through Me(ABR)”

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

External LSA (Type 5)


Originated by an ASBR
Flooded throughout OSPF domain, except Stubby areas
Consist of Network prefix/subnet-mask of external network (ex. RIP, EIGRP..)

NSSA External LSA (Type 7)


Originated by an ASBR
Exist only in Not-So-Stubby-Area (NSSA)
Are Not flooded outside the area they were originated
Example: Allows LSA Types: 1, 2, 3, 7 ( No External Type-5’s )

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

OSPF AREAS TYPES

1. Backbone Area (Area 0):


• The central area that interconnects other OSPF areas.

2. Standard Area (Areas 1 to [Link]):


• Regular areas that can carry all OSPF LSA types.

3. Stub Area:
• Definition: A stub area is designed to block external route advertisements, reducing the size
of the OSPF database.
• Allowed LSAs: Types 1, 2, 3, and a summary default route (no External Type-5 LSAs).
• Default Summary Route:
o An ABR injects a default summary LSA (prefix: [Link]/0) into the stub area.
o This route allows devices to forward unknown traffic via the ABR.
• Configuration:
router ospf 1
area 100 stub

4. Totally Stubby Area:


• Allowed LSAs: Types 1, 2, and a summary default route.
o Blocks Type 3, Type 5 LSAs, and ASBR functionality.
• Configuration:
router ospf 1
area 100 stub no-summary

5. Not-So-Stubby Area (NSSA):


• Purpose: Allows stub areas to carry external routes (learned via protocols like RIP, EIGRP, or
BGP).
• Allowed LSAs: Types 1, 2, 3, and 7 (no Type-5 LSAs).
• NSSA Configuration:
router ospf 1
area 100 nssa

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

NSSA Attributes:
• N-bit and E-bit: Reflect an interface's external LSA flooding capability.
o N-bit (NSSA support): Should be 1 in Hello messages.
o E-bit (External routing capability): Should be 0.
o Mismatched Options fields can lead to adjacency failures.

Type 7 to Type 5 Translation (P-bit):


• P-bit = 0: NSSA ABR does not translate Type 7 LSAs into Type 5 LSAs.
o This occurs when the NSSA ASBR is also the NSSA ABR.
• P-bit = 1: NSSA ABR translates Type 7 LSAs into Type 5 LSAs.
o If there are multiple NSSA ABRs, the one with the highest router ID performs the
translation.

Command to View NSSA External LSAs:


show ip ospf database nssa-external

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

More Details on E, N, P bits:

E-bit (External Routing Capability)


• Purpose: Indicates whether an area supports external LSAs (Type 5).
• Behavior:
o If E-bit = 1, the area supports external routes and allows Type 5 LSAs (e.g., standard
areas).
o If E-bit = 0, external routes are not allowed (e.g., stub areas, totally stubby areas, or
NSSA).
• Usage in Adjacency Formation:
o Routers exchange Hello packets with the E-bit set.
o If E-bit mismatches between neighbors in the same area, OSPF adjacency fails.

N-bit (NSSA Support)


• Purpose: Indicates whether the router supports NSSA functionality.
• Behavior:
o Set to 1 in Hello packets for interfaces in NSSA areas.
o The N-bit must match between neighboring routers in NSSA areas.
o If a router does not support NSSA (older implementation), it cannot form adjacency
with routers that set the N-bit.

P-bit (Propagate Bit for Type 7 to Type 5 LSA Translation)


• Purpose: Controls whether an NSSA ABR translates a Type 7 LSA (used within NSSA areas)
into a Type 5 LSA (used in the backbone or other OSPF areas).
• Behavior:
o P-bit = 0:
▪ Type 7 LSAs are not translated into Type 5 LSAs.
▪ This happens when the NSSA ASBR is also the NSSA ABR, meaning the ASBR
injects external routes but does not propagate them outside the NSSA.
o P-bit = 1:
▪ Type 7 LSAs are translated into Type 5 LSAs by the NSSA ABR.
▪ This allows external routes to propagate outside the NSSA into the backbone
and other areas.
▪ If there are multiple NSSA ABRs, the one with the highest router ID performs
the translation.

Comparison of E-bit, N-bit, and P-bit


Bit Area Types Value Explanation
E- Standard Areas, 1: External routes allowed0: Controls the area’s capability to handle
bit Stub Areas No external routes external Type 5 LSAs.
N- 1: NSSA supported0: NSSA Ensures compatibility with NSSA functionality
NSSA Areas
bit not supported during adjacency formation.
P- 1: Translate Type 7 to Type Determines whether Type 7 LSAs are
NSSA ABRs
bit 50: Do not translate propagated as Type 5 LSAs outside the NSSA.

Practical Scenarios and Implications


1. E-bit in Stub Areas:
o E-bit is set to 0 in stub and totally stubby areas because these areas do not support
Type 5 external LSAs.
2. N-bit in NSSA Areas:

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

o N-bit must be set to 1 in NSSA areas. Any mismatch of the N-bit in the Hello packets
causes adjacency formation to fail.
3. P-bit for NSSA ABRs:
o When multiple NSSA ABRs exist, only the ABR with the highest router ID performs
Type 7 to Type 5 translation if P-bit = 1.
o If P-bit = 0, the translation does not occur, keeping the Type 7 LSAs within the NSSA.

Example Commands for Verification


1. Check E-bit Status:
show ip ospf database router <router-id>

2. Verify N-bit in Hello Packets:


debug ip ospf hello

3. Verify Type 7 to Type 5 Translation (P-bit):


show ip ospf database nssa-external

Area Restriction

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

Normal None
Stub No Type 5 AS-external LSA allowed
Totally Stub No Type 3, 4 or 5 LSAs allowed except the default summary route
No Type 5 AS-external LSAs allowed, but Type 7 LSAs that convert to Type 5 at the NSSA ABR
NSSA can traverse
NSSA Totally No Type 3, 4 or 5 LSAs except the default summary route, but Type 7 LSAs that convert to Type
Stub 5 at the NSSA ABR are allowed

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

DAY#4 OSPF
OSPF PATH SELECTION

1. Intra-area
2. Interarea
3. External routes (which involves additional logic not covered in CCNP)

1. Intra-area
Routes advertised via a type 1 LSA for an area are always preferred over type 3 LSAs.
If multiple intra-area routes exist, the path with the lowest total path metric is installed in the OSPF
Routing Information Base (RIB), which is then presented to the router’s global RIB.
If there is a tie in metric, both routes install into the OSPF RIB.

In below diagram,
Best Route: R1–R3–R4
Not preferred: R1–R2–R4 (inter-area)

MUMBAIR1#sh ip rout [Link]


Routing entry for [Link]/32
Known via "ospf 100", distance 110, metric 11, type intra area
Last update from [Link] on Ethernet0/0, 00:16:34 ago
Routing Descriptor Blocks:
* [Link], from [Link], 00:16:34 ago, via Ethernet0/0
Route metric is 11, traffic share count is 1

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

2. Inter-area

The next priority for selecting a path to a network is selection of the path with the lowest total path
metric to the destination.

If there is a tie in metric, both routes install into the OSPF RIB.

All interarea paths for a route must go through Area 0 to be considered.

In below diagram:
R1 uses the path R1–R3–R5–R6 because its total path metric is 35
R1–R2–R4–R6 path NOT preferred, with a metric of 40

MUMBAIR1#sh ip rout [Link]


Routing entry for [Link]/32
Known via "ospf 100", distance 110, metric 21, type inter area
Last update from [Link] on Ethernet0/0, 00:15:23 ago
Routing Descriptor Blocks:
* [Link], from [Link], 00:15:23 ago, via Ethernet0/0
Route metric is 21, traffic share count is 1

Equal-Cost Multipathing
If OSPF identifies multiple paths in the path selection algorithms, those routes are installed into the
routing table as equal-cost multipathing (ECMP) routes.

The default maximum number of ECMP paths is four paths.

The default ECMP setting can be overwritten with the command maximum-paths maximum-paths
under the OSPF process to modify the default setting.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

METRIC: (COST)

Default cost of essential interfaces:

Solution: AUTO-COST REFERENCE-BANDWIDTH

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

>router(config)#
router ospf 1
auto-cost reference-bandwidth 1000 (equals to 1000 Mbps)

New Reference BW = 10^8 X 10^2 = 10^10

OSPF METRIC (cost) = (New Reference BW / Interface BW)

Example:
ROUTER4(config)#int e0/1
ROUTER4(config-if)#ip ospf cost 1

AUTO-COST REFERENCE BANDWITH (Reference 10^10)

Summarization of Routes
Route scalability is a large factor for the IGP routing protocols used by service providers because
there can be thousands of routers running in a network.

Before Summarization:
MUMBAIR6(config-if)#do sh ip rout | i 192.
O IA [Link]/24 [110/20] via [Link], 00:00:17, Ethernet0/0
[Link]/32 is subnetted, 1 subnets
O IA [Link] [110/21] via [Link], 00:00:17, Ethernet0/0
[Link]/32 is subnetted, 1 subnets
O IA [Link] [110/21] via [Link], 00:00:17, Ethernet0/0

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

[Link]/32 is subnetted, 1 subnets


O IA [Link] [110/21] via [Link], 00:00:17, Ethernet0/0

CONFIG:
MUMBAIR2(config)#
interface Loopback24
ip address [Link] [Link]
end
interface Loopback25
ip address [Link] [Link]
end
interface Loopback26
ip address [Link] [Link]
end

MUMBAIR2(config)#
router ospf 100
network [Link] [Link] area 0
network [Link] [Link] area 0
network [Link] [Link] area 0

Summarization is enabled always on ABR only


MUMBAIR4(config)#
router ospf 1
area 0 range [Link] [Link] cost 11

After Summarization:
MUMBAIR6(config-if)#do sh ip rout | begin 192.
O IA [Link]/16 [110/21] via [Link], 00:01:14, Ethernet0/0

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

DAY#5 OSPF
ROUTE FILTERING

Route filtering is a method for selectively identifying routes that are advertised or received from
neighbor routers.

Route filtering may be used to manipulate traffic flows, reduce memory utilization, or improve
security.

Filtering with Summarization

One of the easiest methodologies for filtering routes is to use the not-advertise keyword during
prefix summarization.

Using this keyword prevents creation of any type 3 LSAs for any networks in that range, thus making
the subordinate routes visible only within the area where the route originates.

MUMBAIR4# configure terminal


MUMBAIR4(config-router)# area 0 range [Link] [Link] not-advertise

RESULTS:
MUMBAIR6#show ip route | i 192.
No 192.x.x.x routes found

Area Filtering

Although filtering via summarization is very easy, it is limited in its ability.

if the [Link]/24 network needs to be present in Area 0 but removed in Area 34, it is not possible
to filter the route using summarization.

R2
ip prefix-list PREFIX-FILTER seq 5 deny [Link]/24
ip prefix-list PREFIX-FILTER seq 10 permit [Link]/0 le 32
!
router ospf 1
router-id [Link]
network [Link] [Link] area 12
network [Link] [Link] area 0

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

area 0 filter-list prefix PREFIX-FILTER in

RESULT:
R3# show ip route ospf | begin Gateway
Gateway of last resort is not set

[Link]/8 is variably subnetted, 5 subnets, 2 masks


O IA [Link]/24 [110/2] via [Link], 00:17:39, GigabitEthernet0/1
[Link]/24 is subnetted, 2 subnets
O IA [Link] [110/3] via [Link], 00:16:30, GigabitEthernet0/1
O IA [Link] [110/3] via [Link], 00:16:30, GigabitEthernet0/1

MUMBAIR4(config)#
ip prefix-list PREFIX-FILTER seq 5 deny [Link]/32
ip prefix-list PREFIX-FILTER seq 10 permit [Link]/16
router ospf 1
area 40 filter-list prefix PREFIX-FILTER in

MUMBAIR6# sh ip rout | i 192.168.24.


MUMBAIR6# -> NO ROUTES FOUND FOR 192.168.24.

Local OSPF Filtering


In some scenarios, routes need to be removed only on specific routers in an area.

OSPF is a link-state protocol that requires all routers in the same area to maintain an identical copy
of the LSDB for that area.

A route can exist in the OSPF LSDB, but it could be prevented from being installed in the local RIB.
This is accomplished by using a Distribute List.

MUMBAIR4(config)#
MUMBAIR4(config)#ip access-list standard ACL-OSPF
MUMBAIR4(config-std-nacl)#10 deny [Link] [Link]
MUMBAIR4(config-std-nacl)#20 permit any
router ospf 1
distribute-list ACL-OSPF in

MUMBAIR6# sh ip rout | i 192.168.24


[Link]/32 is subnetted, 1 subnets
O IA [Link] [110/21] via [Link], 00:09:02, Ethernet0/0
MUMBAIR6#
Route will be present but no reachability

MUMBAIR6#ping [Link]
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
UUUUU

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

DEFAULT ROUTE ORIGINATE


A common situation is where you have some internet-facing routers running BGP with some ISP,
probably receiving full routes, and you want to send a default route to the internal routers, so they
will use the "nearest" router (in terms of metric) to send traffic destined outside the AS.

To generate a default external route into an Open Shortest Path First (OSPF) routing domain. The
topology is something like this:

R1(config)#router ospf 1
R1(config-router)#default-information originate ?

If you use the default-information originate you can advertise a default route in OSPF. OSPF won’t
advertise a default route if you don’t already have it in your routing table.

If you add the always keyword it will advertise the default route even if you don’t have it in the
routing table. Once you have advertised the default route it will look like this on other routers:

MUMBAIR6#show ip ospf database | begin Type-5


Type-5 AS External Link States

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

Link ID ADV Router Age Seq# Checksum Tag


[Link] [Link] 59 0x80000001 0x008D64 1

MUMBAIR6#show ip route ospf


O*E2 [Link]/0 [110/1] via [Link], 00:00:24, FastEthernet0/0

EXAMPLE:
MUMBAIR6
hostname MUMBAIR6
!
interface FastEthernet0/1
ip address [Link] [Link]
!
router ospf 1
network [Link]
default-information originate always
!
end

VIRTUAL LINKS
All areas in an Open Shortest Path First (OSPF) autonomous system must be physically
connected to the backbone area (Area 0). In some cases, where this is not possible, you can
use a virtual link to connect to the backbone through a non-backbone area.

You can also use virtual links to connect two parts of a partitioned backbone through a non-
backbone area.

The area through which you configure the virtual link, known as a transit area, must have
full routing information.

The transit area cannot be a stub area.

router ospf 1
area 1 virtual-link [Link]

router ospf 1
area 1 virtual-link [Link]

show ip ospf virtual-links

Router3.3.3.3#show ip ospf neighbor


Neighbor ID Pri State Dead Time Address Interface
[Link] 1 FULL/ - 00:00:38 [Link] ATM2/0.20

Router3.3.3.3#show ip ospf virtual-links


Virtual Link OSPF_VL3 to router [Link] is up
Run as demand circuit

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

DoNotAge LSA allowed.


Transit area 1, via interface ATM2/0.20, Cost of using 65
Transmit Delay is 1 sec, State POINT_TO_POINT,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:01
Adjacency State FULL (Hello suppressed)
Index 1/2, retransmission queue length 0, number of retransmission 0
First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
Last retransmission scan length is 0, maximum is 0
Last retransmission scan time is 0 msec, maximum is 0 msec

Notice that adjacencies over virtual links are not displayed in the show ip ospf neighbor
command output. The only way to see them is to look at the router LSA and observe debug
commands as the adjacency comes up, or issue the show ip ospf virtual-links command.

======OSPF TOPIC ENDS HERE========

OSPF QUIZ#
1. OSPF uses the protocol number ___________ for its inter-router communication.

87

88

89

90

2. OSPF uses ___________ packet types for inter-router communication.

three

four

five

six

seven

3. What destination addresses does OSPF use, when feasible? (Choose two.)

IP address [Link]

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

IP address [Link]

IP address [Link]

MAC address 01:00:5E:00:00:05

MAC address 01:00:5E:00:00:0A

4. True or false: OSPF is only enabled on a router interface by using the command network ip-
address wildcard-mask area area-id under the OSPF router process.

True

False

5. True or false: The OSPF process ID must match for routers to establish a neighbor adjacency.

True

False

6. True or false: A default route advertised with the command default information-originate in OSPF
will always appear as an OSPF inter-area route.

True

False

7. True or false: The router with the highest IP address is the designated router when using a serial
point-to-point link.

True

False

8. OSPF automatically assigns a link cost to an interface based on a reference bandwidth of


___________.

100 Mbps

1 Gbps

10 Gbps

40 Gbps

9. What command is configured to prevent a router from becoming the designated router for a
network segment?

The interface command ip ospf priority 0

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

The interface command ip ospf priority 255

The command dr-disable interface-id under the OSPF process

The command passive interface interface-id under the OSPF process

The command dr-priority interface-id 255 under the OSPF process

10. What is the advertised network for the loopback interface with IP address [Link]/30?

[Link]/24

[Link]/30

[Link]/32

[Link]/24

Answers to the “Do I Know This Already?” quiz:

1C

2C

3 A, D

4B

5B

6B

7B

8A

9A

10 C

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

BGP (BORDER GATEWAY PROTOCOL)


RFC (REQUEST FOR COMMENT) 1654 defines Border Gateway Protocol (BGP) as an EGP standardized
path vector routing protocol that provides scalability, flexibility, and network stability.

When BGP was created, the primary design consideration was for IPv4 inter-organization
connectivity on public networks like the Internet and on private dedicated networks.

BGP is the only protocol used to exchange networks on the Internet, which has more than 780,000
IPv4 routes and continues to grow.

Due to the large size of the BGP tables, BGP does not advertise incremental updates or refresh
network advertisements as OSPF and IS-IS do.

BGP Key Points


BGP (Border Gateway Protocol) - Technical Points
1. Definition:
o BGP stands for Border Gateway Protocol and is a dynamic routing protocol.
o It is referred to as the protocol of the Internet because it is used to route traffic
between Autonomous Systems (AS).
2. Protocol Type:
o BGP is an Exterior Gateway Protocol (EGP), the only EGP widely used today.
o Operates as a Path-Vector Routing Protocol, maintaining an AS-by-AS path to
destinations.
o Functions as a policy-based routing protocol, allowing administrators to define
routing policies.
3. Transport Layer:
o BGP operates at Layer 4 (Transport Layer) and uses TCP port 179 for
communication.
o It ensures reliable transmission of routing information.
4. Loop Prevention:
o Prevents routing loops by using AS numbers (AS_PATH attribute) for EBGP to track
the route path and for IBGP you can avoid loop using Full mesh, Router reflector
and BGP confederation
5. Neighbor Relationships:
o Manual configuration is required to define neighbors, as BGP lacks an auto-
discovery mechanism.
o eBGP (External BGP): Neighbors belong to different ASes and must be directly
connected.
o iBGP (Internal BGP): Neighbors belong to the same AS and do not require direct
connectivity.
6. Administrative Distance:
o eBGP: 20 (high priority).
o iBGP: 200 (lower priority than eBGP).
7. Routing Information:
o BGP uses incremental and triggered updates, minimizing unnecessary routing
overhead.
o Updates are sent as unicast to manually configured neighbors.
8. Addressing and Summarization:
o BGP is classless, supporting VLSM, FLSM, and CIDR.
o Allows both manual and automatic summarization of routes.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

9. Scalability and Reliability:


o Designed for scalability to handle large, complex networks.
o Prioritizes reliability over speed, making it ideal for Internet routing.
10. Load Balancing:
• BGP does not perform load balancing by default and typically uses only one best path per
network.
• It can be configured for Multipath (using multiple paths) in specific scenarios.
11. Flavors:
• eBGP: For routing between different Autonomous Systems.
• iBGP: For routing within the same Autonomous System.
• Both flavors follow different rules for establishing neighbor relationships and propagating
updates.
12. Routing Policy and Attributes:
• BGP allows the implementation of advanced routing policies using attributes like:
o AS_PATH: Tracks the ASes traversed.
o NEXT_HOP: Identifies the next-hop router.
o LOCAL_PREF: Indicates the preferred path within an AS.
o MED (Multi-Exit Discriminator): Used for path selection between ASes.
13. Convergence and Updates:
• Convergence in BGP can be slow, as it prioritizes stability over rapid changes.
• Uses keepalive messages to maintain neighbor relationships.
14. Security:
• Lacks inherent security mechanisms, making it susceptible to attacks like BGP hijacking.
• Can be secured with MD5 authentication or BGP Route Filtering.
15. Use Cases:
• Internet Routing: Exchanges routing information across ISPs.
• Enterprise Networks: Connects different branches or connects enterprises to ISPs.
• Traffic Engineering: Allows fine-grained control over routing paths using policies.
16. Drawbacks:
• BGP is complex to configure and requires careful planning and maintenance.
• Does not support auto-discovery or periodic updates.
17. Key Features:
• Guarantees loop-free routing through AS_PATH tracking.
• Divides updates into incremental changes, minimizing bandwidth usage.
• Uses multihoming for redundancy and reliability.

BGP itself is an application (layer 7).

BGP’s purpose is for routing (layer 3); exchanging layer 3 information. It’s a routing protocol.

BGP uses TCP port 179 (layer 4: transport), but the application is what does the processing of the
logic (routing policy).

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

Autonomous System Numbers


An organization requiring connectivity to the Internet must obtain an autonomous system number
(ASN).

ASNs were originally 2 bytes (16-bit range), which made 65,535 ASNs possible.

Due to exhaustion, RFC 4893 expanded the ASN field to accommodate 4 bytes (32-bit range).

This allows for 4,294,967,295 unique ASNs, providing quite an increase from the original 65,535
ASNs.

An autonomous system (AS) is a group of IP networks operated by one or more network


operator(s) that has a single and clearly defined external routing policy.

Exterior routing protocols are used to exchange routing information between Autonomous
Systems.

Who Allots ASN To Organization?


AS numbers are assigned in blocks by Internet Assigned Numbers Authority (IANA) to regional
Internet registries (RIRs).

The appropriate RIR then assigns ASNs to entities within its designated area from the block assigned
by IANA.

Entities wishing to receive an ASN must complete the application process of their RIR, LIR or
upstream service provider and be approved before being assigned an ASN.

Current IANA ASN assignments to RIRs can be found on the IANA website.

There are other sources for more specific data: [Link]

Assignment of ASN in blocks: [Link]

What is ASN?

A public AS has a globally unique number, an AS Number, associated with it. This number is used
both in the exchange of exterior routing information (between neighboring Autonomous Systems)
and as an identifier of the AS itself.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

There are two types of AS Numbers:

• Public AS Numbers
• Private AS Numbers

ASN TABLE:

ASN FAQs
When should an AS be created?

An AS needs to be created if a network connects to more than one AS with different routing policies.

When is a Public AS Number required?

A Public AS Number is required only when an AS is exchanging routing information with other
Autonomous Systems on the public Internet. That is, all routes originating from an AS is visible on
the Internet.

Is my organization eligible for a Public AS Number?

Your organization is eligible for an AS Number assignment if:

• it is currently multihomed, or
• it has the need to interconnect with another AS

When can I use a Private AS Number?

A Private AS Number should be used if an AS is only required to communicate via Border Gateway
Protocol with a single provider. As the routing policy between the AS and the provider will not be
visible in the Internet, a Private AS Number can be used for this purpose.

IANA has reserved, for Private Use, a contiguous block of 1023 Autonomous System numbers from
the “16-bit Autonomous System Numbers” registry, namely 64512 – 65534 inclusive.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

IANA has also reserved, for Private Use, a contiguous block of 94,967,295 Autonomous System
numbers from the “32-bit Autonomous System Numbers” registry, namely 4200000000 –
4294967294 inclusive.

I plan to change my upstream providers. Can I take my AS Number with me?

This depends on how you received that AS Number. If you got it directly from APNIC, then it is
portable and you can take it with you to whichever providers you choose.

However, if you got your AS Number from a Local Internet Registry (LIR), you can only use it while
you continue to receive connectivity from the LIR. That is, if you decide to no longer use the LIR as
one of your upstream providers, then you have to return the AS Number.

It is imperative to use only the ASN assigned by IANA, the ASN assigned by your service provider,
or a private ASN. Using another organization’s ASN without permission could result in traffic loss
and cause havoc on the Internet.

4 bytes ASN (32-bit range)


4-byte ASNs provide 232 or 4,294,967,296 autonomous system numbers ranging from 0 to
4294967295.

The first thing to notice about these numbers is that they include all of the older 2-byte ASNs, 0
through 65535

That greatly helps with interoperability between autonomous systems using 2-byte ASNs and those
using 4-byte ASNs.

A 4-byte ASN between 0 and 65535 is called a mappable ASN, because it can be represented in just 2
bytes; the first 16 bits are in every case all zeroes.

3-Ways of Representing 4-byte ASN (32bit):

1. asplain is a simple decimal representation of the ASN, from 0 to 4294967295.


2. asdot+ breaks the number up into low-order and high-order 16-bit values, separated by a
dot. All of the older 2-byte ASNs can be represented in the low-order value, with the high-
order value set to 0. So for example, 65535 is 0.65535. One more than that, 65536, is
outside the value that can be represented in the low-order range alone, and is therefore
represented as 1.0. 65537 would be 1.1, 65680 is 1.144, and so on.
3. asdot is a mixture of asplain and asdot+. Any ASN in the 2-byte range of 0 – 65535 is written
in asplain (so 65535 is written “65535”) and any ASN above that range is written in asdot+
(so 65536 is written “1.0”).

ASPLAIN to ASDOT+ Converter: [Link]

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

ASN Allocation Policies

All five of the RIRs (Regional Internet Registries) (AfriNIC, APNIC, ARIN, LACNIC, and RIPE NCC) have
the same assignment policies for 4-byte ASNs:

· 4-byte ASNs have been available since 1 January 2007. The default assignment, if you request an
ASN, is to give you a 2-byte ASN and only assign a 4-byte ASN if you specifically request it.

· Beginning on 1 January 2009 that policy reverses: A 4-byte ASN will be the default. You can still
get a 2-byte ASN, but only if you specifically request it.

· A year later, on 1 January 2010, all ASN assignments will be 4-byte. The ASN you receive might
be of the form [Link] (where the high-order 16 bits are all 0 and the low-order 16 bits are not), but the
RIRs will make no distinction between those numbers and any other 4-byte ASN. And although it
won't effect your network in any way, the 16-bit ASN you've had maybe for years will, in the eyes of
the RIRs, be a mapable 32-bit ASN. For instance, Level3 Communications' AS3356 becomes in the
eyes of the RIRs, at the beginning of 2010, 0.3356.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

BGP Peering/Neighbor Formation States:

1️ IDLE: Router is searching for a neighbor


• The BGP process is administratively down or has been reset.
• The router is waiting for the next retry attempt before initiating a connection.
• BGP is newly configured, and the router has yet to start a TCP connection.
• If an existing BGP session is reset, it moves back to the Idle state before retrying.

2️ CONNECT: Router is initiating a TCP session with the peer


• The router initiates a TCP connection with the remote peer.
• The BGP process is waiting for a successful TCP three-way handshake.
• If the connection is successful, it transitions to the OpenSent state.
• If the TCP session fails, BGP moves to the Active state and retries.
• If a BGP reset occurs, it moves back to the Idle state.

3️ ACTIVE: Router is retrying a failed TCP session


• The previous TCP connection attempt failed, and the Connect-Retry timer is running.
• The router listens for an incoming connection or attempts to establish a new TCP session.
• If the connection is successful, it moves to the OpenSent state.
• If another failure occurs, the router retries until the Connect-Retry timer expires.
• If a BGP reset occurs, it moves back to the Idle state.
• Frequent transitions between Active and Idle indicate connectivity issues.

4️ OPENSENT: TCP session is established, Open message is sent


• The TCP connection is established, and the router has sent a BGP Open message.
• The router is waiting for an Open message from the peer.
• If a valid Open message is received, it moves to the OpenConfirm state.
• If an invalid message is received, or there is a capability mismatch, a Notification message
is sent, and the router moves back to Idle.

5 OPENCONFIRM: Waiting for Keepalive message


• Both routers have sent and received Open messages, confirming the session parameters.
• The router sends Keepalive messages and expects a Keepalive response from the peer.
• If a valid Keepalive message is received, it moves to the Established state.
• If a Notification message or an error occurs, it transitions back to Idle.

6️. ESTABLISHED: BGP peering is fully operational


• The BGP neighbor relationship is complete, and peers can exchange routing updates.
• Update messages are sent and received to advertise networks.
• BGP maintains the session using Keepalive messages.
• Each received Keepalive or Update message resets the Hold Timer to prevent session
timeout.
• If a Notification message is received (due to errors or policy changes), the session resets
and moves back to Idle.

Key Notes:
✔ IDLE → CONNECT → ACTIVE → OPENSENT → OPENCONFIRM → ESTABLISHED (Ideal flow).
✔ Frequent transitions between IDLE ↔ ACTIVE indicate a TCP connectivity issue.
✔ Notification messages cause the session to reset to IDLE.
✔ Keepalive messages ensure session stability, and missing Keepalives may cause session drops.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

BGP MESSAGE TYPE


4 BGP Message types = Open, Update, Keepalive, Notifications

1️. Open Message


• Sent immediately after establishing a TCP connection with a BGP peer.
• Used to initiate a BGP session and includes key parameters:
o Autonomous System (AS) Number – Identifies the originating AS.
o BGP Version – Typically version 4 (current standard).
o Router ID – A unique identifier (usually the highest IP or manually set).
o Hold Time – Maximum time (default 180s) before considering the peer down if no
Keepalives are received.
o Optional Parameters – Such as capabilities like Route Refresh or Multiprotocol
extensions (MP-BGP).
• If both peers agree on the parameters, the session moves to OpenConfirm; otherwise, a
Notification message is sent, and the session is terminated.

2️. Update Message


• Used to exchange routing information between BGP peers.
• Contains:
o New route announcements (NLRI – Network Layer Reachability Information).
o Withdrawn routes (previously advertised but no longer valid).
o Path attributes (e.g., AS Path, Next-Hop, MED, Local Preference).

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

• The core function of BGP – controls how prefixes are advertised and withdrawn across the
internet or private networks.

3️. Keepalive Message


• Sent periodically to maintain an active BGP session.
• By default, sent every 60 seconds (1/3 of the Hold Time).
• If no Keepalives, Updates, or Notifications are received within the Hold Time, the BGP
session is declared down.
• Contains only a message header (no additional data).
• Helps in fast failure detection without exchanging unnecessary routing data.

4️. Notification Message


• Sent when a critical error occurs that requires terminating the BGP session.
• After sending this message, the router closes the BGP connection.
• Common reasons for sending a Notification:
o Hold Timer Expired – No Keepalive received before Hold Time expires.
o Neighbor Capabilities Mismatch – Peers do not support the same BGP features.
o Malformed or Invalid Updates – Incorrect attributes or corruption in Update
messages.
o Authentication Failure – If MD5 authentication is enabled and fails.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

BGP LAB#1:

CONFIGURATIONS:
R26(config)#
hostname ATT26
int e0/2
ip add [Link] [Link]
no shut

int loopback 1
ip add [Link] [Link]
no shut

router bgp 65000


neighbor [Link] remote-as 65001
network [Link] mask [Link]

R27(config)#
hostname VODAFONER27
int e0/2
ip add [Link] [Link]
no shut
int e0/1
ip add [Link] [Link]
no shut

int loopback 1
ip add [Link] [Link]
no shut

router bgp 65001


neighbor [Link] remote-as 65000
network [Link] mask [Link]

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

BGP NEIGHBOR TABLE:


ATT26#sh ip bgp summary
BGP router identifier [Link], local AS number 65000
BGP table version is 1, main routing table version 1

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


[Link] 4 65001 8 8 3 0 0 00:04:14 1

BGP router identifier The IP address representing this router


Local AS number The local router’s Autonomous System Number
BGP table version Local BGP table increases when the BGP table changes
Main routing table version Last version of BGP database in the main routing table
Neighbor The IP address, used in the neighbor statement
V (Version) The version of BGP this router is running
AS (Autonomous System) The listed neighbor’s Autonomous System Number
MsgRcvd (Message Received) The number of BGP messages received from neighbor
MsgSent (Message Sent) The number of BGP messages sent to this neighbor
TblVer (Table Version) Last version of the BGP table that was sent to neighbor
InQ (In Queue) In Queue input messages in Queue
OutQ (Out Queue) Out Queue Output messages in Queue
Up/Down Time since BGP session was established
State The current state of the BGP session: active, idle etc
PfxRcd (Prefix Received) Number of BGP network entries received from this neighbor

BGP FORWARDING TABLE:


ATT26#show ip bgp
BGP table version is 3, local router ID is [Link]
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

Network Next Hop Metric LocPrf Weight Path


*> [Link]/24 [Link] 0 0 65001 i
*> [Link] [Link] 0 32768 i

BGP table version Local BGP table increases when the BGP table changes
Local router ID The IP address representing this router
Network Learn network with subnet masks
* This is a valid route and that BGP is able to use it
> This entry has been selected as the best path
Next Hop [Link] means that this network originated on this router

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

R1 learn about this network from [Link]


Metric BGP attributes that are used to select the best path
LocPrf BGP attributes that are used to select the best path
Weight BGP attributes that are used to select the best path
Path A sequence of Autonomous Systems in the path from Left to Right
Path i Network was advertised using the network command
Path 2 AS path 2
Path ? Redistributed Networks

Weight = 32768 for LOCAL


Weight = 0 other routes

ROUTING TABLE:

ATT26#show ip route
<!—output omitted--!>

Gateway of last resort is not set

[Link]/24 is subnetted, 1 subnets


B [Link] [20/0] via [Link], 00:15:17
[Link]/24 is variably subnetted, 2 subnets, 2 masks
<!—output omitted--!>

B This route was learned through BGP


[Link]/24 Destination learn network and 24 is subnet mask
20 20 is the Administrative Distance of eBGP protocol
[Link] Next Hop IP Address where to send the traffic
00:15:17 Time since the route was learnt

DEBUG:

debug ip bgp all


debug ip bgp ipv4 unicast updates

VODAFONER27#
*Jun 2 15:25:04.814: BGP: [Link] connection timed out 180187ms (last update) 180000ms
(hold time)
*Jun 2 15:25:04.814: BGP: [Link] went from Established to Closing
*Jun 2 15:25:04.814: %BGP-3-NOTIFICATION: sent to neighbor [Link] 4/0 (hold time
expired) 0 bytes
*Jun 2 15:25:04.814: BGP: ses global [Link] (0xF1B0F408:1) Send NOTIFICATION 4/0 (hold
time expired) 0 bytes
*Jun 2 15:25:04.814: BGP: [Link] local error close after sending NOTIFICATION
*Jun 2 15:25:04.814: %BGP-5-NBR_RESET: Neighbor [Link] reset (BGP Notification sent)
*Jun 2 15:25:04.814: BGP: nbr_topo global [Link] IPv4 Unicast:base (0xF1B0F408:1) NSF
delete stale NSF not active
*Jun 2 15:25:04.815: BGP: [Link] closing

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

*Jun 2 15:25:04.815: BGP: ses global [Link] (0xF1B0F408:1) Session close and reset
neighbor [Link] topostate
*Jun 2 15:25:04.815: BGP: nbr_topo global [Link] IPv4 Unicast:base (0xF1B0F408:1)
Resetting ALL counters.
*Jun 2 15:25:04.815: BGP: [Link] went from Closing to Idle
*Jun 2 15:25:04.815: %BGP-5-ADJCHANGE: neighbor [Link] Down BGP Notification sent
*Jun 2 15:25:04.815: %BGP_SESSION-5-ADJCHANGE: neighbor [Link] IPv4 Unicast topology
base removed from session BGP Notification sent

BGP STATE DOWN:


Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
[Link] 4 65000 0 0 1 0 0 00:03:13 Active
VODAFONER27#

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

BGP ACTIVE AND PASSIVE


• Active Peer (Client): Initiates TCP connection using a random port (>1023).
• Passive Peer (Server): Listens on TCP port 179, does not initiate.
• By default, the peer with the lowest BGP RID initiates the connection.
• Only one TCP session is maintained per neighbor.
• Behavior can be modified to control connection initiation.

Mode Role TCP Behavior Port Used


Active Client Initiates TCP Random (>1023)
Passive Server Listens only Port 179

BGP LOGS:
*Jun 2 15:29:25.144: BGP: [Link] passive open to [Link]
*Jun 2 15:29:25.144: BGP: Fetched peer [Link] from tcb
*Jun 2 15:29:25.144: BGP: [Link] passive went from Idle to Connect

ACTIVE PORT > 1024 and PASSIVE PORT = 179


ATT26(config-if)#do sh ip bgp neig | i hos -> initiated first
Local host: [Link], Local port: 63158
Foreign host: [Link], Foreign port: 179

VODAFONER27#sh ip bgp nei | i host


Local host: [Link], Local port: 179
Foreign host: [Link], Foreign port: 63158

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

CONFIGURATIONS
R1(config)#router bgp 1
R1(config-router)#neighbor [Link] transport connection-mode passive

R2(config)#router bgp 2
R2(config-router)#neighbor [Link] transport connection-mode active

Show tcp brief all

BGP Timers:
• Basic BGP times are Keepalive and Hold-down timer intervals.
• By default, Keepalive timer is 60 seconds.
• By default, hold-down timer is 3 x Keepalive or 180 seconds.
• Failing to receive 3 keepalives in a row will make the hold-down timer reach 180 seconds.
• Neighbor is considered down and routes from this neighbor are flushed.
• To verify current timers, issue the “show ip bgp neighbor” command.
• BGP timers can be changed, both the defaults and on a per-neighbor basis.
• In the OPEN message, BGP routers exchange the hold time they want to use.
• Values of 1 or 2 are illegal, minimum working value for the hold time is 3 seconds.

VODAFONER27#sh ip bgp nei


BGP neighbor is [Link], remote AS 65000, external link
BGP version 4, remote router ID [Link]
BGP state = Established, up for 00:09:25
Last read 00:00:23, last write 00:00:28, hold time is 180, keepalive interval is 60 seconds

CONFIGURATIONS:

R2(config)#router bgp 2
R2(config-router)#timers bgp 50 150
R2(config-router)#neighbor [Link] timers 20 60

R2#clear ip bgp *

After changing the time for neighbor R3 new hold time is 60 and Keepalive is 20 seconds now.

After changing default, timers for all other new hold time is 150 & Keepalive is 50 seconds now.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

BGP Next-Hop-Self:

• RFC 4271 defines the BGP standards and operations.


• NEXT_HOP is a well-known mandatory attribute that specifies the IP address used to reach
advertised destinations in BGP updates.
• iBGP does not modify the NEXT_HOP attribute, leaving it unchanged from the originating
router.
• This can lead to reachability issues if there is no IGP route to the NEXT_HOP address advertised
in the BGP update.
• NEXT_HOP-SELF can be used on route reflectors or edge routers to ensure proper next-hop
reachability within iBGP, especially when routers aren't directly connected to the next hop.

CONFIGURATIONS:

VODAFONER27(config-router)#neighbor [Link] next-hop-self

VODAFONER28#sh ip bgp [Link]


BGP routing table entry for [Link]/24, version 9
Paths: (1 available, best #1, table default)
Not advertised to any peer
Refresh Epoch 1
65000
[Link] from [Link] ([Link])
Origin IGP, metric 0, localpref 100, valid, internal, best
rx pathid: 0, tx pathid: 0x0

VODAFONER28#traceroute [Link]
Type escape sequence to abort.
Tracing the route to [Link]
VRF info: (vrf in name/id, vrf out name/id)
1 [Link] 0 msec 1 msec 0 msec
2

VODAFONER28#sh ip bgp [Link]


BGP routing table entry for [Link]/24, version 10
Paths: (1 available, no best path)
Not advertised to any peer
Refresh Epoch 1
65000

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

[Link] (inaccessible) from [Link] ([Link])


Origin IGP, metric 0, localpref 100, valid, internal
rx pathid: 0, tx pathid: 0
VODAFONER28#

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

BGP Flavors:
There are two flavors of BGP Internal BGP and External BGP.
IBGP (Interior Border Gateway Protocol):
o If the peers are in the same AS called Internal BGP (iBGP).
o Internal BGP (IBGP) is between same Autonomous System Number.
o Routes learned from IBGP peer will not be advertised to other IBGP peers (to avoid loop)
o By default, Internal BGP (IBGP) peers are set with TTL value = 255
o Internal BGP (IBGP) routes have Administrative Distance of 200.
o Next hop remains unchanged when route is advertised to IBGP peer.
o Internal BGP (IBGP) peers do not need to be directly connected.

EBGP (Exterior Border Gateway Protocol):


o If peers are in a different AS called external BGP (eBGP).
o EBGP is peering between two different Autonomous System (AS).
o Routes learned from eBGP peer will be advertised to other peers.
o EBGP peers are set with TTL = 1, means neighbors directly connected.
o External BGP (EBGP) routes have Administrative Distance of 20.
o Next hop changed when it is advertised to EBGP peer by default.
o External BGP (EBGP) the neighbors need to be connected directly.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

BGP Multihop

• EBGP routers use a TTL value of 1 for their BGP packets by default.
• If the BGP neighbor is more than one hop away, the TTL value will decrement to 0 and the
packet will be discarded.
• To solve this, the ebgp-multihop command is used to increase the TTL value.
• The ebgp-multihop command does not apply to iBGP.
• If EBGP is sourced from a loopback interface, multihop is required to allow packet traversal
beyond one hop.
• When using a loopback interface as the BGP source, the update-source command must also be
configured.
• By configuring update-source loopback, the BGP session will remain up, even if the physical link
goes down.
• Update-source can be configured either per neighbor or per peer-group.
• A static route is typically needed to ensure the loopback interface is reachable, but in some
cases, eBGP can work without it by using an IGP route to the loopback.
• Multihop allows BGP peers to establish a session even if they must pass through intermediate
routers.

GNS LAB

1st HOP

2nd HOP

ATT26(config-router)#do sh run | sec bgp


router bgp 65000
neighbor [Link] remote-as 65001
neighbor [Link] ebgp-multihop 2
neighbor [Link] update-source Loopback1
network [Link] mask [Link]

ip route [Link] [Link] [Link]

VODAFONER27(config-router)#do sh run | sec bgp


router bgp 65001
network [Link] mask [Link]
neighbor [Link] remote-as 65001
neighbor [Link] remote-as 65000
neighbor [Link] ebgp-multihop 2
neighbor [Link] update-source Loopback1

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

ip route [Link] [Link] [Link]

BGP UPDATE-SOURCE

In BGP, for a neighbor relationship to be established, the source IP address of the BGP packets sent
by a router must match the neighbor IP address configured on the neighboring router.

• By default, the source IP address is the IP address of the outgoing interface.


• To change the source IP address for BGP packets, the update-source command is used,
allowing you to specify an interface or loopback address as the source IP.

Example: neighbor {ip-addr | group-name} update-source {interface}

PRACTICE TASK: (HOMEWORK)

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

BGP Peer Group:


• BGP router may have many neighbors that require the same BGP policies.
• BGP peer groups are used to simplify configuration and to improve performance.
• Peer group can be used when router has a group of neighbors with the same policies.
• Update is generated once per group rather than for each neighbor.
• BGP peer group requires less CPU resources rather send separately.
• Peer groups saves a lot of time and typing.
• Peer groups make updating more efficient and improve performance

Routers Basic Configurations


R1(config)#interface f1/0 R2(config)#interface f0/0
R1(config-if)#ip add [Link] [Link] R2(config-if)#ip add [Link]
R1(config-if)#no shutdown [Link]
R2(config-if)#no shutdown
R2(config)#interface loopback 2
R2(config-if)#ip add [Link] [Link]
R2(config-if)#no shutdown
R1(config)#interface f0/0 R3(config)#interface f0/0
R1(config-if)#ip add [Link] [Link] R3(config-if)#ip add [Link]
R1(config-if)#no shutdown [Link]
R3(config-if)#no shutdown
R3(config)#interface loopback 3
R3(config-if)#ip add [Link] [Link]
R3(config-if)#no shutdown
R1(config)#int f0/1 R4(config)#interface f0/0
R1(config-if)#ip add [Link] [Link] R4(config-if)#ip add [Link]
R1(config-if)#no shutdown [Link]
R4(config-if)#no shutdown
R4(config)#interface loopback 4
R4(config-if)#ip add [Link] [Link]

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

R4(config-if)#no shutdown
R1(config)#interface loopback 1
R1(config-if)#ip add [Link] [Link]
R1(config-if)#no shutdown

R1 Configuration without Peer Group


R1(config)#router bgp 1
R1(config-router)#neighbor [Link] remote-as 2
R1(config-router)#neighbor [Link] remote-as 3
R1(config-router)#neighbor [Link] remote-as 4
R1(config-router)#neighbor [Link] update-source loopback 1
R1(config-router)#neighbor [Link] update-source loopback 1
R1(config-router)#neighbor [Link] update-source loopback 1
R1(config-router)#neighbor [Link] ebgp-multihop 2
R1(config-router)#neighbor [Link] ebgp-multihop 2
R1(config-router)#neighbor [Link] ebgp-multihop 2

R1 Configuration With Peer Group


R1(config)#router bgp 1
R1(config-router)#neighbor [Link] remote-as 2
R1(config-router)#neighbor [Link] remote-as 3
R1(config-router)#neighbor [Link] remote-as 4

R1(config-router)#neighbor pg1 peer-group


R1(config-router)#neighbor [Link] peer-group pg1
R1(config-router)#neighbor [Link] peer-group pg1
R1(config-router)#neighbor [Link] peer-group pg1

R1(config-router)#neighbor pg1 update-source loopback 1


R1(config-router)#neighbor pg1 ebgp-multihop 2

Looks like eBGP cannot be established between two non-connected peers without having a more specific
route than a default route!

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

BGP Topologies: Full Mesh, Route Reflector, and Confederation [Loop avoidance
mechanism in iBGP]

1. Full Mesh (IBGP)


In a traditional IBGP setup, every router in an AS must be fully meshed with every other IBGP router.

This is required because BGP does not advertise IBGP-learned routes to another IBGP peer (to
prevent loops).

As the number of routers increases, scalability issues arise due to the large number of peer
relationships.

The number of IBGP sessions required follows the formula: n(n−1) \ 2 where n is the number of IBGP
routers.

Example:
If there are 4 IBGP routers, the number of sessions needed:

4(4−1) \ 2 = 6 IBGP sessions

If 100 IBGP routers, then:

100(99) \ 2=4950 IBGP sessions

2. Route Reflector (RR)


Used to reduce the IBGP full-mesh requirement by introducing a hierarchical design.
A Route Reflector (RR) is a central IBGP router that reflects IBGP routes to other IBGP peers.
IBGP routers connecting to the RR are called Route Reflector Clients.
Reduces IBGP session overhead significantly.

Route Advertisement Rules in RR:


From a client to RR → Advertise to all clients and non-clients.
From a non-client to RR → Advertise to clients only (not other non-clients).
Between clients → Allowed (via RR).

Advantages of Route Reflector:


✅ Scalability – Reduces IBGP sessions.
✅ Simplicity – Centralized control.
✅ Better resource utilization.

Disadvantages:
❌ Single point of failure (unless multiple RRs exist).
❌ Suboptimal routing in some scenarios (e.g., asymmetric paths).

Example Configuration:
router bgp 65001
bgp router-id [Link]
neighbor [Link] remote-as 65001
neighbor [Link] route-reflector-client

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

neighbor [Link] remote-as 65001


neighbor [Link] route-reflector-client

3. Confederation
BGP Confederation is another technique to reduce IBGP full-mesh complexity.
The AS is divided into multiple sub-ASes (called Member ASes).
Each sub-AS has full IBGP mesh within itself.
Between sub-ASes, EBGP is used (even though they are inside the same main AS).
Externally, they appear as a single AS to the outside world.

Advantages of Confederation:
✅ Scalable – Reduces IBGP sessions.
✅ Logical separation – Helps in policy control.
✅ Avoids suboptimal routing (compared to RR in some cases).

Disadvantages:
❌ Configuration complexity – Requires sub-AS assignments.
❌ Latency in convergence – More AS Path processing.

Example Configuration:
router bgp 65001
bgp confederation identifier 65001
bgp confederation peers 65002 65003
neighbor [Link] remote-as 65002
neighbor [Link] remote-as 65003

Comparison: Route Reflector vs Confederation


Feature Route Reflector (RR) Confederation
Scalability High (reduces IBGP sessions) High (reduces IBGP sessions)
Configuration Complexity Low (Just RR-client setup) High (Requires sub-AS configuration)
Loop Prevention Uses Cluster-ID Uses AS-Path
Inter-Domain Routing Control Limited More granular
Recommended for Small-Medium AS Large AS with multiple domains

Conclusion
Full Mesh is not scalable for large networks.
Route Reflectors (RR) are simple to implement but can cause suboptimal routing.
Confederation is better for large networks but requires more configuration.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

BGP Best Path Selection:


• BGP sends update packet to a peer with path attributes associated with prefix.
• BGP selects the best path based on a list of attributes.
• BGP attributes are similar to metrics in OSPF and EIGRP.
• BGP use path attributes to pick the best route to a destination.
• BGP store multiple paths to a destination in BGP table.
• BGP only install one best route in the routing table.
• BGP path algorithm decides best path to install in the IP routing table.
• BGP path algorithm decides best path to use for traffic forwarding.
• BGP goes through the following steps to select the best path route.

Priority Attribute Preference


1 Weight Highest
2 Local Preference Highest
3 Originate Local
4 AS Path Shortest
5 Origin Code Lowest
6 MED Lowest
7 EBGP Path Over IBGP Path Prefer eBGP
8 Shortest IGP Path to BGP Next Hop Lowest IGP Metric
9 Oldest Path Received First
10 Router ID Lowest
11 Neighbor IP Address Lowest Neighbor IP

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

BGP Attributes:

BGP uses path attributes (PAs) associated with each network path. The PAs provide BGP with
granularity and control of routing policies within BGP. The BGP prefix PAs are classified as follows:

• Well-known mandatory
• Well-known discretionary (pron: duh·skri·shuh·nuh·ree)
• Optional transitive
• Optional non-transitive

➢ Well-known mandatory attributes must be included with every prefix advertisement;


➢ Well-known discretionary attributes may or may not be included with a prefix advertisement.
➢ Optional attributes do not have to be recognized by all BGP implementations. Optional
attributes can be set so that they are transitive and stay with the route advertisement from AS
to AS.
➢ Other PAs are non-transitive and cannot be shared from AS to AS.

Well-Known Mandatory:
• As the name suggests it is mandatory and must.
• These attribute must appear in every Update message.
• Must be recognized & supported by all BGP speakers.
• If these attributes are missing a Notification, error is generated.
• If these attributes are missing the session will be closed.
• Well-Known mandatory attributes are AS Path, Next Hop Address, & Origin.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

Well-Known Discretionary: (pron: duh·skri·shuh·nuh·ree)


• Must be recognized & supported by all BGP speakers.
• May or may not appear in every BGP Update message.
• Does not have to be included in every BGP update message.
• Well-Known Discretionary attributes are Local Preference & Atomic Aggregate.

Optional Transitive:
• May or may not be supported by all BGP speakers.
• Will be passed on if not recognized by the receiver.
• The attribute should be accepted and passed along to other peers.
• Optional Transitive attributes are Aggregator and Community.
• Transitive, these attributes are across AS boundaries.

Optional Non-Transitive:
• May or may not be supported by all BGP speakers.
• Not required to pass on, may be safely ignored.
• The attribute should be ignored and not passed on to other peers.
• Optional Non-Transitive attributes are MED, Originator ID and Cluster List.
• Non-transitive, these attributes are restricted to the same AS.

Type Code Attribute Name Category


1 Origin Well-Known Mandatory
2 AS Path Well-Known Mandatory
3 Next Hop Well-Known Mandatory
4 Multi Exit Disc (MED) Optional Non-Transitive
5 Local Pref Well-Known Discretionary
6 Atomic Aggregate Well-Known Discretionary
7 Aggregator Optional Transitive
8 Community Optional Transitive
9 Originator ID Optional Non-Transitive
10 Cluster List Optional Non-Transitive

In BGP, the Network Layer Reachability Information (NLRI) is a routing update that consists of the
network prefix, prefix length, and any BGP PAs for the specific route. (Update packet)

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

SUMMARY OF BGP ATTRIBUTES


• BGP path selection is done through the best path algorithm.
• Best path uses various attributes assigned to each route.
• BGP attributes are similar to metrics in OSPF and EIGRP.
• BGP selects the best path based on a list of attributes.
• BGP use attributes to decide the best route.
• BGP has 0 to 14 attributes for Cisco.
• BGP has 1 to 14 attributes for other venders.
• BGP does not use metrics but use set of attributes.
• BGP has four main types of attributes.
• Well-Known Mandatory.
• Well-Known Discretionary.
• Optional Transitive.
• Optional Non-Transitive.

BGP influencing INBOUND traffic


1. AS_path
2. MED Multi-exit discriminator

BGP influencing OUTBOUND traffic


1. Weight
2. Local_pref

1. BGP Weight Attribute (highest wins)

BGP weight attribute is a Cisco proprietary path attribute that is local to the router and is used to
influence local path selection on a certain router.

BGP weight is the first tie breaker for best path selection on a Cisco router, the attribute is not
propagated to other routers in the BGP updates and only found on Cisco routers.

The path with the highest weight is selected as the best toward a destination.

The weight can be a number from 0 to 65,535. Paths that the router originates have a weight of
32,768 by default, and other paths have a weight of 0. As we mentioned earlier the path with the
highest weight value wins.

Summary:
• Weight is Cisco-Proprietary value.
• Weight is only local on the router.
• Weight is not exchanged between BGP routers.
• Weight is never advertised to other routers.
• The path with the highest weight is preferred.
• Weight for a route originated on the local router is 32768.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

• Weight is zero for all other routes.

BGP weight can be set using one of three ways on a Cisco router.

1. Assigned per neighbor using the neighbor {ip-address | peer-group} weight weight. This
command will influence all routes received from a certain neighbor by assigning the configured
value to all these routes.
2. Using AS-Path access lists. ip as-path access-list access-list-number {permit | deny} as-regular-
expression neighbor ip-address filter-list access-list-number weight weight. This method will
apply the weight value to As-paths defined in the access list.
3. Using route-maps for more complex definitions.

BGP weight is the easiest way to manipulate the BGP path selection on a single Cisco router for
outbound traffic. The attribute is local and will not be propagated to other routers in the network
within the BGP update messages.

Weight values can be assigned to routes using the neighbor command, IP AS-PATH or route maps for
complex policies.

GNS3 LAB

R1 Configuration R2 Configuration
interface f0/0 interface f0/0
ip add [Link] [Link] ip add [Link] [Link]
no shutdown no shutdown
interface f0/1
interface f0/1 ip add [Link] [Link]
ip add [Link] [Link] no shutdown

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

no shutdown interface loopback3


ip add [Link] [Link]
R3 Configuration
interface f0/0 interface f0/1
ip add [Link] [Link] ip add [Link] [Link]
no shutdown no shutdown
interface loopback3
ip add [Link] [Link]

R1 BGP configuration R2 BGP configuration


router bgp 1 router bgp 2
neighbor [Link] remote-as 2 neighbor [Link] remote-as 1
neighbor [Link] remote-as 2 neighbor [Link] remote-as 2
network [Link] mask [Link]
R3 BGP Configuration
router bgp 2
neighbor [Link] remote-as 1
neighbor [Link] remote-as 2
network [Link] mask [Link]

First, let us check BGP weight attribute value for internal and external routes. It is 0 for external
routes and 32768 default for internal routes.

Router R1 decided to use [Link] as the next hop. All the BGP attributes are the same so it
came down to the router ID to select a winner.

Note: Router ID. Prefer the path with the lowest BGP neighbor router ID.

Modify the attribute “weight”


R1 Weight Configuration
router bgp 1
neighbor [Link] weight 500

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

To apply the path attribute changes to BGP prefix, always clear the process

clear ip bgp *
show ip bgp

After changing the weight, R1 Now selected [Link] as the next hop address.

2. LOCAL PREFERENCE (highest wins)

This is another way of choosing outbound path with BGP. Why would we need yet another way?
Well, for starters, weight is Cisco proprietary attribute, which means there is no weight on, say
Juniper. And weight has only local significance. This means we may have to apply it on several or all
routers.

Local preference comes right after weight in BGP path selection, so it is still strong mechanism of
preferring a path. It is not limited to a local router, but spans the entire autonomous system. This
means that we can set a local pref on one router for some prefixes, and it is sent to all internal
neighbours along with prefix updates. It is removed on eBGP sessions, so it stays within a local AS.

Local pref can range from 0-4294967295 with a default of 100. The higher the better.

The local preference has to be set inbound on routes being received to influence the outbound
routing behaviour.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

Summary:
• Local Preference is the second BGP attribute.
• Use local preference to choose the outbound external BGP path.
• Local Preference is sent to all Internal BGP routers in AS.
• Local Preference is not exchanged between external BGP routers.
• Local preference is a Well-Known Discretionary BGP attribute.
• Local Preference Default value is 100.
• The path with the highest Local Preference is preferred.

GNS3:
CE2(config)#
router bgp 1
bgp default local-preference 150
OR

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

CE2(config)#
route-map LOCAL-PREF-150
set local-preference 150

CE2(config)#router bgp 1
neighbor [Link] route-map LOCAL-PREF-150 in
end

CE2#clear ip bgp *

Clear ip bgp *
Or
Clear ip bgp [Link] soft (preferable) [keeps the tcp session, only refreshes route changes]

SHOW COMMANDS:
1st Method to Verify:
CORE#sh ip bgp [Link] bestpath
BGP routing table entry for [Link]/24, version 51
Paths: (2 available, best #2, table default)
Not advertised to any peer
Refresh Epoch 1
245
[Link] from [Link] ([Link])
Origin IGP, metric 0, localpref 250, valid, internal, best
rx pathid: 0, tx pathid: 0x0

2nd Method to Verify:


CORE#sh ip bgp
<!output omitted--!>
Network Next Hop Metric LocPrf Weight Path
* i [Link]/24 [Link] 0 150 0 3 4 5 i
*>i [Link] 0 250 0 2 4 5 i

3rd Method to Verify:


CORE#traceroute [Link]
Type escape sequence to abort.
Tracing the route to [Link]
VRF info: (vrf in name/id, vrf out name/id)
1 [Link] 0 msec 1 msec 0 msec
2 [Link] 1 msec 1 msec 1 msec
3 [Link] [AS 2] 1 msec 1 msec 1 msec
4 [Link] [AS 4] 1 msec 0 msec 0 msec
5 [Link] [AS 4] 2 msec 1 msec 1 msec

If you see the local preference attribute has been applied to all routes coming in from PE1, if
we just wanted to do it for [Link] then we could match this network in a prefix-list and add
that to the route-map.

CE2(config)#
ip prefix-list [Link] seq 5 permit [Link]/24

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

route-map LOCAL-PREF-150 permit 10


match ip address prefix-list [Link]
set local-preference 150
exit
router bgp 1
neighbor [Link] route-map LOCAL-PREF-150 in
end
clear ip bgp *

4. AS Path:
• AS Path is the fourth BGP attribute.
• AS path is a mandatory attribute, describe path taken on the way to destination.
• BGP prefers the shortest AS path to get to a destination.
• BGP AS Path is a Well-Known mandatory attribute.
• Ordered list of ASNs through which the update has passed.
• The main purpose of the AS Path is to avoid loops.
• AS-Path prepending is to make received prefix "Less Attractive".
• Add own AS number multiple times so the as path becomes longer.
• AS-Path prepending is a way to manipulate the AS-Path attribute of a BGP route.
• AS-Path prepending used to influence inbound direction traffic.
• AS path 1 2 3 is preferred over AS path 1 2 3 4 5.

GNS3
CE1(config)#
route-map PREPEND permit 10
set as-path prepend 40000 40000

CE1(config-route-map)#
router bgp 1
neighbor [Link] route-map PREPEND out
end

Show commands:
GOOGLE-SERVER#show ip bgp
*> [Link] 0 32768 i
*> [Link]/24 [Link] 0431i
*> [Link] [Link] 0 4 2 1 40000 40000 i
*> [Link] [Link] 0431i
*> [Link] [Link] 0431i
*> [Link] [Link] 0 04i
*> [Link] [Link] 0 04i
Network Next Hop Metric LocPrf Weight Path
*> [Link] [Link] 04i
.
6. MED:
o MED (Multi-Exit Discriminator) is the sixth BGP attribute.
o Multi-Exit Discriminator (MED) is optional non-transitive attribute.
o The lowest MED is the preferred path.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

o The MED is exchanged between Autonomous Systems.


o MED is used to advertise the neighbors how to enter the AS.
o MED is propagated to all routers within the neighbor AS.
o MED is not passed along any other Autonomous Systems.
o MED can influence routers in the same AS but not on different AS.

GNS3
Basically use this attribute for influencing traffic between two directly connected autonomous
systems.

AS1

CE1(config)#
route-map MED permit 10
set metric 50
exit

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

router bgp 1
neighbor [Link] route-map MED out
end

CE1#clear ip bgp *

3. Originate:
o Originate is the third BGP attribute.
o Prefer the path that the local router originated.
o In the BGP table, Local router originated see next hop [Link].
o Routes with weight set to “32768” is considered as local routes.
o BGP router will prefer routes that it installed into BGP itself to another router installed.

5. Origin Code:
o BGP prefer the lowest Origin Code.
o There are three origin codes: IGP, EGP & Incomplete.
o IGP is lower than EGP and EGP is lower than Incomplete.
o IGP (shows up as i) use the network command for BGP.
o EGP (shows up as e) is an old routing protocol no more.
o Incomplete (shows up as ?) means redistributed something into BGP.
o Origin is a Well-known mandatory attribute.

7. EBGP Path Over iBGP Path:


o Prefer eBGP (External BGP) over iBGP (Internal BGP) paths.
o Routes learned via eBGP is more preferred than routes learned via iBGP.
o If both routes are learned via eBGP then chooses the lowest IGP value to the next hop.

8. Shortest IGP Path to BGP Next Hop:


o Prefer the path within the AS with the lowest IGP metric to the BGP next hop.

9. Oldest Path:
o Prefer the path that received first, in other words, the oldest path.
o The oldest route in the routing table is preferred over the new ones.

10. Router ID:


o Prefer the path with the lowest BGP neighbor router ID.
o Lowest router ID will be selected as the best path.
o The router ID is based on the highest IP address.
o If there is loopback interface, then the IP address of loopback will be used.
o The router ID can also be manually configured.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

11. Neighbor IP Address:


o Prefer the path with the lowest neighbor IP address.
o If two eBGP routers and two links in between then the router ID will be the same.
o In this case, the neighbor IP address is the tiebreaker.

OTHER BGP ATTRIBUTES


Atomic Aggregate
The Atomic Aggregate attribute informs BGP peers that the local router is using a less specific
(aggregated) route to a destination.

If a BGP speaker selects a less specific route, when a more specific route is available, it must attach
the Atomic Aggregate attribute when propagating the route. The Atomic Aggregate attribute lets the
BGP peers know that the BGP speaker used an aggregated route.

When you use the Atomic Aggregate attribute, the BGP speaker has the option to send the
Aggregator attribute. The Aggregator attribute includes the AS number and the IP address of the
router that originated the aggregated route. In Cisco routers, the IP address is the RID of the router
that performs the route aggregation. Atomic Aggregate is a well-known attribute and Aggregator is
an optional, transitive attribute.

BGP Communities

A BGP community is bit of “extra information” that you can add to one of more prefixes
which is advertised to BGP neighbors.

This extra information can be used for things like traffic engineering or dynamic routing policies.

BGP communities provide additional capability for tagging routes and for modifying BGP routing
policy on upstream and downstream routers. BGP communities can be appended, removed, or
modified selectively on each attribute as the route travels from router to router.

BGP communities are an optional transitive BGP attribute that can traverse from autonomous
system to autonomous system. A BGP community is a 32-bit number that can be included with a
route. A BGP community can be displayed as a full 32-bit number (0-4,294,967,295) or as two 16-bit
numbers (0-65535):(0-65535) commonly referred to as new-format.

Notes pending for


- Full mesh, RR
- Confederation
- Redistribution

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

BGP QUIZ

1. Which of the following autonomous systems are private? (Choose two.)

1. 64,512–65,535
2. 65,000–65,535
3. 4,200,000,000–4,294,967,294
4. 4,265,000–4,265,535,016

2. Which BGP attribute must be recognized by all BGP implementations and advertised to
other autonomous systems?

1. Well-known mandatory
2. Well-known discretionary
3. Optional transitive
4. Optional non-transitive

3. True or false: BGP supports dynamic neighbor discovery by both routers.

1. True
2. False

4. True or false: A BGP session is always one hop away from a neighbor.

1. True
2. False

5. True or false: The IPv4 address family must be initialized to establish a BGP session with a
peer using IPv4 addressing.

1. True
2. False

6. Which command is used to view the BGP neighbors and their hello intervals?

1. show bgp neighbors


2. show bgp afi safi neighbors
3. show bgp afi safi summary
4. show afi bgp interface brief

7. How many tables does BGP use for storing prefixes?

1. One
2. Two
3. Three
4. Four

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

8. True or false: BGP advertises all its paths for every prefix so that every neighbor can build
its own topology table.

1. True
2. False

9. Which BGP command advertises a summary route to prevent link-flap processing by


downstream BGP routers?

1. aggregate-address network subnet-mask as-set


2. aggregate-address network subnet-mask summary-only
3. summary-address network subnet-mask
4. summary-address network mask subnet-mask

10. True or false: The IPv6 address family must be initialized to establish a BGP session with
a peer using IPv6 addressing.

1. True
2. False

Answers to the “Do I Know This Already?” quiz:

1 A, C

2A

3B

4B

5B

6B

7C

8B

9B

10 A

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

REDISTRIBUTION

Redistribution always encompasses two routing protocols: a source and destination.

The source protocol provides the network prefixes that are to be redistributed, and the destination
protocol receives the injected network prefixes.

The redistribution configuration exists under the destination protocol and identifies the source
protocol.

Using a route map allows for the filtering or modification of route attributes during the injection into
the destination protocol.

KEY POINTS:

A route must exist in the RIB in order for it to be redistributed into the destination protocol.

In addition to the route being in the RIB, the source protocol that redistributes into the destination
protocol must be the source for the route in the RIB.

REMEMBER!!!

Redistribution is not transitive.

In other words, when a router redistributes protocol 1 into protocol 2, and protocol 2 redistributes
into protocol 3, the routes from protocol 1 does not redistribute into protocol 3.

router eigrp
redistribute ospf
router ospf
redistribute eigrp
redistribute bgp
router bgp

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

redistribute ospf

For routes to be exchanged between all three routing protocols, mutual redistribution must be
configured between all three protocols

router eigrp
redistribute ospf
redistribute bgp
router ospf
redistribute eigrp
redistribute bgp
router bgp
redistribute ospf
redistribute eigrp

Seed Metrics

Every routing protocol uses a different methodology for calculating the best path for a route, EIGRP
can use bandwidth, delay, load, and reliability for calculating its best path, whereas OSPF primarily
uses the path metric for calculating the shortest path first (SPF) tree (SPT).

OSPF cannot calculate the SPT using EIGRP path attributes, and EIGRP cannot run diffusing update
algorithm (DUAL) using only the total path metric.

The destination protocol must be provided with relevant metrics to the destination protocols so that
the destination protocol can calculate the best path for the redistributed routes.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

Every protocol provides a seed metric at the time of redistribution that allows the destination
protocol to calculate a best path.

Protocol Default Seed Metric

EIGRP Infinity. Routes set with infinity are not installed into the EIGRP topology table.

OSPF All routes are Type 2 external. Routes sourced from BGP use a seed metric of 1, and all other protocols
uses a seed metric of 20.

BGP Origin is set to incomplete, the multi-exit discriminator (MED) is set to the IGP metric, and the weight is
set to 32,768.

BGP ORIGIN SHOWING “?”

PROTOCOL-SPECIFIC CONFIGURATION

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

redistribute {connected | static | eigrp as-number | ospf process-id [match


{internal | external [1|2]}] | bgp as-number} [destination-protocol-
options] [route-map route-map-name].

Redistribution commonly uses route maps to manipulate or filter routes on the redistributing
router.

SELECTIVE REDISTRIBUTION:

BGP is designed to handle a large routing table, whereas IGPs are not. Redistributing BGP into an IGP
on a router with a larger BGP table (for example, the Internet table with 800,000+ routes) should use
selective route redistribution. Otherwise, the IGP can become unstable in the routing domain, which
can lead to packet loss.

PROTCOL BASIS REDISTRIBUTIONS:

1. EIGRP

redistribute source-protocol [metric bandwidth delay reliability


load mtu] [route-map route-map-name]

3 – TYPES FOR DOING REDISTRIBUTION:


EXAMPLE1: (USING DEFAULT-METRIC)
router eigrp 100
default-metric 1000000 1 255 1 1500
network [Link] [Link]
redistribute ospf 1

EXAMPLE2: (USING LEGACY METHOD)


router eigrp 100
network [Link] [Link]
redistribute ospf 11000000 1 255 1 1500

EXAMPLE3: (USING ROUTE-MAP)


router eigrp 100
network [Link] [Link]
redistribute ospf 1 route-map OSPF-2-EIGRP
!
route-map OSPF-2-EIGRP permit 10
set metric 1000000 1 255 1 1500

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

2. OSPF

redistribute source-protocol [subnets] [metric metric] [metric-type {1 | 2}]


[tag 0-4294967295] [route-map route-map-name]

3. BGP

Redistributing routes into BGP does not require a seed metric because BGP is a path vector protocol.

Redistributed routes have the following BGP attributes set:


• The origin is set to incomplete.
• The next-hop address is set to the IP address of the source protocol.
• The weight is set to 32,768.
• The MED is set to the path metric of the source protocol.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

GNS3: (PRACTICE ASSIGNMENT)

TASK#1: CONFIGURE OSPF BETWEEN MUMBAIR4 and MUMBAIR6


TASK#2: CONFIGURE EIGRP BETWEEN MUMBAIR6 and TOKYOR7
TASK#3: CONFIGURE “REDISTRIBUTION”

REDISTRIBUTION BASIC COMMANDS FIRST:


ATTR26
hostname ATTR26
int fa2/0
ip add [Link] [Link]
no shutdown
int loop 1
ip add [Link] [Link]

router eigrp 100


network [Link]
network [Link]

VODAFONER27
hostname VODAFONER27
int fa2/0
ip add [Link] [Link]
no shutdown
int fa1/0
ip add [Link] [Link]
no shutdown
int loop 1
ip add [Link] [Link]

router eigrp 100


network [Link]
network [Link]

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

router ospf 1
network [Link] [Link] area 0
network [Link] [Link] area 0

VODAFONER28
hostname VODAFONER28
int fa1/0
ip add [Link] [Link]
no shutdown
int loop 1
ip add [Link] [Link]

router ospf 1
network [Link] [Link] area 0
network [Link] [Link] area 0

=============
REDISTRIBUTION CLI COMMAND EGRP<-->OSPF
=============
VODAFONER27(config)#
router eigrp 100
redistribute ospf 1 metric 100000 510 255 1 1500

router ospf 1
redistribute eigrp 100 subnet

--Did you know?--


What happens if you don’t provide all required values while redistributing inside EIGRP.
Let us try!
VODAFONER27(config)#
router eigrp 100
redistribute eigrp 100 subnets
no redistribute ospf 1 metric 100000 510 255 1 1500

routes are not installed in ATTR26 RIB


=============
REDISTRIBUTION CLI COMMAND eBGP<-->OSPF
=============
ATTR26
no router eigrp 100
router bgp 2

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

neighbor [Link] remote-as 1


network [Link] mask [Link]

no router eigrp 100


router bgp 1
neighbor [Link] remote-as 2
network [Link] mask [Link]

VODAFONER28
no change as above

VODAFONER27 #configure redistribution


router bgp 1
redistribute ospf 1

router ospf 1
redistribute bgp 1 subnets
!
end
!
clear ip bgp *

=============
REDISTRIBUTION CLI COMMAND iBGP<-->OSPF
=============
ATTR26
no router bgp 2
router bgp 1
neighbor [Link] remote-as 1
network [Link] mask [Link]

VODAFONER27
router bgp 1
neighbor [Link] remote-as 1
network [Link] mask [Link]
router bgp 1
redistribute ospf 1
!
router ospf 1
redistribute bgp 1 subnets
!
end
!
clear ip bgp *

VODAFONER27(config-router)#
router bgp 1
bgp redistribute-internal
exit

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

!
#in order to prevent routing loops from being formed.
=====================

ISSUES OF REDISTRIBUTIONS:

• Suboptimal routing
• Routing loops

PROBLEM: [Suboptimal routing]


When redistributing routes from one routing source into another routing source, the original
routing source’s information is lost when the seed metric is injected at the redistribution point.

Therefore, overall network visibility is lost or hidden from the destination routing source.

This is not an issue when there is only one point of redistribution between two sources. However, if
there are multiple points of redistribution between two sources.

SOLUTION:
You can solve this issue by providing different seed metrics on the boundary routers

PROBLEM: [Routing Loops]


Routing loops caused due to administrative distance (AD)

OSPF E2

SOLUTION:
To redistribute a route from one routing source to another (EIGRP into OSPF, for example), that
route must be in the routing table as an entry for the routing source that you are redistributing the
route from.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

QUIZ: PART 1

1. R1 learns the [Link]/24 prefix from EIGRP. EIGRP is redistributed into OSPF on R1, and OSPF is
redistributed into BGP on R1. R1 advertises all the BGP network prefixes to R3. Does R3 receive the
[Link]/24 prefix?
1. Yes
2. No
2. What is the administrative distance for external EIGRP routes?
1. 90
2. 110
3. 170
4. 200
3. What is the default seed metric for OSPF?
1. 20
2. 100
3. 32,768
4. infinity
4. R1 learns the [Link]/24 prefix from EIGRP. EIGRP is redistributed into OSPF on R1. R1 has an
OSPF adjacency with R2. R2 redistributes OSPF into BGP. R2 advertises all BGP network prefixes to
R3. Does R3 receive the [Link]/24 prefix?
1. Yes
2. No
5. What is the administrative distance for external OSPF routes?
1. 150
2. 110
3. 180
4. 200
6. What is the default seed metric for EIGRP?
1. 20
2. 100
3. 32,768
4. infinity
7. Which additional command is needed to redistribute external OSPF routes into EIGRP?
1. ospf-external-prefixes redistributable
2. eigrp receive external source networks
3. ospf redistribute-internal
4. None
8. Which additional command is needed to redistribute external OSPF routes in to BGP?
1. ospf-external-prefixes redistributable
2. match external
3. bgp redistribute-internal
4. none

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

ANSWERS:
1. b. Route redistribution is not transitive on a single router.
2. c. The AD for external EIGRP routes is 170.
3. a. The default seed metric for OSPF is 20.
4. a. Sequential redistribution is allowed.
5. b. The AD for external OSPF routes is 110, which is the same as the AD for internal OSPF routes.
6. d. The default seed metric for EIGRP is infinity.
7. d. External OSPF routes redistribute into EIGRP with the basic redistribution command.
8. c. External OSPF routes are not redistributed into BGP with the basic redistribution command; the
command match external must also be used.

QUIZ PART2:

1. Which of the following are methods that can be used to solve routing issues caused by multipoint
redistribution? (Choose all that apply.)
1. Modify the seed metrics of the redistributed routes.
2. Modify the administrative distances of redistributed routes.
3. Tag routes as they are redistributed and then deny them from being redistributed back into
the originating routing source.
4. Modify the metric used to reach the boundary routers.

2. Which of the following methods can be used to solve suboptimal routing issues caused by
redistribution?
1. Modify the seed metrics of the redistributed routes.
2. Modify the administrative distances of redistributed routes.
3. Redistribute only classless networks.
4. Modify the metrics of the routes before redistribution.

3. Which of the following is true?


1. The EIGRP command distance 165 [Link] [Link] changes the AD to 165 for all EIGRP
routes learned from neighbor [Link].
2. The EIGRP command distance 165 [Link] [Link] changes the AD to 165 for the EIGRP
learned route [Link]/24.
3. The EIGRP command distance 165 [Link] [Link] changes the AD to 165 for internal EIGRP
routes learned from neighbor [Link].

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

4. The EIGRP command distance 165 [Link] [Link] changes the AD to 165 for external EIGRP
routes learned from neighbor [Link].

4. What must be true for a route from one routing source to be redistributed into a different routing
source?
1. The routing sources must have similar metrics.
2. The routing sources must have similar administrative distances.
3. The route must be in the routing table on the router performing redistribution.
4. The route must be a directly connected route on the router performing redistribution.

5. Which of the following routing protocols have a default seed metric of unreachable? (Choose
two.)
1. RIP
2. EIGRP
3. OSPF
4. BGP

6. Which of the following routing protocols has a default seed metric of 20?
1. RIPng
2. EIGRP for IPv6
3. OSPFv3
4. BGP

7. When redistributing, you have four options for the seed metric: accepting the default value,
specifying it with the default-metric command, using the metric option with
the redistribute command, and using a route map. If all four of these are configured with different
values, which will be preferred?
1. Default values
2. default-metric command
3. Metric option with the redistribute command
4. Route map attached to the redistribute command

9. Which option is mandatory when redistributing OSPF routes into EIGRP?


1. metric
2. metric type
3. subnets
4. match

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

10. Which option is mandatory when redistributing classless networks into OSPF?
1. metric
2. metric type
3. subnets
4. match

11. Which of the following is not included when redistributing from one IPv6 routing protocol into
another IPv6 routing protocol?
1. A prefix
2. A seed metric
3. A directly connected route participating in the routing process
4. An administrative distance

12. During redistribution that uses route maps, what occurs to a route that matches a deny entry in
the route map?
1. It is redistributed with default values.
2. It is redistributed with the values in the set clause.
3. It is redistributed only if there is a routing table entry for it.
4. It is not redistributed.

ANSWERS:
1. a, b, and c
2. a
3. c
4. c
5. a and b
6. c
7. d
9. a
10. c
11. c
12. d

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

POLICY BASED ROUTING (PBR)


Policy-based routing can be used to change the next hop IP address for traffic matching certain
criteria.

This can be useful to overrule your routing table for certain traffic types. I will show you how to
configure policy-based routing.

GNS3 LAB:

1# Configure Interface on Routers mentioned below:

TOKYOR7(config)#
interface Ethernet0/1
ip address [Link] [Link]
no shutdown
interface Ethernet0/2
ip address [Link] [Link]
no shutdown
interface Ethernet0/3
ip address [Link] [Link]
no shutdown

TOKYOR10(config)#
interface Ethernet0/1

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

ip address [Link] [Link]


no shutdown
interface Ethernet0/3
ip address [Link] [Link]
no shutdown

TOKYOR29(config)#
interface Ethernet0/0
ip address [Link] [Link]
no shutdown
interface Ethernet0/2
ip address [Link] [Link]
no shutdown

TOKYOR12(config)#
interface Ethernet0/2
ip address [Link] [Link]
no shutdown
interface Ethernet0/3
ip address [Link] [Link]
no shutdown

TOKYOR30(config)#
interface Loopback1
ip address [Link] [Link]
no shutdown
interface Ethernet0/0
ip address [Link] [Link]
no shutdown
interface Ethernet0/2
ip address [Link] [Link]
no shutdown
interface Ethernet0/3
ip address [Link] [Link]
no shutdown

2# Configure OSPF process on below mentioned Routers:


TOKYOR7(config)#
TOKYOR10(config)#
TOKYOR29(config)#
TOKYOR12(config)#
TOKYOR30(config)#

conf t
router ospf 1
network [Link] [Link] area 0
end

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

PRE-CHECKS HERE

OSPF Neighbors are established


TOKYOR7#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface


[Link] 1 FULL/DR 00:00:39 [Link] Ethernet0/3
[Link] 1 FULL/DR 00:00:39 [Link] Ethernet0/2
[Link] 1 FULL/DR 00:00:39 [Link] Ethernet0/1
TOKYOR7#

OSPF support equal load-sharing, hence, all 3 routes are placed in RIB:
TOKYOR7#show ip route [Link]
Routing entry for [Link]/32
Known via "ospf 1", distance 110, metric 21, type intra area
Last update from [Link] on Ethernet0/1, 00:00:01 ago
Routing Descriptor Blocks:
[Link], from [Link], 00:00:01 ago, via Ethernet0/2
Route metric is 21, traffic share count is 1
* [Link], from [Link], 00:00:01 ago, via Ethernet0/3
Route metric is 21, traffic share count is 1
[Link], from [Link], 00:00:01 ago, via Ethernet0/1
Route metric is 21, traffic share count is 1

ICMP is successful to [Link]


TOKYOR7#ping [Link] rep 10
Type escape sequence to abort.
Sending 10, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!!!!!!
Success rate is 100 percent (10/10), round-trip min/avg/max = 1/1/1 ms
TOKYOR7#

Traceroute (udp packets) to [Link] is successful (Note: traceroute in router generates udp packet)
TOKYOR7#traceroute [Link] probe 1
Type escape sequence to abort.
Tracing the route to [Link]
VRF info: (vrf in name/id, vrf out name/id)
1 [Link] 0 msec
2 [Link] 1 msec

Telnet is successful to [Link] (Note: telnet generates tcp traffic)


TOKYOR7#telnet [Link]
Trying [Link] ... Open

User Access Verification

Username:

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

Now let’s say that I want to use the link in between TOKYOR7 and TOKYOR12 to reach [Link]. I
could influence the metric for OSPF, but this applies to all traffic. What if I wanted to use this link for
certain traffic only?
TOKYOR7(config)#
int e0/3
ip ospf cost 1000
end

All traffic is impact due to manipulating the OSPF COST on TOKYOR7_E0/3. The route is removed
from RIB as well:
TOKYOR7#show ip route [Link]
Routing entry for [Link]/32
Known via "ospf 1", distance 110, metric 21, type intra area
Last update from [Link] on Ethernet0/2, 00:06:41 ago
Routing Descriptor Blocks:
* [Link], from [Link], 00:06:41 ago, via Ethernet0/2
Route metric is 21, traffic share count is 1
[Link], from [Link], 00:06:41 ago, via Ethernet0/1
Route metric is 21, traffic share count is 1

We could use the link in between TOKYOR7 / TOKYOR10 & TOKYOR29 for the majority of our traffic
and use the link between TOKYOR7/ TOKYOR12 only for certain traffic. This can be very useful. For
example, imagine that the link between TOKYOR7/ TOKYOR12 is a dedicated link that offers QoS for
VoIP traffic.

This is something we can achieve with PBR (Policy Based Routing) Let me show you how!

Right now, all traffic is sent towards TOKYOR29/ TOKYOR10:


TOKYOR7#show ip route | include [Link]
O [Link] [110/21] via [Link], 00:09:01, Ethernet0/2

TOKYOR7#show ip route [Link]


Routing Descriptor Blocks:
* [Link], from [Link], 00:06:41 ago, via Ethernet0/2
Route metric is 21, traffic share count is 1
[Link], from [Link], 00:06:41 ago, via Ethernet0/1

Now let’s say that we want all ICMP traffic from TOKYOR7 destined for [Link] to cross the link
between TOKYOR7/TOKYOR12. Here’s how to do this:

First, I create an access-list that matches my traffic. Now we have to create a route-map:
TOKYOR7(config)#
ip access-list extended ONLY_ICMP_TOKYOR12
permit icmp host [Link] host [Link]

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

permit icmp host [Link] host [Link]


permit icmp host [Link] host [Link]

Whenever the traffic matches the access-list, we will change the next hop to [Link]
(TOKYOR12) using route-map.
TOKYOR7(config)#
route-map PBR_TOKYOR12 permit 5
match ip address ONLY_ICMP_TOKYOR12
set ip next-hop [Link]

Last but not least, let’s activate it:


TOKYOR7(config)#
ip local policy route-map PBR_TOKYOR12

Let’s see if it works, to see it in action I will enable a debug on R1:

TOKYOR7#debug ip policy
Policy routing debugging is on

Now let’s send a ping from TOKYOR7:

TOKYOR7#ping [Link] repeat 1


Type escape sequence to abort.
Sending 1, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!
Success rate is 100 percent (1/1), round-trip min/avg/max = 13/13/13 ms

The ping is working, let’s see what TOKYOR7 thinks of it:

*Aug 19 16:21:58.327: IP: s=[Link] (local), d=[Link], len 100, policy match
*Aug 19 16:21:58.327: IP: route map PBR_TOKYOR12, item 5, permit
*Aug 19 16:21:58.327: IP: s=[Link] (local), d=[Link] (Ethernet0/3), len 100, policy routed
*Aug 19 16:21:58.327: IP: local to Ethernet0/3 [Link]

Above you can see that it has been policy routed towards [Link]. We can also verify this by
looking at the route-map:
TOKYOR7#show route-map PBR_TOKYOR12
route-map PBR_TOKYOR12, permit, sequence 5
Match clauses:
ip address (access-lists): ONLY_ICMP_TOKYOR12
Set clauses:
ip next-hop [Link]
Nexthop tracking current: [Link]
[Link], fib_nh:0,oce:0,status:0

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

Policy routing matches: 10 packets, 1000 bytes


TOKYOR7#

Let’s try some traffic that doesn’t match our access-list. Telnet for example:
TOKYOR7#tracer [Link] prob 1
Type escape sequence to abort.
Tracing the route to [Link]
VRF info: (vrf in name/id, vrf out name/id)
1 [Link] 1 msec
2 [Link] 1 msec

OR

TOKYOR7#telnet [Link]
Trying [Link] ... Open

TOKYOR7 is able to connect but it’s not policy routed:


*Aug 19 15:41:02.828: IP: s=[Link] (local), d=[Link], len 28, policy rejected -- normal
forwarding
*Aug 19 15:41:02.829: IP: s=[Link] (local), d=[Link], len 28, policy rejected -- normal
forwarding

As you can see above, this traceroute (udp) / telnet traffic (TCP) is routed using the normal path.

There is one more thing I’d like to show you. With policy-based routing, there is a difference
between traffic that is originated from the router and going through the router.

The example above is for traffic originated from the router (TOKYOR7). What if we want to policy
route traffic that is routed via TOKYOR7?

TOKYOR7#
interface Ethernet0/0
ip address [Link] [Link]
end

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

Let’s create another route-map & access-list:

TOKYOR7(config)#
ip access-list extended ONLY_ICMP_TOKYOR12_HOST
permit icmp host [Link] host [Link]

Now we have to create a route-map:


TOKYOR7(config)#
route-map PBR_TOKYOR12_HOST permit 5
match ip address ONLY_ICMP_TOKYOR12
set ip next-hop [Link]

Whenever the traffic matches the access-list, we will change the next hop to [Link]
(TOKYOR12).

Last but not least, let’s activate it:


TOKYOR7#
interface Ethernet 0/0
ip policy route-map PBR_TOKYOR12_HOST

Let’s see if it works, to see it in action I will enable a debug on R1:


TOKYOR7#
debug ip policy
Policy routing debugging is on

Now let’s send a ping from TOKYOPC1:

TOKYOPC1/ # ping [Link]


Type escape sequence to abort.
Sending 1, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

Success rate is 100 percent (1/1), round-trip min/avg/max = 13/13/13 ms

The ping is working, let’s see what TOKYOR7 thinks of it:

TOKYOR7#
*Aug 19 15:59:59.801: IP: s=[Link] (Ethernet0/0), d=[Link], len 84, FIB policy match
*Aug 19 15:59:59.801: IP: s=[Link] (Ethernet0/0), d=[Link], len 84, PBR Counted
*Aug 19 15:59:59.801: IP: s=[Link] (Ethernet0/0), d=[Link], g=[Link], len 84, FIB
policy routed

Above you can see that it has been policy routed towards [Link]. We can also verify this by
looking at the route-map:

TOKYOR7#show route-map PBR_TOKYOR12_HOST


route-map PBR_TOKYOR12_HOST, permit, sequence 5
Match clauses:
ip address (access-lists): ONLY_ICMP_TOKYOR12
Set clauses:
ip next-hop [Link]
Nexthop tracking current: [Link]
[Link], fib_nh:0,oce:0,status:0

Policy routing matches: 8 packets, 784 bytes

Great, our traffic from TOKYOR7 is policy routed.

Summary:
Policy-based routing allows us to overrule the global routing table for traffic that matches our
access-list. This can be a great way to redirect traffic for certain applications. To activate PBR, there
is a difference for traffic that is going through the router or that is originated by the router:

• Use the ip policy command under the interface for traffic that is going through the router.
• Use the ip policy local command globally for traffic that is originated by the router.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

BIDIRECTIONAL FORWARDING DETECTION (BFD)


BFD (Bidirectional Forwarding Detection) is a super-fast protocol that is able to detect link failures
within milliseconds or even microseconds. All (routing) protocols have some sort of mechanism to
detect link failures. OSPF uses hello packets and a dead interval, EIGRP uses hello packets and a
hold-down timer etc.

Networks that use real-time traffic like VoIP require fast convergence times. Routing protocols like
OSPF or EIGRP are able to quickly select another path once they lose a neighbor but it takes a while
for them to realize that something is wrong.

We can tune timers for fast convergence, for example OSPF can be configured to use a dead interval
of only one second. The problem however is that all of these protocols were never really designed
for sub-second failover. Hello packets and such are processed by the control plane so there is quite
some overhead. BFD was designed to be fast; its packets can be processed by some interface
modules or line cards so there isn’t much overhead.

BFD runs independent from any other (routing) protocols. Once it’s up and running, you can
configure protocols like OSPF, EIGRP, BGP, HSRP, MPLS LDP etc. to use BFD for link failure detection
instead of their own mechanisms. When the link fails, BFD will inform the protocol. Here’s how you
can visualize this:

R1 and R2 are configured to use BFD and will send control packets to each other. OSPF remains the
same, it’s sending its OSPF packets. Once the link fails, this will happen:

When BFD doesn’t receive its control packets anymore it realizes we have a link failure and it will
report this to OSPF. OSPF will then tear down the neighbor adjacency.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

There are two operating modes to BFD, asynchronous mode and demand mode. The asynchronous
mode is similar to the hello and holddown timers, BFD will keep sending hello packets (called BFD
control packets) and when you don’t receive some of them, the session is teared down.

The demand mode is different, once BFD has found a neighbor it won’t continuously send control
packets but only uses a polling mechanism. Another method has to be used to check reachability, for
example it could check the receive and transmit statistics of the interface. Right now, Cisco (or any
other vendor I know of) doesn’t support BFD demand mode.

Both modes also support something called echo mode. When a device sends BFD echo packets then
the receiver will return them without processing them. When the sender doesn’t get the echo
packets back, it knows something is wrong and will tear down the session.

BFD consists of 2 types of packets - Control and Echo:

• Control packets are mandatory and processed by the CPU. They set up the initial BFD
session, where parameters are negotiated, such as timers.
• Echo packets use UDP to send an echo to a peer and are not received by the CPU. The is
because they contain the source and destination IP/MAC of the sender. Therefore, when the
peer gets the echo packet, the CEF/FIB tables (which do not touch the CPU) simplify forward
the packet straight back to the sending peer. These are optional (but is on by default) if
disabled only the control packets are used to determine that the peer is alive.

GNS3:

1# Configure Interface on Routers mentioned below:

TOKYOR7(config)#
interface Ethernet0/2
ip address [Link] [Link]
no shutdown

TOKYOR29(config)#
interface Ethernet0/0
ip address [Link] [Link]
no shutdown
interface Ethernet0/2
ip address [Link] [Link]
no shutdown

TOKYOR30(config)#

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

interface Ethernet0/0
ip address [Link] [Link]
no shutdown

2# Configure OSPF process on below mentioned Routers:


TOKYOR7(config)#
TOKYOR29(config)#
TOKYOR30(config)#

conf t
router ospf 1
network [Link] [Link] area 0
end

Configure the BFD timers.


TOKYOR7(config)#
interface Eth0/2
bfd interval 50 min_rx 50 multiplier 3

router ospf 1
bfd all-interfaces

TOKYOR29(config)#
interface Eth0/2
bfd interval 50 min_rx 50 multiplier 3

router ospf 1
bfd all-interfaces

TOKYOR30(config)#
interface Eth0/2
bfd interval 50 min_rx 50 multiplier 3

router ospf 1
bfd all-interfaces

• The BFD interval is to specify how often we will send BFD packets, this is similar to the hello
packet that protocols like OSPF, EIGRP, HSRP, etc. use.
• The second value to configure is the minimum receive interval. This is how often we expect to
receive a BFD packet from our neighbor.
• The last value to configure is for the holddown. This is similar to the dead interval in OSPF or the
holddown time that other protocols use.

PRE-CHECKS:

TOKYOR29#show bfd neighbors

IPv4 Sessions
NeighAddr LD/RD RH/RS State Int

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

[Link] 1/1 Up Up Et0/2

TOKYOR29#show bfd neighbors details

IPv4 Sessions
NeighAddr LD/RD RH/RS State Int
[Link] 1/1 Up Up Et0/2
Session state is UP and using echo function with 50 ms interval.
Session Host: Software
OurAddr: [Link]
Handle: 1
Local Diag: 0, Demand mode: 0, Poll bit: 0
MinTxInt: 1000000, MinRxInt: 1000000, Multiplier: 3
Received MinRxInt: 1000000, Received Multiplier: 3
Holddown (hits): 0(0), Hello (hits): 1000(24)
Rx Count: 26, Rx Interval (ms) min/max/avg: 1/1002/839 last: 715 ms ago
Tx Count: 26, Tx Interval (ms) min/max/avg: 1/992/836 last: 796 ms ago
Elapsed time watermarks: 0 0 (last: 0)
Registered protocols: OSPF
Uptime: 00:00:21
Last packet: Version: 1 - Diagnostic: 0
State bit: Up - Demand bit: 0
Poll bit: 0 - Final bit: 0
C bit: 0
Multiplier: 3 - Length: 24
My Discr.: 1 - Your Discr.: 1
Min tx interval: 1000000 - Min rx interval: 1000000
Min Echo interval: 50000

Now, let us “shutdown” down the interface to see the BFD convergence speed and its working:
TOKYOR7
interface Eth 0/2
shutdown

Almost immediately you will see these messages on TOKYOR12:


TOKYOR12(config-router)#
*Aug 19 16:46:55.436: %OSPF-5-ADJCHG: Process 1, Nbr [Link] on Ethernet0/2 from FULL
to DOWN, Neighbor Down: BFD node down

Within a second, BFD reports to OSPF that there is a link failure and the neighbor adjacency has
been dropped. Now that’s pretty quick!

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

How to Disable BFD on interface when its is enabled on Router mode:


router ospf 1
bfd all-interfaces
!
interface e0/2
ip ospf bfd disable
!
Other enable one interface after another:
interface e0/2
ip ospf bfd
interface e0/3
ip ospf bfd
!

NOTE:
In Bidirectional Forwarding Detection (BFD), the terms LD/RD and RH/RS are used as follows:
• LD (Local Discriminator) / RD (Remote Discriminator):
o LD: The Local Discriminator is an identifier used by the local system to distinguish
its BFD session.
o RD: The Remote Discriminator is an identifier used by the remote system. When
received, it helps identify which session the packet belongs to on the remote side.
o These discriminators are used for demultiplexing BFD sessions, ensuring that each
packet is associated with the correct session.
• RH (Required Hold Time) / RS (Required Send Interval):
o RH (Required Hold Time): The minimum time interval that the local system
requires between BFD packets sent by the remote system.
o RS (Required Send Interval): The interval at which the local system sends BFD
packets.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

VRF-LITE
By default, a router uses a single global routing table that contains all the directly connected
networks and prefixes that it learned through static or dynamic routing protocols.

VRFs are like VLANs for routers, instead of using a single global routing table we can use multiple
virtual routing tables. Each interface of the router is assigned to a different VRF.

VRFs are commonly used for MPLS deployments, when we use VRFs without MPLS then we call it
VRF lite.

GNS3:

Interface Configurations:
ISP(config)#
interface GigabitEthernet0/0
no switchport
ip address [Link] [Link]

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

no negotiation auto
duplex full
no shutdown
interface GigabitEthernet0/1
no switchport
ip address [Link] [Link]
no negotiation auto
duplex full
no shutdown
interface GigabitEthernet0/2
no switchport
ip address [Link] [Link]
no negotiation auto
duplex full
no shutdown

AUSTRALIAR16(conf t)#
interface Ethernet0/0
no switchport
ip address [Link] [Link]
duplex full
no shutdown

CHINAR17(conf t)#
interface Ethernet0/0
no switchport
ip address [Link] [Link]
duplex full
no shutdown

JAPANR15(conf t)#
interface Ethernet0/0
no switchport
ip address [Link] [Link]
duplex full
no shutdown

In the topology above we have one ISP router and three customers called “JAPAN”, “AUSTRALIA”
and “CHINA”. Each customer is connected to the ISP router. The ISP router has only one global
routing table so if we connect everything like the topology above, this is what the routing table will
look like:

ISP#show ip rout connected


[Link]/8 is variably subnetted, 2 subnets, 2 masks
C [Link]/24 is directly connected, GigabitEthernet0/0
L [Link]/32 is directly connected, GigabitEthernet0/0
[Link]/8 is variably subnetted, 2 subnets, 2 masks
C [Link]/24 is directly connected, GigabitEthernet0/2
L [Link]/32 is directly connected, GigabitEthernet0/2

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

[Link]/8 is variably subnetted, 2 subnets, 2 masks


C [Link]/24 is directly connected, GigabitEthernet0/1
L [Link]/32 is directly connected, GigabitEthernet0/1
ISP#

The ISP router has a single global routing table that has all 3 directly connected networks. Let’s use
VRFs to change this, I want to create a separate routing table for customer “JAPAN”, “AUSTRALIA”
and “CHINA”. First, we have to create these VRFs:

ISP(config)#
ip vrf AUSTRALIA
exit
ip vrf CHINA
exit
ip vrf JAPAN
exit

Globally we create the VRFs, one for each customer. Our next step is to add the interfaces of the ISP
router to the correct VRF. Here’s how:

ISP(conf t)#
ISP(config)#interface GigabitEthernet0/0
ISP(config-if)# ip vrf forwarding AUSTRALIA
% Interface GigabitEthernet0/0 IPv4 disabled and address(es) removed due to enabling VRF
AUSTRALIA
ISP(config-if)#interface GigabitEthernet0/1
ISP(config-if)# ip vrf forwarding JAPAN
% Interface GigabitEthernet0/1 IPv4 disabled and address(es) removed due to enabling VRF
JAPAN
ISP(config-if)#interface GigabitEthernet0/2
ISP(config-if)# ip vrf forwarding CHINA
% Interface GigabitEthernet0/2 IPv4 disabled and address(es) removed due to enabling VRF
CHINA

On the interface level we use the ip vrf forwarding command to assign the interface to the correct
VRF. Once you do this, you’ll have to add the IP address again. Let’s configure the remaining
interfaces:

ISP(conf t)#
interface GigabitEthernet0/0
ip address [Link] [Link]
interface GigabitEthernet0/1
ip address [Link] [Link]
interface GigabitEthernet0/2
ip address [Link] [Link]

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

All interfaces are now configured. There’s a useful command you can use to see all the VRFs and
their interfaces:
ISP#show ip vrf
Name Default RD Interfaces
AUSTRALIA <not set> Gi0/0
CHINA <not set> Gi0/2
JAPAN <not set> Gi0/1
ISP#

Our VRFs are configured, let’s take a look at the global routing table of the ISP router:
ISP#show ip route connected

ISP#

The global routing table has no entries, this is because all interfaces were added to a VRF. Let’s check
the VRF routing tables:

ISP#show ip route vrf JAPAN connected


Routing Table: JAPAN
[Link]/8 is variably subnetted, 2 subnets, 2 masks
C [Link]/24 is directly connected, GigabitEthernet0/1
L [Link]/32 is directly connected, GigabitEthernet0/1

ISP#show ip route vrf AUSTRALIA connected


Routing Table: AUSTRALIA
[Link]/8 is variably subnetted, 2 subnets, 2 masks
C [Link]/24 is directly connected, GigabitEthernet0/0
L [Link]/32 is directly connected, GigabitEthernet0/0

ISP#show ip route vrf CHINA connected


Routing Table: CHINA
[Link]/8 is variably subnetted, 2 subnets, 2 masks
C [Link]/24 is directly connected, GigabitEthernet0/2
L [Link]/32 is directly connected, GigabitEthernet0/2

We use the show ip route command but you’ll need to specify which VRF you want to look at. As you
can see, each VRF has its own routing table with the interfaces that we configured earlier.

If you want to do something on the router like sending a ping then you’ll have to specify which VRF
you want to use. By default, it will use the global routing table. Here’s an example how to send a
ping:

ISP#ping vrf JAPAN [Link]


Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms

ISP#ping vrf AUSTRALIA [Link]

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

Type escape sequence to abort.


Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms

ISP#ping vrf CHINA [Link]


Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/5/18 ms

That’s easy enough, just don’t forget to specify the correct VRF.

VRF vs VRF LITE

Below table compares both the VRF and VRF Lite and shares their differences:

VRF VRF LITE

VRF is VRF with MPLS and MPBGP VRF-lite is normally VRF without MPLS and
MPBGP

Full VRF is useful in Service Provider WAN environment where VRF lite is generally used in enterprise and Data
multiple customers are required to be routes across Center environment.
overlapping IP address space. Commonly limited to PE
(Provider edge) equipment.

May require Route target as part of configuration in service Doesn’t need Route target as part of
provider domain. configuration
(route target is like bgp extended community.
route target appears in a field in the update
messages)

VRF detail is shared between devices running VRF VRFs are locally significant and detail is not shared
between devices running VRF lite

Highly scalable solution Not scalable.

Is a super-set of VRF-lite Is a super-set of VRF MPLS

Scope – Useful in Service Provider environment for Scope – Useful in Customer Enterprise / Data
segregating Customer Routing Table on the WAN (MPLS) side. Center environment for segregating Customer
Security Zones in routing tables on the LAN side of
IT setup.

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN


CCNP ENTERPRISE 2024 LAB WORKBOOK|| TRAINER: SAGAR DHAWAN || [Link]/C/NETWORKJOURNEY

TRAINER: SAGAR DHAWAN | [Link] | [Link]/c/NetworkJourney | LinkedIN

You might also like