0 Routing
0 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.
• Basically it is designated to provide information and assistance to data plane.
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.
• Per packet load balancing.
Fast switching
• This method is knows for process once and switch many times
• RP :- Route Processor – CPU
o To process the frame so table can be populated
• SE :- Switch Engine – Shortcut
o To forward the traffic on the basis of entry in table.
• For every new connection switch always look into route processor.
• Load balancing per destination basis.
Adjacency
• Sh adjacency
• Sh adjacency detail
• Sh ip cef 10.0.0.2 255.255.255.255 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.
How to disable CEF
• #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
▪ It will change L2 information
• 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.
• There are three way to configure static route
1. With using next hop address
▪ When Route is assigned through next hop
• Solution →no proxy ARP
• Problem → recursive Lookup
• R1(config)#IP Route <destination network > <destination subnet
mask > <next hop ip >
2. With using exit interface
▪ When route is assigned through exit interface
• Problem →Proxy ARP
• Solution → no recursive Lookup
o Ip route <Destination Prefix ><destination subnet
mask><exit interface>
o Ip route < 30.0.0.0>< 255.0.0.0>< fastethernet 0/1>
3. With using combination of both Exit Interface and Next hop.
▪ Ip route <Destination Prefix ><destination subnet mask><exit
interface><next hop ip >
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
Route Preference criteria
• Purpose → Redundancy (Backup )
o Primary path
o Secondary Path
• When there are multiple paths for a single destination, so router should prefer any
one path to reach that destination.
Lowest metric
Dynamic Routing
• Routing in which routes are maintained and calculate 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.
o Ex→ RIP , EIGRP , OSPF
• EGP→Routing Protocols that share routes between different autonomous systems.
o BGP
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
Ethernet 10,000 kbps 1000
Fast Ethernet 100,000 kbps 100
Gig Ethernet 10,00,000 kbps 10
10 gig 10,000,000 kbps -
Loop back 8,000,000 kbps 5000
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
1. Version = 2
2. OP code = 5
3. Checksum Value
4. Seq=0
5. Ack=0
6. AS number
7. K value
8. Hold = 15 sec
9. IOS version
10.Authentication (optional)
EIGRP Neighbour ship parameter
Adjacency
• Null update is used to verify bidirectional connectivity b/w routers which hello cannot provide
• Hello does not provide ack but update packet does.
Update Message
3. It is used to share prefix information
4. Unicast (serial)
5. Multicast (ethernet)
6. Update packet is separate from hello packet.
▪ Update are not periodic in Eigrp but only trigged
7. OP code = 1
8. Ack = 5
9. When two router will form Neighbourship and share update it start-up
10. In that case router will share full Update on multicast address
11. When any new network is added in topology in that case router will generate
partial Update.
RTO → 468 ms
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)
• Delay Infinite value ( EIGRP)
• When Router advertised any Prefix to other router it will send it ip as Next-hop
• R1(config)#interface ethernet 1/0
• R1(config-if)#no ip split-horizon Eigrp 1
• R1(config-if)# No ip Next-hop-self Eigrp 100
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
1) To summary the route to reduce routing table size.
2) To add multiple route to form single subnet.
3) For summary for connected route.
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
• DHCP Stateless (No need DHCP Server)
o No separate configuration is needed.
o No binding are maintained
• DHCP State full (Need DHCP Pool)
o Dhcp server (config)
o Dhcp server will maintain all binding table
NDP feature
• R1(config)#int l0
• R1(config-if)#ipv6 address 1::1/128
Autoconfig
• DHCP for IPV6
o Stateless Auto config
▪ Stateless dhcp which does not maintain any database.
▪ Cannot provide dns-server info.
▪ Router advertisement
• As u will enable ipv6 on interface a device will start sending
Router advertisement in every 60 sec.
• Server will send Router advertisement.
▪ Router Solicitation
• This packet is forward by host on router to set IPV6
preferred.
• It is send by client.
▪ Valid lifetime 30 days , preferred lifetime 7 days (always)
▪ 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
▪ DNS info can be provided
▪ Valid lifetime 48 hrs , Preferred lifetime 24 hrs
▪ Solicit , advertise , request , reply
▪ Client 546 , server 547
o R1(config)#ipv6 dhcp pool R2
o R1(config-dhcpv6)#address prefix 10:1:1::/80
o R1(config-dhcpv6)#dns-server 100:1:1:1::1
o R1(config-dhcpv6)#exit
o R1(config)# int fa0/0
o R1(config-if)#ipv6 dhcp server R2
o R1(config-if)#ipv6 address 100:1:1::1/80
o R2(config-if)#ipv6 address dhcp R2
o R2(config-if)#ipv6 address autoconfig default
o R1 (config-if)#ipv6 nd prefix 100:1:1::1/80 600 300
→Eigrp (Named Mode)
• R1(config)#int fa0/0
• R1(config-if)#ipv6 summary-address eigrp 100 172:168:101::/61
• Classic mode = IPV4 , ipv6
o Micro second
• Named mode = ipv4 , Ipv6
o Pico second
o R1(config)# router eigrp ccnp
o R1(config-router)#address-family ipv4 autonomous-system
200
o R1(config-router-af)#exit
o R1(config-router)#address-family ipv6 autonomous-system
200
o R1(config-router-af)#eigrp router-id 1.1.1.1
o R1(config-router-af)#exit
→Ospf V3
• R3(config)#router ospfv3 10
• R3(config-router)#router-id 3.3.3.3
• R3(config)#int r fa0/0,l0
• R3(config-if-range)#ospfv3 10 ipv6 area 1
Eigrp (Enhanced Interior Gateway routing Protocol)
• Mode
o Classic mode (32 bit)
o Name Mode (64 bit)
• Metric
o Fixed
▪ Bandwidth
▪ Delay
o Variable
▪ Load
▪ Reliability
• Minimum delay of interface 10 micro second
o 1 gig
o 10 gig
o 20 gig
o 40 gig
o 100 gig
• Bandwidth
o 10^7 / least bandwidth
o 1 gig = 10000000 / 1000000 = 10
o 10 gig = 10^7/10^7 = 1
o 20 gig = 10^7/20*10^6= 1
o 40 gig = 10^7/ 40*10^6=1
• 10 gig =
o (10^7 /least bandwidth + total delay /10 )*256
o (10^7/1 0000000+10/10)*256 = (1+1)*256=512
• Eigrp named mode use one process for IPV4 and IPV6
• Delay use in picoseconds second in named mode
Configuration
• ROUTER EIGRP CCNA
o Address-family ipv4 unicast autonomous-system 100
▪ Network 12.1.1.1 0.0.0.0
• Address-family ipv6 unicast autonomous-system 100
• Show Eigrp address-family ipv4 neighbors.
• Show Eigrp address-family ipv4 interfaces.
• Show Eigrp address-family ipv4 topology
• R2(config)#router eigrp ccnp
o R2(config-router)#address-family ipv4 unicast autonomous-system 1
o R2(config-router-af)#default af-interface fastEthernet 0/0
o R2(config-router-af)#af-interface fastEthernet 0/0
o R2(config-router-af-interface)#hello-interval 1
o R2(config-router-af-interface)#hold-time 10
o R2(config-router-af-interface)#passive-interface
o R2(config-router-af-interface)#authentication key-chain R1
o R2(config-router-af-interface)#authentication mode hmac-sha-256 ccna
• (Eigrp formula)*256 *256 = metric 64 bit
•
• Metric 64 bit / RIB scale (by default 128 ) (1 -255)
• Metric rib-scale (1-255)
• Metric version 32 bit
Neighbour ship
• Area Id should be same
• Subnet and subnet mask should same
• Hello & dead timers should be same
o R1 (config)#int fa0/0
▪ R1(config-if)#ip ospf hello-interval 5
▪ If you will change hello timer , hold will automatically change
• Router id should be unique within area
• Authentication should match (optional)
o Type 0 = null
o Type 1= plain text
o Type 2 = md5
• Ospf network type should match
• OSPF stub flag must match
OSPF state
o Down
▪ No hello will be sent or received
▪ This is the initial state of a neighbour relationship. It indicates that the
router has not received any ospf hello packets.
o Init
▪ Hello is sent.
▪ This state indicates that a hello packet has been received from
another router, but bidirectional communication has not been
established.
▪ Active neighbour ship
o 2-way
▪ Hello is sent and received.
▪ Neighbourship is done.
▪ Bidirectional communication has been established. If a DR or BDR is
needed, the election occurs during this state.
o Exstart
This is the first state in forming an adjacency
Null DBD is exchanged between to verify bidirectional connectivity
for updates.
▪ Routers identify which router will be the master or slave for the LSDB
synchronization.
▪ Master/Slaves (Election)
• Highest RID
▪ To decide who will start sending the database first
▪ Once the election will be completed they will move to “ exchange”
state
▪ Seq number
▪ Only master will increase Seq number
▪ MTU size negotiate
▪ Init = 1
▪ More = 1
▪ Master = 1
o Exchange
▪ During the state, routers are exchanging link states by using DBD
packets.
▪ Asking about each other’s database.
▪ LSA header send from master
▪ Then slave will send LSA header in response
▪ But will not have database information in that DBD.
o Loading
▪ Slave will send LSR to ask detail information about LSA Header.
▪ Master will send LSU
▪ Slave will send LSACK
▪ When the database is completely synchronised they will move to full
state and will said to form “adjacency”
▪ Neighbour ship / adjacency -> 40 sec (wait timer )
2 –Way State
• Network type
o BMA (Broadcast Multi Access)
o P2P (Point to point)
• Number of Neighbour ship = n (n-1)/2 n= Number of router
• To reduce the number of adjacencies, router will elect DR & BDR between the router
o DR(Designated Router)
o BDR(Backup 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
o Every DRother will form adjacency with DR and BDR both.
o DR and BDR will form adjacency with each other.
o DRother will never form adjacency with DRother.
• 224.0.0.5 → When ever DR send any update all will received from this multicast add. Every
router of ospf can accept that.
• 224.0.0.6→Only DR and BDR can accept the update.
• Clear IP OSPF PROCESS (Y) → Simultaneously with in msec
o DR (only two router in one BMA) currently
o DR/BDR (when more than two router in BMA)
Virtual Link
Virtual link is always considered as P2P
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)
▪ For default route = Metric value = 1 (default)
o E1 = Total path cost
▪ # Redistribute Eigrp 100 subnets metric-type 1
▪ Show ip ospf border-routers
▪ O>OIA>E1>E2 →Route preference ospf
▪ O = Intra Area Route
▪ OIA = Inter Area Route
▪ E1 =
• for redistributed routes = metric value = 20 (def) + forward metric
• For default route = metric value = 1 (def) + forward metric
• Forward metric = metric to reach ABR will be calculated on the basis of
LSA 4.
6) LSA 6 (Group membership)
7) NSSA External LSA
Standard Area
• By default all area are standard Area
Stub Area
• To filter LSA5 into 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 not allow virtual link
• 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
3) NSSA
a. LSA 5 convert into LSA 7
b. Manually generate default route on ABR
c. Default route generate in LSA 7
4) Totally NSSA
a. LSA 5 & LSA 4 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
Summarization in OSPF
Filtering
1) Route filtering
a. Distribute-list
i. ACL
1. Standard
a. R5(config)#ip access-list standard 10
b. R5(config-std-nacl)#deny 172.168.0.0 0.0.255.255
c. R5(config-std-nacl)#exit
d. R5(config)#router ospf 1
e. R5(config-router)#distribute-list 10 in
f. R5(config-router)#exit
2. Extended
ii. Prefix-List
iii. Route-map
b. AD value
i. R5(config)#router ospf 1
ii. R5(config-router)#distance ospf external 255
iii. 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
i. R2(config)#ip prefix-list ccnp seq 10 deny 10.1.0.0/22 ge 24 le 32
ii. R2(config)#ip prefix-list ccnp seq 20 permit 0.0.0.0/0 le 32
d. #route ospf 100
e. #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
a. R2(config-if)#ip ospf authentication
i. IP ospf authentication-key cisco
3) Type 2 = MD5 authentication
a. ip ospf authentication message-digest
b. ip ospf message-digest-key 1 md5 cisco
c. show ip ospf interface | in line |authentication|key
6) Loopback
a. It will always advertise in /32
7) Virtual Link
OSPFv3
• OPSF v2 (IPV4)
• OSPF V3(IPV6)
• Router OSPFV3 process id ( Address family config)
• IPV6 router ospf process id (IPV6)
• Number of SPF calculation reduce in OSPFV3
• Hello
1 Source IPV6
▪ Int (link local address)
2 Destination IPV6
▪ FF02::5 , FF02::6
3 Cost calculation same
4 Layer 3 protocols and it encapsulate in IPV6
• LSA
1. LSA type 1
a. Router LSA
b. Which Neighbour connected on which link
c. Don’t have information about network
2. LSA type 2
a. Network LSA
b. Don’t have information about network.
3. LSA type 3
a. Inter Area Prefix LSA
4. LSA type 4
a. Intra Area router LSA
5. LSA Type 5
a. External
6. LSA type 7
a. NSSA External
7. LSA type 8
a. Link LSA
b. It will share Link local address
c. It will be local in link
8. LSA type 9
a. Intra area Prefix LSA
b. If any network add type 9 will generate
c. Have information about network
9. IPv6 router ospf 1
a. Router id 1.1.1.1
10. IPV6 ospf 1 area 1
11. Show pv6 ospf database link adv-router 1.1.1.1
12. Show ipv6 ospf database router adv-router 1.1.1.1
13. Show ipv6 ospf database prefix adv-router 1.1.1.1
Multiple Redistribution
1) When routes are moving from lower Ad to Higher Ad there will be no problem.
a. Eigrp (90) to ospf (110)
b. Ospf (110) to eigrp (170)
2) When router is moving from higher AD to lower ad there will be chance for sub optimal routing.
a. Sub optimal routing
i. When router have shortest path but still router is using longest path is called
sub-optimal routing.
3) How we can prevent with sub-optimal routing
a. Prefix list
i. R6(config)#ip prefix-list abc seq 10 deny 1.1.1.0/24 le 32
ii. R6(config)#ip prefix-list abc seq 20 permit 0.0.0.0/0 le 32
iii. R6(config)#router os 10
iv. R6(config-router)#distribute-list prefix abc in fa1/0
v. R6(config-router)#exit
vi. R3(config)#ip prefix-list abc seq 10 deny 1.1.1.0/24 le 32
vii. R3(config)#ip prefix-list abc seq 20 permit 0.0.0.0/0 le 32
viii. R3(config)#router ospf 10
ix. R3(config-router)#distribute-list prefix abc in
x. R3(config-router)#exit
b. AD value
i. R3(config)#router ospf 10
ii. R3(config-router)#distance ospf external 121
iii. R3(config-router)#exit
iv. R6(config)#router ospf 10
v. R6(config-router)#distance ospf external 121
vi. R6(config-router)#exit
GRE
• It stands for Generic Routing Encapsulation.
o It is used to build tunnel (Point to point) between two sites.
o It is network layer Protocol
o Its use protocol number is 47.
Configuration NAT
• Delhi_NB(config)#ip route 0.0.0.0 0.0.0.0 s5/0
• Banglore_NB(config)#ip route 0.0.0.0 0.0.0.0 s5/1
• Delhi_NB(config)# int fa0/0
• Delhi_NB(config-if)#ip nat inside
• Delhi_NB(config)#int s5/0
• Delhi_NB(config-if)#ip nat outside
• Delhi_NB(config)#ip access-list standard 10
• Delhi_NB(config-std-nacl)#permit any
• Delhi_NB(config-std-nacl)#exit
• Delhi_NB(config)#ip nat inside source list 10 interface s5/0 overload
• Banglore_NB(config)#int fa0/0
• Banglore_NB(config-if)#ip nat inside
• Banglore_NB(config-if)#exit
• Banglore_NB(config)#int s5/1
• Banglore_NB(config-if)#ip nat outside
• Banglore_NB(config-if)#exit
• Banglore_NB(config)#ip access-list standard 10
• Banglore_NB(config-std-nacl)#permit any
• Banglore_NB(config-std-nacl)#exit
• Banglore_NB(config)#ip nat inside source list 10 interface s5/1 overload
Configuration of GRE
• Delhi_NB(config)#int tunnel 10
• Delhi_NB(config-if)#ip add 12.0.0.1 255.0.0.0
• Delhi_NB(config-if)#tunnel source 200.20.20.2
• Delhi_NB(config-if)#tunnel destination 201.20.20.4
• Banglore_NB(config)#int tunnel 10
• Banglore_NB(config-if)#ip address 12.0.0.2 255.0.0.0
• Banglore_NB(config-if)#tunnel source serial 5/1
• Banglore_NB(config-if)#tunnel destination 200.20.20.2
• Delhi_NB(config)#ip route 10.1.2.0 255.255.255.0 12.0.0.2
• Banglore_NB(config)#ip route 10.1.1.0 255.255.255.0 12.0.0.1
Gre problem
• Always make P2p network
• Have to configure individual tunnel
• Routing table size increase
• When any spoke add you have configure tunnel for them.
• Spoke to spoke communication possible but through hub
• That why we need DMVPN
DMVPN
• It stand for dynamic multipoint VPN
• In which tunnel will create automatically.
• Multipoint GRE
• NHRP ( Next hop resolution Protocol)
o NHRP Registration Request
o NHRP Registration Reply
o With the help of NHRP Spoke will register then self on HUB router
• Phase 1
o Spoke = P2P tunnel ( define destination )
o HUB = multipoint tunnel
Configuration
1) R1_H(config)#int fa0/0
2) R1_H(config-if)#ip add 12.0.0.1 255.0.0.0
3) R1_H(config-if)#no sh
4) R1_H(config-if)#exit
5) R1_H(config)#int s4/0
6) R1_H(config-if)#ip add 192.168.1.1 255.255.255.0
7) R1_H(config-if)#no sh
8) R1_H(config-if)#exit
9) R7_Server(config)#
10) R7_Server(config)#int s4/0
11) R7_Server(config-if)#ip add 192.168.1.10 255.255.255.0
12) R7_Server(config-if)#no sh
13) R7_Server(config-if)#exit
14) R7_Server(config)#no ip routing
15) R7_Server(config)#ip default-gateway 192.168.1.1
16) R7_Server(config)#do wr
17) R3_S1(config)#int fa1/0
18) R3_S1(config-if)#ip add 24.0.0.2 255.0.0.0
19) R3_S1(config-if)#no sh
20) R3_S1(config)#int fa0/0
21) R3_S1(config-if)#ip add 192.168.2.1 255.255.255.0
22) R3_S1(config-if)#no sh
23) R4_S2(config)#
24) R4_S2(config)#int fa1/1
25) R4_S2(config-if)#ip add 34.0.0.3 255.0.0.0
26) R4_S2(config-if)#no sh
27) R4_S2(config-if)#exit
28) R4_S2(config)#int fa0/0
29) R4_S2(config-if)#ip add 192.168.3.1 255.255.255.0
30) R4_S2(config-if)#no sh
31) R4_S2(config-if)#exit
32) R5_USer1(config)#int fa0/0
33) R5_USer1(config-if)#ip add 192.168.2.10 255.255.255.0
34) R5_USer1(config-if)#no sh
35) R5_USer1(config-if)#exit
36) R5_USer1(config)#no ip routing
37) R5_USer1(config)#ip default-gateway 192.168.2.1
38) USer2_R6(config)#
39) USer2_R6(config)#int fa0/0
40) USer2_R6(config-if)#ip add 192.168.3.10 255.255.255.0
41) USer2_R6(config-if)#no sh
42) USer2_R6(config-if)#no ip routing
43) USer2_R6(config)#
44) USer2_R6 (config)#ip default-gateway 192.168.3.1
45) R2_ISP(config)#int fa0/0
46) R2_ISP(config-if)#ip add 12.0.0.2 255.0.0.0
47) R2_ISP(config-if)#no sh
48) R2_ISP(config-if)#int fa1/0
49) R2_ISP(config-if)#ip add 24.0.0.4 255.0.0.0
50) R2_ISP(config-if)#no sh
51) R2_ISP(config-if)#exit
52) R2_ISP(config-if)#int fa1/1
53) R2_ISP(config-if)#ip add 34.0.0.4 255.0.0.0
54) R2_ISP(config-if)#no sh
IKE
• It stand for Internet key exchange
• This protocol is used to generate key in IP sec
• This also defines the frame work how key will exchange.
• Ike don’t have transport mechanism
ISAKMP
• It stand for Internet security association key management Protocol
• It is layer 7 protocol , UDP based , port number is 500 , 4500 (Nat-t)
• It is used for transport key
• It is divided into two phase
• Phase are define by ISAKMP
• Modes is define by IKE
• Modes are three
o Main mode
o Aggressive mode
o Quick mode
• Phase 1
o This phase is used to make a secure path for phase 2 and authenticate the peer.
o Main mode ( 6 packet) Gre , DMVPN , site to site vpn
o Aggressive mode (3 packet) remote VPN , any connect vpn
• Phase 2
o This is used to encrypt the data
o Quick mode ( 3 packet)
• Phase 1
o Main Mode
▪ 6 packet
• 1 pair is known as ISAKMP Security Association
• HAGLE
• H= hashing ( mD5 , HMAC-SHA)
• A= Authentication ( pre-share , certificate)
• G = group ( define the size of key in bit )
• L = lifetime ( by default 24 hours)
• E = Encryption ( Des , 3-des , AES)
• Secure Key exchange :- Deffi Hellman algorithm
o Symmetric key
▪ Same key for data encryption and decryption
o Asymmetric Key
▪ One use for data encryption and other use data decryption.
o Generate the key
o After that it will check authentication
• Authentication
o Encrypted
o Both router will authentication by 5th and 6th packet
• Phase 2
o Quick mode ( 3packet )
1) Encryption
a. (Des , 3 Des)
2) Hash algorithm
a. (Md5 , SHA, AES)
3) Encapsulation ( for key exchange which protocol we use for user data)
a. AH (Authentication Header) , ESP ( encapsulation Protocol)
4) Mode
a. Tunnel
i. L7 – l3
ii. Remote VPN
b. Transport
i. L7 – l4
ii. Site- to – site VPN
• SPI
o Outbound ( encrypt the data)
o Inbound ( decrypt the data)
Configuration
o Delhi_NB(config)#crypto isakmp policy 10
o Delhi_NB(config-isakmp)#hash md5
o Delhi_NB(config-isakmp)#group 2
o Delhi_NB(config-isakmp)#encryption aes
o Delhi_NB(config-isakmp)#authentication pre-share
o Delhi_NB(config-isakmp)#exit
o Delhi_NB(config)#crypto isakmp key cisco address 0.0.0.0
LDP
• Label distribution Protocol
• It is open standard
• It is used to exchange label between MPLS router
• Port number 646
• It use TCP & UDP both
• Multicast address 224.0.0.2
• Hello is udp based
• Hello 5 sec and Hold 15 sec
• They will negotiate for Neighbourship and after Neighbourship form they will share label and
that time it will use TCP for reliability purpose.
• They will do 3-way handshake for reliability purpose.
• It will exchange its own local label
• Remote label
MPLS have two table
o LIB ( Label Information Base)
o LFIB ( Label Forwarding Information Base)
▪ LIB = Local
▪ RIB ( forwarding table)
▪ LDP neighbour table
MPLS Header
o Header size is 32 bit
o Label is 20 bit.
▪ 1,048,576
▪ Few labels are reserved (0-15)
▪ Show mpls label range
▪ Mpls label range <value>
▪ 3 – Implicit label
• PHP ( Penultimate Hop Popping)
o By default a router will always advertise label value 3 for its
directly connected subnet to it neighbour
o It means I am telling my neighbour when u have to forward
traffic to me for that network u have to send it unlabeled , so
that I don’t have to do two lookups
o Show mpls ldp bindings
▪ 0 – Explicit label
• If you are using qos data.
o 3 bit experimental
▪ This is use for class of service , QOS
o 1 bit bottom of stack bit
▪ Whenever we have multiple label
▪ MPLs L-3 vpn
o 8 bit TTL
• Add
o Router will add label
• Swap
o Replace the label
• POP
o Remove the label
• Ingress
o Who will add the label
• Intermediate
o Swap the label
• Egress
o Pop the label
Configuration of Mpls
• R2(config)#int fa0/0
• R2(config-if)#mpls ip
• R2(config)#router ospf 10
• R2(config-router)#mpls ldp autoconfig
• R2#sh mpls interfaces
• R4#sh mpls ldp neighbour
• R2(config)#mpls ldp router-id lo1
• R2(config)#mpls ldp router-id lo1 force
• R1(config)#int fa0/0
• R1(config-if)#mpls ldp discovery transport address interface
• R1#sh mpls forwarding-table
• R1#sh mpls ldp bindings (first check )
• R1#sh mpls ldp bindings 4.4.4.4 255.255.255.255
• R1#sh ip route 4.4.4.4 255.255.255.255 ( second check)
• sh mpls ldp neighbor
•
• R1( config)#Mpls ldp neighbour 2.2.2.2 password cisco123
• R2( config)#Mpls ldp neighbour 1.1.1.1 password cisco123
I
BGP (Border Gateway Protocols)
1) It stands for Border gateway protocol.
2) It is an EGP Protocol.
3) It is used to provide inter – AS communication.
4) It is a path vector routing Protocol.
a. It means bgp us path attribute for best path selection.
5) Flexibility
a. For loud balancing in BGP or for path manipulation there is multiple path attributes in
BGP.
6) It is a highly scalable routing Protocol.
a. BGP can handle lakh’s of route in table.
b. Because BGP algorithm is more powerful than IGP.
c. IGP routing protocol algorithm is not able to handle lakh’s of route.
7) It is a completely reliable Routing Protocol
a. Work on TCP
8) It uses TCP Port number 179.
a. Completely reliable routing protocol.
9) It work on layer 7.
10) It is a class less routing protocol.
11) By default auto summary is disabled.
12) It supports Manual Summarization.
13) By default maximum path 1.
14) Administrative Distance = 20 (EBGP) and 200 (IBGP)
15) AS number 2 byte and 4 byte
a. 2 byte = 16 bit = 0 to 65535
b. 4 byte = 0:0 – 65535:65535
16) Public A.S = 1 to 64511, Private AS = 65412 to 65534.
17) BGP doesn’t support dynamic Neighbourship discovery.
18) It support only md5 authentication
19) It support static Neighbourship
20) BGP sends all type of packets as unicast
21) We can’t configure more than one AS on a single router
22) BGP convergence is slow as compare to IGP.
Why we use BGP
1) IGP’s were developed for to handling up to 1000 of routes inside their routing table. Therefore
can’t be implementing in very large networks.
2) BGP can contain lakh’s of routes inside their BGP table or routing table.
3) We never use default route in ISP router to other ISP Router.
4) In IGP’s if any link (PREFIX) goes down then it affects to complete routing structure (topology).
But in BGP, it not affects other routers BGP table.
5) When we are service provider or network size is very large.
6) When we have multiple connections for internet or multiple service provider.
1) Internal BGP
a. When you are forming Neighbourship b/w same AS.
b. AD is 200 for IBGP
c. TTL is 255
2) External BGP
a. When you are forming Neighbourship b/w different AS.
b. AD is 20
c. TTL is 1
i. Network should be directly connected.
Type of customer
• BGP forms a TCP session with neighbor routers called peers. BGP uses the finite-state
machine (FSM) to maintain a table of all BGP peers and their operational status. The
BGP session may report the following states:
1) Idle
1. We don’t have path to reach neighbor
2. No route to neighbor
3. Neighbour shutdown
4. Waiting for start-3way handshake.
2) Connect
1. In this state router try to make 3 way handshake.
2. Try to form TCP connection, but won’t be confirmed.
3) Active
1. TCP connection not completed, retrying to form tcp connection.
4) Open sent
1. These routers will exchange open message with each other and check
parameter to establish Neighbourship.
2. TCP connection completed and sent open msg.
5) Open confirm
1. Exchanged open msg, parameter agreed, send keepalive after 60 sec.
6) Established
1. Peering completed, update is exchanged.
• There are four types of msg in BGP, each type of BGP packet will travel over tcp. It is not
possible to transmit it any single msg of BGP without forming TCP Connection.
1) Open Msg
a. Open msg send only once when Neighbourship comes up. Than after BGP will not send
any open msg.
b. Open msg will be used by BGP to exchange initial configuration between two BGP peers
which is require to form BGP Neighbourship.
Content of open msg
1) Marker
2) Length
3) Type : Open Message (1)
4) Version = 4
5) BGP identifier = Router-id
6) My AS
7) Hold down timer (180 sec)
a. There are three type of table in BGP
i. Neighbour table
ii. BGP table
iii. Routing table
2) Keep-alive
a. After exchanging open msg successfully between routers. Router will start to send keep-
alive msgs periodically after every 60 sec just to inform its neighbor that I’m still awake.
b. If any router doesn’t receiver keep alive msg from its neighbor within 180 sec (hold
down time)
i. Type code 4
3) Update msg
a. Type = 2
b. Update packets will be responsible to carry routes information. Update packet having
some components
c. Path Attributes: some criteria used by selection of best path.
d. Prefix info/NLRI: Network layer reachability information.
e. Withdrawn routes: The prefix that goes down.
f. EBGP Update timer is 30 sec
g. IBGP Update timer is 5 sec
Note: if any router have multiple prefixes and all prefix attributes same than router will generate a single
update msg.
4) Notification
a. If peering goes down than it will notification msg and it will contain the cause of
problem.
Next hop Rule in EBGP
• Whenever in EBGP router share prefix with neighbor router it will change next hop address.
• Whenever in IBGP router share prefix with neighbor router it will not change next hop address.
• Whenever any IBGP router receives any prefix from IBGP router it will not share with another
IBGP router.
• Whenever IBGP router share prefix it will not add AS number, but EBGP router will add as
number whenever it will share prefix.
• Whenever any EBGP router receive any update prefix , in that prefix router it get his own AS
number so it will discard that update
Route Reflector
1) Server
a. By default server
2) Client
3) Non-client
a. Side router
• Non-client → Server →Non-client
• Client →Server→Non-client
• Client →Server →Client
• Non-C→Server→Client
• R3(config-router)#neighbor 23.1.1.2 route-reflector-client
o Static route
o IGP protocols
o R1(config-router)#neighbor 2.2.2.2 update-source loopback 1
o R2(config-router)#neighbor 1.1.1.1. update-source loopback 1
o R1(config)#ip route 2.2.2.2 255.255.255.255 12.1.1.2
o R2(config)#ip route 1.1.1.1 255.255.255.255 12.1.1.1
a. BGP will always carry these attributes with bgp update automatically.
a. Sometimes bgp will carry these attribute with bgp update, sometime
it’s not. It depends on nbr, its.IBGP nbr or EBGP nbr.
3) Optional transitive
4) Optional non-transitive
1) Next-hop:
a. If in an ibgp or ebgp update next hop is not reachable then that
particular update is not considered as best.
2) weight:
a. it is Cisco proprietary and also it has local significance,
b. bgp will not carry weight information with bgp update
c. for self advertised prefixes it is by default 32768
d. for all received prefixes by default it is 0
e. Higher weight will always prefer.
i. Path manipulation
1. Locally significant
2. Can only be applied in IN direction
3. Weight never advertise into bgp update
4. R1(config-router)#neighbor 13.1.1.3 weight 1
5. <0-65535> default weight
3) Local preference
a. Advertise from ibgp to ibgp.
b. Bgp will always include local preference attribute in its outgoing bgp
update but only for ibgp neighbour.
c. By default local preference is 100 for internal prefixes.
d. Do not advertise in ebgp to ebgp router.
e. Local pref. will be blank.
f. Higher will always preferred.
g. If any router receive prefixes from ebgp nbr (0), and from IBGP nbr
(100) in that case local preference will never compared.
4) Self Advertised
a. self advertised prefix will be preferred
b. If router receiving same prefix from different nbr than it will not
compare self advertised.
5) AS Path
a. Loop avoidance
b. Best path calculation
i. Least number of as-path in an update is preferable
ii. Can apply in IN and OUT direction.
c. router will define that path as best which is providing destination
network after crossing less number of AS
d. AS-path list can have maximum 64AS’s.
6) Origin code
a. i = if we are advertising route in bgp with network command.
b. E= if any route advertised in EGP
c. ? = if we redistributed anything in BGP by default origin code will be
'?'
d. i>E>?
8) external>internal
a. If any prefix coming from two different nbr’s one is ebgp (20) and
one is ibgp (200) than it will preferred external first.
a. If igp configured background of bgp then bgp can use igp cost to
reach next-hop address.
b. lower cost will be preferred
In case of DSCP
o 000 (cs)class selector 000(Drop probability) 00(ECN)
2) Assured forwarding
a. These values are used to increase number of queues. These AF values are combination
of c s value & drop probability
b. IT defines four classes of queuing purpose and three levels of drop probability for each
queue.
c. AF value
i. Syntax = AFxy
1. X= CS value
2. Y=Drop probability
3) Expedited Forwarding
a. EF is always preferred over all AF value
b. The DSCP value of EF with decimal value 56, binary 1011100.
4) Ethernet Header
They can only marked if dot1q and ISL header is present it means only on trunk port
First 3 bit COS in dot1q header are called user priority bits .
5) Wan marking
a. MPLS
b. Tunnel
Which model is used to implement qos in network
o Best effort delivery
o Integrated server model
▪ RSVP ( resource reservation protocol)
R2(config)#ip access-list extended 101
R2(config-ext-nacl)#permit tcp host 1.1.1.1 host 4.4.4.4 eq 22
R2(config-ext-nacl)#exit
R2(config)#class-map ssh
R2(config-cmap)#match access-group 101
R2(config-cmap)#exit
R2(config)#policy-map ccnq
R2(config-pmap)#class ssh
R2(config-pmap-c)#set ip precedence 3
R2(config-pmap)#class HTTP
R2(config-pmap-c)#set dscp ef
R2(config-pmap-c)#exit
R2(config)#int fa1/0
R2(config-if)#service-policy output ccnq
R2(config-if)#exit
ip ssh source-interface lo1
Multicasting
• Multicast
o One too many
o In which one device is sending data and a specific group of device receive the data
o Class D = 224.0.0.0 – 239.255.255.255
o 01-00-5E-00-00-00
o A multicast ip address cannot be used a source of an ip packet.
Configuration
• R1(config)#ip multicast-routing
• R1(config)#int range fa0/0 , fa1/0
• R1(config-if-range)#ip pim dense-mode
• R1(config-if-range)#exit
• R2(config)#int range fa0/0 , fa1/0
• R2(config-if-range)#ip pim dense-mode
• R2(config-if-range)#exit
• R1#sh ip mroute
• R2(config)#do sh ip pim neighbour
• R1(config)#int fa0/0
• R1(config-if)#ip igmp version 1
• R1(config-if)#exit
• R4(config)#int fa0/0
• R4(config-if)#ip igmp join-group 234.1.1.1
NTP
1) NTP is stands for Network Time Protocol
2) It is a UDP Based Protocol
3) It use port number 123
4) It use transport IP base
5) It is use to synchronies time among all device
6) It works on server-client model
7) In which client sent request to server and ask for time and server reply time.
8) Stratum
a. 1 to 15
b. Only 15 hops you will
c. Small number is preferred.
9) Why we need NTP server?
a. In real time scenario we have many devices so it’s not possible to sync time/
configure time on every device that scenario we need NTP server.
10) How NTP servers work?
a. It works on the basis stratum preference value. An ntp client can be configured with
multiple NTP servers. The device will use only the NTP server with the lowest
stratum value.
11) What is poling Interval?
a. After 64 sec client again synchronies time with server is known as Poling Interval.
12) What is root dispersion?
a. That is the calculated error of the actual clock attached to the atomic clock.
13) What is NTP peer?
a. NTP peer mode is intended for configuration where a group of devices operate as
mutual backups of each other. IF one of the devices loses a reference source , the
time values can flow from the surviving peers to all the others
14) How time authorizes and server?
a. Server send digest in NTP server
b. Client have to verify digest
i. Digest = md5 + key
15) Sh clock
16) Sh ntp status
17) Ntp master 3
18) Sh ntp associations
19) Ntp server 1.1.1.1
20) Clock set
21) Ntp authenticate
22) Ntp authenticate –key 1 md5 cisco
23) Ntp trusted-key 1
24) Ntp server 12.1.1.1 key 1
SNMP
1) It stands for Simple network management Protocol
2) It is a udp based protocol
3) Use port number 161 , 162
4) Snmp is server which is used to monitor the network devices.
a. Network health , interface , cpu , memory , logs , interface
5) For snmp we can use an application that can run on any end system.
6) Network manager system (NMS)
a. This is a SNMP server who collect information from agent
b. It is a centralized device.
7) SNMP Agent
a. That device which send information to snmp server.
i. Router , switch , firewall
8) MIB
a. It stands for Management information base.
b. Its collected data which have multiple information
c. Each variable is used a number that help to understand object identifier
9) SNMP version 1
a. Get request
i. Whenever server is sending request to get some variable to agent.
ii. Port number 161 used by server and client is used 162
b. Get response
i. Client is sending response.
c. Set request
i. Server want to configure something on agent (hostname , vtp )
10) SNMP version 1
a. Variable counter is 32 bits.
b. Traps will have limited information
c. Snmp informs are not supported.
d. No authentication
e. Only traps (traps are encrypted)
11) SNMP version 2
a. No authentication
b. Informs are supported
c. variable counter is 64 bits
d. Traps and informs are encrypted.
Syslog
• Log message
o Those logs generate by a device
o It is udp based protocol use port number 512
o Interface , line protocol …etc
o By default log message are enable on console mode
o At remote access ( telnet/ssh) log are disable)
1) Time stamp
a. Date and Time
b. It’s time to define at which there was changed on device.
2) Facility (%)
a. Which type of change ( interface )
3) Severity level
a. 0 to 7
4) Mnemonic
a. What happened in a facility
5) Message string
a. It’s a complete message of the log
• R1#show logging
• How to store log message
o Store on device
▪ 4096 bytes
▪ We can increase this size.
▪ It can use more memory on device
o Remote device
• Logging console
• No logging console
o This command will disable log in device.
• No service timestamps
• Service sequence –number
o To add sequence with log
• Service timestamps log
• Sh logging history
• Logging buffered 7
• Logging buffered 8192*
• Logging console 7
• Logging host
• Logging trap 7
1) DATA Plane
a. Also known as user plane
b. Traffic transiting the router
2) Control Plane
a. Traffic initiated by the router
b. Traffic destined to the router
3) Management Plane
a. Management configuration and monitoring
b. telnet , ssh , tftp