NDC Chapter 3
NDC Chapter 3
1
Chapter 3
Outlines
Introduction
Types of routing
How routing works
Routing Information Protocol (RIP)
Interior Gateway Routing Protocol (IGRP)
Network Addressing Scheme
Types of NAT
Overloading NAT with PAT (NAPT)
Introduction
Routing
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
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:
1. The wildcard mask of /26 is:
255.255.255.255 - 255.255.255.192 = 0.0.0.63
2. The wildcard mask of /19 is:
255.255.255.255 - 255.255.224.0 = 0.0.31.255
3. 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 class full 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)
Does not support variable length subnet mask (VLSM)
Use broadcast
Outdated
RIPv2
RIPv2 uses multicasts (only to neighbor routers configure with
RIPv2) and
RIPv2 supports triggered updates—when a change occurs, a
RIPv2 router will immediately propagate its routing information to
its connected neighbors.
RIPv2 is a classless protocol.
Supports VLSM
30 seconds.
Hold-down timer: Routes will enter into the hold-down state when an
Route invalid timer: the length of time that must elapse (180 seconds)
Route flush timer: the time between a route becoming invalid and its
RIPv1 RIPv2
router rip router rip
network Network_Address version 2
network Network_Address
less
RIPv1 Distance Vector IGP 120 Hop count Classful Bellman-Fold UDP/520
RIPv2 Distance Vector IGP 120 Hop count Classless Bellman-Fold UDP/520
ACLs are lists of conditions used to test network traffic that tries
to travel across a router interface. These lists tell the router what
types of packets to accept or deny.
The router examines each packet and will forward or
discard it based on the conditions specified in the ACL.
`
An ACL used to
filter traffic i.e. permit/deny traffic
Identify traffic i.e. include/exclude traffic
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] [wildcard mask] [operator [port]] [log]
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
Syntax: 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 Scheme
• IANA-Internet Assigned Numbers Authority
• RIR-Regional Internet Registry (5)
• ISP and End User Org.
45
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