Vous êtes sur la page 1sur 6

Notes on Administrative Distance and Metric

Routing protocols uses metrics for calculating best path for a remote network. Distance
vector routing protocols use distance (usually hop-count) as their metric. Link state
protocols utilize some sort of cost as their metric. Only routes with the best metric are
added to the routing table.
If multiple equal-metric routes exist to a particular network, most routing protocols will
load-balance. If your router is running multiple routing protocols, Administrative Distance
is used to determine which routing protocol to trust the most. Routing protocol with
Lowest administrative distance wins.

A route with an unknown Administrative Distance will never be inserted into


the routing table.
For example consider a router is configured with two routing
protocols OSPF and EIGRP. Since EIGRP has lower AD value of 90 when compared to
that of OSPF which is 110, the router chooses the path derived by EIGRP. If we configure
a static route with EIGRP, router chooses static route because its AD value is 1.

The Administrative distance can be configured manually and it can override default
administrative distance values.

Changing default administrative distance values


RIP
Router(config)#router rip
Router(config-route)#distance < 220>
EIGRP
Router(config)#router eigrp 111
Router(config-route)#distance eigrp <55 > <200> [inter d value and external
Ad value]
OSPF
Router(config)#router OSPF 100
Router(config-route)#distance < 90>
NOTE : To go back to default administrative distance in above protocols use no distance
command

Short note on RIP with Interview Questions


Short note made for quick study for RIP
The Routing Information Protocol (RIP) is a distance-ve outing protocol
RIP takes the hop count as a metric.
RIP have two versions RIP v1 and RIP v2
In IPv6 RIP is called as RIPng
RIPng must be enabled in interfaces in IPv6
RIP sends out the full routing table every periodic update
RIP prevents routing loops by implementing a limit on the number of hops allowed
in a path from the source to a destination.
A maximum number of hops allowed for RIP is 15. This hop limit, however, also
limits the size of networks that RIP can support.
A hop count of 16 is considered an infinite distance
RIP implements the split horizon, route poisoning and also hold down mechanisms
to prevent incorrect routing information from being propagated
RIP router transmitted full updates every 30 seconds

RIP uses the User Datagram Protocol (UDP) as one of its transport protocol, and is
assigned the reserved port number 520

Interview Questions
What is Route Poisoning?
What is Split Horizon ?
Utilizing RIP, what is the limit when it comes to number of hops?
What is the difference between RIP V1 and V2 ?
Mulitcast address of RIP v2 ?
Administristative distance of RIP ?
Can we use RIP in a scenario having more than 15 routers ? What
is the difference between RIP and RIPng?

Router on a Stick and SVI configuration


Router on stick method and SVI (Switched Virtual Interface) are used for
Router on stick Configuration
Configuration on switch connected to router
Switch(config)#interface fa0/10 Switch(configif)#switchport trunk encapsulation dot1q Switch(configif)#switchport mode trunk
This is how we configure Switch.Interface between switch and router must be
configured as trunk port.
Router(config)#interface fa0/0.10 Router(configsubif)#encapsulation dot1Q 10 Router(config-subif)#ip
address 192.168.10.254 255.255.255.0 Router(configsubif)#exit
Router(config)#interface fa0/0.20 Router(configsubif)#encapsulation dot1Q 20 Router(config-subif)#ip
address 192.168.20.254 255.255.25 Router(configsubif)#exit
Create two sub-interfaces on the router and tell it to whi AN they belong. Don't forget to
add an IP address for each VLAN.

NOTE : Don't forget to set your IP address and gateway on the computers.

SVI (Switched Virtual Interface) Configuration


Switch(config)#ip routing
Switch(config)#interface vlan 10
Switch(config-if)#no shutdown
Switch(config-if)#ip address 192.168.10.254 255.255.255.0
Switch(config)#interface vlan 20
Switch(config-if)#no shutdown
Switch(config-if)#ip address 192.168.20.254 255.255.255.0
art by enabling routing using the "ip routing" command as we know routing is not
enabled by default in switches. Next step is to create a SVI for VLAN 10 and 20 and
configure IP addresses on them
NOTE : Don't forget to set your IP address and gateway on the computers.

How to enable "Routed Ports" on Layer3


Switches
By default routing is disabled in layer 3 switches.We can

le it globally using

"IP routing" command.To enable routing in specific inte , type


"no switchport" command and put an IP address on it.
Configuration
Switch(config)#interface fa0/16
Switch(config-if)#no switchport
Switch(config-if)#ip address 192.168.10.254 255.255.255.0
This ports can be used by the computers as a gateway.
There are two things you should remember about the routed port:

It's no longer a switchport so it's not associated with any VLAN.


It's a routed port but it doesn't support sub-interfaces like a router does.

Quick reminder about HSRP


In this article we will discuss about brief about HSRP
Quick reminder about HSRP
Hot Standby Router Protocol (HSRP) is a Cisco proprietary protocol.

With HSRP, two or more devices support a virtual router with a fictitious MAC
address and unique IP address
Hosts use this IP address as their default gateway and the MAC address for the
Layer 2 header
The virtual routers MAC address is 0000.0c07.ACxx , in which xx is the HSRP
group. Multiple groups (virtual routers) are allowed.
The Active router forwards traffic. The Standby router is backup and
monitors periodic hellos (multicast to 224.0.0.2,
UDP port 1985) to detect a failure of the active router.
The active router is chosen because it has the highest HSRP priority (default
priority is 100). In case of a tie, the router
with the highest configured IP address wins the election
A new router with a higher priority does not cause an election unless it is
configured to preempt.

HSRP States
Learn: The router does not know the virtual IP address and is waiting to hear from
the active router.
Listen: The router knows the IP and MAC of the virtual router, but it is not the active
or standby router.
Speak: Router sends periodic HSRP hellos and participates in the election of the
active router.
Standby: Router monitors hellos from active router and assumes
responsibility if active router fails.
Active: Router forwards packets on behalf of the virtual router.