Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

Routing [CCNA 200-120]

1 | P a g e





CCNA 200-120
Routing
Arafat Mohamed

Special thanks to Eng.Ahmed Nabil



References
How to Master CCNA 2013
Cisco 200-120 Guide

Routing [CCNA 200-120]

2 | P a g e

Routing

Routing: means taking a packet from one device and sending it through the network to
another device on a different network.

Path determination: refers to the work done by routing protocols to learn all possible routes,
and choose the best route.

A routing protocol: used between routers to exchange routing information and build the
routing table.

Routed protocols: the protocols that we are routing, for example IPv4 or IPv6.

To be able to route packets, a router must know, at a minimum, the following:

Destination address
Neighbour routers from which it can learn about remote networks
Possible routes to all remote networks
The best route to each remote network
How to maintain and verify routing information

Routing Operation:

If a network is directly connected, then the router already knows how to get to it.

If a network isnt directly connected to the router, the router must use one of two ways to
learn how to get to the remote network:

Static routing: meaning that someone must hand-type all network locations into the routing
table. If a change occurs in the network, the administrator is responsible for updating all
changes by hand into all routers.

Dynamic routing: a protocol on one router communicates with the same protocol running on
neighbor routers.
The routers then update each other about all the networks they know about and place this
information into the routing table.
If a change occurs in the network, the dynamic routing protocols automatically inform all
routers about the event.

Learning:
1. The router learns about remote networks from neighbor routers or from an
administrator.
2. The router then builds a routing table that describes how to find the remote networks.

Forwarding:
Use a routing table to learn where to forward IP packets:
1. Known: the router will forward the packet to the destination.
2. Unknown: the router will discard the packet and send an ICMP destination unreachable
message back out interface.
3. Broadcast: the router will take packet to itself.
Routing [CCNA 200-120]

3 | P a g e

Notes:
The Administrative distance is the trustworthiness of a route (0 is best, 255 is worst).
Your firewall might be blocking ICMP traffic.
Traceroute uses the ICMP protocol.
You must be able to ping the router interface before you add the route.
Routing [CCNA 200-120]

4 | P a g e

Static Routing (S)

Static routing has the following benefits:

No overhead on the router CPU.
No bandwidth usage between routers.
It adds security .

Notes:
Administrative distance: By default 1, (0 if you use an exit interface).
You can change the default value by adding an administrative at the end of the
command.
We use default routing to send packets with a remote destination network not in the
routing table to the next-hop router.
To be on the safe side, you should always turn on the ip classless command when you
use default routing.


Configuration:
Static route (S):
R1(config)# ip route destination network subnet mask next hop ip Admin Distance = 1
R1(config)# ip route destination network subnet mask interface Admin Distance = 0

Default route (S*):
R1(config)# ip route 0.0.0.0 0.0.0.0 next hop ip
R1(config)# ip route 0.0.0.0 0.0.0.0 interface

To configure your router in classful mode:
R1(config)# no ip classless

To configure your router in classless mode:
R1(config)# ip classless

Configuring a gateway of last resort :
Gateway(config)#ip route 0.0.0.0 0.0.0.0 x.x.x.x
Gateway(config)#ip route 0.0.0.0 0.0.0.0 interface
Gateway(config)#ip default-network x.x.x.x

To clear all routes:
Router# clear ip route *

Show commands:
Router#show ip route
Router#show ip route static

Routing [CCNA 200-120]

5 | P a g e

Dynamic routing

Autonomous system is a collection of routers/networks that belongs to a single administrative
domain. 0 65535

Within an autonomous system we run a routing protocol and we call these interior gateway
protocols (IGP).

Between autonomous systems we also run a routing protocol but we call these external
gateway protocols (EGP).

There is only one routing protocol we use on the internet which is called BGP (Border
Gateway Protocol).


The lower the administrative distance the better.


Protocol Admin distance
Direct connected 0
Static 1
BGB 20
EIGRP 90
IGRP 100
OSPF 110
ISIS 115
RIP 120


Interior routing protocols are divided in three different classes:

Distance Vector (RIP)
Hybrid or Advanced Distance Vector (EIGRP)
Link-State (OSPF)

Routing protocols can be classfull or classless:

Classfull routing protocols DO NOT send the subnet mask with their updates.
Classless routing protocols send the subnet mask with their updates.


Routing [CCNA 200-120]

6 | P a g e

Distance Vector (RIPv1 IGRP)

Distance: How far away.
Vector: Which direction.

Operation:

@ Startup:
Each router will copy its routing table and send it periodically on 255.255.255.255.

@ Convergence:
Periodic updates every 30 seconds act as keep alive.
Router will delete inactive networks after 6 updates (180 seconds).

@ Change:
Problems:
Slow convergence.
Routing loop.

Solutions:
1. TTL Expire: starts with 255 and when it reaches to (1), the router will discard it.

2. Triggered update + Poisoned route + Poison reverse:
Once a network goes down the router will send a triggered update immediately to
update its neighbours.
Poisoned route: update for this network with an infinite metric (16).
Poison reverse: any router receives triggered update + poison route will forward it and
reply with ACK.

3. Spilt horizon: You dont advertise to your neighbour what you learned from them.

4. Hold down timer: if a route fails, dont accept any updates about that route unless:
- It returned back with the same metric and direction.
- Hold down time expires.



Routing [CCNA 200-120]

7 | P a g e

RIPv2 Configuration (R):
Router(config)#router rip
Router(config-router)#network x.x.x.x
Router(config-router)#version 2
Router(config-router)#no auto-summary

Router(config-router)#passive-interface xxx.
Router(config)#maximum-paths x.

Show commands:
Router#show ip route
Router#show ip route rip
Router#debug ip rip

To know which versions of rip is run use
Router#show ip protocols

Routing [CCNA 200-120]

8 | P a g e

EIGRP Ciscos Hybrid Routing Protocol

Operation:

@ Startup:
Routers will start sending hello packets to other routers on 224.0.0.10.
Neighbours will exchange routing information which will be saved in the topology table.
Selecting the best path based on bandwidth, delay, load, reliability and MTU.
The best path from the topology table will be copied in the routing table.

@ Convergence:
Periodic hello act as keep a live:

1. Fast links (Speed > T1 speed):
Hello interval= 5 seconds.
Dead interval= 15 seconds.

2. Slow links (Speed < T1 speed):
Hello interval= 60 seconds.
Dead interval= 180 seconds.

@ Change:
Send partial triggered update to all neighbours.

Routing [CCNA 200-120]

9 | P a g e

EIGRP Terminology:
EIGRP Neighbor Table:
Lists all directly connected neighbors:
Next Hop Router.
Interface.

EIGRP Topology Table:
Lists all learned routes from all EIGRP neighbors:
Destination.
Metric.

Global Routing Table:
Best routes from EIGRP topology table will be copied to the routing table.

Advertised distance (AD): How far the destination is away for your neighbor.
Feasible distance (FD): The total distance to the destination.

Successor (S): the best path to the destination.
Feasible successor (FS): backup path.

If you lose the successor because of a link failure EIGRP will copy/paste the feasible
successor in the routing table
If you lose the successor and there isnt feasible successor available, EIGRP will queries
neighbours and recalculate successor.

EIGRP metrics:
Bandwidth, Delay, Load, Reliability and MTU.

By default EIGRP only uses bandwidth and delay. Load and reliability are disabled by
default.

EIGRP Authentication:
Only supports MD5.
The Key-chain can be different per router.
The key-ID has to be the same on every router.


Routing [CCNA 200-120]

10 | P a g e

EIGRP Configuration (D):
Router(config)#router eigrp 1
Router(config-router)#no auto-summary
Router(config-router)#network x.x.x.x

Configure authentication:

1. Configure a key-chain:
Router(config)#key chain MYCHAIN
Router(config-keychain)#key 1
Router(config-keychain-key)#key-string BANANA

2. Now we have to activate it:
Router(config)#interface FastEthernet 0/0
Router(config-if)#ip authentication mode eigrp 1 md5
Router(config-if)#ip authentication key-chain eigrp 1 MYCHAIN

To change backup numbers:
Router(config-router)# variance 4

Show commands:
Router#show ip route
Router#show ip route eigrp
Router#show ip protocols
Router#show ip eigrp neighbors
Router#show ip eigrp topology
Router#debug ip eigrp



Routing [CCNA 200-120]

11 | P a g e

OSPF Open Shortest Path First

Link state:

Link: Thats the interface of our router.
State: Description of the interface and how its connected to neighbor routers.

Operation:

@ Startup:
1. Neighbour discovery: send hello packets on 224.0.0.5.

2. Router discovery:
- Exchange of LSAs.
- Build LSDB Link state database .
- Electing DR and BDR .
- Calculating best path using SPF shortest path first algorithm.

@ Convergence:
1. Periodic updates every 30 minutes.
2. Periodic hello every 10 seconds act as keep alive.

@ Change:
1. Router that feels change:
- Rebuild new LSA.
- Send triggered LSA describing new state on 224.0.0.6.

2. Neighbours routers:
- Remove the old LSA.
- Update LSDB with the new LSA.
- Redrawing trees till routing table is updated.


Routing [CCNA 200-120]

12 | P a g e

Hello packet:

Router ID: its 32 bit, the highest IP address on any active interface.
- Loopback interface.
- Physical interface.
Router Priority: used to determine who will become designated or backup designated
router.
Hello Interval: 10 seconds, Dead Interval: 40 seconds.
Area ID: its 32 bit.
Authentication password.

OSPF Topologies:
Point-to-Point.
Multi-Access.

Multi-Access network:
All our OSPF routers will only form full neighbor adjacencies with the DR and BDR on
224.0.0.6 and not with all other routers.

DR (Designated Router):
1. Router that first boots ospf.
2. Router having highest priority:
The default priority is 1.
A priority of 0 means you will never be elected as DR or BDR.
3. Router having highest router id.
4. Dead time = 4 hello = 40 seconds.

DROTHER: a router isnt DR or BDR.

Type of routers:
Backbone routers: routers in the backbone area (area 0).
Area border routers (ABR): routers between 2 areas.
Autonomous system border routers (ASBR).

LSAs Types:
1. LSA Type 1: generated by each router in AS, contains router LSA.
2. LSA Type 2: generated by DR, contains network link LSAs.
3. LSA Type 3: generated by ABR, contains network link summary LSA.
4. LSA Type 4: generated by ABR, contains ASBR summary LSA.
5. LSA Type 5: generated by ASBR, contains AS external link LSA.


Routing [CCNA 200-120]

13 | P a g e

OSPF Metric:
Cost which is based on the bandwidth of an interface.
Cost = Reference Bandwidth / Interface Bandwidth.
The reference bandwidth is a default value on Cisco routers which is a 100Mbit interface.
The lower the cost the better the path is.

OSPF Load balancing:
Paths must have an equal cost.
4 equal cost paths will be placed in routing table.
Maximum of 16 paths.
To make paths equal cost, change the cost of a link
If a path is not equal we can make it so by manually changing the cost or bandwidth of
an interface.

OSPF default route:
You need to use the default-information originate command. If you dont already have a
default route in your routing table then you need to add the always keyword.

To block the hello packets but still advertise the network in OSPF you can use the
passive-interface command on the interface.



Routing [CCNA 200-120]

14 | P a g e

OSPF Configuration (O):
Router(config)#router ospf 1 - process ID
Router(config-router)#network x.x.x.x wildcard mask area 0

Advertise a default route:
Router(config)#router ospf 1
Router(config-router)#default-information originate always symbol O*E2

Plaintext authentication:
Router(config)#interface FastEthernet 1/0
Router(config-if)#ip ospf authentication
Router(config-if)#ip ospf authentication-key secret

MD5 authentication:
Router(config)#interface FastEthernet 1/0
Router(config-if)#ip ospf authentication message-digest
Router(config-if)#ip ospf message-digest-key 1 md5 mykey

Area authentication:
Router(config-if)#router ospf 1
Router(config-router)#area 0 authentication
MD5 authentication:
Router(config-router)#area 0 authentication message-digest

Change the OSPF timers:
Router(config-if)#interface FastEthernet 1/0
Router(config-if)#ip ospf hello-interval 5
Router(config-if)#ip ospf dead-interval 15
Change the priority:
Router(config)#interface FastEthernet 0/0
Router(config-if)#ip ospf priority 200

Change the cost:
Router(config)#interface FastEthernet 1/0
Router(config-if)#ip ospf cost 50

Create a loopback
Router(config)#interface loopback 0
Router(config-if)#ip address 2.2.2.2 255.255.255.0

Reset the OSPF process:
Router#clear ip ospf process

Show commands:
Router#show ip route
Router#show ip route ospf
Router#show ip ospf neighbor
Router#show ip protocols - Check router ID
Router#show ip ospf interface fa1/0 - Check the cost

Routing [CCNA 200-120]

15 | P a g e

RIP v1:
1. Send periodic updates every 30 seconds on 255.255.255.255.
2. Triggered update at change with an infinite metric (16).
3. Equal load balancing, 4 paths by default, 16 or more by configuration.
4. Metric is hop count [maximum 15 hop].
5. Use BellmanFord algorithm to calculate routing table.
6. Classfull.
7. Admin distance 120.
8. Hold down timer 180 seconds.

IGRP:
1. Send periodic updates every 90 seconds on 255.255.255.255.
2. Triggered update at change.
3. Equal & un equal load balancing, 4 paths by default, 16 or more by configuration.
4. Metric is [bandwidth & delay] default + load + reliability + MTU [100 router by
default, 255 by configuration].
5. Use BellmanFord algorithm to calculate routing table.
6. Classfull.
7. Admin distance 100.
8. Hold down timer 280 seconds.

Routing [CCNA 200-120]

16 | P a g e

RIP v2:
1. Send periodic updates every 30 seconds on 224.0.0.9.
2. Triggered update at change with an infinite metric (16).
3. Equal load balancing, 4 paths by default, 16 or more by configuration.
4. Metric is hop count [maximum 15 hop].
5. Use BellmanFord algorithm to calculate routing table.
6. Classless.
7. Admin distance 120.
8. Hold down timer 180 seconds.
9. Support authentication.

EIGRP:
1. Send full routing table at startup.
2. Send periodic hello at convergence act as keep alive on 224.0.0.10.
3. Send partial triggered update at change.
4. Use dual algorithm to calculate best path and backup path.
5. Admin distance: Internal 90 External 170.
6. Support many routed protocols [IPv4 IPv6 IPX Apple Talk].
7. Equal & non-equal load balancing, 4 paths by default, 16 or more by configuration.
8. Classless.
9. Support authentication.

OSPF:
1. Send hello packets at startup on 224.0.0.5.
2. Send triggred LSA at change on 224.0.0.6.
3. Send periodic hello every 10 seconds, periodic LSA every 30 minutes at convergence.
4. Use Dijkstra algorithm to calculate SPF shortest path first.
5. Metric is cost.
6. Admin distance: 110.
7. Equal load balancing, 4 paths by default, 16 or more by configuration.
8. Classless.
9. Support authentication.
10. Support hierarchical design multiple area.

You might also like