ccnproute
ccnproute
CCNP Route: 300-101 also called shortest-path-first protocols, the routers each create three separate tables. One of these tables
keeps track of directly attached neighbors, one determines the topology of the entire internetwork, and one is used as the
routing table. Linkstate routers know more about the internetwork than any distance-vector routing protocol. OSPF is an IP
routing protocol that is completely link
state. Link-state protocols send updates containing the state of their own links to all other directly connected routers on the
network, which is
then propagated to their neighbors.
Hybrid Hybrid protocols use aspects of both distance vector and link state—for example, EIGRP
PPP: Point to Point Protocol
r1(config-if)#encapsulation ppp
r#debug ppp negotiation
r2(config-if)#encapsulation ppp
r2#debug ppp negotiation
r#show ip route
Phases in PPP
1 Down:
in this phase, ppp is down, this message is seen after the link and ppp are completely down.
2 Establishment phase:
3 Authentication phase:
r1(config)#interface loopback 1
r1(config-if)# ip address 1.1.1.1 255.255.255.255
r1(config)#int serial 0/0
r1(config-if)#ip unnumbered loopback 1
r2(config)#interface loopback 1
r2(config-if)# ip address 2.2.2.2 255.255.255.255
r2(config)#int serial 0/0
r2(config-if)#ip unnumbered loopback 1
r#show ip route
r1(config)#int serial 0/0
r1(config-if)#no peer neighbor-route (router will not receive route from other router)
r1#show ip route
Note: CDPCP is reponsible to take cdp based packet from one router to another. if CDPCP is disabled
thn we cant see neighbor info in cdp cmd.
R#clear ppp all (this command can clear process of ppp but it is avaible in ios 15.0 only)
isp(config)#AAA new-model
isp(config)# AAA authentication ppp ccie group radius group tacacs+ local
isp(config)#username cisco passsword cisco
isp(config)#interface serial 0/0
isp(config-if)#ppp athentication pap ccie
cust(config)#int serial 0/0
cust(config-if)#ppp pap sent-username cisco password cisco
how to connect isp router with radius or tacacs
isp(config)#interface multilink 1
isp(config)#int serial 0/0
isp(config-if)#ppp multilink group 1
isp(config)# int serial 0/1
isp(config-if)#ppp multilink group 1
how to configure authentication in multilink interface
isp(config)#int multilink 1
isp(config-if)#ppp authentication chap
isp(config)#username cisco password cisco
cust(config)#interface multilink 1
cust(config-if)#ppp chap hostname cisco
cust(config-if)#ppp chap password cisco
cust(config)#interface multilink 1
cust(config-if)#ppp ipcp route default
cust#show ip route
PPPoE
r1(config)#interface virtual-temple 1
r1(config-if)#encapsulation ppp (default is ppp)
r1(config-if)#ip address 12.1.1.1 255.255.255.0 (we can call loopback address)
r1(config)#bba-group pppoe test
r1(config-bba-group)#virtual-templete 1
r1(config)#interface ethernet 0/0
r1(config-if)#pppoe enable group test
r2(config)#interface dialer 10
r2(config-if)#encapsulation ppp
r2(config-if)#ip address 12.1.1.2 255.255.255.0 (we can call loopback address)
r2(config-if)#dialer pool 100
r2(config)#interface ethernet 0/0
r2(config-if)#pppoe-client dial-pool-number 100
r1(config)#interface virtual-templete 1
r1(config-if)#ppp authentication chap
r1(config)#username cisco password cisco
r2(config)#interface dialer 10
r2(config-if)#ppp chap hostname cisco
r2(config-if)#ppp chap password cisco
r2(config)#interface dialer 10
r2(config-if)#encapsulation ppp
r2(config-if)#ip address negotiated / ip address dhcp
if client is not receiving ip from dhcp server than clear ppp all or flap interface
1 Configure-Request:
2 Configure-Reject:
if configuration option received in the confreq msg is not acceptable thn device will send
confreject
3 Configure-Nak:
if received configration option is acceptable but some value is not acceptable thn router
transmit a confnak msg
Configure-Ack:
if all options and values in confreq msg are acceptable thn router will transmit confack msg
Terminate-Request:
Terminate-Ack:
Process switching
Fast-switching
CEF (cisco express forwording)
Process switching
Fast switching
Route Processor
Switch engine
CEF (cisco express forwording)
Centeralized CEF
Decenteralized CEF
Drop adjacency: this table is basically responsible to handle all those packet which are
encounteredwith mismatch of encapsulation or crc error.
Discard adjacency: this table is resonsible to handle all those packet which are discarded by an acl
Glean adjacency: this table is responsible to have information about all directly connected network
and whenever a packet will mode to a any directly connected network thn all those packet will be
handled by glean adjacency.
Punt adjacency: this table is reponsible to handle those packet which is not processed by cef and
forworded to control plane to process these packet
ARP Process
IP Routing
routing is a process or technique to identify the path from one network to another network
a router must know the following information to route the packets from one network to
another network.
destination network
neighbor router from which it can learn about remote network
possible number of router to reach the destination
best route to reach the destination
Static routing
Dynaming routing
Static Routing
Advantage:
security
low CPU utalization
Efficient in small network
usually used in small network
Disadvantage:
Time consuming
Not good for large network
burden on an administrator
it will install both route into routing table. bcz it will check logest prefix match and prefix
match is same. after that it will check a.d. value and a.d. is also same.after that it will metric
and static route matric is always 0 so both route metric is also same.. so it will install both
routes into routing table. but it will not perform load-balancing
it will preffer that path which is installed first into routing table
floating static routing than one route will be save in routing table and second route will be
same in nvram if first route goes down than second route will automatically placed into
routing table.
r(config)#ip route 0.0.0.0 0.0.0.0 12.1.1.1
r(config)#ip route 0.0.0.0 0.0.0.0 23.1.1.1 2
EIGRP
it stand for Enhanced interior gateway routing protocol
it is open standard protocol.
it is an IGP Protocol
it is a hybrid/advance distance routing protocol.
metric is bandwidth+load+delay+reliability+mtu
hello timer 5sec and hold timer 15sec.
hop count bydefault 100 and maximum 255.
first time full update after that triggered update
it is a PDM Protocol (protocol dependant module).
administrative distance is 90/170/5
it is a classless routing protocol
it support vlsm
it support discontigious network.
bydefault auto-summary is enabled/ disable in ios version 15.0 and above.
multicast address 224.0.0.10
protocol number 88.
there are two version of eigrp v2 and v3
we can run maximum 30process on a single router
it support equal load-balancing, bydefault 4, max 16/32.
it uses dual algorithem for best path selection (diffusing update algorithem)
it will create neighbor with using primary address.
it is an algorithem used by eigrp for select lowest cost loop free path for each possible
destination
it also provide fast convergence.
if in topology table multiple path available than it will run dual and it will select best route
and put it in routing table
there are four terms of dual: 1 FD, 2 RD, 3 Successor, 4 Feasible Successor
total metric from source to destination or you can say that a caculated metric of successor is
called FD.
Successor:
feasibility condition
Hello
Update-RTP
Query-RTP
Reply-RTP
ACK
it is used for detecting packet loss and to ensure ordered delivery of the packets
Hello
contents of hello
version
opcode: hello,ack =5, update=1 , query =3, reply=4
checksum
autonomous system number
eigrp parameters: k values, hold time
sequence and acknowledge: used for acknowledged packet only (update,query, reply)
software version: information about the ios version
update:
Query:
query packets are sent by a router when successor route fail and ther is no feasible
successors in the topology table.
the routers places the route in active state and sent a query to its neighbors for an
alternetive route.
query msg are sent as a multicast 224.0.0.10
Reply:
reply packets are sent in response to query packets, the responding router has an
alternetive route.
reply packets are sent as a unicast to the querying router.
stuck in active
when a router noticess that a route failure and there is no feasible successor that route
move in active state from passive,
that router sends a query msg to its neighbor and it will wait for 3min for reply.
if router does not receive a reply within active timer, that route will considered stuck-in-
active state
if router not receiving reply within 3min router will flap the neighborship with its neighbor
router(config-router)#timers active-time (value)
router(config-router)#eigrp stub
stub flag bit on in eigrp hello packet
Summarization
Neighbor table
Topology table
Routing Table
Neighbor Table
Topology Table
it contains all destination advertise routes by neighbor routers which come from the nbr
routing table
r#show ip eigrp topology
r#show ip eigrp topology all-links
Routing Table
it contain the best route to each remote network and this path called successor
it will contain three types of route: internal, external, summary
r#show ip route
r#show ip route 1.1.1.0
r#show ip route eigrp
r#show ip route eigrp 100
Null 0:
R(config-router)#metric weights 0 1 1 1 1 0
Passive Interface
router(config-router)#passive-interface default
router(config-router)#passive-interface ethernet 0/0
Unequal-cost Load-Balancing
Varriance: it will multiply with successor when dual algorithem run on topology table
(default1, 1to128).
router(config-router)#varriance (1 to 128)
Offset-list
MD-5 Authentication
r(config-if)#metric maximum-hopes 1
split-horizon
route filtering is used to filter the unused routes of a router. it is used to reduce the size of routing
table. we can perform route filtering by using 4 methods.
Standard ACL
Extended ACL
Route-map
Prefix-list
source: next hop address from which router receiving the routes
destination: the routes which we want to filter
r#show ip protocol
r#show access-list 101
200-100 =100
100/2=50
any= 0.0.0.0 /0
ge= greater thn
le= less thn
static neighborship
Redistribut static
summarization
ip default-network
network 0.0.0.0
redistribute static
summarization
IP default-network
r(config)#interface loopback 1
r(config-if)#ip address 192.168.101.1 255.255.255.0
r(config)#router eigrp 100
r(config-router)#network 192.168.101.0
r(config)# ip default-network 192.168.101.0
network 0.0.0.0
Router-id in eigrp
r(config-router)# eigrp stub (it will forword connected and summary route only)
r(config-router)#eigrp stub receive only (it will not forword any route)
r(config-router)#eigrp stub connected (it will forword only connected route)
r(config-router)# eigrp stub summary (it will forword only summary route)
r(config-router)# eigrp stub redistributed (it will forword only redistributed route
Policy based routing can be used to change the next hop ip address. this can be usefull to
over rule your routing table for certain traffic types.
router(config)#access-list 101 permit ip any 3.3.3.0 0.0.0.255
router(config)#route-map cisco permit 10
router(config-route-map)#match ip address 101
router(config-route-map)# set ip next-hop 13.1.1.2
router(config-if)#ip policy route-map cisco
router#debug ip policy
it is a track object. this feature allow you to make sure that next hop is reachable befor that the
routing table is used.
r5(config)#frame-relay switching
r5(config)#interface serial 0/0
r5(config-if)#enacapsulation frame-relay
r5(config-if)#frame-relay intf-type dce
r5(config-if)#clock rate 64000
r5(config-if)#frame-relay route 102 interface serial 0/1 201
r5(config-if)#frame-relay route 103 interface serial 0/2 301
r5(config-if)#frame-relay route 104 interface serial 0/3 401
Type1 hello
Type2 DBD database discription
Type3 LSR Link state request
Type4 LSU Link state update (retransmission time out 5sec)
Type5 LS Ack link state acknowledge
Note: OSPF header size is 32bytes but always remember that first 24bytes are always common in all
packet
OSPF Design:
Note: inter area route can not move to one area to another area without backbone area, but
external route can move one area to another area without backbone area.
Backbone router
internal router
Area Border Router
Autonomous System Boundary router
Backbone router
internal router
a router which has at least one interface in backbone area and one in regular area
we create ABR for devide database in different area
An ABR will keep multiple Area's database in memory
it can send routing information to different area but not send database
it is used to connect different routing protocol with ospf or redistribute rip,eigrp into ospf
it is used to exchange routing information in ospf and different protocol
network mask
hello interval
dead interval
designated router
backup designated router
neighbor router id
neigbor router priority
Router-id
router(config-router)#router-id 1.1.1.1
A router will always keep its route information in its database in the form of LSA, when any update
will go from one device to another device it will go in the form of LSA
Types of LSA
It is generate by every router within an area to represent itself, it will not cross its own area
within an area all routers have common 'Router LSA' information,
one router LSA can keep multiple links information
after every 30min router will flood lsa, if any router receives higher sequence no. lsa than
router will execute SPF algorithem
in router LSA link-id and advertising router-id will be same
router lsa contain some special bits like 'V' end point of virtual link, 'E' it is ASBR, 'B' it is ABR.
link-id= router id, adv router-id= router-id
It is generated by ABR router for sending routing information from one area to another area
it contain information about all inter area routes
link-id=network id (prefix id), adv. router-id= router id of ABR
it is generated by ABR
discribe that who is doing redistribution means ASBR information
cost to reach an ASBR from ABR
Link-id= router-id of ASBR, Adv. router-id= router-id of ABR.
generated by ASBR
this LSA will keep the information of all routes of other routing domain
link-id= external routes, adv. router-id= router-id of ASBR.
Note: all external route will come as E2 route in ospf and it is larger route than any other path. it will
never show total cost of path (cost20)
Standard Area
Stub Area
Totally Stub Area
NSSA Area
Totally NSSA Area
Standard Area:
Stub Area
it is used to filter Type5 LSA and Type4 LSA or to filter external routes
after filtering type5 and type4 LSA It automatically generate default route
default route is advertise by ABR
stub are run on both sides means ABR and all other router of this area.
we cant configure area0 as stub area
stub area not allow virtual-link
stub area is not allowed ASBR router so we cant configure stub area near ASBR router.
we cant make stub to that area which is attached with ASBR bcz it cant do redistribution .
router(config-router)#area 1 stub
Totally stub:
NSSA Area
it filter LSA3,4,5
Default route will automatically generated
implement only on ABR router
allow redistribution
default route originate by ABR
router(config-router)# area 1 nssa no-summary
Route filtering
To filter routes we can use distribute-list. under distribute-list we can call varrious components
Standard ACL
Extended ACL
Prefix-list
Route-MAP
Area Filter List
Standard ACL
Extended ACL
Prefix-list
route-map
Area Filter-list
summarization
Types of summarization
internal summarization
external summarization
router(config-router)#maximum-path 10
router(config-router)#distance 100
note: if we changed hello interval than dead timer will automatically get changed. if we changed
dead-interval manually than dead will not get change automatically
note: if hello and dead timers are mismatch than neighborship will not come up
router(config-router)#max-lsa 40 / warning-only
authentication in ospf
Type 0 - Null
Type1 - Plain text
Type2 - MD-5
note: we can configure plain text and md5 authentication but at a time latest authentication will
work
Unicast hello send and Can connect more than 2 router but have no
broadcast capability.
It elects Dr and BDR but all OSPF packets are exchange through
unicast
# Int fa0/0
Point to multipoint :-
it is not default option but best choice for nbma n/w, if broadcast is
enabled otherwise it can’t work
No DR/BDR election
6. Loopback:-
1. It is default n/w type for loopback interface
7. virtual-link n/w:-
Virtual link is used for non backbone area that is not directly connected
with backbone area (area 0).
Transits area means who work between area 0 and any regular
area.then we use virtual-link over transits area.
# Sh ip os virtual-link
n/w types Hello Dead DR & Auto Manual
times times BDR NBR nbr
discovery define
Broadcast 10 40 Y Y X
P2p 10 40 X Y X
P2mp 30 120 X Y X
NON 30 120 Y N Y
BROADCAST
P2mp (NB) 30 120 X N Y
BGP: Border Gateway Protocol
it is an EGP Protocol (it can form neighborship between two different AS's)
it is a Path Vector routing Protocol (it uses multiple attribute to select best path)
it is highly scalable than IGP (it can have lakhs of routes in its BGP table)
it is reliable protocol (it uses TCP)
it uses tcp port number 179 before establish neighborship it have to form tcp
connection (three way hand shake process).
only BGP is fully reliable routing protocol.
it is more secure than any other routing protocol bcz all msgs will travel on TCP
protocol
it is a classless routing protocol
it support manual summarization
Administrative Distance: IBGP 200, EBGP 20.
A.S. size is 2bytes(0-65535) and 4bytes(0.0-65535.65535).
Public A.S= 1 to 64511, Private AS=64512 to 65534.
BGP doesn't support dynamic neighbor discovery.
it supports only md5 authentication
bgp convergence is slow as compaire to IGP.
IGP's were developed for to handling upto 1000 of routes inside their routing table.
therefore can't be implement in very large networks.
BGP can contain lakh's of routes inside their BGP table or routing table.
we never use default route in ISP router to other ISP router.
in IGP's if any link (prefix) goes down thn it effects to complete routing
structure(topology). but in BGP, it not affects other routers bgp table.
when we are service provider or network size is very large.
when we have multiple connections for internet or multiple service provider.
Types of customers
we configure static default route in the direction of ISP and natting also
if we configure default route on both connection than it will not perform load-balancing
Single multi-homed
In this we must have two ISP and customer must have atleast one connection from each ISP.
in this we must have atleast two isp and two link from each isp.
Types of msges in BGP
there is four types of msgs in BGP, each type of BGP packet will travell over TCP. it is not
possible to transmit any single msg of BGP without forming TCP connection.
1 OPEN msg
open msg send only once when nbrship comes up. than after BGP will not send any
open msg.
open msg will be used by BGP to exchange initial configuration between two bgp
peers which is require to form bgp neighorship
contents of bgp
version 4
router-id
own AS
Hold down timer (180sec)
2 keep-alive
After exchanging open msgs successfully between both router, router will start to send
keep-alive msgs periodically after every 60sec just to inform its neighbor that im still awake.
if any router doesn't receive keep alive msg from its neighbor within 180sec (hold down
time) than router will break down the neighborship
3 Update
update packets will be responsible to carry routes information. update packet having some
components
Path Attributes: some crieteria used by selection of best path.
Note: if any router have multiple prefixes and all prefix attributes are same than router will
generate a single update msg
4 Notification
if peering goes down than it will generate notification msg and it will contain the cause of
problem.
5 Open-confirm: exchanged open msg, perameter agreed, send keep-alive after 60sec
router#show ip route
router#show ip bgp
note: we can advertise network but its prefix length should be match in its routing table connected
route.
note: it will install only best route of bgp table into routing table.
Well known Mandatory
BGP will always carry these attributes with bgp update automatically
sometimes bgp will carrry these attribute with bgp update , sometime its not. it depends on nbr, its
IBGP nbr or EBGP nbr
optional transitive
if any bgp neighbor receive any update with optional transitive attribute and that router dont
support that attribute in that case it will not drop update, it will accept that update and also will
forword it to another neighbor after removing that attribute.
optional non-transitive
if any bgp neighbor receive any update with optional non-transitive attribute and that router dont
support that attribute in that case it will discard that incoming update.
1 Next-hop: reachability, if next-hop not reachable than it will not compaire other path attribute, if
any router receiving any prefix from two nbr and next-hop is reachable via both router, than bgp will
not define best path based on next-hop only.
2 weight:
3 Local preference
bgp will always include local preference attribute in its out going bgp update but only for
ibgp neighbor.
bydefault local preference is 100 for internal prefixes
higher will always preffered
if any router receive prefixes from ebgp nbr (0), and from IBGP nbr (100) in that case local
preference will never compaire
4 Self Advertised
5 AS Path Lenght
6 Origin code
7 MED (metric)
if any prefix coming from to different nbr one is ebgp and one is ibgp than it will preferre
external first
if igp configured background of bgp thn bgp can use igp cost to reach next-hop address.
if router receiving sam eprefix coming from two different EBGP neighbor than oldest path
always be preffered
11 router-id of neighbor
if router receiving same prefix coming from two nbr which router id is has same than lower
ip address will be preffered
note: BGP support equal cost load-balancing but up to igp cost to reach next hope attribute must be
same.
BGP will always discard all these updates which are carrying its own AS inside there AS-path list.
if a BGP router receives anything from one ibgp neighbor than it will never advertise that
information toward any other ibgp nbr.
Rule of next-hop
Whenever any router give update to its ebgp neighbor, it will advertise update after
modifying their next-hop address.
whenever any router give update to its ibgp neighbor, it will advertise update without
modifying their next-hop address.
note: that prefix should be present in its local routing table with same prefix lengh.
connected check rule for EBGP
Note: open msg ttl value for ebgp enighbor is 1, and for ibgp neighbor ttl value is 255.
router(config-router)#redistribute connected