CCNA_Routing_Word
CCNA_Routing_Word
Document 11
Dynamic Routing: 1
Dynamic routing protocols, as their name suggests, are used to dynamically exchange
routing information between routers. Their implementation allows network topologies to
dynamically adjust to changing network conditions, and to ensure that efficient and
redundant routing continues despite any changes.
Dynamic routing is a mechanism through which routing information is exchanged between
routers to determine the optimal path between network devices. A routing protocol is used
to identify and announce network paths.
Administrative Distance:
Administrative Distance (AD) is used to rate the trustworthiness of routing information
received from the neighbour router. The route with the least AD will be selected as the
best route to reach the destination remote network and that route will be placed in the
routing table. It defines how reliable a routing protocol is. It is an integer value ranging
from 0 to 255 where 0 shows that the route is most trusted and 255 means that no
traffic will be passed through that route or that route is never installed in the routing
table.
Default admin distances:
Example –
The smaller the value of AD, the more reliable the routing protocol is. For example, if a
Manoj Reddy – Routing
Document
Manoj Reddy – Routing
Document 13
router receives an advertised route to a remote destination network from OSPF and
EIGRP, then the advertised route of EIGRP will be considered as the best route and will
be placed in the routing table as EIGRP has lower AD.
Autonomous System (AS) is a group of routers and networks working under a single
administrative domain. It is a 16-bit value that defines the routing domain of the
routers. These numbers range from 1 to 65535.
•
Private Autonomous system Number –
Private Autonomous System Number are 16-bit values that range from 64512 to
65535. The service provider will provide a private autonomous system number to
the customer when the customer wants multi-connection to a single ISP (single
home or dual home network) but not to more than one ISPs. These are provided
in order to conserve the autonomous system numbers.
• Assigning of AS numbers –
The Autonomous numbers are first assigned by IANA (Internet Assign Number
Manoj Reddy – Routing
Document
Manoj Reddy – Routing
Document 14
Hop Count:
Hop count is the number of routers occurring in between the source and destination
network. The path with the lowest hop count is considered as the best route to reach a
network and therefore placed in the routing table. RIP prevents routing loops by limiting
the number of hops allowed in a path from source and destination. The maximum hop
count allowed for RIP is 15 and a hop count of 16 is considered as network unreachable.
RIP timers:
• Update timer: The default timing for routing information being exchanged by the
router's operating RIP is 30 seconds. Using an Update timer, the routers
exchange their routing table periodically.
• Invalid timer: If no update comes until 180 seconds, then the destination router
considers it invalid. In this scenario, the destination router mark hops count as 16
for that router.
• Hold down timer: This is the time for which the router waits for a neighbour router
to respond. If the router can’t respond within a given time, then it is declared dead.
It is 180 seconds by default.
• Flush time: It is the time after which the entry of the route will be flushed if it
doesn’t respond within the flush time. It is 60 seconds by default. This timer starts
after the route has been declared invalid and after 60 seconds i.e. time will be 180
+ 60 = 240 seconds.
LAB – RIP:
Router rip
version 2
network 10.0.0.0
network 192.168.1.0
router rip
version 2
network 10.0.0.0
network 192.168.2.0
#no shutdown
• Hello
• Update
• Query
• Reply
• ACK (Acknowledgement)
Hello packets are used for neighbor discovery. As soon as you send hello packets and
receive them, your EIGRP routers will try to form the neighbor adjacency. Before sharing
EIGRP updates, EIGRP routers must establish neighbor associations.
The purpose of the hello message is to:
The “Hello” message is meant to find out who your neighbor are.
On whatever sort of link, it is always multicast.
The timer is set to 5 seconds and is transmitted regularly.
15 seconds of hold-down timer is there.
Update packets have routing information and are sent reliably to whatever router that
requires this information. Update packets can be sent to a single neighbor using unicast
or to a group of neighbors using multicast.
Query: When a router does not have a feasible successor for a destination prefix, it
sends a query packet to its neighbours asking if they have a successor to the destination.
It Helps in faster Convergence and uses Multicast/Unicast
Reply: A reply packet is sent in response to a query packet.
It's reliable and Unicast
ACK: Used to acknowledge the receipt of update, Query and reply to messages
ACK packets do not require an acknowledgment. ACK packets are Unicast hello packets.
EIGRP has its own reliability mechanism to acknowledge the receipt of its multiple types of
packets and uses Reliable Transport Protocol (RTP) to deliver or exchange packets between
the neighbors in a guaranteed and ordered way.
No auto-summary is needed because, by default EIGRP will behave like a classful routing
protocol which means it won’t advertise the subnet mask along the routing information.
In this case, that means that 1.1.1.0/24 and 2.2.2.0/24 will be advertised as 1.0.0.0/8
and 2.0.0.0/8. Disabling auto-summary will ensure EIGRP sends the subnet mask along.
EIGRP Tables:
a. Neighbor Table (#sh ip eigrp neighbor)
b. Topology Table (#sh ip eigrp topology)
c. Routing Table (#sh ip route)
Neighbor Table: Contains list of directly connected routers.
In the below example we have 02 routers running on EIGRP.
• H (Handle): Here, you will find the order when the neighbor adjacency was
established. Your first neighbor will have a value of 0, the second neighbor a
value of 1, and so on.
• Hold: (sec): this is the hold-down timer per EIGRP neighbor. Once this timer
expires, we will drop the neighbor adjacency. The default hold-down timer is 15
seconds.
• 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 your neighbor and receive an acknowledgment packet back.
P: Passive—The router has not received any EIGRP input from a neighbor, and the
network is assumed to be stable.
A: Active—When a route or successor is down, the router attempts to find an
alternative path.
After local computation, the router realizes that it must query the neighbor to see
whether it can find a feasible successor or path.
Update—A value in this field identifies that the router has sent an update packet to a
neighbor.
Query—A value in this field identifies that the router has sent a query packet to a
neighbor.
Reply—A value here shows that the router has sent a reply to the neighbor.
r - This is used in conjunction with the query counter; the router has sent out a query
and is awaiting a reply.
Feasible distance (FD)—This is the metric or cost to the destination from the router.
(46251776/46226176): -The first number is the EIGRP metric that represents the
feasible distance, or the cost to the destination. The number after the slash is the EIGRP
metric that the peer advertised, or the advertised distance.
Routing Table: The best route to the destination will be stored. This Best Routes are
Successors.
EIGRP LAB 2:
o If the receiving neighbor does not have a route, it queries all of its own
neighbors asking for an alternative route.
o The queries propagate through the network creating an expanding tree of
queries.
o When a router responds to the query, it stops propagating on that portion
of the network. However, the query can still propagate in other portions
of the network as the other routers attempt to find alternative paths.
• When a route goes active, a reply must be received for every generated queries,
otherwise it stays active the whole time.
Common causes of SIAs:
o Router has high CPU usage or memory problems that results in the router
being too busy to respond or unable to allocate enough memory to
process the query or build the reply packet.
o Bad link between the routers, which allows the two routers just enough to
keep the route connected and receiving packets, but not enough that
some packets or lost therefore some queries and replies are lost.
o Unidirectional link, which results with traffic only flowing in one direction.
o Before
• Router A sends a query for network 10.1.1.0/24 to Router B
• Router B has no entry for this network, so it queries Router C
• If problem exists beween router B and C, the reply packet from Router C to
Router B might be delayed or lost.
• Router A has no visibility of downstream progress and assumes that no response
indicates problems with Router B
• After Router A’s 3-minute active timer expires, the neighbor relationship with
Router B is reset, along with all known routes from Router B.
o After
• With the Active Process Enhancement feature, Router A queries downstream
Router B (with an SIA-Query) at the midway point of the active timer (one and a
half minutes by default) about the status of the route.
• Router B responds (with an SIA-Reply) that it is searching for a replacement
route.
• Upon receiving this SIA-Reply response packet, Router A validates the status of
Router B and does not terminate the neighbor relationship.
• Meanwhile, Router B will send up to three SIA-Queries to Router C. If they go
unanswered, Router B will terminate the neighbor relationship with Router C.
• Router B will then update Router A with an SIA-Reply indicating that the network
10.1.1.0/24 is unreachable.
• Routers A and B will remove the active route from their topology tables.
• The neighbor relationship between Routers A and B remains intact.
o Query is send when the router losses a route from its routing table.
o SIA timers :
active-time = 3 min by default
Network Summarization:
Summarization means we advertise one summary route that represents multiple
networks.
Route summarization is a method where we create one summary route that represent
multiple networks/subnets. It’s also called route aggregation or supernetting.
Summarization has several advantages:
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.
RIP Summarization:
EIGRP metric = [K1 * bandwidth + (K2 * bandwidth) / (256 – load) + K3 * delay] * [K5 /
(reliability + K4)]
Down state:
At this point both routers have no information about each other. R1 does not know which
protocol is running on R2. Vice versa R2 have no clue about R1. In this stage OSPF learns
about the local interfaces which are configured to run the OSPF instance.
In down state routers prepares themselves for neighborship process. In this state routers
choose RID (Router ID). RID plays a big role in OSPF process. Before we move in next
state let’s understand what RID is.
Attempt/Init state:
Neighborship building process starts from this state. R1 multicasts first hello packet so
other routers in network can learn about the existence of R1 as an OSPF router. This hello
packet contains Router ID and some essential configuration values such as area ID, hello
interval, hold down timer, stub flag and MTU. Essential configuration values must be
same on routers who want to build an OSPF neighborship.
• subnet
• area id
• hello and dead interval timers
• authentication
• area stub flag
• MTU
Two-way state:
If essential configuration values match, R2 will add R1 in neighbor table and reply with
its hello packet. As R2 knows the exact address of R1, it will use unicast for reply. Beside
RID and configuration values, this packet also contains the R2’s neighbor table data. As
we know R2 has already added R1 in its neighbor table. So, when R1 will see R2’s
neighbor table data, R1 would also see its name in this data. This will assure R1 that R2
has accepted its neighborship request.
At this point: -
• R2 has checked all essential configuration values listed in hello packet which it
received from R1.
• R2 is ready to build neighborship with these parameters.
• R2 has added R1 in its neighbor table.
• To continue the neighborship process, R2 has replied with its hello packet.
• R1 has received a reply from neighbor, with its own RID listed in R2’s neighbor
table.
OSPF uses different types of exchange process for different types of networks: -
It is a Cisco specific network type. It connects a single pair of routers. HDLC and PPP are
example of point-to-point network type. In this type of network: -
DR and BDR:
OSPF routers in a network which need DR (Designated router) and BDR (Backup
designated router) do not share routing information directly with all each other’s. To
minimize the routing information exchange, they select one router as designated router
(DR) and one other router as backup designated router (BDR). Remaining routers are
known as DROTHERs.
All DROTHERs share routing information with DR. DR will share this information back to
all DROTHERs. BDR is a backup router. In case DR is down, BDR will immediately take place
the DR and would elect new BDR for itself.
Main reason behind this mechanism is that routers have a central point for routing
information exchange. They need not to update each other’s. A DROTHER only need to
update the central point (DR) and other DROTHERs will receive this update from DR.
When the 2-Way state is complete, the DR and DBR routers are elected, considering they
are on a broadcast/NBMA networks.
EXSTART STATE:
This state specifies that DR and BDR have been elected and master-slave relation is
determined. An initial sequence number for adjacency formation is also selected. The
router with the highest router ID becomes the master and begins to exchange Link State
data. Only the Master router can increment the sequence number.
EXCHANGE STATE:
In this state, OSPF routers exchange DataBase Descriptor (DBD) packets co ets. Thntain
Link State Advertisement (LSA) headers describing the content of the entire Link State
Database (LSD). The contents of the DataBase Descriptor (DBD) received by the router
are compared with its own Link State Database (LSD) to check if changes or additional
link-state information is available from its neighbor.
LOADING STATE:
In this state, routers exchange full Link State information based on DataBase Descriptor
(DBD) provided by neighbors, the OSPF router sends Link State Request (LSR) and receives
Link State Update (LSU) containing all Link State Advertisements (LSAs).
Link State Updates (LSU) act as an envelope that contains all the Link State
Advertisements (LSAs) – that have been sent to neighbors with new changes or new
networks learned.
FULL STATE:
Full state is the normal operating state of OSPF that indicates everything is functioning
normally. In this state, routers are fully adjacent with each other, and all the router and
network Link State Advertisements (LSAs) are exchanged, and the routers' databases are
fully synchronized.
For Broadcast and NBMA media, routers will achieve the Full State with their DR and BDR
router only, while for Point-to-point and Point-to-multipoint networks a router should be
in the Full State with every neighbouring router.
OSPF Process (Summarized format):
Down – indicates that no Hellos have been heard from the neighbouring router.
Init – indicates a Hello packet has been heard from the neighbor, but two way
communication has not yet been initialized.
2-Way – indicates that bidirectional communication has been established. Recall that
Hello packets contain a neighbor field. Thus, communication is considered 2-Way once a
router sees its own Router ID in its neighbor’s Hello Packet. Designated and Backup
Designated Routers are elected at this stage.
ExStart – indicates that the routers are preparing to share link state information.
Master/slave relationships are formed between routers to determine who will begin the
exchange.
Exchange – indicates that the routers are exchanging Database Descriptors (DBDs). DBDs
contain a description of the router’s Topology Database. A router will examine a
neighbor’s DBD to determine if it has information to share.
Loading – indicates the routers are finally exchanging Link State Advertisements,
containing information about all links connected to each router. Essentially, routers are
sharing their topology tables with each other.
Full – indicates that the routers are fully synchronized. The topology table of all routers in
the area should now be identical. Depending on the “role” of the neighbor, the state may
appear as:
• Full/DR – indicating that the neighbor is a Designated Router (DR)
• Full/BDR – indicating that the neighbor is a Backup Designated Router (BDR)
• Full/DROther – indicating that the neighbor is neither the DR or BDR On a multi-access
network, OSPF routers will only form Full adjacencies with DRs and BDRs. Non-DRs and
non-BDRs will still form adjacencies, but will remain in a 2-Way State. This is normal OSPF
behavior.
OSPF Tables:
The OSPF process builds and maintains three sees:
• A neighbor table – contains a list of all neighbouring routers.
(#sh ip ospf neighbors)
• A Database table – contains a list of all possible routes to all known networks within an
area. (sh ip ospf database)
• A routing table – contains the best route for each known network. (#sh ip route)
OSPF uses the concept of areas. An area is a logical grouping of contiguous networks
and routers. All routers in the same area have the same topology table, but they don’t
know about routers in the other areas. The main benefits of creating areas is that the
size of the topology and the routing table on a router is reduced, less time is required to
run the SPF algorithm and routing updates are also reduced.
Each area in the OSPF network has to connect to the backbone area (area 0). All router
inside an area must have the same area ID to become OSPF neighbors. A router that has
interfaces in more than one area (area 0 and area 1, for example) is called Area Border
Router (ABR). A router that connects an OSPF network to other routing domains (EIGRP
network, for example) is called Autonomous System Border Router (ASBR).
WildCard Mask:
Wildcard masks are used to specify a range of network addresses. They are commonly
used with routing protocols (like OSPF) and access lists. Just like a subnet mask, a
wildcard mask is 32 bits long. It acts as an inverted subnet mask, but with a wildcard
mask, the zero bits indicate that the corresponding bit position must match the same bit
Manoj Reddy – Routing
Document
Manoj Reddy – Routing
Document 128
position in the IP address. The one bits indicate that the corresponding bit position
doesn’t have to match the bit position in the IP address.
Task: Change the area 0 to area 10 in any one router and verify if the neighborship is
forming:
In Router-1 changed the area value to area 100
Router(config)#router ospf 100
Router(config-router)#router-id 2.2.2.2
Router(config-router)# log-adjacency-changes
Router(config-router)# network 192.168.1.0 0.0.0.255 area 10 ------> changed from area 0 to area10
Router#
Router#
00:18:24: %OSPF-4-ERRRCV: Received invalid packet: mismatch area ID, from backbone area must be
virtual-link but not found from 192.168.1.2, GigabitEthernet0/0/0
Type 3 = Summary LSA: This is generated by an ABR to advertise routes from one
area to another (eg., LSA to Area 0 signifying Area outes and vice versa). Summarization
is not on by default.
Type 1 router LSAs always stay within the area. OSPF however works with multiple areas
and you probably want full connectivity within all the areas. R1 is flooding a router LSA
within the area so R2 will store this in its LSDB. R3 and R4 also need to know about the
networks in Area 2.
R2 is going to create a Type 3 summary LSA and flood it into area 0. This LSA will flood
into all the other areas of our OSPF network. This way all the routers in other areas will
know about the prefixes from other areas.
The name “summary” LSA is very misleading. By default, OSPF is not going to summarize
anything for you. If you are looking at the routing table of an OSPF router and see
some O IA entries, you are looking at LSA type 3 summary LSAs. Those are your inter-
area prefixes!
Type 4 = ASBR Summary LSA: This is generated by an ABR to notify routers of the
presence of an ASBR in a particular area.
This prefix will be redistributed into OSPF. R1 (our ASBR) will take care of this and create
a type 5 external LSA for this. Don’t forget we still need type 4 summary ASBR LSA to
locate R1. If you ever tried redistribution with OSPF you might have seen O E1 or E2
entries. Those are the external prefixes and our type 5 LSAs.
This is generated by an ASBR, one for each route that is redistributed into OSPF. Flooded
everywhere, except for special areas.
In the picture R1 is still our ASBR redistributing information from RIP into OSPF.
Since type 5 is not allowed we must think of something else. That’s why we have a type
7 external LSA that carries the exact same information but is not blocked within the
NSSA area. R2 will translate this type 7 into a type 5 and flood it into the other areas.
Let me summarize the LSA types:
• Type 1 – Router LSA: The Router LSA is generated by each router for each area it
is located. In the link-state ID you will find the originating router’s ID.
• Type 2 – Network LSA: Network LSAs are generated by the DR. The link-state ID
will be the interface IP address of the DR.
• Type 3 – Summary LSA: The summary LSA is created by the ABR and flooded
into other areas.
• Type 4 – Summary ASBR LSA: Other routers need to know where to find the
ASBR. This is why the ABR will generate a summary ASBR LSA which will include
the router ID of the ASBR in the link-state ID field.
• Type 5 – External LSA: also known as autonomous system external LSA: The
external LSAs are generated by the ASBR.
• Type 6 – Multicast LSA: Not supported and not used.
• Type 7 – External LSA: also known as not-so-stubby-area (NSSA) LSA: As you can
see area 2 is a NSSA (not-so-stubby-area) which doesn’t allow external LSAs (type
5). To overcome this issue, we are generating type 7 LSAs instead.
OSPF LSA LAB (LAB –3);
By using the show ip ospf database we can look at the LSDB and we can see the type 1
router LSAs, type 2 network LSAs and the type 3 summary LSAs here. What else do we
find here?
OSPF routers build a Topology Database of all links within their area, and all routers
within an area will have an identical topology database. Routing updates between these
routers will only contain information about links local to their area. Limiting the topology
database to include only the local area conserves bandwidth and reduces CPU loads.
Area 0 is required for OSPF to function and is considered the “Backbone” area. As a
rule, all other areas must have a connection into Area 0, though this rule can be
bypassed using virtual links (explained shortly). Area 0 is often referred to as the transit
area to connect all other areas. OSPF routers can belong to multiple areas and will thus
contain separate Topology databases for each area. These routers are known as Area
Border Routers (ABRs). Consider the above example. Three areas exist: Area 0, Area 1,
and Area 2. Area 0, again, is the backbone area for this Autonomous System.
Both Area 1 and Area 2 must directly connect to Area 0. Routers A and B belong fully to
Area 1, while Routers E and F belong fully to Area 2. These are known as Internal
Routers. Router C belongs to both Area 0 and Area 1. Thus, it is an ABR. Because it has
an interface in Area 0, it can also be considered a Backbone Router. The same can be
said for Router D, as it belongs to both Area 0 and Area 2.
Now consider the above example. Router G has been added, which belongs to Area 0.
However, Router G also has a connection to the Internet, which is outside this
Autonomous System. This makes Router G an Autonomous System Border Router
(ASBR).
A router can become an ASBR in one of two ways:
• By connecting to a separate Autonomous System, such as the Internet
• By redistributing another routing protocol into the OSPF process.
ASBRs provide access to external networks. OSPF defines two “types” of external routes:
• Type 2 (E2) – Includes only the external cost to the destination network. External cost
is the metric being advertised from outside the OSPF domain. This is the default type
assigned to external routes.
• Type 1 (E1) – Includes both the external cost, and the internal cost to reach the ASBR,
to determine the total metric to reach the destination network. Type 1 routes are always
preferred over Type 2 routes to the same destination.
Thus, the four separate OSPF router types are as follows: • Internal Routers – all router
interfaces belong to only one Area. • Area Border Routers (ABRs) – contains interfaces in
at least two separate areas • Backbone Routers – contain at least one interface in Area
0 • Autonomous System Border Routers (ASBRs) – contain a connection to a separate
Autonomous System
From the above example, the following can be determined:
• Routers A, B, E, and F are Internal Routers.
• Routers C and D are ABRs, Router G is an ASBR
OSPF Authentication:
• Routers within a standard area will share Router (Type 1) and Network (Type 2) LSAs to
build their topology tables. Once fully synchronized, routers within an area will all have
identical topology tables.
• Standard areas will accept Network Summary (Type 3) LSAs, which contain the
routes to reach networks in all other areas.
• Standard areas will accept ASBR Summary (Type 4) and External (Type 5) LSAs, which
contain the route to the ASBR and routes to external networks respectively
Configuration of standard areas is straight forward:
Router(config)# router ospf 1
Router(config-router) # network 10.1.0.0 0.0.7.255 area 1
• Totally Stubby areas will also not accept Type 4 or Type 5 LSAs, detailing routes to
external networks.
Again, the purpose of Totally Stubby areas is to limit the number of LSAs flooded into
the area, to conserve bandwidth and router CPUs. The Stub’s ABR will instead
automatically inject a default route into the Totally Stubby area, so that those routers
can reach both inter-area networks and external networks. The ABR will be the next-hop
for the default route.
Totally Not So Stubby Area (TNSSA) – Like a Totally Stubby area; prevents
both inter-area and external routes from flooding into an area, unless those external
routes originated from an ASBR within the NSSA area. • Like Standard and Stub areas,
TNSSA area routers will share Type 1 and Type 2 LSAs to build their topology tables.
• TNSSA areas will not accept Type 3 LSAs to other areas.
• TNSSA areas will not accept Type 4 or Type 5 LSAs, detailing routes to external
networks. • If an ASBR exists within the TNSSA area, that ASBR will generate Type 7
Manoj Reddy – Routing
Document
Manoj Reddy – Routing
Document 141
LSAs. With the exception of not accepting inter-area routes, TNSSA areas are identical in
function to NSSA areas. Configuration of TNSSA areas is relatively simple:
Router(config)# router ospf 1
Router(config-router) # network 10.1.0.0 0.0.7.255 area 1
Router(config-router) # area 1 nssa no-summary
The area 1 nssa no-summary command is configured only on the ABR of the TNSSA area;
other routers within the area are configured with the area 1 nssa command.
• Must be configured between two ABRs of which one must be connected to area0
• The transit area may not be a stub area and must have full routing information.
• The virtual link will transition to the fully functional point-to-point interface state
when a route to the neighbouring ABR is found in the routing table.
• The maximum path cost in the transit area should not exceed 65535; else, the
virtual link will not come up.
• To see the cost of using the transit area, “show ip OSPF virtual link” and refer to
‘cost of using.
------------------------------------------------------------------------
Router3#sh run | sec ospf
router ospf 100
router-id 3.3.3.3
log-adjacency-changes
area 10 virtual-link 2.2.2.2
network 192.168.20.0 0.0.0.255 area 10
network 192.168.30.0 0.0.0.255 area 0
-------------------------------------------------------------------------
Router#sh run | sec ospf
router ospf 100
router-id 4.4.4.4
log-adjacency-changes
network 192.168.30.0 0.0.0.255 area 0
Verification:
R1 is learning the prefixes from area 0
From Router-3, below is the output and the Virtual Link is formed successfully.
Route Re-distribution:
Manoj Reddy – Routing
Document
Manoj Reddy – Routing
Document 144
log-adjacency-changes
redistribute eigrp 1 subnets >==== Redistribution of OSPF to EIGRP
network 192.168.20.0 0.0.0.255 area 0
Verification:
Router1#sh ip route eigrp (D EX routes are EIGRP External routes learning from OSPF)
The ping will works fine now from OSPF to EIGRP and Vice versa.
192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks
D EX 192.168.20.0/24 [170/1683712] via 192.168.10.2, 00:01:11, GigabitEthernet0/0/0
192.168.30.0/24 is variably subnetted, 2 subnets, 2 masks
D EX 192.168.40.0/24 [170/1683712] via 192.168.10.2, 00:01:11, GigabitEthernet0/0/0
Router3#sh ip route ospf
OSPF is learning the EIGRP routes now called O E2 in the below table.
O E2 192.168.10.0 [110/20] via 192.168.20.1, 00:01:00, GigabitEthernet0/0/0
O E2 192.168.30.0 [110/20] via 192.168.20.1, 00:01:00, GigabitEthernet0/0/0
Router3#ping 192.168.30.100 (able to ping the LAN Gateway at Router 1 from R3)
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.30.100, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/0 ms
router rip
version 2
network 192.168.10.0
network 192.168.30.0
------------------------------------------------
Router3#sh run | sec ospf
router ospf 1
log-adjacency-changes
network 192.168.20.0 0.0.0.255 area 0
network 192.168.40.0 0.0.0.255 area 0
------------------------------------------------------
Router2#sh run | sec rip
redistribute rip metric 1 /// OSPF to RIP re-distribution
router rip
version 2
redistribute ospf 1 metric 1 ////RIP to OSPF re-distribution
network 192.168.10.0
----------------------------------------------------------
Output from R1 and learning OSPF prefixes.
Router1#sh ip route rip
192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks
R 192.168.20.0/24 [120/1] via 192.168.10.2, 00:00:01, GigabitEthernet0/0/0
192.168.30.0/24 is variably subnetted, 2 subnets, 2 masks
R 192.168.40.0/24 [120/1] via 192.168.10.2, 00:00:01, GigabitEthernet0/0/
------------------------------------------------------------------------------------------------------------------
Let’s configure a static default route on R1 to reach the networks behind the ISP1
router:
R1#ping 4.4.4.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/2/4 ms
R1(config)#router rip
R1(config-router) #default-information originate
The command above will tell RIP to advertise the static default route.
Both routers have a default route, learned from R1. Let’s test these:
R2#ping 4.4.4.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 3/3/4 ms
Standard ACL:
Can be named or numbered ACL
The access-list number range is from 1-99 and 1300-1699
Can block a Network, Host and Subnet and all services are blocked
Filtering is done based on only Source IP address.
The command syntax for configuring a standard numbered ACL:
The first value {1-99 or 1300-1999} specifies the standard ACL number range.
The second value specifies whether to permit or deny the configured source IP address
traffic.
The third value is the source IP address that must be matched.
The fourth value is the wildcard mask to be applied to the previously configured IP
address to indicate the range.
Extended ACL:
Can be named or numbered
The access-list number range is from 100-199 and 2000-2699
We can allow or deny a Network, Host, Subnet and Service
Selected services can be blocked
Filtering is done based on Source IP, Dest IP, Protocol and port no
Extended ACLs filter traffic based on Layers 3 and 4 source and destination
information thus giving greater flexibility and control over network access than standard
ACLs. The command syntax for configuring an extended numbered ACL:
The first value {100-199 or 2000-2699} specifies the extended ACL number range.
The second value specifies whether to permit or deny traffic according to the criteria
that follows.
The third value indicates protocol type, that is, IP, TCP, UDP, ICMP or other IP-sub
protocol
The source and destination IP address and their associated wildcard masks determine
where traffic originates and its destination, respectively.
Numbered ACL - If you refer to the ACL by a numeric ID, you can use 1 - 99 for a
standard ACL or 100 - 199 for an extended ACL.
Named ACL - If you refer to the ACL by a name, you specify whether the ACL is a
standard ACL or an extended ACL, then specify the name.
Functionally there is no difference. Named acl's allows us to give them some descriptive
name for identification. The other differences are the fact that with numbered acl's, the
type (i.e., standard, extended, etc) is identified by the range that the number is in as
opposed to a keyword used as the acl is declared.
• Only one ACL per interface, per protocol, per direction is allowed.
• ACLs are processed top-down; the most specific statements must go at the top of
the list. Once a packet meets the ACL criteria, the ACL processing stops, and the
packet is either permitted or denied.
• ACLs are created globally and then applied to interfaces.
• An ACL can filter traffic going through the router, or traffic to and from the
router.
• All ACLs have an implicit “deny all” statement at the end. Therefore, every ACL
must have at least one permit statement to allow any traffic to pass.
ACL LAB:
router rip
version 2
network 10.0.0.0
network 192.168.1.0
no auto-summary
Router 3 – Config:
router rip
version 2
network 11.0.0.0
Manoj Reddy – Routing
Document
Manoj Reddy – Routing
Document 154
network 192.168.3.0
no auto-summary
network 192.168.2.0
no auto-summary
Creating the ACL Rules as per the requirement in R2:
access-list 10 deny host 192.168.1.1
access-list 10 deny host 192.168.1.2
access-list 10 deny 192.168.3.0 0.0.0.255
access-list 10 permit any
Implementation:
interface FastEthernet2/3
no switchport
ip address 192.168.2.100 255.255.255.0
ip access-group 10 out ---- > Applying the ACL group 10 to the outbound interface of f2/3
duplex auto
speed auto
Now 192.168.1.1, 19.168.1.2 won’t be able to reach 192.168.2.1, and 192.168.2.2
They will get @Destination host unreachable message as like below:
Output from 192.168.1.1:
Output from 192.168.1.1 where it can reach the other networks (NO ACLs configured for
192.168.3.0 network, and that’s why it’s reachable)
Output from 192.168.3.2, where it’s unable to reach 192.168.2.1 is unable to reach because we
have configured ACL
1. Create the topology like above, and assign the basic IP addressing
2. Choose any routing protocol to form the neighbour relationship
Manoj Reddy – Routing
Document
Manoj Reddy – Routing
Document 156
TASK:
5. Will make 192.168.10.2, should not ping to Server. - 192.168.40.1
6. 192.168.10.2 should ping all the other neighbours but not to Server.
7. Host – 192.168.20.2 should not be able to get the FTP Services from the server
Let’s get started with the RIP Configs:
network 192.168.40.0
no auto-summary
Now with the help of RIP we have the connectivity established towards the Server.
The ping from all the LAN Hosts to the server would work.
First check the reachability (PING) then configure the ACLs on the router.
Let’s configure the Extended ACLs:
ip access-group 143 in ------ > applying the access-group 143 to the Gi0/0/1 interface
Below is the Output from 192.168.10.2, the ping now is not successful because of ACL.
The ping to Server (192.168.40.1) is not working whereas to another any host like
ex.,.192.168.20.2 is working fine.
NO ACLs configured, and the FTP is successful now from the Host: 192.168.20.1
On Router 1:
access-list 122 deny tcp host 192.168.20.2 host 192.168.40.1 eq ftp
access-list 122 permit ip any any
Implementation:
interface FastEthernet2/3
no switchport
reply belongs to which host (because source port numbers for both A and B are the
same). Hence, to avoid such a problem, NAT masks the source port number as well and
makes an entry in the NAT table.
NAT inside and outside addresses –
• Inside local address – An IP address that is assigned to a host on the Inside (local)
network. The address is probably not an IP address assigned by the service
provider i.e., these are private IP addresses. This is the inside host seen from the
inside network.
• Inside global address – IP address that represents one or more inside local IP
addresses to the outside world. This is the inside host as seen from the outside
network.
• Outside local address – This is the actual IP address of the destination host in the
local network after translation.
• Outside global address – This is the outside host as seen from the outside
network. It is the IP address of the outside destination host before translation.
Network Address Translation (NAT) Types –
There are 3 ways to configure NAT:
of the pool is not free, then the packet will be dropped as only a fixed number of
private IP addresses can be translated to public addresses. Suppose if there is a
pool of 2 public IP addresses then only 2 private IP addresses can be translated at
a given time. If 3rd private IP address wants to access the Internet, then the
packet will be dropped therefore many private IP addresses are mapped to a pool
of public IP addresses. NAT is used when the number of users who want to access
the Internet is fixed. This is also very costly as the organization must buy many
global IP addresses to make a pool.
❖ Port Address Translation (PAT) – This is also known as NAT overload. In this,
many local (private) IP addresses can be translated to a single registered IP
address. Port numbers are used to distinguish the traffic i.e., which traffic
belongs to which IP address. This is most frequently used as it is cost-effective as
thousands of users can be connected to the Internet by using only one real global
(public) IP address.
❖ Advantages of NAT –
1.NAT conserves legally registered IP addresses.
2.It provides privacy as the device’s IP address, sending and receiving the traffic,
will be hidden.
3.Eliminates address renumbering when a network evolves.
❖ Disadvantage of NAT –
1. Translation results in switching path delays.
2.Certain applications will not function while NAT is enabled.
3. Complicates tunnelling protocols such as IPsec.
4. Also, the router being a network layer device, should not tamper with port
numbers (transport layer) but it must do so because of NAT.
Working:
When the PC sends the server a request via the router, the router will first map the
private IP address of the PC into a public IP address from the pool. The router will then
forward the request to the server, with the public IP address of the PC as the source
address.
When the server responds with a packet destined for the PC, the router will investigate
its dynamic NAT table and translate the public IP of the PC to the private one, then
forward the packet to the PC via the ip NAT inside interface
show ip nat translations command will be used to check the NAT table in the router.
Tip: You can create an access list of private IP addresses and a pool of public IP addresses
then enable Port Address Translation on a router in a similar way to dynamic NAT
configuration. The only difference in configurations between PAT and dynamic NAT if PAT
configuration is done this way is the word overload.
Output of SH IP NAT TRANSLATIONS:
• NTP servers have access to highly precise atomic clocks and GPU clocks
• It uses Coordinated Universal Time (UTC) to synchronize CPU clock time.
• Avoids even having a fraction of vulnerabilities in information exchange
communication.
• Provides consistent timekeeping for file servers
Working of NTP:
NTP is a protocol that works over the application layer, it uses a hierarchical system of
time resources and provides synchronization within the stratum servers. First, at the
topmost level, there is highly accurate time resources’ ex. atomic or GPS clocks. These
clock resources are called stratum 0 servers, and they are linked to the below NTP server
called Stratum 1,2 or 3 and so on. These servers then provide the accurate date and time
so that communicating hosts are synced to each other.
Architecture of Network Time Protocol:
Advantages of NTP:
• When the servers are down the sync time is affected across a running
communication.
• Servers are prone to error due to various time zones and conflict may occur.
• Minimal reduction of time accuracy.
• When NTP packets are increased synchronization is conflicted.
• Manipulation can be done in synchronization.
How does NTP synchronize?
The following steps implicate the NTP time synchronization:
surfaces via User Datagram Protocol (UDP) on port 123 and sustains broadcast
synchronization of peer computer clocks.
NTP Basic LAB for time sync:
1. Server in this LAB acting as a TFTP Server and having the valid Cisco IOS files.
2. Configure the IP addressing to the Switch, Server and the reachability should be
there
Switch# interface Vlan1
No shutdown
ip address 192.168.1.2 255.255.255.0
Server IP: 192.168.1.100 and Subnet mask: 255.255.255.0, Gateway is not
needed as both the server and switch are from same /24 network in my LAB.
3. Ping from Switch to Server and it should reachable.
Switch#ping 192.168.1.100
Sending 5, 100-byte ICMP Echos to 192.168.1.100, timeout is 2 seconds:
Manoj Reddy – Routing
Document
Manoj Reddy – Routing
Document 165
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 0/0/0 ms
4. Check the “Sh flash” command from the Switch and identify the free memory.
5. Please note to upload the new IOS image, free memory should be there in the switch
Switch#sh flash
Directory of flash:/
1 -rw- 4670455 <no date> 2960-lanbasek9-mz.150-2.SE4.bin
3 -rw- 4670455 <no date> c2960-lanbase-mz.122-25.SEE1.bin
2 -rw- 4670455 <no date> c2960-lanbasek9-mz.150-2.SE4.bin
4 -rw- 1093 <no date> config.text
64016384 bytes total (50003926 bytes free) //// Free memory available in the switch
6. Upload the new IOS Image to the Switch:
Switch # copy tftp: flash: ------ >We are telling the Switch to copy the new IOS file from
tftp server to Switch flash memory
Address or name of remote host []? 192.168.1.100 -> We need to tell the TFTP ServerIP
Source filename []? c2960-lanbase-mz.122-25.SEE1.bin
Destination filename [c2960-lanbase-mz.122-25.SEE1.bin]?
Accessing tftp://192.168.1.100/c2960-lanbase-mz.122-25.SEE1.bin...
Loading c2960-lanbase-mz.122-25.SEE1.bin from 192.168.1.100:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 4670455 bytes]
4670455 bytes copied in 0.1 secs (3754877 bytes/sec)
Now the new IOS file got added to the Switch flash memory.
7. Set the boot variable and reload the Switch to take the new IOS.
Switch(config)#boot system c2960-lanbase-mz.122-25.SEE1.bin
Switch(config)#reload
Then the new IOS image will be loaded, and you can check with the command “sh ver”
That’s how we need to upgrade the switches in the real time, and check “sh ver” and
you will see the new IOS version in the Switch.
3. SNMP Manager –
It is a centralized system used to monitor network. It is also known as Network
Management Station (NMS)
4. SNMP agent –
It is a software management software module installed on a managed device.
Managed devices can be network devices like PC, routers, switches, servers, etc.
1. noAuthNoPriv –
This (no authentication, no privacy) security level uses a community string for
authentication and no encryption for privacy.
3. authPriv – This security level (authentication, privacy) uses HMAC with Md5 or
SHA for authentication and encryption uses the DES-56 algorithm.
SNMP versions –
There are 3 versions of SNMP:
1. SNMPv1 –
It uses community strings for authentication and uses UDP only.
2. SNMPv2c –
It uses community strings for authentication. It uses UDP but can be configured
to use TCP.
3. SNMPv3 –
It uses Hash-based MAC with MD5 or SHA for authentication and DES-56 for
privacy. This version uses TCP. Therefore, the conclusion is the higher the version
of SNMP, the more secure it will be.
Manoj Reddy – Routing
Document
Manoj Reddy – Routing
Document 170
Strength of SNMP:
1. It is simple to implement.
2. Agents are widely implemented.
3. It is robust and extensible.
4. Polling approach is good for LAN based managed object.
5. It offers the best direct manager agent interface.
6. SNMP meet a critical need
• Active Router– the router that actively sends and receives a packet to the host
within the organization. It is the default gateway router. Only one active router
will be selected among the cluster of routers.
• Standby Router– the router/s that in case the incumbent active router will go
offline, among the standby router will be chosen as the active router.
If the active router goes offline, router failover will occur. These changes will not affect
the hosts. The host keeps the same IP address and MAC address setting. The default
gateway IP address will be the same still on all hosts. There will be no changes on the
host’s ARP table as the gateway router’s virtual MAC address will be the same.
Changes in failover only happen on router and switch, and hosts are not affected.
Points to be remembered:
1. We can only have one and only one Active Router in HSRP.
2. We can only have one and only one Standby Router in HSRP.
3. Selection of Active and Standby Router will be done based on PRIORITY.
4. The Range of PRIORITY will be from 0-255.
5. The Default Value of PRIORITY is 100.
6. The Router with Highest PRIORITY will be elected as Primary and the Router
with second PRIORITY will be act as BACKUP Router.
7. If by any chance or anyway two routers have same PRIORITY in that case the
HIGHEST IP ADDRESS on the HSRP’s Interfaces gets elected as Active Router.
8.Preemption in HSRP is not enabled by default, and we need to enable it
Virtual Router role in HSRP:
Remember the Virtual router has its own IP and MAC Address.
The virtual IP Address will be default gateway of all host.
Every time a host sends an ARP Request Virtual MAC Address is Returned.
Hosts machines have no idea which router working for forwarding traffic.
LAB – HSRP :
1. Prepare the LAB as per above and provide the basic IP addressing to the Routers
and the Computer
2. I am running OSPF in my LAB as a dynamic routing protocol.
3. Below is the OSPF Config from the Routers:
Router1:
Router1#sh run | sec ospf
router ospf 100
network 192.168.1.0 0.0.0.255 area 0
network 192.168.3.0 0.0.0.255 area 0
Router0:
Router#sh run | sec ospf
router ospf 100
network 192.168.2.0 0.0.0.255 area 0
network 192.168.1.0 0.0.0.255 area 0
Router4:
Router#sh run | s ospf
router ospf 100
network 192.168.2.0 0.0.0.255 area 0
network 192.168.3.0 0.0.0.255 area 0
network 110.1.1.0 0.0.0.255 area 0
4. From the Router4 configure a Default route towards ISP, and from ISP one
default route to R4, for reachability.
From R4:
Router4(config)#ip route 0.0.0.0 0.0.0.0 110.1.1.1
From ISP Router:
Router3(config)#ip route 0.0.0.0 0.0.0.0 110.1.1.2
5. Check the reachability, now the Host in the LAN will be able to ping the ISP.
From PC0, able to reach to ISP Network:
VRRP:
VRRP, Virtual Router Redundancy Protocol, is a vendor-neutral redundancy protocol
that groups a cluster of physical routers (two or more routers) to produce a new single
virtual router. It enables redundancy by assigning the same virtual gateway IP address
and MAC address on all physical routers within the VRRP group. Currently, VRRP is at
version 2. It almost has the same concept as HSRP. The only difference is that
preemption is enabled by default on VRRP, while on HSRP, it needs to be configured
manually.
Two states of Virtual Router Redundancy Protocol (VRRP):
• Master Router– It is the current default gateway of all the hosts within the
organization. It is actively sending and receiving packets to the hosts.
• Backup Router – The backup router will take the role of the master router during
the failover or when the master router goes offline.
We will use the same LAB what we have used for HSRP:
Let’s do the VRRP Configs: (VRRP not supporting in Packet Tracer):
The protocol can connect any internetwork of autonomous system using an arbitrary
topology. The only requirement is that each AS have at least one router that is able to
run BGP and that is router connect to at least one other AS’s BGP router. BGP’s main
function is to exchange network reach-ability information with other BGP systems.
Border Gateway Protocol constructs an autonomous systems’ graph based on the
information exchanged between BGP routers.
BGP is the protocol that makes the Internet work by enabling data routing. When a user
in India loads a website with origin servers in USA, BGP is the protocol that enables that
communication to happen quickly and efficiently.
Characteristics of Border Gateway Protocol (BGP):
On R1:
You will get the below log, stating adjacency formed between the BGP peers
R2#
bgp log-neighbor-changes
--------------------------------------------------------
no synchronization
bgp log-neighbor-changes
no auto-summary
BGP forms unicast-based connection to each of its BGP-speaking peers. BGP uses TCP
port 179 as its underlying delivery mechanism. BGP establishes a neighbour adjacency
with other BGP routers before they exchange any routing information.
Idle State:
Idle is BGP’s first state. If BGP detects a start event where a new BGP neighbor is
configured or an established BGP peering is reset, BGP will initialize some resources and
reset the ConnectRetryTimer. Then, it tries to initiate a TCP connection to the BGP peer.
Manoj Reddy – Routing
Document
Manoj Reddy – Routing
Document 180
It will also listen for a new connection established by a BGP peer router. If BGP succeeds
in this stage, it will move to Connect state.
If it fails, BGP will stay in an Idle state. The ConnectRetryTimer is then set to 60 seconds,
and it should decrement to zero for the connection to be initiated again. If it fails again,
the previous ConnectRetryTimer will be doubled and should be decremented to zero for
a new connection to be initiated again.
2. Connect: BGP is waiting for the TCP three-way handshake to complete. When it is
successful, it will continue to the Open Sent state. In case it fails, we continue to the
Active state. If the Connect Retry timer expires then we will remain in this state. The
ConnectRese happens (for example resetting BGP) then we move back to the Idle state.
3. Active: BGP will try another TCP three-way handshake to establish a connection with
the remote BGP neighbor. If it is successful, it will move to the OpenSent state. If the
Connect Retry timer expires then we move back to the Connect state. BGP will also keep
listening for incoming connections in case the remote BGP neighbor tries to establish a
connection. Other events can cause the router to go back to the Idle state (resetting BGP
for example).
After sending an OPEN message to the peer, BGP waits in this state for the OPEN reply. If
a successful reply comes in, the BGP state moves to Open Confirm and a keepalive is
sent to the peer. Failure can result in sending the BGP state back to Idle or Active.
The BGP state machine is one step away from reaching its final state (Established). BGP
waits in this state for keepalives from the peer. If successful, the state moves to
Established; otherwise, the state moves back to Idle based on the errors.
• Open
• Update
• Keepalive
• Notification
The BGP OPEN message is used to set up and establish BGP neighbour adjacency. An
OPEN message includes information on the BGP router, and these must be negotiated
and accepted by both BGP routers before they can exchange routing information. The
BGP router information comprises the following:
BGP Version Number – the BGP version which the router is using. BGP version 4 is the
latest version. If the two BGP routers have a version mismatch, then no BGP session
will be made.
AS Number – the AS number must match the originating BGP router’s AS number. This
specifies if the BGP routers will run iBGP or eBGP as well.
Hold Time – it ensures that the BGP neighbor is ‘alive.’ By default, Cisco routers have
180 seconds hold time value. If the routers’ hold time values are different, the lowest
hold time value will be used. The minimum hold time value is 3 seconds and to disable
KEEPALIVE messages, the hold time value is set to 0.
If the BGP router doesn’t receive any UPDATE or KEEPALIVE messages from the BGP
neighbor during the hold time, then it will claim that the neighbor is ‘dead.’ It will tear
down the BGP session, the routes from the ‘dead’ neighbor are removed, and an
UPDATE message with route withdrawal is sent to the other BGP routers for the affected
prefixes. If the router does receive an UPDATE or KEEPALIVE message, then the hold
timer will be reset to the initial value.
BGP Identifier (RID) – the BGP router ID (RID) identifies the BGP router in the advertised
prefixes. It is a 32-bit unique number, and it can be used to prevent loops for the routers
that are advertised within the autonomous system (AS). The RID value must not be zero
to form a neighbor adjacency. It can be set manually using the ‘bgp router-id’ command.
If the RID is n0t manually defined, it can dynamically use the highest loopback IP
address, and if no loopback interface is configured, it will use the highest IP address on
a physical interface.
Keepalive Message:
KEEPALIVE messages ensure that BGP neighbors are still alive. These messages are sent
every one-third of the negotiated hold time value of the two BGP routers. By default,
Cisco devices have a hold time of 180 seconds. One-third of 180 is 60, so the default
KEEPALIVE message interval is 60 seconds.
If a BGP neighbor misses the three KEEPALIVE intervals, 180 seconds by default (60 x 3 =
180), the routes from that neighbor will be flushed from the other BGP router. If the
hold time value is zero, no KEEPALIVE messages will be sent between the BGP peers.
Update Message:
UPDATE messages are used for advertising and exchanging routing information between
BGP neighbors. The advertised prefix or the Network Layer Reachability Information
Manoj Reddy – Routing
Document
Manoj Reddy – Routing
Document 182
(NLRI) information is included in the UPDATE message. The UPDATE message is also
used in withdrawing advertised BGP routes, and it includes just the prefix only in the
message. UPDATE messages also act as keepalives to lessen unnecessary traffic.
Notification Message:
The last of the BGP message types, NOTIFICATION messages will be sent if errors are
detected in the BGP session. When a NOTIFICATION message is sent, the BGP neighbor
adjacency will be terminated, and the BGP connection will be closed. The TCP session
and the BGP table will be cleared of all entries from the BGP neighbor. Route
withdrawals are done by sending UPDATE messages which will be sent to the other BGP
peer/s.
• Single Homed: The single homed design means you have a single connection to
a single ISP. With this design, you don’t need BGP since there is only one exit
path in your network. You might as well just use a static default route that points
to the ISP.
The advantage of a single-homed link is that it’s cost effective, the disadvantage is that
you don’t have any redundancy. Your link is a single point of failure but so is using a
single ISP.
• Dual Homed: The dual homed connection adds some redundancy. You are still
only connected to a single ISP, but you use two links instead of one. There are
some variations for this design. Here’s the first one:
With this design, we use a single router on both ends, but we do have redundant links.
To increase redundancy, we can add a second router:
In the example above, the ISP has a second router. We also could have used a second
router at the customer’s side and a single router at the ISP. For even more redundancy,
add a second router at both sides:
The example above offers the most redundancy when you are connected to a single ISP.
We have two links and two routers on both ends. One disadvantage of this design is
that we are still using a single ISP.
Single Multi-homed
Multihomed means we are connected to at least two different ISPs. The simplest design
looks like this:
Above you see that we have a single router at the customer, connected to two different
ISPs. The single point of failure in this design is that you only have one router at the
customer. When it fails, you won’t be able to connect to any ISP. We can improve this by
adding a second router:
Manoj Reddy – Routing
Document
Manoj Reddy – Routing
Document 184
Dual Multihomed:
The dual multihomed designs means we are connected to two different ISPs, and we use
redundant links. There are some variations, here’s the first one:
Above you can see that we are connected to two different ISPs, using one router and
two links to each ISP. We have redundant ISPs and links, but the router is still a single
point of failure. We can improve this by adding a second router:
The design above is better; it has two customer routers. One disadvantage, however, is
that once one of your routers fails, you will lose the connection to one of the ISPs. Using
the same number of routers and links, the following design might be better:
This design has redundant ISPs, routers, and links. Both customer routers are connected
to both ISPs. This design does offer the highest redundancy but it’s also an expensive
option.
Conclusion:
• Single homed: you are connected to a single ISP using a single link.
• Dual homed: you are connected to a single ISP using dual links.
• Single multi-homed: you are connected to two ISPs using single links.
• Dual multi-homed: you are connected to two ISPs using dual links.
1. Configure the LAB as per the topology and assign the basic IP addressing to all the
Interfaces and create the Loopback IPs. R1 – 1.1.1.1 is a loopback IP etc.,
2. Create one Static route from R1 to R3, and from R3 to R1
router1#sh run | i ip route
ip route 192.168.23.3 255.255.255.255 192.168.12.2
router3#sh run | i ip route
ip route 192.168.12.1 255.255.255.255 192.168.23.2
3. From R1 ping the R3 Interface IP and it should be reachable because Static route
is configured.
router1#ping 192.168.23.3
Sending 5, 100-byte ICMP Echos to 192.168.23.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/59/92 ms
4. Let’s configure the BGP in R1 and R3
Use the ebgp-multihop command to increase the TTL. Using a value of 5 in our
example. R2 will receive a packet with a TTL of 5, decrements it by 1 and forwards it to
R3. We can verify this change by looking at the show ip bgp neighbors command:
Verification:
So, here in my LAB I am specifying the BGP that the eBGP is 5 hops away, and the TTL
Valus will change to 5 and it will try to reach the router.
• Network command
• Redistribution
BGP doesn’t care about interfaces, it doesn’t even look at them. When we use the
network command in BGP then BGP will only look at the routing table. When it finds the
network that matches the network command, it will install it in the BGP table.
Let me show you some examples to explain what I’m talking about. We will use the
following two routers:
R1 and R2 are in different autonomous systems so we use eBGP. Here is the BGP
configuration:
Nothing special here, just plain eBGP between R1 and R2. Let’s advertise some networks
in BGP…
Network Command
Let’s create a loopback interface with a network and advertise it in BGP:
R1(config)#interface loopback 1
R1(config-if) #ip address 1.1.1.1 255.255.255.0
R1(config)#router bgp 1
R1(config-router) #network 1.1.1.0 mask 255.255.255.0
Above we have created a loopback interface with network 1.1.1.0 /24, this is what
we will advertise in BGP. Since we created a loopback interface, this network will
be directly connected for R1:
Since it’s in the routing table, BGP will be able to install this network in the BGP
table:
R1#show ip bgp
BGP table version is 2, local router ID is 192.168.12.1
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal,
r RIB-failure, S Stale, m multipath, b backup-path, x best-
external, f RT-Filter
Origin codes: i - IGP, e - EGP, ? - incomplete
That’s all there is to it. Just use the network command to put the networks you want in
the BGP table. One thing you have to be aware of is that you must use the exact
network and subnet mask for the network command.
R1(config)#interface loopback 2
R1(config-if) #ip address 11.11.11.11 255.255.255.255
R1(config)#router bgp 1
R1(config-router) #network 11.11.11.0 mask 255.255.255.0
I created a loopback interface with network 11.11.11.11 /32. BGP uses the network
command to advertise 11.11.11.0 /24. This network will never be placed in the BGP
table since the subnet mask doesn’t match:
Be aware of this. Make sure you type the exact network address and subnet mask when
advertising something in BGP. Let’s fix this:
R1(config)#router bgp 1
R1(config-router) #no network 11.11.11.0 mask 255.255.255.0
R1(config-router) #network 11.11.11.11 mask 255.255.255.255
With the correct network command, BGP will be able to advertise this network in the
BGP table:
And because R1 has it in its BGP table, R2 will be able to learn it:
BGP Next-hop-Self:
iBGP is that it doesn’t change the next hop IP address. Sometimes this can cause
reachability issues.
The next-hop-self-command will allow us to force BGP to use a specified IP
address as the next hop rather than letting the protocol choose the next hop.
1. Create the topology as like above and assign the basic IP addressing.
2. Router R1 and R2 are in AS10(iBGP) and R3 is running in AS20(EBGP)
3. R3 is in AS 20 and we use eBGP between R2 and R3. Once we advertise network
3.3.3.0 /24 on R3 in BGP then R2 will learn this prefix and stores it in its BGP
table, the next hop IP address will be 192.168.23.3.
4. Once R1 learns about prefix 3.3.3.0 /24 then the next hop IP address will remain
192.168.23.3. When R1 doesn’t know how to reach this IP address then it will fail
to install 3.3.3.0 /24 in its routing table.
Configuration from the Routers:
R1#sh run | sec bgp
router bgp 10
no synchronization
neighbor 192.168.12.2 remote-as 10
no auto-summary
------------------------------------------
R2#sh run | sec bgp
router bgp 10
no synchronization
neighbor 192.168.12.1 remote-as 10
neighbor 192.168.23.3 remote-as 20
no auto-summary
Manoj Reddy – Routing
Document
Manoj Reddy – Routing
Document 191
------------------------------------------------------
Now R2 will get the route 3.3.3.3/24 from R3, and R2 will be able to reach it.
R1 learns the prefix but it’s unable to install it in the routing table, The problem here is
that the next hop IP address is 192.168.23.3.
The R1 don’t know how to reach the IP - 192.168.23.3 because it’s not in the routing
table
On R2 configuring this command so that while sending any updates to R1- 192.168.12.1, please
mark your IP as the next-hop IP.
When two EBGP routers that are directly connected do not form a working BGP
neighbour adjacency there could be several things that are wrong:
We can filter the neighbours with the help of prefix-lists and let me tell you with an
example.
1. Prepare the LAB as per the above topology, R1 is in AS1 and having a Loopback IP of
1.1.1.1/24 and R2nd R2 is in AS2.
2. Below is the R1 Config:
router bgp 1
no synchronization
bgp log-neighbor-changes
no auto-summary
4. Let’s verify the R2 routing table, and it should learn about 1.1.1.1
5. Now I don’t want R2 to learn the 1.1.1.0 network, R1 should not send the 1.1.1.0/24 to R2.
R1(config)#router bgp 1
5. Let’s check the Routing and BGP table in R2 Router and it shouldn’t get that prefix:
6.
That’s how the prefix-list will work in the BGP.
R2 is receiving the Prefix from R1 – 1.1.1.1/32 and R2 won’t advertise it to R3 as all the
routers are in iBGP sessions.
This simplifies our IBGP configuration a lot but there’s also a downside. What if the route
reflector crashes? It’s a single point of failure when it comes to IBGP peering's. Of
course, there’s a solution to this, we can have multiple route reflectors in our network.
The route reflector can have three types of peerings:
• EBGP neighbor
• IBGP client neighbor
• IBGP non-client neighbor
When you configure a route reflector you must tell the router whether the other IBGP
router is a client or non-client. A client is an IBGP router that the route reflector will
“reflect” routes to, the non-client is just a regular IBGP neighbor.
Rules:
When a route reflector forwards a route, there are a couple of rules:
Let’s do a LAB now so that you will understand the behaviour of IBGP and Route
Reflector:
1. Configure the LAB topology as like above and assign the IP addresses to the
Interfaces.
2. All the routers are running in same AS – 100
3. So R1, R2, R3 will form IBGP relationship, as all are in same AS
4. Let’s check the BGP config of the routers:
R1:
R2:
On R3:
Let’s check now the BGP routing tables in R2, and R3:
R2 is learning the prefix 1.1.1.1/32 from the R1 router, and it’s stored in BGP Routing
table and from R2 we can ping 1.1.1.1 and below is the output:
R2 is learning the Prefix 1.1.1.1 from R1, and not sending it to R3 as it’s a default
behaviour of IBGP.
Any update/route received from IBGP neighbour should not be sent back to other
IBGP Neighbour and that’s what we called it’s a Split-Horizon Rule
To fix this problem either we can go with Full-Mesh relationship (it’s not feasible if you
have more routers) and possible solution is making the RR (Route Reflectors)
Now R3 has learnt the prefixes from R1, and in R3 routing table the routes
are available.
So, this proves for IBGP we can use Route Reflectors to learn all the router Prefixes.
• Attributes:
o Weight (Highest Weight will be preferred)
o Local Preference (Highest will be preferred)
o Originate (Prefer paths that are locally Originated)
o AS path length (Shortest AS path)
o Origin code (IGP will be preferred over EGP)
o MED (Multi-Exit Discriminator) - Lowest MED is preferred
o eBGP path over iBGP path
o Shortest IGP path to BGP next hop
o Oldest Path
o Router ID (Lowest will be preferred)
o Neighbor IP address
IGPs select the path with the lowest metric. For example:
Weight:
Prefer the path with the highest weight. This is a value that is local to the router and it’s
Cisco proprietary. The default value is 0 for all routes that are not originated by the
local router.
Local Preference:
The local preference is used within an autonomous system and exchanged between
iBGP routers. We prefer the path with the highest local preference. The default value is
100.
Originate:
Prefer the path that the local router originated. In the BGP table, you will see next hop
0.0.0.0. You can get a path in the BGP table through the BGP network command,
aggregation, or redistribution. A BGP router will prefer routes that it installed into BGP
itself over a route that another router installed in BGP.
AS path length:
Prefer the path with the shortest AS path length. For example, AS path 1 2 3 is preferred
over AS path 1 2 3 4 5.
Origin code:
Prefer the lowest origin code. There are three origin codes:
• IGP
• EGP
• INCOMPLETE
IGP is lower than EGP and EGP is lower than INCOMPLETE
MED:
Prefer the path with the lowest MED. The MED is exchanged between autonomous
systems. For a detailed explanation, look at the MED lesson.
Oldest Path:
Prefer the path that we received first, in other words, the oldest path.
Router ID:
Prefer the path with the lowest BGP neighbor router ID. The router ID is based on the
highest IP address. If you have a loopback interface, then the IP address on the loopback
will be used. The router ID can also be manually configured.
Neighbor IP address:
Prefer the path with the lowest neighbor IP address. If you have two eBGP routers and
two links in between then the router ID will be the same. In this case, the neighbor IP
address is the tiebreaker.
LAB:
1. Configure the topology as like above and assign the basic IP addressing.
2. R1 is running in AS100, R2 – AS200, R3- AS300 and R4 – AS400
3. Configure the BGP configs as per diagram.
4. R4 is having 2 LOOPBACK IPs and from R1 we should ping/reach that R4 loopback
IPs.
R1 BGP Config:
R2 BGP Config:
R3 BGP Config:
Manoj Reddy – Routing
Document
Manoj Reddy – Routing
Document 1105
R4 BGP Config:
Because both ISP1/ISP2 now have same Weight and so BGP considered highest IP address as a
metric, so our ISP2 has a highest IP address compared with ISP1, so ISP2 is preferred by default.
Let’s configure the WEIGHT BGP Protocol and make ISP1 as the preferred traffic partner from R1
router.
LAB:
R2:
R3:
R4:
Let’s quickly check the R3 routing table and will see the prefix 8.8.8.0 is learning from R4
or not:
In R3 BGP Routing table we can see it’s learning 8.8.8.0 prefix from both 192.168.10.1 and
from 192.168.20.1(thru R2) but BGP Considered 192.168.10.1 (thru R1) is the best path
Let’s configure the LOCAL PREFERENCE Attribute in BGP and make sure all the traffic will
pass through R2:
Now all the traffic is passing through R2: 192.168.40.1 is the R2 IP address.
So, this proves we LOCAL PREFERENCE BGP ATTRIBUTE we can influence the Outbound external
BGP path.
LAB:
AS- PATH ATTRIBUTE
Let’s check the R1, R2 Routing tables, and we can see they both are preferring to reach the loopback
IP to the connected Interfaces.
So, to reach the R3 Prefix 10.1.1.0, now the R2 is going to R1 first and reaching the R3.
Because from R3, it’s advertising the highest AS-PATH (200 200 200 200) and latest AS-PATH
is preferred.
• MED can be used to advertise to your neighbors how they should enter your AS.
• MED is exchanged between autonomous systems.
• The lowest MED is the preferred path.
• MED is propagated to all routers within the neighbor AS but not passed along to any
other autonomous systems.
MED (also called metric) is exchanged between autonomous systems, and you can use it to
let the other AS know which path they should use to enter your AS. R2 is sending a MED of
200 towards AS 3. R3 is sending a MED of 300 to AS 3. AS 3 will prefer the lower metric and
send all traffic for AS 1 through R2.
LAB: We will re-use the same LAB what we have used for AS-PATH, and we will do now
MED.
1. Setup the LAB as per the above topology, and assign the basic IP addressing as per the setup
Now R2 will learn the Prefix 20.1.1.1 from R1 as they both are configured for OSPF.
Now R3 won’t receive that prefix it’s not advertised yet to R3:
That’s how the OSPF configs will be, and let’s configure the BGP Configs and re-distribute the OSPF
prefix 20.1.1.1 to BGP so that R3 will learn the network.
Let’s check the R3 BGP Routing table and see from which path it’s learning the R1 loopback Prefix –
20.1.1.1.
Let’s use the MED protocol and influence the traffic so that R3 should use R2 to enter to the AS 100
MED uses latest value, so from R1 to R3 I will advertise high MED value, so that R3 will choose the
path to R2, as it’s having the less MED Value.
So, with the help of MED we can influence the Incoming traffic to enter AS.
BGP Peer-Groups:
When you configure BGP on a router it’s possible that some of the BGP neighbors share the
exact same configuration. This can be annoying since you must type in the exact same
commands for each of these neighbors. Also, when BGP prepares updates, it does this
separately for each neighbor. This means that it must use CPU resources to prepare the
update for each neighbor.
To simplify the configuration of BGP and to reduce the number of updates BGP must create,
we can use peer groups. We can add neighbors to a peer group and then apply all our
configurations to the peer group. BGP will prepare the updates for the peer group which
requires less CPU resources than preparing them for each neighbor separately.
In my LAB, if you see from R1, the configurations for R2,R3 and R4 are almost same
From R1 :
Now instaed of writing to all the routes we can make all the commands in one PEER GROUP
and advertise that PEERGROUP to neighbours.
Now R1 formed the IBGP relationship with all the other routers.
From R3, R4 also you will see the same commands, and I don’t want to add again.
•
• Let’s understand quickly with one LAB:
By default. No sync is enabled on the routers and if you have configured the BGP correctly
the prefix from R2 – 8.8.8.8/32 will be seen on R3 Routing table.
Check the R3 Routing table now for verification.
• i (IGP)
• e (EGP)
• ? (Incomplete)
i (IGP) routes are the routes which are originated from a routing protocol, like RIP, OSPF,
EIGRP etc. Generally, this is done via network command under the BGP process.
e (EGP) routers are the routes which are originated from External Gateway Protocol (EGP).
Now the only EGP is BGP, so this is the routes originated from BGP.
? (Incomplete) routes are the routes which are Redistributed from static, IGP etc. into the
BGP.
Let’s quickly understand BGP ORIGIN CODE ATTRIBUTE with one LAB:
1. Create the IP addressing as per the below LAB topology
2. I am running R1, R2 in AS100 and R3 in AS200
3. Create the BGP config as per the below config
R1 Config:
R2 Config:
R3 Config:
Types of VPNs:
• Remote Access and
• Site-to-Site VPN
Remote Access VPN: A remote access VPN securely connects a device outside the
corporate office. These devices are known as endpoints and may be laptops, tablets, or
smartphones. Advances in VPN technology have allowed security checks to be conducted on
endpoints to make sure they meet a certain posture before connecting. Think of remote
access as computer to network.
Remote access VPNs are also sometimes called client-based VPNs or client-to-server VPNs.
There are different ways a remote access VPN can be used, for example:
• A business traveller could use a remote access VPN to connect to their company’s
network from the Wi-Fi in the hotel lobby. They can access all the same files and
software they would have in the office. The VPN also protects the data from anyone
snooping on the public Wi-Fi.
• Somebody working from home could use a remote access VPN to access the
company’s network from home. Their computer works as if it was connected to the
company network in the office, and data is protected as it goes through the public
internet.
Here’s how it works:
• First, the VPN server checks that the user is allowed to access the network.
• Once the user is authenticated, the client and server establish an encrypted tunnel
between them.
- encryption tunnel: IPsec and SSL are two that are often used.
• The user can now access resources through the VPN server.
This gives them access to a company’s internal network to access files or software.
A site-to-site VPN connects the corporate office to branch offices over the Internet. Site-to-
site VPNs are used when distance makes it impractical to have direct network connections
between these offices. Dedicated equipment is used to establish and maintain a connection.
Think of site-to-site access as network to network.
In Site-to-Site we have GRE (Generic Routing Encapsulation), and IPsec will be used.
Different technologies can be used to implement a site-to-site VPN. These include IPsec,
Dynamic MultiPoint VPN (DMVPN), and L3VPN.
VPN Working:
VPN software establishes an encrypted virtual tunnel between your device and a remote
VPN server. This creates a secure connection between you and the public internet, hiding
your IP address, disguising your location, and protecting your web activity from outside
monitoring.
It’s like taking an envelope with a written letter inside and putting it inside a second
envelope with a new address on. Your actual message becomes completely hidden from the
outside world – as if it was inside of a tunnel.
This process is known as encapsulation and is performed by dedicated tunnelling protocols.
IPsec tunnel
An IPsec tunnel can be used to join sites together, in much the same way it connects
individuals to a private network within remote access VPNs.
In this case, however, the VPN is implemented by routers at the two or more sites that are
connecting to each other. For this reason, it’s sometimes also called a router-to-router VPN.
Whereas a remote access VPN creates a tunnel for one device to connect to the private
network, with a site-to-site VPN, the IPsec tunnel encrypts the traffic between the
connected networks. This can take two forms:
• A route-based IPsec tunnel allows any traffic between the networks through. It’s like
wiring the networks together.
• A policy-based IPsec tunnel sets up rules that decide what traffic is allowed through,
and which IP networks can talk to which other IP networks.
• IPsec tunnels can be built using most firewalls and network routers.
That doesn’t scale well in large companies with thousands of sites, where thousands of connections
might need to be established.
Instead, Cisco’s Dynamic MultiPoint VPN (DMVPN) technology offers a solution. It enables sites to
connect to the DMVPN hub router using dynamic IP addresses.
The network architecture is a hub-and-spoke design, which reflects the fact that most traffic goes
between branch sites (spokes) and the main site (hub), rather than between one branch and
another.
That said, it’s still possible for branch sites to connect to each other using a DMVPN. It just takes a
little additional configuration.
Cisco® Dynamic Multipoint VPN (DMVPN) is a Cisco IOS® Software-based security solution for
building scalable enterprise VPNs that support distributed applications such as voice and video
(Figure 1).
Cisco DMVPN is widely used to combine enterprise branch, teleworker, and extranet connectivity.
Major benefits include:
1. Prepare the LAB as per the above topology and assign the basic IP addressing
R1:
router bgp 1
no synchronization
bgp log-neighbor-changes
network 192.168.1.0
no auto-summary
R2:
R3:
Now R3 (Dubai) and R4 (Sweden) will be able to reach the Bangalore HO Routers.
We won’t do any changes for the tunnel config on R2 because it’s an ISP router, and we are
using ISP router to connect our Branch offices to HO and Vice versa.
R3:
R4:
Now R1 will build the dynamic tunnels towards the Branch Routers, and let’s just verify it.
So, to solve the issue we need to issue a P2 Multipoint Command in OSPF on all the routers.
Let’s also enable IPSEC on the routers for more encryption on the tunnels:
WANs can be vital for international businesses, but they are also essential for everyday use,
as the internet is considered the largest WAN in the world.
The term wide area network is used to describe a network that spans multiple geographic
locations. Consider an example. A company has two offices, one in London and one in
Berlin. Both offices have a LAN. If the company connects these two LANs together using
WAN technology, a WAN is created.
The key difference between LANs and WANs is that the company usually doesn’t own WAN
infrastructure. A company usually leases WAN services from a service provider. A WAN
spanning multiple cities could look something like this:
Modem - Converts the digital signals produced by a computer into analog signals to be
transmitted over the public telephone network. Another modem turns the analog signals
into digital signals on the other end of the connection.
Connectivity media - Such as Fiber, Wireless, Microwave or satellite
WAN Switch: A multiport device in the provider network, operating at L2 of the OSI model.
This device typically switches traffic such as Frame Relay.
The term "Service Provider Equipment" refers to all hardware and devices owned by the
service provider. Other equipment and terminology often used in WAN include:
Switched Connections-
WAN Protocols:
• Defines how the data to be send on WAN links, also called as WAN encapsulation.
• PPP & HDLC are WAN protocols.
What is HDLC:
HDLC stands for High-Level Data Link Control. It is a bit-oriented code transparent
synchronous data link layer protocol. The International Organization for Standardization (ISO)
developed it. Moreover, it supports both connection-oriented and connectionless services.
What is PPP:
PPP stands for Point to Point Protocol.
It is a data link layer; a byte-oriented communication protocol. It can connect two routers
directly without any host or networking device in the middle. Furthermore, the PPP frame
consists of one or more bytes. It has bytes for flag, address, control, payload and FCS.
Moreover, PPP provides services such as connection authentication, transmission encryption,
and compression. It is possible to use PPP over various physical networks like serial cable,
phone lines, trunk lines and cellular telephone, radio links, fibre optic links (SONET).
Moreover, Internet Service Provider (ISP) uses PPP for customer dial-up access to the internet.
PPP Authentication:
PPP supports two Authentication Protocols. These Authentication Protocols are:
periodically. CHAP uses MD5 hash. One end sends “Hash” to other node and the other node
also sends a hash. If the hashes are same, then the communication starts.
Below, you can find the detailed PPP Session Establishment schema:
As you can see here, for the session establishment, firstly LCP Packets have sent each other.
The first message of LCP is Configure-Request LCP Message. If it is accepted, the other end
sends Configure-Ack LCP Message. If not, it sends Configure-Nak. Then, the first router sends
a second modified Configure-Request LCP Message.
After this LCP messaging step, Authentication step comes with PAP or CHAP Authentication
Protocols. Here, if we use PAP, we will use 2-way handshake. If we use, CHAP, then we will
use 3-way handshake mechanism like above. These messages are Challenge, Response and
Accept/Reject Messages.
Then, a successful Authentication step, in Network Layer Phase, NCP messaging starts. Here
again, there are two messages: Configure-Request and Configure-Ack. If one end does not
accept the request, it is rejected with Configure-Nak Messages. Here, for IP, IPCP (Internet
Protocol Control Protocol) is used as NCP.
PPP uses LCP (Link Control Protocol) and NCP (Network Control Protocol). LCP is responsible
of the establishment of the link. NCP is responsible from the transmission of IP and other
protocols across the PPP link.
LAB:
CHAP Configurations on R1/R2;
Introduction to MPLS:
Multi-Protocol Label Switching (MPLS): It is a technique that is used for the routing of
network packets. It is called a Multiprotocol as it supports multiple protocols like Internet
Protocol (IP), Asynchronous Transport Mode (ATM) and Frame Relay protocols. Moreover,
in MPLS technique the network packet forwarding is done based on the label present on the
packet, that’s why it is called Label Switching.
The MPLS Network consists of LSR (Label Switch Routers). These are named so as they can
understand the MPLS labels. There are 3 types of LSR –
• Ingress LSR: The Ingress LSR receive unlabelled IP packet and PUSH the label on it.
Ingress LSR are present at the beginning of the network.
• Egress LSR: Egress LSR POP the label from the incoming packet and forward it as an
IP packet. Egress LSR are present at the end of the network.
• Intermediate LSR: Intermediate LSR are present in between Ingress and Egress
routers, that is why they are called intermediate routers. These routers receive the
labelled packet, SWAP the label of the packet and forward it to the next hop. Thus,
carrying out MPLS forwarding of the packet.
• MPLS is a L2.5 Protocol.
1. Assign the basic IP addressing as per the LAB and run the OSPF on all the routers.
You should now have full ip connectivity between R1, R2, R3 to verify this we need to see
if we can ping between the loopbacks of R1 and R3
R1#ping 3.3.3.3 source lo0
For this tutorial we will be using the second option, so go int the ospf process and enter
mpls ldp autoconfig – this will enable mpls label distribution protocol on every interface
running ospf under that specific process.
R1
router ospf 1
mpls ldp autoconfig
R2
router ospf 1
mpls ldp autoconfig
R3
router ospf 1
mpls ldp autoconfig
You should see log messages coming up showing the LDP neighbors are up.
R2#
*Mar 1 00:31:53.643: %SYS-5-CONFIG_I: Configured from console
*Mar 1 00:31:54.423: %LDP-5-NBRCHG: LDP Neighbor 1.1.1.1:0 (1) is UP
R2#
*Mar 1 00:36:09.951: %LDP-5-NBRCHG: LDP Neighbor 3.3.3.3:0 (2) is UP
To verify the mpls interfaces the command is very simple – sh mpls interface
This is done on R2, and you can see that both interfaces are running mpls and using LDP
R2#sh mpls interface
Interface IP Tunnel Operational
FastEthernet0/0 Yes (ldp) No Yes
FastEthernet0/1 Yes (ldp) No Yes
R2#sh mpls ldp neigh
Peer LDP Ident: 1.1.1.1:0; Local LDP Ident 2.2.2.2:0
TCP connection: 1.1.1.1.646 - 2.2.2.2.37909
State: Oper; Msgs sent/rcvd: 16/17; Downstream
Up time: 00:07:46
LDP discovery sources:
FastEthernet0/0, Src IP addr: 10.0.0.1
Addresses bound to peer LDP Ident:
10.0.0.1 1.1.1.1
Peer LDP Ident: 3.3.3.3:0; Local LDP Ident 2.2.2.2:0
TCP connection: 3.3.3.3.22155 - 2.2.2.2.646
State: Oper; Msgs sent/rcvd: 12/11; Downstream
Up time: 00:03:30
LDP discovery sources:
FastEthernet0/1, Src IP addr: 10.0.1.3
Addresses bound to peer LDP Ident:
10.0.1.3 3.3.3.3
One more verification to confirm LDP is running ok is to do a trace between R1 and R3 and
verify if you get MPLS Labels show up in the trace.
R1#trace 3.3.3.3
Type escape sequence to abort.
Tracing the route to 3.3.3.3
R3#
router bgp 1
neighbor 1.1.1.1 remote-as 1
neighbor 1.1.1.1 update-source Loopback0
no auto-summary
!
Manoj Reddy – Routing
Document
Manoj Reddy – Routing
Document 1147
address-family vpnv4
neighbor 1.1.1.1 activate
What is a IPV6:
Internet Protocol Version 6 is a network layer protocol that allows communication to
take place over the network. IPv6 was designed by Internet Engineering Task Force
(IETF) in December 1998 with the purpose of superseding the IPv4 due to the global
exponentially growing internet users.
The IPv4 uses a 32-bit address scheme allowing to store 2^32 addresses which is more
than 4 billion addresses. To date, it is considered the primary Internet Protocol and
carries 94% of Internet traffic. Initially, it was assumed it would never run out of
addresses, but the present situation paves a new way to IPv6, let’s see why? An IPv6
address consists of eight groups of four hexadecimal digits. Here’s an example IPv6
address:
3001:0da8:75a3:0000:0000:8a2e:0370:7334
This new IP address version is being deployed to fulfil the need for more Internet
addresses. It was aimed to resolve issues which are associated with IPv4. With 128-bit
address space, it allows 340 undecillion unique address space. IPv6 also called IPng
(Internet Protocol next generation).
Types of IPv6 Address:
Now that we know about what is IPv6 address let’s look at its different types.
Advantages of IPv6:
• Reliability
• Faster Speeds: IPv6 supports multicast rather than broadcast in IPv4.This feature
allows bandwidth-intensive packet flows (like multimedia streams) to be sent to
multiple destinations all at once.
• Stronger Security: IPSecurity, which provides confidentiality, and data integrity, is
embedded into IPv6.
• Routing efficiency
• Most importantly it’s the final solution for growing nodes in Global network.
Disadvantages of IPv6:
• Conversion: Due to widespread present usage of IPv4 it will take a long period to
completely shift to IPv6.
• Communication: IPv4 and IPv6 machines cannot communicate directly with each
other. They need an intermediate technology to make that possible.
One of the differences between IPv4 and IPv6 is that we no longer use ARP (Address
Resolution Protocol). ND (Neighbor Discovery Protocol) replaces the functionality of
ARP.
ND uses ICMP and solicited-node multicast addresses to discover the layer two address
of other IPv6 hosts on the same network (local link). It uses two messages to accomplish
this:
Using solicited-node multicast addresses as the destination is far more efficient than
IPv4’s ARP requests broadcast to all hosts.
Every IPV6 device will compute a solicited-node multicast address by taking the
multicast group address (FF02::1: FF /104) and adding the last six hexadecimal
characters from its IPv6 address. It will then join this multicast group address and
“listens” to it.
When one host wants to find the layer two address of another host, it will send the
neighbor solicitation to the remote host’s solicited node multicast address. It can
calculate the solicited-node multicast address of the remote host since it knows about
the multicast group address, and it knows the IPv6 address that it wants to reach.
The result will be that only the remote host will receive the neighbor solicitation. That’s
far more efficient than a broadcast that everyone receives.
IPv6 Neighbor Advertisement Message:
Once the remote host receives the neighbor solicitation, it will reply with the neighbor
advertisement message. The source address is the IPv6 address of the host, and the
destination address is the IPv6 address of the remote host that sent the neighbor
solicitation. The most important part is that this message includes the layer two address
of the host. The neighbor advertisement message uses type 136 in the ICMPv6 packet
header.
Once R1 receives the neighbor advertisement, these two IPv6 hosts will be able to
communicate with each other.
Manoj Reddy – Routing
Document
Manoj Reddy – Routing
Document 1150
Configuration:
Now you have an idea of how IPv6 neighbor discovery works.
If there is a string of zeros, then you can remove them once. In the example above I
removed the entire 0000:0000:0000 part. You can only do this once, your IPv6 device
will fill up the remaining space with zeros until it has a 128-bit address.
There is more however, the address can be shortened even more:
• Short: 2041:0000:140F:875B:131B
• Shorter: 2041:0:140F: 875B:131B
If you have a “hextet” with 4 zeros, then you can remove those and leave a single zero.
Your IPv6 device will add the remaining 3 zeros.
Leading zeros can also be removed, here’s another address to demonstrate this:
• Original: 2001:0001:0002:0003:0004:0005:0006:0007
• Short: 2001:1:2:3:4:5:6:7
• An entire string of zeros can be removed, you can only do this once.
• 4 zeros can be removed, leaving only a single zero.
• Leading zeros can be removed.
Stateless autoconfiguration for IPv6 is like a “mini-DHCP” server for IPv6. Routers
running IPv6 can give the prefix of the network and a gateway address to clients looking
for an IPv6 address. IPv6 uses the NDP (Neighbor Discovery Protocol), and one of the
things this protocol offers is RS (Route Solicitation and (RA) Router Advertisement
messages that help an IPv6 device configure an IPv6 address automatically.
What happens however when we have more than one router on the subnet? Which
router advertisement will our host then use? To figure this out, we’ll use the following
topology:
We have two routers, R1 and R2 who will send router advertisements. Our host will be
configured for SLAAC so that it will configure its own IPv6 address. With two router
advertisements, our host will have to decide which one to use.
Configuration
First, we will enable IPv6 unicast routing on R1 and R2, otherwise they won’t send any
router advertisements:
R1 & R2
(config)#ipv6 unicast-routing
Let’s configure a global unicast address on each router so that they can advertise a
prefix in the RA:
R1(config)#interface GigabitEthernet 0/1
R1(config-if) #ipv6 address 2001:DB8:123:123::1/64
R2(config)#interface GigabitEthernet 0/1
R2(config-if) #ipv6 address 2001:DB8:123:123::2/64
Now we will configure the host to use the router advertisements for autoconfiguration:
Host(config)#interface GigabitEthernet 0/1
Host(config-if) #ipv6 address autoconfig
H1#show ipv6 routers default
Router FE80::F816:3EFF:FE19:6D0 on GigabitEthernet0/1, last update 1 min
Hops 64, Lifetime 1800 sec, AddrFlag=0, OtherFlag=0, MTU=1500
HomeAgentFlag=0, Preference=Medium, trustlevel = 0
Reachable time 0 (unspecified), Retransmit time 0 (unspecified)
Prefix 2001:DB8:123:123::/64 onlink autoconfig
Valid lifetime 2592000, preferred lifetime 604800
Great, as you can see our host is using R2 as the default router. Why? all parameters in
the router advertisements from our routers are equal so there’s nothing in the RA that
the host will use to select. It decided to use R2 since that’s the first RA that it received.
IPV6 Routing:
Static and Default Routing in IPV6.
Configuration:
To demonstrate this topology, I will use the following topology:
R1 and R2 are connected with a serial link. R2 has a loopback interface with IPv6 address
2001:DB8:2:2::2/64. Let’s see if we can reach this address.
S 2001:DB8:2:2::/64 [1/0]
via Serial0/0/0, directly connected
S 2001:DB8:2:2::/64 [1/0]
via 2001:DB8:12:12::2
R1#ping 2001:DB8:2:2::2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:DB8:2:2::2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/1/4 ms
S ::/0 [1/0]
via 2001:DB8:12:12::2
R1#ping 2001:DB8:2:2::2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:DB8:2:2::2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/1/4 ms