Lab Workbook: CCNA Routing and Switching - (Exam: 200-125 CCNA)
Lab Workbook: CCNA Routing and Switching - (Exam: 200-125 CCNA)
LAB WORKBOOK
1
Device and Cable Requirement:
Cisco 1841 x3
Cisco 2960 x2
Cisco 3560 x2
PC x5
Serial Cable x1
Note:- Only R1 and R3 is connected over Serial cable and rest of all devices are
connected over Ethernet cable.
2
2.1 Static Routing
Configuration
R1:
R2:
3
R3:
PC-1:
PC-2:
PC-3:
4
PC-4:
Varification
In CCNA we will see two type of routing mechanism, one is Static Routing and another one is
Dynamic Routing. In the static routing mechanism we create route statically/manually. ip route
command is used to configure the static route. Static Route implementation in a big network will
be nightmare for Network Administrator. Just keep in mind, when you are configuring Static
Route, you have to configure forwarding route and reverse route (two way path) for traffic/data
to reach destination.
Let me explain you in more detail, when you will start ping to IP 172.16.30.5 from PC-1, then
what would be Source and Destination IP of the Layer 3 header of ping packet.
When you will start ping from PC-1, packet will go to R1’s Fa0/1 (Computer will check its own IP
and destination IP whether they are in same subnet or different subnet, in our case destination
IP is in different subnet. If destination IP in different subnet then for Routing Computer will send
the traffic to Gateway, in our case Router R2), then router will check the destination IP of the
Layer 3 header, which is 172.16.30.5. This is the reason IPv4 Class A, B and C is called
destination based Routing.
5
Then in the Routing Table it will find the path to reach destination. In the routing table it will find
which network/IP is matching with our destination IP – 172.16.30.5, So we need configure a
Static Route for Destination 172.16.30.0/24 with next HOP IP – 172.16.12.1.
Then it will see network 172.16.30.0/24 which will be pointing to IP 172.16.12.1 (Next-HOP IP).
That means if I want to reach destination 172.16.30.5 I have to go to R1 (172.16.12.1 is R1’s IP
used in Fa0/0). This process also called L3 lookup or Routing lookup. I hope now you know how
the traffic is reaching to destination. For CCNA this is enough, but there is lot you will come to
know in CCIE.
Before I start verification, I would like to tell you one thing, Ping is 2 way process. Sending ICMP
echo Request to Destination and destination is sending ICMP echo reply back to source. When
Ping request will reach to PC-3 then PC-3 will change Layer 3 header.
And when ICMP echo reply will hit the R3’s interface Fa0/1, then R3 also will do the same
destination based lookup. On R3 we need a static route to reach 172.16.20.0/24 with the next
hop 172.16.13.1.
We have seen that Static Route is required on R2 for Destination 172.16.30.0/24 with next hop
IP – 172.16.12.1. Also we have seen that Static Route is required on R3 for destination
172.16.20.0/24 with next hop IP – 172.16.13.1. Both the router R2 and R3 is pointing traffic to
R1. What R1 will do now?
R1 needs two static routes, when traffic is coming from R3 it will send to R2 and when traffic will
come from R2 it will send to R3.
On R1 we need Static Route for Destination 172.16.20.0/24 with next hop IP – 172.16.12.2
(Traffic coming from R3) and another one is, for destination 172.16.30.0/24 with next hop IP –
172.16.13.3 (Traffic coming from R2).
6
R2#show ip interface brief
Interface IP-Address OK? Method Status Protocol
R2#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
7
On the above output we are seeing R2’s Routing table, on R2 one static route was configured
for destination 172.16.30.0/24 with next hop IP – 172.16.12.1. That means, if any traffic is come
from PC-1 or PC-2 and destined for network 172.16.30.0/24, it will pass the information to R1.
Static route is identified by “S” in the routing table and “C” for connected Network.
R3#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
On the above output we are seeing R3’s Routing table, on R3 one static route was configured
for destination 172.16.20.0/24 with next hop IP – 172.16.13.1. That means, if any traffic is come
from PC-3 or PC-4 and destined for network 172.16.20.0/24, it will pass the information to R1.
R1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
8
Gateway of last resort is not set
As we discussed earlier, on R1 we need two static routes, when traffic is coming from R3 it will
send to R2 and when traffic is coming from R2 it will send to R3.
On the above output we can see on R1, there are two Static Routes. One for Destination
172.16.20.0/24 with next hop IP – 172.16.12.2 (Traffic coming from R3 for destination
172.16.20.0/24) and another one is, for destination 172.16.30.0/24 with next hop IP –
172.16.13.3 (Traffic coming from R2 for destination 172.16.30.0/24).
*** You may notice there are two values inside the bracket “[1/0]”. First one is AD
(Administrative Distance) and second one is Metric. Always you will see metric “0” for static
route. Let me show you one more verification command to see a route.
From PC-1:
9
From PC-4:
10
2.2 Default Static Route
Configuration
Note:- R2 is a Service Provider’s Router. Basically you do not have to configure Service
Provider Router if you are working on Enterprise Network. I have given the configuration as
below you may configure R2 as same. SRV-1 (Server) also located in Internet, you do not have
to configure it in real world, so you may configure the IP address same as below.
R2:
11
R2(config-if)#ip address 59.16.20.2 255.255.255.0
R2(config-if)#no shutdown
R2(config)#interface fastEthernet 0/1
R2(config-if)#ip address 172.16.12.2 255.255.255.0
R2(config-if)#no shutdown
R1:
SRV-1:
PC-1:
PC-2:
12
Varification
Static Default route was configured on R1 as it has to reach 1000 of Servers are located in the
Internet. In the Internet we may not know all the servers IP as we access those servers using
their name. In such scenario we can use Static Default Route. Also question said, only one
route I can configure, so this must me Static Default Route, because Default Route on R1 will
pass all the IP traffic to R2 to reach internet. There is one more reason you should know why we
configure default route, when your router can not handle huge amount of route in the routing
table, on that scenario you can use Default Route to save resources on the Router.
Note:- Be careful while you are configuring Default route in Complex Network, think all the
possible ways before applying default route as it may create loop in the routing table. If you are
100% sure that creating Default Route will not introduce loop in the network then go for it.
R1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
13
On the above output we can see, R1 has installed a default route in routing table. Now any
request comes to R1 (request to reach any destination IP) that will be forwarded to R2 (Next
hop IP – 172.16.12.2). Always you will see * sign on the default route as it indicates default
route. Also you are seeing Gateway of last resort is 172.16.12.2. It says if there is no match to
destination IP in the routing table it should use default route.
14
2.3 Floating Static Route
Configuration
R1:
R1(config)#router rip
R1(config-router)#network 172.16.12.0
R1(config-router)#network 172.16.13.0
15
R2:
R2(config)#router rip
R2(config-router)#network 172.16.20.0
R2(config-router)#network 172.16.12.0
R3:
R3(config)#router rip
R3(config-router)#network 172.16.13.0
R3(config-router)#network 172.16.30.0
PC-1:
16
PC-2:
PC-3:
PC-4:
Varification
Floating static route is, when static route will be used as backup route by increasing the AD
(Administrative Distance) value. For Example, in our network we used Static Route as well as
17
RIP routing protocol and we want Static should be used as backup route, I mean when RIP
failed then static routing should work.
If we run Static and RIP both the routing mechanism, by default Static Route will take
preference and Static Route will be installed in the Routing Table, not RIP Route. The reason is
AD value, who has lowest AD that route will install in Routing table. We know Static Route has
AD of 1 and RIP has AD of 120.
Actual Rules, if any network is learning from 2 different routing protocol then who has the lowest
AD that routing protocol route will be seen in the routing table. In our case, Static Routing as it
has lowest AD. But question said, RIP route will be installed in the Routing table. It is possible if
we configure Static Route with higher AD than RIP. At the end of the static route syntax we can
add AD value on static route.
R2#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
On the above output, we did not find Static Route on R2’s routing table. Here “R” indicates RIP.
R1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
18
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
On the above output, we did not find Static Route on R1’s routing table. Here “R” indicates RIP.
R3#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
On the above output, we did not find Static Route on R3’s routing table. Here “R” indicates RIP.
From PC-1:
19
From PC-4:
20
2.4 Routing Information Protocol (RIP)
Configuration
Note:- RIP is already configured in previous section except the Serial link between R2
and R3. Now we will enable RIP only on the Serial Interface between R2 and R3.
R1:
R2:
21
R2(config)#no ip route 172.16.30.0 255.255.255.0 172.16.12.1 130
R2(config)#router rip
R2(config-router)#network 172.16.23.0
R3:
Varification
RIP is a Distance Vector Routing protocol. RIP operates on UDP port 520, all RIP packets have
a source and destination port equal to 520.
RIP Metric:
Hop Count. Maximum is 15.
If we do not mention version 2 under RIP configuration then version 1 will be running. Also
network command in RIP is classful for v1 and v2. RIPv1 is out of market, nobody using it now
a days.
R2(config)#router rip
R2(config-router)#network 172.16.20.0
R2(config-router)#network 172.16.12.0
R2(config-router)#network 172.16.23.0
But, in the running-configuration it is showing as below. So, network command in RIP is classful.
router rip
network 172.16.0.0 <<<Major Network>>>
RIPv1 is a classful routing protocol, so it does not advertise subnet mask information along with
advertised routes. For RIPv1 to determine what the subnet mask is of the destination network,
RIP pulls the subnet mask from the interface in which the route was received. This is true only if
the route was received and directly connected subnet both are in same major network. If the
route received is not in the same major network, the router will do auto-summarization at the
classful network.
RIPv1 does not support VLSM if the subnets are from different major network.
RIPv1 does not support control plane protection, that is called authentication.
22
RIPv1 sends broadcast update to 255.255.255.255.
RIPv1 has few limitations so RIPv2 was introduced. Now let’s do the verification.
R2#sh ip protocols
Routing Protocol is "rip" <<<RIP is running on this Router>>>
Sending updates every 30 seconds, next due in 25 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Redistributing: rip
Default version control: send version 1, receive any version
Interface Send Recv Triggered RIP Key-chain
FastEthernet0/0 1 21
FastEthernet0/1 1 21
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
172.16.0.0
Passive Interface(s):
Routing Information Sources:
Gateway Distance Last Update
172.16.12.1 120 00:00:21 <<<gateway for Routing, next hop>>>
172.16.23.3 120 00:00:08 <<<gateway for Routing, next hop>>>
Distance: (default is 120)
On the above output we can see, Router is running RIP Protocol and that is RIPv1. Because
RIPv1 sends v1 update and capable to receives v1 and v2 update.
Also we can see RIP timers, sending update every 30 sec.
Maximum path 4, which means it can load share between four equal paths.
Routing for Networks, it is basically the network was configured by network command under RIP
global configuration mode.
R2#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
23
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
From routing table we can see, network 172.16.13.0 is doing load sharing as from R2 we can
reach network 172.16.13.0 using 2 paths, both has same metric (hop count) 1.
If we want to reach network 172.16.30.0 from R2 then we have to go 172.16.23.3 which is R3.
You can see R1 and R3’s Routing table using same show commands.
Let’s see some debug output, as I said RIPv1 sending update to broadcast IP 255.255.255.255
and cannot send subnet mask information on the update.
24
R2#debug ip rip
RIP protocol debugging is on
RIP: sending v1 update to 255.255.255.255 via FastEthernet0/0 (172.16.12.2)
RIP: build update entries
network 172.16.20.0 metric 1
network 172.16.23.0 metric 1 <<<There is no subnet mask info in update>>>
network 172.16.30.0 metric 2
RIP: sending v1 update to 255.255.255.255 via FastEthernet0/1 (172.16.20.2)
RIP: build update entries
network 172.16.12.0 metric 1
network 172.16.13.0 metric 2
network 172.16.23.0 metric 1
network 172.16.30.0 metric 2
RIP: sending v1 update to 255.255.255.255 via Serial0/1/0 (172.16.23.2)
RIP: build update entries
network 172.16.12.0 metric 1
network 172.16.20.0 metric 1
From PC-1:
From PC-4:
25
Now the question said, if the serial link between R2 and R3 goes down there should be any
connectivity failure between subnet 172.16.20.0/24 & 172.16.30.0/24.
To test it, we will manually shutdown the serial interface from R2. Then we will check ping.
From PC-1:
26
From PC-4:
2.5 RIPv2
Configuration
R2:
R2(config)#router rip
R2(config-router)#version 2
R1:
R1(config)#router rip
R1(config-router)#version 2
R3:
R3(config)#router rip
R3(config-router)#version 2
27
Varification
Already RIPv1 was running, so only one command is required to enable RIPv2, that is version 2
under RIP global process. RIPv2 is an extension of RIP-1.
Now let’s see debug output from one of the RIP running router.
R3#debug ip rip
RIP protocol debugging is on
RIP: sending v2 update to 224.0.0.9 via FastEthernet0/0 (172.16.13.3)
RIP: build update entries
172.16.20.0/24 via 0.0.0.0, metric 2, tag 0
172.16.23.0/24 via 0.0.0.0, metric 1, tag 0 <<<Sending subnet mask info>>>
172.16.30.0/24 via 0.0.0.0, metric 1, tag 0
RIP: sending v2 update to 224.0.0.9 via FastEthernet0/1 (172.16.30.3)
RIP: build update entries
172.16.12.0/24 via 0.0.0.0, metric 2, tag 0
172.16.13.0/24 via 0.0.0.0, metric 1, tag 0
172.16.20.0/24 via 0.0.0.0, metric 2, tag 0
172.16.23.0/24 via 0.0.0.0, metric 1, tag 0
RIP: sending v2 update to 224.0.0.9 via Serial0/1/0 (172.16.23.3)
RIP: build update entries
172.16.13.0/24 via 0.0.0.0, metric 1, tag 0
172.16.30.0/24 via 0.0.0.0, metric 1, tag 0
R2#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
28
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
In RIPv1 we have seen that network 172.16.13.0 is doing load sharing, same is in RIPv2.
Configuration
R2:
R2(config)#router rip
R2(config-router)#passive-interface serial 0/1/0
R2(config-router)#passive-interface fastEthernet 0/0
Varification
Once you apply passive-interface for an interface, that interface will stop sending Broadcast or
Multicast update, but it will be able to receive broadcast or multicast update. Passive-interface
cannot stop sending unicast update on RIP.
29
R1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
R3#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
30
R1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Can you see the change in the routing table on R3? RIP route 172.16.20.0/24 not there in
routing table, as R2’s fa0/0 and Se0/1/0 cannot send update for this network. Now let’s see
routing table of R3.
R3#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Can you see the change in the routing table on R3? RIP route 172.16.20.0/24 not there in
routing table, as R2’s fa0/0 and Se0/1/0 cannot send update for this network.
31
2.7 RIPv2 unicast neighbor
Configuration
R1:
R1(config)#router rip
R1(config-router)#passive-interface fastEthernet 0/0
R1(config-router)#neighbor 172.16.12.2
R2:
R2(config)#router rip
R2(config-router)#neighbor 172.16.12.1
Varification
In Previous configuration passive-interface was configured on R2’s fa0/0 and this interface was
not able to send any broadcast or multicast update.
32
Now we have configured passive-interface on R1’s Fa0/0 and this interface will not be able to
send broadcast or multicast update, these interfaces can send unicast update and that can be
configured using neighbor command under RIP routing process.
Now both the interfaces will send unicast update instead of multicast. IP which was configured
with neighbor command, that is interface IP of another end. For example, on R1 we have
configured neighbor 172.16.12.2, this IP is R2’s interface IP on the connected link.
Now enable debug ip rip command on R2, check the debug logs. R2 now sending unicast
update instead of multicast.
R2#debug ip rip
RIP protocol debugging is on
R2#
RIP: sending v2 update to 172.16.12.1 via FastEthernet0/0 (172.16.12.2)
RIP: build update entries
172.16.20.0/24 via 0.0.0.0, metric 1, tag 0
2.8 RIPv2 auto-summary and Split-horizon
Configuration
R1:
R1(config)#interface fastEthernet0/1
R1(config-if)#ip address 192.168.10.1 255.255.255.0
R1(config-if)#exit
R1(config)#router rip
R1(config-router)#network 192.168.10.0
R2:
33
R3:
Varification
RIPv1 and v2 both does the auto-summarization at the classful/major network boundary. In our
case, R1 is major network boundary as Fa0/0 has IP address 172.16.12.1/24 and it’s major
network is 172.16.0.0/16, at the other side R1 has Fa0/1 which has IP address 192.168.10.1/24
and it’s major network also same, 192.168.10.0/24.
When R1 will send update to R3, It will not send update for individual subnets (172.16.12.0/24 &
172.16.20.0/24), instead it will send major network 172.16.0.0/16, and we can verify it by seeing
R3’s routing table.
R3#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
34
P - periodic downloaded static route
This behavior can be turned off on RIPv2 using the command no auto-summary. Let’s
configure no auto-summary on R1 and will check R3’s routing table.
R1(config)#router rip
R1(config-router)#no auto-summary
Wait for some time to converge the RIP then you check R3’s routing table as we know RIP is
very slow protocol by default. But we can tune the timers to converge it little faster. Or you can
refresh the routing table of R3 using command clear ip route * but do not use this command in
production.
R3#clear ip route *
R3#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Now, we can see two RIP routes on R3’s routing table. Is that clear to you?
Next, we will verify split-horizon, it is basically used to prevent loop in the RIP. Split-horizon
says, if an update is received on an interface the same update will not be sent back over the
same interface.
35
R2 is receiving update from R1 on interface Fa0/0, the same update R2 will not send back to R1
over the interface Fa0/0.
But we have disables the split-horizon on R2’s fa0/0, so it will break the rules and will send back
the same update which was received on interface Fa0/0.
Basically split-horizon need to disable on Hub router in Hub and Spoke topology, where Hub
router need to send back same update over the same interface to share the routing update with
Spoke routers.
36
[…output omitted…]
Configuration
R1:
R1(config)#router rip
R1(config-router)#default-information originate
R2:
Varification
If you want to advertise default route from RIP you may use the command default-information
originate under RIP global process which will propagate throughout the entire RIP routing
domain.
37
Check the routing table of R2 and R3, both installed a default route.
R2#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
R3#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
38
Now, split-horizon is enabled on R2’s interface fa0/0.
39
2.10 Enhanced Interior Gateway Routing Protocol (EIGRP)
Remove all the previous RIP configurations and change the subnet on the link between
R1 and R3 to 172.16.13.0/24.
Use the Topology 2
Configure EIGRP on R1, R2 and R3 and disable auto-summarization on all the routers.
Configure IP address on PC’s as below and test the connectivity between PC’s using
ping.
PC-1 = 172.16.20.5/24
PC-2 = 172.16.20.10/24
PC-3 = 172.16.30.5/24
PC-4 = 172.16.30.10/24
Configuration
R2:
R2(config)#router eigrp 1
R2(config-router)#no auto-summary
R2(config-router)#network 172.16.20.2 0.0.0.0
R2(config-router)#network 172.16.23.2 0.0.0.0
R2(config-router)#network 172.16.12.2 0.0.0.0
R1:
40
R1(config)#no router rip
R1(config)#interface fastEthernet 0/1
R1(config-if)#ip address 172.16.13.1 255.255.255.0
R1(config)#router eigrp 1
R1(config-router)#no auto-summary
R1(config-router)#network 172.16.12.1 0.0.0.0
R1(config-router)#network 172.16.13.1 0.0.0.0
R3:
R3(config)#router eigrp 1
R3(config-router)#no auto-summary
R3(config-router)#network 172.16.13.3 0.0.0.0
R3(config-router)#network 172.16.23.3 0.0.0.0
R3(config-router)#network 172.16.30.3 0.0.0.0
PC-1:
PC-2:
PC-3:
41
PC-4:
Varification
An EIGRP router only advertises its best route to its neighbor, not every route that is
aware of.
42
An EIGRP router does not have a complete map of the topology, it is only aware of
what its neighbors have told it (routing by rumor).
Ability to send the full routing table as an update (but only when 2 neighbors first come
up)
EIGRP Tables:
A Router running EIGRP maintain three different tables
Neighbor Table
Topology Table
Routing Table
EIGRP Metric:
EIGRP use five parameters to calculate it’s metric. EIGRP identifies these parameters by K
values. By Default EIGRP use Bandwidth and Delay for metric calculation.
Bandwidth = K1
Delay = K3
Load = K2
Reliability = K4
MTU = K5
43
How EIGRP works?
EIGRP first finds its neighbor on EIGRP enabled connected interfaces using hello packet,
then neighbors exchange update packets to share each other’s route/networks. These
route/network information are stored in topology table. Now EIGRP will run DUAL algorithm
to calculate the metric and find the best path. Once best path was found then it will be
installed in Routing table.
EIGRP network command can be configured with wild card mask and it is classful if you do
not use wildcard mask.
Wildcard mask is opposite of subnet mask. If you know the subnet mask easily you can
calculate wild card mask. For example, you have a subnet 10.1.1.0/24, now you want to
calculate the wild card mask. Just follow me.
255.255.255.255
255.255.255. 0
------------------------
0 . 0 . 0 . 255
What I did, just subtract the subnet mask from 255.255.255.255 and the result what I got
that is wild card mask, which is 0.0.0.255.
We have configured network command under EIGRP global process as below (without wild
card mask).
router eigrp 1
network 172.16.20.0
44
Router ID (RID) is nothing but Router Name. It is used to prevent loop in EIGRP routing
domain and it has to be unique, otherwise duplicate RIDs may cause problems when
configuring EIGRP.
R2#show ip protocols
Router is running EIGRP and its K values. K1 = 1 and K3 = 1, that means K1 and K3 is
enabled. K2, K4 & K5 = 0, that means these are disabled by default.
EIGRP also calculate HOP count, by default which is 100 but you can increase it to 255.
Automatic summarization not in effect as we disabled the auto-summary.
Also we can see, maximum path 4, means EIGRP router can do load sharing in 4 equal
metric path.
45
Routing for networks, means networks were added by the network command which
matches the interface network/IP and enabled EIGRP on those interfaces.
Gateway, this router has two neighbors and their IP address to route packets.
EIGRP Administrative Distance is 90 for Internal and 170 for External.
We can see, R2 has two neighbors (R1 & R3) and their IP address on the connected interface.
Now let me explain each and every field of this output.
H = Handle, or you may think like serial number. It starts from 0 and first neighbor will use 0.
Hold = It is calculated in second. This is neighbor’s hold time and neighbor shared this hold
time in hello packet.
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.
Q Cnt (Q Count) = The number of EIGRP packets (Update, Query or Reply) in the queue
that are waiting for transmission. Ideally you want this number to be 0 otherwise it might be
an indication of congestion on the network.
46
Seq Num (Sequence number): This will show you the sequence number of the last
update, query or reply packet that router received from your EIGRP neighbor.
Excellent; that’s how EIGRP stores neighbor information! Our next step is of course to take
a look at the EIGRP Topology table:
If you look at the gray marked area, you can see that we are looking at the EIGRP topology
table for AS (Autonomous System) number 1. Keep in mind that the AS number has to
match on EIGRP routers in order to become neighbors. Also you can see “P” in front of
each route/network, that means Passive, good route. If you see “A” instead of “P” then
that route is bad route, not up.
Just notice here, R2 is learning route 172.16.13.0/24 from two different neighbors, R1 (via
172.16.12.1) and R3 (via 172.16.23.3). When the route is leaning from R1 it has metric
30720 and when it is learning from R3 it has metric 2172416. Metric lowest is best. Next we will
verify routing table and we will see route 172.16.13.0/24 is installed from R1 (172.16.12.1) as it
has lower metric. Same you may verify for route 172.16.30.0/24.
47
R2#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Here we can see routing table of R2. As discussed above, R2 will install route 172.16.13.0/24
from R1 (via 172.16.12.1), same we can see here. So it means, in topology table we can see
router is learning one route from many different neighbors but routes from best neighbor will be
installed in routing table. Here “D” indicates EIGRP route.
From PC-1:
48
From PC-4:
49
2.11 EIGRP Static Neighbors and Split-horizon
Configuration
R1:
R1(config)#router eigrp 1
R1(config-router)#neighbor 172.16.12.2 fastEthernet 0/0
R2:
R2(config)#router eigrp 1
R2(config-router)#neighbor 172.16.12.1 fastEthernet 0/0
Varification
EIGRP static neighbor configuration will stop sending multicast packets to neighbor, instead it
will send unicast packet.
Let’s do some high level verification to see how EIGRP is sending hello packet to unicast IP.
50
Let’s turn on following two debug commands,
Check the Source IP (s) and Destination IP (d) both are unicast IP for hello packet. Also you
can see IP Protocol number 88, that indicates EIGRP.
Now, we will check Split-horizon, concept is same as I explained in RIP. It is basically used to
prevent loop in the EIGRP. Split-horizon says, if an update is received on an interface the same
update will not be sent back over the same interface.
51
2.12 EIGRP Unequal Load Balancing and Timer
Configuration
R1:
R2:
R2(config)#router eigrp 1
R2(config-router)#variance 71
Varification
EIGRP is only routing protocol supports unequal cost load balancing. Let me explain first what is
load balancing, Cisco router cannot do the actual load balancing, but still we say router is doing
load balancing. Cisco router can do load sharing, it is basically, when router will send data to
destination it will use multiple path to send data towards destination. So multiple path must be
exist in the routing table to accomplish this.
Now we will understand what is unequal cost/metric load balancing? It is basically load
balancing between different metric path/link. As we know in topology table EIGRP can keep
multiple path for same destination and best path will be chosen based on metric and put it in
routing table. What about those paths which was not chosen as best path? These paths also
can be installed in the routing table by configuring variance under EIGRP global process.
You cannot install all paths/routes in routing table from topology table, there is a condition that
must match. Condition is – route must be meeting feasibility condition.
52
Metric - the metric is used when determining the best path to a destination network. It is worked
out from a formula that included Bandwidth, Delay, Load, Reliability and MTU.
Feasible Distance (FD) – Feasible distance is the best metric along a path to a
destination network. Actually the metric from a router to destination.
Reported distance (RD) - The metric advertised by a neighboring router for a specific
route. It other words, it is the metric of the route used by the neighboring router to reach
the network.
Successor – The best route, which is going to Routing table from topology table.
Active Route – Bad route, if the route goes down you may see “A” in front of the route in
topology table.
In our case, route 172.16.13.0/24 coming from neighbor R3 has met feasibility condition and we
can install this route from topology table to Routing table.
53
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
r - Reply status
Now let me explain you how the route 172.16.13.0/23 has come from R3 met feasibility
condition.
So, the route has come from R3 can be chosen for unequal cost/metric load balancing.
Equal cost load balancing can happen automatically, but unequal cost load balancing cannot
happen automatically. We have configure for that, the configuration will be done under EIGRP
routing process using command variance [multiplier].
Here multiplier is, how many times longer Feasible Successor’s FD than Successor’s FD.
In our case,
54
Note: - variance command does not change metric of routes. The biggest drawback of variance
command is, it will take effect of all routes those are fall under this condition. You cannot do it
for a single route.
Now we will check routing table of R2 to check whether the route 172.16.13.0/24 has come from
R3 was installed in the routing table or not.
R2#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Check the above output, now route 172.16.13.0/24 is doing unequal cost load balancing. But
what about the route 172.16.30.0/24, it is also doing unequal cost load balancing as I said when
you configure variance it will take effect of all routes those are fall under this condition.
55
Split-horizon is enabled
Next xmit serial <none>
Un/reliable mcasts: 0/1 Un/reliable ucasts: 5/5
Mcast exceptions: 0 CR packets: 0 ACKs suppressed: 0
Retransmissions sent: 0 Out-of-sequence rcvd: 1
Topology-ids on interface - 0
Authentication mode is not set
In EIGRP Hello and hold time can be different between neighbors, it should not be same
between neighbors to form neighborship. Cisco recommends, when you are changing hello and
hold time please do change on all the interfaces throughout the EIGRP routing domain.
Configuration
R1:
R2:
56
R2(config)#router eigrp 1
R2(config-router)#eigrp router-id 2.2.2.2
R2(config-router)#auto-summary
R3:
Varification
Router ID (RID) is nothing but Router Name. It is used to prevent loop in EIGRP routing
domain and it has to be unique on the routers in EIGRP routing domain, otherwise duplicate
RIDs may cause problems when configuring EIGRP.
Let’s verify on R2
R2#show ip protocols
57
Maximum metric variance 1
[…output omitted…]
EIGRP does the auto-summarization at the classful/major network boundary. In our case, R1 is
major network boundary as Fa0/0 has IP address 172.16.12.1/24 and it’s major network is
172.16.0.0/16, at the other side R1 has Fa0/1 which has IP address 192.168.10.1/24 and it’s
major network also same, 192.168.10.0/24.
When R1 will send update to R3, It will not send update for individual subnets (172.16.12.0/24 &
172.16.20.0/24), instead it will send major network 172.16.0.0/16, and we can verify it by seeing
R3’s routing table.
R3#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
58
2.14 EIGRP Passive Interface
Configuration
R2:
R2(config)#router eigrp 1
R2(config-router)#passive-interface fastEthernet 0/0
Varification
EIGRP passive interface will stop sending multicast and unicast packet. When you will configure
passive-interface on R2’s interface Fa0/0 after some time you will see a log message on the
screen that neighbor gone down, hold time expired. Because, the interface is not able send
hello to maintain neighborship.
Log message:
R2#
59
%DUAL-5-NBRCHANGE: IP-EIGRP 1: Neighbor 172.16.12.1 (FastEthernet0/0) is down:
holding time expired
Configuration
R1:
60
R1#write erase
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
[OK]
Erase of nvram: complete
R1#reload
Proceed with reload? [confirm]
R1(config)#router ospf 1
R1(config-router)#router-id 1.1.1.1
R1(config-router)#network 172.16.12.1 0.0.0.0 area 0
R1(config-router)#network 172.16.13.1 0.0.0.0 area 0
R2:
R2#write erase
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
[OK]
Erase of nvram: complete
R2#reload
Proceed with reload? [confirm]
R2(config)#router ospf 1
R2(config-router)#router-id 2.2.2.2
R2(config-router)#network 172.16.12.2 0.0.0.0 area 0
R2(config-router)#network 172.16.23.2 0.0.0.0 area 0
R2(config-router)#network 172.16.20.2 0.0.0.0 area 0
61
R3:
R3#write erase
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
[OK]
Erase of nvram: complete
R3#reload
Proceed with reload? [confirm]
R3(config)#router ospf 1
R3(config-router)#router-id 3.3.3.3
PC-1:
PC-2:
62
PC-3:
PC-4:
Varification
About OSPF:
OSPF is a Dynamic Routing Protocol (IGP).
Link State Routing Protocol Use Dijkstra SPF Algorithm
Guarantees Loop Free Topology within Area
Hierarchy using “areas”
Fast Convergence
Efficient Update packets
Efficient Metric – Cost
Use Control plane security
63
Routing Table
Step 2
Chose best path via SPF
Step 3
Neighbor and Topology Table maintenance
All neighbor information stores in neighbor table. In topology table OSPF keeps all link
information. All OSPF routers within an area keeps same topology table or all routers within an
area will have same view of the topology. Because OSPF router exchange topology table at the
time of forming adjacency to keep same topology information inside an area. Once topology
table synchronized then Router run SPF algorithm to find the best path and put that path in
Routing table.
Like EIGRP, OSPF also use Hello packets to discover neighbor on OSPF enable link.
Use IP Protocol 89.
Sends Multicast to 224.0.0.5 or 224.0.0.6 or Unicast.
Hello packets contain different parameters that neighbor must agree on to form
adjacency.
Once Neighborship is negotiated, LSDB (Link State Database) is exchanged.
OSPF Router ID
Identify the node/router in the Link State Graph
That needs to be different between nodes
Note:- Router ID nothing but router name, Cisco recommends to configure Router ID manually.
If router ID is configured manually then router will not take router id automatically.
64
OSPF adjacency occurs when connect neighbors use hello packets to agree on unique and
common attributes. Not all OSPF Neighbors are form adjacency.
Database Description (DBD) = Carries brief information about local link state database
(LSDB) and used to synchronize LSDB between the routers. Basically this packet is
used to check if the LSDB between 2 routers is the same. The DBD is a summary of the
LSDB.
Link State Request (LSR) = Request for required LSA from neighbor after DBD’s have
been exchanged successfully.
65
OSPF Adjacency process uses 8 states to determine progress of Adjacency establishment. If
two routers on a link reaches up to 2-way state that means, both the routers are formed
neighborship. Once they will synchronize their database then they will form adjacency.
Down
No hellos have been received from neighbor.
Attempt
Unicast Hello packet has been sent to Neighbor, but no hello has been received back.
This state only used in manually configured NBMA (Non-broadcast Multi Access) neighbors.
Init
Hello has been received from neighbor, but they have not acknowledged from me.
2 – way
I have received a Hello packet from neighbor and neighbor has received acknowledged Hello
from me. Also I will see my Router ID in neighbor’s hello packet.
At the end of this stage, the DR (Designated Router) and BDR (Backup Designated Router) for
broadcast and non-broadcast multi-access networks are elected.
***If router cannot go to 2 – way state there could be some possibility of L1 or L2 issue.
ExStart
This is first step of actual adjacency. Master and Slave relationship is formed, where Master has
higher Router ID.
Master chooses the starting sequence number for the DBD (Database Descriptor) packets that
are used for actual LSA (Link State Advertisement) exchange.
Exchange
Local Link state database is sent through DBD packets. Database descriptors contain link-state
advertisement (LSA) headers only and describe the contents of the entire link-state database.
Routers also send link-state request (LSR) packets and link-state update packets (which contain
the entire LSA) in this state.
Loading
Link state Request packets are sent to ask for more information about a particular LSA. The
neighbor then provides the requested link-state information in link-state update packets.
Full
Neighbors are fully adjacent and database is synchronized.
Step 2: Chose best path via SPF (Shortest Path First) algorithm
66
Once databases are synchronized path selection begins
Best path to the link lowest end to end cost
Multiple equal cost paths are allowed
Cisco’s implementation bandwidth based cost
Default Cisco Cost = 100 / Link Bandwidth in Mbps
Backbone area is called AREA 0; any other area number is called Non-backbone area. Between
Non-backbone area communication must be through backbone area.
OSPF Router Type:
Link state advertisement is an advertisement about link status. In OSPF routing domain routers
are exchanged LSA to build the topology table/LSDB, then SPF will run to build shortest path
tree.
67
LSA Types and their name …
Type 1 = Router LSA
Type 2 = Network LSA
Type 3 = Network Summary LSA
Type 4 = ASBR Summary LSA
Type 5 = External LSA
Type 7 = NSSA External LSA
There are total 11 type of LSA exist in OSPF but in CCNA course we will see only first three
type LSA.
LSA Type 1 (Router LSA) – Generated by the routers in an area. Describes, router’s directly
connected Links, what are my link cost, who are my neighbors.
LSA Type 2 (Network Summary LSA) – It is generated by ABR, describe ABR’s reachability
to links in other area; include cost, but hide ABR’s actual path to the destination.
We have covered lots of theory so far, now let’s do some verification. First we will see
neighborship on all three routers. R1 will form neighborship with R2 and R3 and state will be full,
Likewise R2 will form neighborship with R1 and R3 and state will be full, same will be true for
R3.
68
Neighbor ID Pri State Dead Time Address Interface
On every router we will see two type of LSA on the topology table, Type 1 and Type 2. Marked
in Yellow which is type 1 and marked in green which is type 2 LSA. These two types of LSA will
be flooded (send) within the area.
As we know, Type 2 LSA is generated by DR in Broadcast or Non-broadcast multi-access
network, here R1 and R2, R1 and R3 is connected over Ethernet port, Ethernet media is OSPF
detected as Broadcast network that is the reason we see Type 2 LSA. You may check for R2
and R3’s topology table.
69
Now we will check whether our all interfaces are configured on area 0 or not.
All interfaces on all the routers are in area 0. Let’s see routing table of R2.
R2#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
R2 is learning two routes from R1 and “O” indicate OPSF. Now we will check PC to PC ping
test.
70
From PC-1:
From PC-4:
71
2.16 OSPF Static Neighbors and Timers
Configuration
R1:
R1(config)#router ospf 1
R1(config-router)#neighbor 2.2.2.2
R2:
R2(config)#router ospf 1
72
R2(config-router)#neighbor 1.1.1.1
Varification
We already know that, static neighbor is sending unicast instead of multicast. Here in this
scenario it will not work, need to change the network type to NBMA (non-broadcast multi-
access) then R1 and R2 will exchange information over unicast. Network type change is not
covered in CCNA syllabus.
OSPF does not allow static neighbors except in non-broadcast networks, i.e. NBMA or P2MP-
NB. In that case, the multicast communication is completely blocked, unicast communication is
required.
But still I am showing you how to change network type, in the configuration section I changed
the network type to NBMA on R1 and R2’s interface Fa0/0, now R1 and R2 will exchange
unicast packet.
Hello and Dead interval must be same on both end of the link to form adjacency. In question
said, change hello and dead interval only on R2, but you have to change on R1 as well. Also
changing the hello interval automatically changes the dead interval on the interface. But do not
73
depend on automatic change, just do it yourself. Now we will see how to check hello and dead
interval.
74
2.17 OSPF Multi-Area and Interface Cost
Configuration
R1:
R1(config)#router ospf 1
R1(config-router)#network 172.16.13.1 0.0.0.0 area 2
R2:
R3:
75
Varification
We have configured here OSPF multi area. When you are configuring OSPF multi area just
keep in mind that non-backbone area must be connected to area 0. It is a loop prevention
mechanism OSPF used to prevent loop. In our case, link between R1 and R3 was configured
for area 2 and another link on R1 and R3 was connected to area 0.
First we will check whether the link between R1 and R3 is really on the area 2 or not.
Now, next we will check how the traffic is flowing over the network from PC-1.
PC-1:
I used traceroute, it is a tool to check the hop by hop details of traffic flowing. I did the
traceroute to IP 172.16.30.5 from PC-1. From the output we can see the traffic flowing path.
First traffic is going to R2 (172.16.20.2) as the IP I can see on the output. Second, it is going to
R1 (172.16.12.1), then it is going to R3 (172.16.13.3), at last it is reaching to destination, which
is PC-3 (172.16.30.5). I can see hare in my network traffic flow is R2 R1 R3. But question
said, traffic should flow from Subnet 172.16.20.0/24 to 172.16.30.0/24 over the Serial link
between R2 and R3, that means R2 R3. How can we achieve it?
76
There are two path to reach network 172.16.30.0/24 from 172.16.20.0/24. One is, R2 R1
R3. Another one, R2 R3. We know that OSPF is choosing path through R1 because of best
metric. Now we will compare the metric between both the paths.
Path = R2 R1 R3 = 2
You can see from the routing table before changing cost. See below
R2#show ip route
O IA 172.16.13.0/24 [110/2] via 172.16.12.1, 00:02:07, FastEthernet1/0
Path = R2 R3 = 65
On R2 just shutdown the interface Fa0/0 and check routing table.
R2#show ip route
O IA 172.16.13.0/24 [110/65] via 172.16.23.3, 00:00:26, Serial0/1/0
We have seen both the path metric, now if we increase the metric (metric should be more than
65) on R2’s interface Fa0/0 than the metric which has serial (metric 65) link then we will be able
to see route 172.16.30.0/24 on the R2’s routing table and R2 will receive from R3 directly as
serial link will have lower metric. That means, traffic will flow from R2 R3.
In the configuration section you can see the command ip ospf cost 80 under R2’s Fa0/0, that
will make the change of metric. You will know more about changing cost or route manipulation
in CCNP and CCIE. Now we will check R2’s routing table.
R2#show ip route
O IA 172.16.13.0/24 [110/65] via 172.16.23.3, 00:16:16, Serial0/1/0
[…output omitted…]
77
Again we will do the traceroute from PC-1 to check how the traffic is flowing now.
PC-1:
Configuration
R1:
R1(config)#router ospf 1
R1(config-router)# default-information originate always
Varification
Default routes injected into a normal area can be originated by any OSPF router. The OSPF
router does not, by default, generate a default route into the OSPF domain. In order for OSPF to
generate a default route, you must use the default-information originate command.
R2#show ip route
78
O*E2 0.0.0.0/0 [110/1] via 172.16.23.3, 00:07:56, Serial0/1/0
[…output omitted…]
R3#show ip route
Note- Use the default-information originate with always keyword, or else default route
advertising router must have a 0.0.0.0 route in routing table. Here, always keyword is used as
the advertising router does not have 0.0.0.0 route in the routing table.
Configuration
R2:
R2(config)#router ospf 1
R2(config-router)#passive-interface fastEthernet 0/0
Varification
OSPF passive interface will stop sending multicast and unicast packet. When you will configure
passive-interface on R2’s interface Fa0/0 after some time you will see a log message on the
screen that neighbor gone down, hold time expired. Because, the interface is not able send
hello to maintain neighborship.
Log message:
R2#
79
%OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on FastEthernet0/0 from FULL to DOWN, Neighbor
Down: Interface down or detached
Remove all the OSPF configurations from all three routers on diagram 2.
Do not need to configure IP addresses on R1 and R3’s interfaces.
Shutdown the R2’s interface Fa0/0 and Serial0/1/0, do not configure IP address.
Do not use device R1, R3, PC-3 and PC-4.
Configure VLAN 10 and 20 on SW-1
Assign VLAN ID 10 on SW-1’s interface Fa0/2.
Assign VLAN ID 20 on SW-1’s interface Fa0/3.
Configure IP address on PC-1 and PC-2 as below.
PC-1 = 172.16.10.5/24 GW IP = 172.16.10.1
PC-2 = 172.16.20.5/24 GW IP = 172.16.20.1
Make sure PC-1 and PC-2 can communicate with each other (do not use ip routing on
SW-1)
Configuration
R1:
R1#write erase
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
80
[OK]
Erase of nvram: complete
R1#reload
Proceed with reload? [confirm]
R2:
R2#write erase
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
[OK]
Erase of nvram: complete
R2#reload
Proceed with reload? [confirm]
R3:
R3#write erase
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
[OK]
Erase of nvram: complete
R2#reload
Proceed with reload? [confirm]
SW-1:
SW-1(config)#vlan 10
81
SW-1(config-vlan)#exit
SW-1(config)#vlan 20
PC-1:
PC-2:
Varification
Here in question says that PC-1 and PC-2 will communicate and both are in different VLAN, as
we know that for different VLAN communication we need help of Layer 3 device for routing.
Question also said that we cannot enable ip routing on SW-1. So there is only a option left out
which is Router on a Stick.
This technology does the inter-VLAN routing and we will chose R2 for the same. Router-on-a-
stick is a type of router configuration in which a single physical interface manages traffic
between multiple VLANs on a network. The router interface have to be configured to operate as
a trunk link, also we have to create sub-interface on a physical interface. Actually we are just
logically dividing one physical interface into multiple logical interfaces as per requirement (It will
depend on number of VLAN communication; in our case we need 2 sub-interfaces as we have
only 2 VLAN). Router is connected to a switch port (SW-1) which will have to be configured in
82
trunk mode. The router receives VLAN tagged traffic on the trunk interface from the switch, and
forwards the routed traffic out to destination with VLAN tagged using the same interface.
Explanation of Communication:
PC-1:
83
PC-2:
Configuration
SW-1:
84
SW-1(config)#interface vlan10
SW-1(config-if)#ip address 172.16.10.1 255.255.255.0
SW-1(config-if)#exit
SW-1(config)#interface vlan20
SW-1(config-if)#ip address 172.16.20.1 255.255.255.0
SW-1(config-if)#exit
SW-1(config)#ip routing
Varification
Here we have to configure inter-VLAN routing on SW-1, as switch SW-1 is Layer 3 switch we
can configure inter-VLAN routing.
For inter-VLAN routing on a L3 switch, we have to configure VLAN interface or SVI (sometime
people in the networking industry call it as Layer 3 VLAN) and SVI (Switch Virtual Interface)
number must be same as VLAN ID. Then configure IP address under SVI. At last just enable
routing features on the L3 switch by using command ip routing. This is the advantage of using
L3 switch as it can do both Routing as well as switching and we don’t have to rely on Router for
inter-vlan routing.
SW-1#show ip route
PC-1:
85
PC-2:
86