CCNP Routing
CCNP Routing
● Activities related to maintaining routing table, performing NAT, QOS, ACL, etc., belongs to the
control plane.
● CPU is involved in these activities of a device.
2) Data Plane
● Activities related to make forwarding decision on the basis of information provided by the
control plane.
● All interface of a device residence in the plane.
3) Management Plane
● Activities related device management like configuring device from CLI via console , telnet , ssh
and SNMP
Switching Methods
1. Process Switching
2. Fast switching
3. CEF (cisco express forwarding)
Process switching
● When frame is received that frame is always is sent to the processor (CPU)
● This is done repeatedly same every time a frame is received even if it is from same source
and for same destination
● It will increase CPU utilization high
● Device will stop functioning.
Fast switching
● This method is knows for process once and switch many times
● By default , CEF is enabled on cisco devices like router , Switch (if routing is configured)
▪ Generation 2 🡪 RP / CEF
● The maximum transmission unit (mtu) is exceeded, and the packet must be fragmented.
● QOS
● SH ip CEF
Adjacency
● Sh adjacency
● Sh adjacency detail
1) Null adjacency: - Null adjacency table will be responsible to handle those packets which are
forwarded toward null interface.
2) Drop adjacency: - This table is basically responsible to handle those packets which encountered
with mismatch of encapsulation or crc error.
3) Discard adjacency: - This table is responsible to handle those packets which are discarded
(forced) by an acl.
4) Glean adjacency: - The table is responsible to have information about all directly connected
networks and whenever a packet will move to any directly connected network then those
packet will be handled by glean adjacency.
5) Punt adjacency: - The table is responsible to handle those packets which is not processed by cef
and forwarded to control plane to process these packet.
● #no ip cef
C-CEF
● Central CEF
D-CEF
Distribute CEF
Routing
● It is a process by which router will forwarded packets.
● Router have two table to take forwarding Decision
o Routing table
▪ It find out exit interface
▪ It have L3 information
o ARP table
▪ It have MAC Address
● Routing is a process in which if router receive traffic on one interface after receiving traffic
router will check routing table just to find out the exit interface , after checking the exit interface
it will switch the traffic on that exit interface , now it will change L2 information by the help of
ARP table and after that traffic will forward.
● Type of Communication
o Unicast
o Broadcast
o Multicast
Type of Routing
1) Static Routing
2) Dynamic Routing
Static Routing
● In this Routing administrator manually specify the route information.
● Recursive Lookup
o Repetition of routing table lookup for a single destination.
● Proxy Arp
o An ARP reply is given on behalf of other devices.
● Serial Link 🡪
o Does not Support ARP
o Serial Link Does not have mac address
o Static route can be assigned through exit interface if that interface is serial 🡪
so that will no problem of proxy ARP.
● Advantages
o CPU utilization less
o Security
● Disadvantage
o Burden on an administrator
o Works in small network
o Time consuming
Lowest metric
● Packets will be distributed among both the routes equally and alternating.
Dynae automatically.
● Routers automatically exchange the routes b/w each other.
● Some packets are there for each protocol which is advertised by routing protocols to
get the routes from their neighbouring routers🡪 Directly Connected Routers.
● Dynamic Routing
o IGP(Interior Gateway Protocols)
o EGP(Exterior Gateway Protocols)
● IGP🡪Routing Protocols that share routes among same autonomous system.
EIGRP
1) It stand for Enhanced Interior Gateway Protocols
2) It is an Interior Gateway Protocols
3) It is Hybrid Routing Protocols
a. It will not use distance (hop count) but still hop count will be forward
in EIGRP updates.
b. Next-hop = source of update
c. Table
4) It is Advance Distance Routing Protocols
5) It is Open standard.
Metric
a. Bandwidth = 1*K1 (by default)
i. Capacity of link
ii. Higher value is preferable
iii. Sh int fa0/0 | s BW
b. Load= 0*K2
i. Link utilization
ii. Lower value is preferable
c. Delay= 1*K3 (by default)
i. Time taken during transmission from one device to another
ii. Lower value is preferable.
d. Reliability= 0*K4
i. Link having least downtime.
ii. Lower value is preferable
e. MTU= 0*K5
i. Interface through which we can send more data.
ii. Lower value is preferable.
iii. R1(Config-router)#metric weights 0 1 0 1 1 0
● Eigrp uses composite metric
● In hello packets both routers will tell each other what k values they are using for metric
calculation.
● By default only (k1) bandwidth and (k3) delay are used for metric
calculation.
● Standard IEEE
o Serial
▪ Bw =1.544 mbps
▪ Delay = 20000
o Ethernet
Bandwidth Delay
● Update
● Query
● Reply
● Acknowledgement
Notes:-
● Hello
o Hello packet is used to form and maintain Neighbour.
o Hello packet in Eigrp is used to check whether neighbour is alive or
not
▪ bandwidth utilization is reduced
o This packet carries neighbour parameters which need to be matched
b/w routers with in a broadcast domain.
o Hello packet does not carry subnet mask information
o Multicast (ether , serial ) 224.0.0.10
▪ R1(Config)#Key chain R1
▪ R1(config-keychain-key)#Key 1
▪ R1(config-keychain-key)#Key-string ccna
▪ R1(config)#int fa0/0
▪ R1(Config)#Key chain R1
▪ R1(config-keychain-key)#Key 1
▪ R1(config-keychain-key)#Key-string ccna
▪ R1(Config-if)#passive-interface fa0/0
o It advertise periodically in every 5 sec
Commands
● Router (config)#Router Eigrp 100
● Cisco Proprietary
Adjacency
● Null update is used to verify bidirectional connectivity b/w routers which hello cannot provide
� A router will send the same update to the neighbour from which ACK is not received
sixteen times as unicast
� If ack is received after 8 unicast then it will stop sending further unicast messages.
� If ack is not received even after 16 unicast message then the router will flap the
neighbour ship.
o Hello 🡪 No ACK 🡪 unreliable 🡪 def multicast 🡪 can be unicast
o Update 🡪ACK 🡪 reliable
o ACK 🡪 No ACK 🡪 unreliable 🡪 Always unicast
o Query 🡪 ACK 🡪 reliable 🡪 def Multicast
o Reply 🡪 ACK reliable 🡪 Always 🡪 always Unicast
● Q Count
o Number of pending acknowledgement from a particular neighbour.
● Seq num
o Seq number of update last received from neighbour.
● Query
o OP Code = 3
o Ethernet = Multicast
o Serial = Unicast
o It is sent when successor goes down and feasible successor is not available for a
particular route.
o Delay infinity
o If neighbour ship is static then will be unicast
o Positive reply
▪ When router have redundant path
o Negative Reply
▪ When router does not have redundant Path
o 3 min wait for Query msg
o Stuck in active state
Split horizon
● If you receive any update on interface you cannot send back on that interface
● The split Horizon feature prevents a route learned on one interface from being advertised back
out of that same interface. It is loop in EIGRP
Route Poison
● Hop count 16 (RIP)
● Bounded Update.
● The same prefix Update which router get form interface router will not send back that prefix to
another router on same interface.
● It is used to confirm the sending router that spilt horizon is enabled on receiving router’s
interface.
● R1(config)#interface ethernet 1/0
● Static NBR
o Is useful when there are only two routers with in a broadcast
domain.
▪ Security purpose
o R1(config)#Router Eigrp 100
o R1(Config-Router )#network 192.168.1.0
o R1(Config-Router )#neighbor 192.168.1.2 ethernet 1/0
o Router will send unicast msg in Eigrp
● If you want to configure static Neighbour you have to configure both side
● When Router advertised any Prefix to other router it will send it ip as Next-hop
● Stub Router will never receive Query message but can send Query msg
● Stub router will never forward one neighbour routes to another neighbour
Offset-list
● It used to perform Load-balancing and for path manipulation.
● Make Acl
o Ip access-list standard 10
▪ PERMIT 192.168.3.0 0.0.0.255
Route – filtering
1) Access-list
a. Standard
i. Ip access-list standard 11
1. Permit 30.10.0 0 0.0.255.255
2. exit
● R2(config)#router Eigrp 1
Route-Map
● Which parameter we can match in route-map
1) Metric
2) Metric Range
3) Next hope
4) Route-type
5) Source Protocol
6) Interface
a. Metric
i. R2(config)#Route-map <name> ccna deny <seq > 10
ii. R2(config-route-map)#match metric 33280
iii. R2(config)#Route-map <name> ccna permit <seq > 20
iv. R2(config-route-map)#exit (match all 🡪 permit any)
v. R2(Config)#router Eigrp 100
vi. R2(config-router)#distribute-list route-map ccnp in
b. Metric range
i. (Max metric + min metric)/2
ii. (32768 + 32000 )/2 = 32384
iii. 32384 – (min metric ) 32000 = 384
iv. R2(config)#route-map DAKU
v. R2(config-route-map)#match metric 32384 + - 384
vi. R2(Config)#router Eigrp 100
vii. R2(config-router)#distribute-list route-map DAKU in
c. Next hope
i. Ip access-list standard 10
1. Permit 192.168.123.1 0.0.0.0
ii. Route-map nb deny 10
1. Match ip next-hop 10
iii. Route-map nb permit 20
1. Exit
iv. Router Eigrp 100
1. Distribute-list route-map nb in
d. Route type
i. Internal (90) same domain
ii. External ( 170) different domain
1. Route-map nb deny 10
a. Match route-type < internal > <external>
2. Route-map nb permit 20
a. Exit
3. Router Eigrp 100
a. Distribute-list route-map nb in
e. Source protocol
i. Route-map source-protocol
1. Match source-protocol ospf 4
f. Interface
i. Route-map nb
1. Match metric 32384 + - 384
2. Match interface fa0/1
3. Exit
ii. Router Eigrp 100
1. Distribute-list route-map nb in
g. Tag
1. R2(config)#route-map ccna permit
2. R2(config-route-map)#set tag 500
3. R2(config)#router eigrp 1
4. R2(config-router)#redistribute ospf 1 route-map ccna metric 1 1 1 1
1
Summarization
a. Auto-summary
b. Manual -summary
Automatic-Summary
1) At least one subnet should be same.
2) Subnet mask default
3) Summary
a. Local topology
b. directly connected
4) Routing topology
5) Whenever any router perform summarization then router will create entry in the Eigrp table
with NULL 0 (AD=5)
a. AD🡪 5 (to prevent control plane)
b. Null = 0 (to prevent forwarding / data plane loop)
6) With summary we will always forward least metric
Manual Summary
Redistribute default
a. Redistribute static
i. R1(config)#router eigrp 1
ii. R1(config-router)#redistribute static
iii. R1(config-router)#exit
b. Summarization
i. Ip summary-address Eigrp 100 0.0.0.0 0.0.0.0
c. Network 0.0.0.0
i. Default route should be given by exit interface
IPV6
1) It is 128 bits address.
2) It is represent in Hexadecimal from.
3) Separated with the help of colon “:” only.
4) IPV4
a. 32 bits divided in 4 octets
b. Each octet there is 8 bits
c. 2^8 = 0-255 ( in decimal form)
5) IPV6
a. 128 bits divided on 8 hextets
b. Each hextets there is 16 bits
c. 2^16 = 0-65535 ( in hexadecimal form)
d. 1 hex digit = 4 bits
e. 1 hextets = 16 bit ( 4 digits)
● No need of NAT
● No need of Subnetting
● FC00 ::/7= Private Address(Unique local Unicast) these are used for Intra
network communication
● 2000::/3 = Public Address(Global unicast address) these are used for
communication in global (Internet)
● ::1 /128 = loopback
● FE80::/10 = Link Local Address
o Link local address is made with the help of EUI ( Extended Unique
Identifier) – 64
o Subnet is always /64
o Fe80 ::/64 = network id ( by default)
o Rest 64 bits will be considered for host IP
o This host Ip is derived from physical int mac address
o Step 1 – FE80:: 🡪 64 bits
● FE80:0000:0000:0000:
o Step 2—🡪Auto calculate by MAC Address of interface
▪ 🡪 1234.ABCD.0128 + FFFE
▪ 1034.ABFF:FECD.0128
▪ FE80:: 1034.ABFF:FECD.0128
🡪It is in 64 bits.
🡪10AA.01AO.190A
● FC00:0:0:1::1
NDP feature
● R1(config)#int l0
Autoconfig
▪ RS (client) , RA (server)
▪ If you want the client to install any ip received from router then the
prefix length should be /64
▪ Otherwise EUI-64 will not work
o Stateful dhcp (DHCPV6)
▪ DHCP will maintain database
● R1(config)#int fa0/0
● R1(config-if)#exit
● R1(config)#int fa1/0
● R1(config-if)#exit
● R2(config-rtr)#exit
● R2(config)#int fa0/0
● R2(config-if)#exit
● R2(config)#int fa1/0
● R2(config-if)#ipv6 eigrp 100
● R2(config-if)#exit
● R3(config-rtr)#exit
● R3(config)#int fa1/0
● R3(config-if)#exit
● R3(config)#int fa0/0
● R3(config-if)#exit
● R4(config-rtr)#exit
● R4(config)#int fa1/0
● R4(config-if)#exit
● R4(config)#int f0/0
● R4(config-if-range)#exit
● R1(config)#int fa0/0
● Prefix list
o R1(config)#ipv6 prefix-list NB deny 172:168:101:1::/64
o R1(config)#ipv6 prefix-list NB permit 0::0/0 le 128
o R1(config)#ipv6 router eigrp 100
o R1(config-rtr)#distribute-list prefix-list NB in
o R1(config-rtr)#exit
● R1(config)#int fa0/0
🡪Ospf V3
● R1(config-rtr)#router-id 1.1.1.1
● R1(config-if)#int r fa0/0,l0
● R3(config)#router ospfv3 10
● R3(config-router)#router-id 3.3.3.3
● R3(config)#int r fa0/0,l0
● Mode
o Classic mode (32 bit)
o Name Mode (64 bit)
● Metric
o Fixed
▪ Bandwidth
▪ Delay
o Variable
▪ Load
▪ Reliability
● 10 gig =
o (10^7 /least bandwidth + total delay /10 )*256
o (10^7/1 0000000+10/10)*256 = (1+1)*256=512
● Metric use in named mode
o Bandwidth
o Load
o Latency (delay)
o Reliability
o Mtu
o Energy jitter (Reserved)
● Well known
● Lagging
Eigrp state
●
● Eigrp named mode use one process for IPV4 and IPV6
▪ 10 gbps = 10^13/10^7
o Method 3
▪ Manual Delay configured
● Link 🡪
● State 🡪
● In ospf, routes are not advertised routes Infact complete database in the form of link
state advertisements(LSA) are advertised among the complete topology
● Routers calculate their best path themselves.
● Non backbone
▪ Stems/Branches
o A0 should be centralized located between all non backbone areas
o There should not be more than one area 0 in ospf domain.
● Algorithm = SPF(Shortest path first ) for best path selection.
● AD=110
● Metric = Cost
▪ Type 2 = md5
o Ospf network type should match
o OSPF stub flag must match
● Election of RID
o Manual defined
o Highest loopback Int IP
o Highest physical int ip no matter that int is enabled with ospf or not
● Hello = 10 sec
● Hold = 40 sec
● OSPF tables
o Neighbour table
o Routing table
o Database table
▪ Keep Alive
● OSPF version = 2
● Msg type = 1
● ROUTER ID
● Area id
● Packet checksum
● Auth type
● Auth data
o Type 0 = null
o Type 1= plain text
o Type 2 = md5
● Network mask
● Hello
● Hold
● Priority
● Neighbour Router id
● DR router id
● BDR router-id
o DBD(data base description)
o LSR (Link state Request
o LSU (Link state Update)
o LSACK(Link state ACK)
OSPF state
o Down
▪ No hello will be sent or received
o Init
▪ Hello is sent but not received in return
● Highest RID
o Exchange
▪ Asking about each other’s database.
2 –Way State
Network type = BMA (Broadcast Multi Access)
● To reduce the number of adjacencies, router will elect DR & BDR between the router
● DR(Designated Router)
● Election Criteria
o HIGHEST Priority (def=1) = 0 -255
o Highest RID
One broadcast domain can have only one DR and one BDR
* 224.0.0.5 🡪 When ever DR send any update all will received from this multicast add. Every
router of ospf can accept that.
● Link State ID
o RID of router generated the LSA
● Adv. Router
o RID of Router advertise the LSA
● Number of router LSA = Number of router in an area
● Link count
o Broadcast (BMA)= 1 segment = 1 link count
o P2P = 1 Segment = 2 link count
o Per loopback = 1 link count
● Since in Router LSA, Network subnet mask does not get advertised so in order to advertise the
subnet mask for the transmit links n/w LSA is used.
● Two ABR’s will not accept and forward summary LSA of each other until they both have RLSA of
each other learned trough Area 0
Virtual Link
● No DR/BDR
● No dead Timer
● Update sent over virtual link for Area will never get aged out
o Will be sent with a DNA bit to notify neighbour that it will get updates with DNA bit set
periodically
o Authentication is applicable on virtual link.
o
4) LSA 5 (AS-External LSA)
● Generated by ASBR
o when external AS other than ospf are redistributed into OSPF.
o Number of LSA 5 = Number of external routers adv into ospf
o LSID = network id of external routes
o Adv router= ASBR RID
o RID of ASBR does not change throughout ospf domain in LSA 5
● LSA5 (Metric)
o E1 = External Type 1
o E2 = External Type 2 (Default)
▪ For redistribute routes = Seed metric Value = 20 (Default)
▪ E1 =
Standard Area
Stub Area
● Since ABR filtered LSA 5 into stub area, it will automatically filter LSA 4 into stub area.
● ABR will continue to advertise LSA 3 from non-stub area to stub area and vice versa.
● ABR will generate default route towards stub area routers in the form of LSA3.
● Stub is run on both sides’ means ABR and all other router of this area.
● Stub area is not allowed ASBR router so we can’t configure stub area near ASBR router.
● We can’t make stub to that area which is attached with ASBR because it can’t do
redistribution.
● Area 0 cannot be configured as Stub
● Neighbourship parameter
o Stub flag should be same
o By default = 1 ( when stub is not configured)
● Area 1 stub
● ABR not only filters LSA 5 & LSA 4 but also filter LSA 3 but continue to advertise only
default route in the form of LSA 3.
● ABR will continue to advertise LSA3 of stub area into non-stub areas.
● Network ID , Subnet Mask , Metric default “20” , Route – type N2 (default) and N1
● Whenever NSSA ABSR advertise route. It will add interface ip as forwarding address.
● Default route will be manually configured
3) NSSA
a. LSA 5 convert into LSA 7
b. Manually generate default route on ABR
4) Toally NSSA
a. Lsa 5 & Lsa4 and LSa 3 filter
b. Default route generate automatically in LSA3 by ABR
How to Originate default route in OSPF
● Type 3
o Stub
o Totally Stub
● Type 5
o ASBR
o Default –information originate
o Default –information originate metric-type 1
o Default –information originate metric-type 1 metric 100
o Default –information originate metric-type 1 100 always
o Conditional default route advertisement
▪ IP access-list standard 10
▪ Route-map 10
● Match ip add 10
▪ Router ospf 1
Filtering
1) Route filtering
a. Distribute-list
i. ACL
ii. Prefix-List
iii. Route-map
b. AD value
i. Distance ospf intra-area
c. Summarization
i. Summary-address 50.1.0.0 255.255.0.0 not-advertise
2) Area filter-list
a. LSA 3 filter / Inter Area Route
b. Apply on ABR only
c. Prefix-list
d. #ip prefix-list ccnp deny 60.1.0.0/16 ge 32 le 32
e. #route ospf 100
f. #area 1 filter-list prefix ccnp out
3) LSA filtering
a. Types of Area
b. Area Filter-list (LSA 3)
c. Distribute-list on ASBR Router for outgoing direction (LSA 5)
d. Summarization
i. ABR (LSA 3)
ii. ASBR (LSA 5)
Authentication in Ospf
1) Type 0 = Null
2) Type 1 = Plain text
3) Type 2 = MD5 authentication
6) Loopback
a. It will always advertise in /32
7) Virtual Link
OSPFv3
● OPSF v2 (IPV4)
● OSPF V3(IPV6)
● Hello
1 Source IPV6
▪ Int (link local address)
2 Destination IPV6
▪ FF02::5 , FF02::6
3 Cost calculation same
4 Layer protocols and it encapsulate in IPV6
● LSA
1 Router LSA
▪ Which Neighbour connected on which link
2 Network LSA
3 Inter Area Prefix LSA
4 Intra Area router LSA
5 External
6 NSSA External
7 TYPE 8 Link LSA
▪ It will share Link local address
● Route-map policy
● Exit
● Int fa0/0
● Route-map Policy
● Int fa0/0
URPF
1) Unicast reverse path forwarding
2) R1(config)#ip access-list extended 101
3) R1(config-ext-nacl)#permit ip host 10.0.0.130 host 36.0.0.6
4) R1(config-ext-nacl)#exit
5) R1(config)#route-map 101
6) R1(config-route-map)#match ip address 101
7) R1(config-route-map)#set ip next-hop 12.0.0.2
8) R1(config-route-map)#exit
9) R1(config)#ip local policy route-map 101
10) R2(config)#int fa1/1
11) R2(config-if)#ip verify unicast source reachable-via rx
12) R2(config-if)#exit
13) R2(config)#ip access-list standard 10
14) R2(config-std-nacl)#deny 1.1.1.1 0.0.0.0
15) R2(config-std-nacl)#permit any
16) R2(config-std-nacl)#exit
17) R2(config)#router ospf 1
18) R2(config-router)#distribute-list 10 in
19) R2(config-router)#exit
20) R2(config)#ip route 0.0.0.0 0.0.0.0 23.0.0.3
21) R2(config-if)#ip verify unicast source reachable-via any allow-default
● R1(config-ip-sla-echo)#Frequency <1-604800>
● R1(config)#route-map Policy
● R1(config)#int fa0/0
● R1(config-if)#exit
● Show ip policy
● R3(config-ext-nacl)#exit
● Set interface