NDC Chapter 3
NDC Chapter 3
NDC Chapter 3
ROUTING PROTOCOLS
CONFIGURATION
Introduction
Routing
Static Routing
Routing table is created maintained and updated
by Network Administrator
Does not use routing protocol
Dynamic Routing
Information in routing table is changed
dynamically by router itself using routing
protocols
Advantage and Disadvantages of
Static routing
Advantages
Minimal cpu/memory overhead-do not calculate best
path
No bandwidth overhead-updates are not shared
between routers
Adds security-granular control on how traffic is
routed
Disadvantage
Infrastructure changes must be manually adjusted
No “dynamic” fault tolerance-if a link goes down the
admin is responsible
Impractical in large networks
Configuration syntax
ip route [destination_network] [mask] [next-
hop_address or exit interface]
Default Route
When the router is unable to find a matching
address to the packets destination address in
its routing table, it forwards the packet to its
exit interface or next hop address configured
with a default route 0.0.0.0/0.
Syntax
ip route 0.0.0.0 0.0.0.0 [next-hop_address
or exit interface]
Dynamic Routing
Use routing protocol: software & routing algorithms
to determine best path and construct routing table
Routers dynamically learn destinations and how to
get them & advertize those destinations to other
routers (if they use the same routing protocol)
Advantages
Simpler to configure on large networks
Dynamically choose a different route if a link goes
down
Ability to load balance b/n multiple links
Disadvantage
Updates are shared b/n routers, thus consuming
bandwidth
Routing protocols put additional load on routers
CPU/RAM
Types of Dynamic routing
1. Distance Vector Routing Protocols (DVRP)
2. Link State Routing Protocol (LSRP)
Distance Vector Routing Protocol
find the best path to a remote network by judging
distance
route with the least number of hops to the network
is determined to be the best route.
They send the entire routing table to directly
connected neighbors.
key characteristics:
Periodic updates of the full routing table are sent to routing
neighbors. Example RIP (every 30 seconds),IGRP(every 90
seconds)
Distance-vector protocols suffer from slow convergence, and
are highly susceptible to loops.
Some form of distance is used to calculate a route’s metric.
The Bellman-Ford algorithm is used to determine the shortest
path.
Link State Routing Protocol
Called shortest-path-first protocols
each router create three separate tables
(utilize more RAM and CPU)
Neighbor table – contains a list of all neighbors, and the
interface each neighbor is connected. Neighbors are
formed by sending Hello packets.
Topology table – also known as the “link-state” table
contains a map of all links within an area, including each
link’s status.
Shortest-Path table – contains the best routes to each
particular destination (also known as the “routing” table”)
All routers within an area have identical topology
tables.
Examples are:
Intermediate System-to-Intermediate System (IS-IS) and
Open Shortest Path First (OSPF)
The state of a link changes, such as a router
interface failing, an advertisement containing only
this link-state change will be sent to all routers
within that area. Each router will adjust its topology
table accordingly, and will calculate a new best
route if required.
Because updates are sent only during a link-state
change, and contain only the change (and not the
full table), link-state protocols are less bandwidth
intensive than distance-vector protocols
Link-state protocols utilize some form of cost,
usually based on bandwidth, to calculate a route’s
metric.
The Dijkstra formula is used to determine the
shortest path.
Metric
is a value used by routing protocols to assign costs
to reach remote networks.
Each routing protocol uses its own metric. For
example, RIP uses hop count, EIGRP uses
bandwidth and delay, and OSPF uses bandwidth.
Wild Card Mask
A wildcard mask can be thought of as a subnet mask,
with ones and zeros inverted;
for example, a wildcard mask of 0.0.0.255
corresponds to a subnet mask of 255.255.255.0.
Used in OSPF,ACL to indicate the size of a network or
subnet and what IP addresses should be permitted or
denied respectively
To calculate wildcard mask
Simply subtract your mask from 255.255.255.255 to get
your wildcard mask.
Example:
The wildcard mask of /26 is:
255.255.255.255 - 255.255.255.192 = 0.0.0.63
The wildcard mask of /19 is:
255.255.255.255 - 255.255.224.0 = 0.0.31.255
The wildcard mask of /12 is:
255.255.255.255 - 255.240.0.0 = 0.15.255.255
Routing Information Protocol (RIP)
distance-vector, interior gateway protocol (IGP) used
by routers to exchange routing information
uses hop count to determine the best path
maximum allowable number of hops are 15 hops
Hop Count = routers and also Firewall that are Routers
router broadcasts (RIP v1) its entire RIP table to its
neighboring routers every 30 seconds
Administrative distance of 120
Suitable for small network
RIPv1
It is a classful protocol .Because it doesn’t send updates with
subnet mask information.
RIP supports up to six equal-cost paths to a single
destination and use them for load-balancing. (default four
paths)
Use broadcast
Outdated
RIPv2
RIPv2 uses multicasts (only to neighbor routers
MD5 Authentication
R1(config)#interface s1/0
RIPv1 RIPv2
router rip router rip
network Network_Address version 2
network Network_Address
RIPv1 Distance Vector IGP 120 Hop count Classful Bellman-Fold UDP/520
RIPv2 Distance Vector IGP 120 Hop count Classless Bellman-Fold UDP/520
Primary reasons
Limit network traffic and increase network
performance.
Provide traffic flow control. ACLs can restrict the
delivery of routing updates.
Provide a basic level of security for network access.
Decide which types of traffic are forwarded or
blocked at the router interfaces.
Like: e-mail traffic to be routed, but block all Telnet
traffic.
inbound and outbound
interfaces
S 0/0 OUT In S 0/1
Type of ACL’s
Standard ACLs
VTY ACLs
Extended ACLs
Named ACLs
Standard ACLs
Syntax:
access-list [1-99] [permit | deny] [source address] [wildcard mask] [log]
Example:
Block network 172.18.0.0 from accessing the
172.16.0.0 network
Router(config)# access-list 10 deny 172.18.0.0 0.0.255.255
Router(config)# access-list 10 permit any
To apply this access list, we would configure the following on Router A:
Router(config)# int fa4/0
Router(config-if)# ip access-group 10 out
Verifying ACLs on the router
– show ip interface
– show access-lists
– Show running-config
Extended ACL
Syntax:
access-list [100-199] [permit | deny] [protocol] [source
address] [wildcard mask] [destination address]
Example: block network 172.18.0.0 from
accessing anything on the 172.17.0.0
network, EXCEPT for the HTTP port on the web
server
RB(config)# access-list 101 permit tcp
172.18.0.0 0.0.255.255 host 172.17.0.10 eq 80
RB(config)# access-list 101 deny ip 172.18.0.0
0.0.255.255 172.17.0.0 0.0.0.3
RB(config)# access-list 101 permit ip any any
We could have identified the web server in one
of two ways:
RB(config)# access-list 101 permit tcp
172.18.0.0 0.0.255.255 host 172.17.0.10 eq 80
RB(config)# access-list 101 permit tcp
172.18.0.0 0.0.255.255 172.17.0.10 0.0.0.0 eq
80
RB(config)# int fa1/0
RB(config-if)# ip access-group 101 in
Named ACL
Synatx: ip access-list {standard | extended} name
Apply a Named ACL to an interface in the same manner as
applying a Standard or Extended ACL.
Example:
RB(config)#ip access-list extended web-only
RB(config-ext-nacl)#permit tcp 172.18.0.0 0.0.255.255 host
172.17.0.10 eq 80
RB(config-ext-nacl)#deny ip 172.18.0.0 0.0.255.255
172.17.0.0 0.0.0.3
RB(config-ext-nacl)#permit ip any any
We could have identified the web server in one of two ways:
RB(config-ext-nacl)# permit tcp 172.18.0.0 0.0.255.255 host
172.17.0.10 eq 80
RB(config-ext-nacl)# permit tcp 172.18.0.0 0.0.255.255
172.17.0.10 0.0.0.0 eq 80
RB(config)# int fa1/0
RB(config-if)# ip access-group web-only in
Network Addressing
• IANA-Internet Assigned Numbers Authority
Scheme
• RIR-Regional Internet Registry (5)
• ISP and End User Org.
NAT
Translates between local addresses and public ones
Many private hosts share few global addresses
43
Dynamic NAT Configuration
Specify the inside interface:
Router(config)#interface fast ethernet0/0
Router(config-if)# ip nat inside
Specify the outside interface:
Router(config)#interface serial0/0
Router(config-if)# ip nat outside
Define an Access List to permit the inside local
addresses to be translated:
Router(config)#access-list 1 permit 10.0.0.0
0.0.0.255
Define a pool of global addresses :
Router(config)# ip nat pool DNAT1 179.2.2.65
179.2.2.90 netmask 255.255.255.224
Enter dynamic translation entry :
Router(config)# ip nat inside source list 1 pool DNAT1
Overloading NAT with PAT (NAPT)
Overloading - A form of dynamic NAT that maps multiple
unregistered IP addresses to a single registered IP address by
using different ports. This is known also as PAT (Port Address
Translation), single address NAT or port-level multiplexed NAT.
each computer on the private network is translated to the
same IP address (213.18.123.100), but with a different port
number assignment..
PAT Configuration
Set the fast eth 0/0 and se2/0 interface as the inside and outside
interface:
R1# configure terminal
R1(config)# interface fastethernet0/0
R1(config-if)# ip nat inside
R1(config-if)# interface serial2/0
R1(config-if)# ip nat outside
allow the 192.168.0.0/24 network to reach any destination.
R1(config)# access-list 100 permit ip 192.168.0.0 0.0.0.255 any
enable NAT overload and bind it to the outside interface previously
selected:
R1(config)# ip nat inside source list 100 interface serial 2/0
overload
Tha
n k Yo
u!