The Tablet Technology: Practical & Theoretical Applications

advertisement
Routing Protocols and
CIDR
BSAD 146
Dave Novak
Sources: Network+ Guide to Networks,
Dean 2013
Outline


Routing

Static and Dynamic routing

Routing Protocols

EGPs

IGPs
CIDR
Last time we discussed
IPv4 address space review
 Subnetting conceptual review
 Subnetting example

Internet Routing (review)

On a small internetwork the job of a router is
simply to forward packets destined for
remote network off of the home network


Separate local traffic from remote traffic
On larger, more complex internetworks,
routers consider different performance
metrics and select the “best” or most efficient
route from source to destination

Often measured by fewest hops (based on
graph theory)
Internet Routing (review)

Routers contain information about the
devices and traffic conditions (congestion,
etc.) on the network they are attached to

Routers contain at least some information
about other routers that they can directly
reach

The amount of information routers share with
other routers depends on many things
including configuration, security protocols or
methods, and routing protocols that are used
Routing Tables (review)

All TCP/IP devices have some type of
routing table

A table to determine where to send packets

MAC address mapped to IP address

Systems store local address mappings and
can usually transmit local packets directly to
the receiving system

Systems typically use a default address (the IP
address of a router) for non local transmission
Routing Tables

You can go to the command prompt on your
computer and type in “netstat –r”
Internet Routing

Routers populate their routing tables with
destination IP addresses and best route info

Two broad categories of routing
• 1) Static – routes that do not change
• Tables created for fixed routes or reference to only one or
two routers, which are always used
• 2) Dynamic – system changes routing table
information over time
• Router uses routing protocols to exchange information
with routers around it to learn optimal routes to different
destinations
Static Routing

Commonly used on many personal devices

At least part of route is fixed and does not
change


Useful on small internetworks


Think of hard coding a specific value versus
using variables than can change values
Doesn’t scale
No information available for any networks
the router is not directly attached to
Dynamic Routing

Indirectly collects information on networks
the router is not directly attached to
through communication with other routers

Routing information is continually updated
based on changing conditions

Used on most routers

Reduce management workload

Required on Internet or large internetwork

Scalable
Routing in the Internet

If routing propagation software required
routers to exchange information directly
with all other routers there would be scaling
problems
Routing in the Internet

Scalability is addressed using a two-level
hierarchy

Networks and routers are partitioned into
groups
• Within groups, routers exchange information
using routing propagation software
• One (or a couple) member of each group
summarize information from within the group
and pass that information to other groups
Autonomous System (AS)
Concept

Routing groups are created based on AS
concept

One central authority in charge of a
contiguous set of routers and networks

Can be made for economic, technical, and
or administrative reasons
• University
• Corporation
• ISP
Routing Protocols

Divided into two categories

1) Routers within AS use Interior Gateway
Protocol (IGP) to exchange routing information
between them
• Several different IGPs available
• Each AS chooses its own IGP
Routing Protocols

2) Router designated to communicate with other
AS’s use Exterior Gateway Protocol (EGP) to
exchange routing information with a designated
router in another AS
• EGP summarizes information from the AS before passing
that information to another AS
Routing Protocols
Optimal Routes

No universal agreement about which path
is optimal

In dynamic environments like the Internet,
what is optimal may change - frequently

Different applications have different needs
• Interactive login – path with least delay
• Large graphics – path with max throughput
• Real time audio – path with min variance in
delay

Routing metric
Routing Metrics - examples

Hop count

Hop corresponds to an intermediate
network (router)
• Number of intermediate destinations between
point of origin and final destination

Administrative cost

Assigned manually to control which path
can be used
• Maybe administration doesn’t want traffic to
traverse a certain route as a 1st choice
Routing in EGP

Border Gateway Protocol (BGP) is most
popular EGP routing protocol used to pass
information between different AS
Routing in EGP

BGP possesses following properties:

Routing among autonomous systems
• Routes are given as paths of AS

Provision for policies
• Allows sender and receiver to enforce policies

Facilities for transit routing
• Distinguish between AS that will pass information on
and those that won’t

Reliable transport
• Uses TCP
Routing in IGP

Interior Gateway Protocol (IGP): different
protocols are commonly used to pass
information within a particular AS

1) Routing Information Protocol (RIPv2)

2) Open Shortest Path First (OSPF)

3) Enhanced Interior Gateway Routing
Protocol (EIGRP)
Open Shortest Path First
(OSPF)

Most widely used IGP in enterprise networks

Adjacent routers periodically probe each other


Broadcast link-status message

Compute shortest path
Can subdivide AS into logical areas

The AS imposes a hierarchy within the AS

Scales to handle more routers

Limits broadcast to specific area
Open Shortest Path First
(OSPF)

Uses link-state routing

Measures properties of links (like bandwidth)

Able to update routing tables more quickly

Load balancing by splitting traffic between
routes with equal metrics

Less network traffic
Routing algorithm
Routing protocols
Subnet Support
Distance Vector Routing
RIP, IGRP
Only classful routing
Table Creation
Only Routing Table
Updating
Updating based on
Updated content
Memory Needs
Configuration
Hierarchical
Structure
On Broadcast
Rumor
Whole routing table
Less
Simple
No
Link State Routing
OSPF
Classfull, Classless, VLSM,
Summarization
Routing Table, Neighbor Table and
Topology Table
On multicast
Based on topology table
Only changed information
High
Advanced
Yes
Classless Inter-domain
Routing (CIDR)

A more flexible way to reference and
allocate the limited address space used in
standard IPv4

Also referred to as supernetting

Combining two or more subnetworks with a
common CIDR prefix for routing purposes

A hierarchical allocation of address space
that allows large ISPs to control segments of
address space
Classless Inter-domain
Routing (CIDR)

CIDR is an alternative to traditional
subnetting

Review:

Subnetting allows for logical partitioning of
class-based IP addresses into separate
groups

Requires the use of a subnet mask
Subnetting IPv4 (review)

Subnetting extends the network address by
using a subnet mask to create additional
organizational hierarchies within each IPv4
class
Subnetting IPv4 (review)


Assume a standard class C IPv4 address
space

24 bits in the prefix (the network address)

8 bits in the suffix (the hosts on that network)
Subnetting allows 1, 2, 3, or 4 bits from the
suffix to be “moved” to the prefix

Example: “moving” 1 bit from suffix to prefix
creates two separate logical networks with
128 hosts / subnet
Subnetting IPv4 (review)

Example: “moving” 2 bits from suffix to prefix
creates four separate logical networks with
64 hosts / subnet

Example: “moving” 3 bits from suffix to prefix
creates eight separate logical networks with
32 hosts / subnet
Classless Inter-domain
Routing (CIDR)

CIDR allows IP addresses to be organized
into logical networks in a manner that is
relatively independent of the value of the IP
addresses


Allows flexibility in defining logical networks
as well as in creating “routing groups” of
addresess
Can “recombine” or group separate subnets
for routing purposes
Classless Inter-domain
Routing (CIDR)

Can effectively aggregate the routes in
individual routing table entries from smaller
networks


This GREATLY reduces routing table entries
Requires the use of routing protocols that
support CIDR including: EIGRP, RIP-v2,
OSPF, and BGP
Classless Inter-domain
Routing (CIDR)
“A company that operates 150 accounting services in
each of 50 districts has a router in each office connected
with a frame relay link to its corporate headquarters.
Without supernetting, the routing table on any given
router might have to account for 150 routers in each of
the 50 districts, or 7500 different networks. However, if a
hierarchical addressing system is implemented with
supernetting, then each district has a centralized site as
interconnection point. Each route is summarized before
being advertised to other districts. Each router now only
recognizes its own subnet and the other 49 summarized
routes.” (Source: example is DIRECTLY from http://en.wikipedia.org/wiki/Supernet)
CIDR prefix Dotted Decimal
length
Netmask
Hexidecimal
Netmask
Inverse
Netmask
Binary
Number of Classfull
Networks
Number of
Usable IPs
/1
128.0.0.0
80 00 00 00
127.255.255.255
1000 0000 0000 0000 0000 0000 0000 0000
128 As
2,147,483,646
/2
192.0.0.0
C0 00 00 00
63.255.255.255
1100 0000 0000 0000 0000 0000 0000 0000
64 As
1,073,741,822
/3
224.0.0.0
E0 00 00 00
31.255.255.255
1110 0000 0000 0000 0000 0000 0000 0000
32 As
536,870,910
/4
240.0.0.0
F0 00 00 00
15.255.255.255
1111 0000 0000 0000 0000 0000 0000 0000
16 As
268,435,454
/5
248.0.0.0
F8 00 00 00
7.255.255.255
1111 1000 0000 0000 0000 0000 0000 0000
8 As
134,217,726
/6
252.0.0.0
FC 00 00 00
3.255.255.255
1111 1100 0000 0000 0000 0000 0000 0000
4 As
67,108,862
/7
254.0.0.0
FE 00 00 00
1.255.255.255
1111 1110 0000 0000 0000 0000 0000 0000
2 As
33,554,430
/8
255.0.0.0
FF 00 00 00
0.255.255.255
1111 1111 0000 0000 0000 0000 0000 0000
1 A or 256 Bs
16,777,214
/9
255.128.0.0
FF 80 00 00
0.127.255.255
1111 1111 1000 0000 0000 0000 0000 0000
128 Bs
8,388,606
/10
255.192.0.0
FF C0 00 00
0.63.255.255
1111 1111 1100 0000 0000 0000 0000 0000
64 Bs
4,194,302
/11
255.224.0.0
FF E0 00 00
0.31.255.255
1111 1111 1110 0000 0000 0000 0000 0000
32 Bs
2,097,150
/12
255.240.0.0
FF F0 00 00
0.15.255.255
1111 1111 1111 0000 0000 0000 0000 0000
16 Bs
1,048,574
/13
255.248.0.0
FF F8 00 00
0.7.255.255
1111 1111 1111 1000 0000 0000 0000 0000
8 Bs
524,286
/14
255.252.0.0
FF FC 00 00
0.3.255.255
1111 1111 1111 1100 0000 0000 0000 0000
4 Bs
262,142
/15
255.254.0.0
FF FE 00 00
0.1.255.255
1111 1111 1111 1110 0000 0000 0000 0000
2 Bs
131,070
/16
255.255.0.0
FF FF 00 00
0.0.255.255
1111 1111 1111 1111 0000 0000 0000 0000
1 B or 256 Cs
65,534
/17
255.255.128.0
FF FF 80 00
0.0.127.255
1111 1111 1111 1111 1000 0000 0000 0000
128 Cs
32,766
/18
255.255.192.0
FF FF C0 00
0.0.63.255
1111 1111 1111 1111 1100 0000 0000 0000
64 Cs
16,382
/19
255.255.224.0
FF FF E0 00
0.0.31.255
1111 1111 1111 1111 1110 0000 0000 0000
32 Cs
8,190
/20
255.255.240.0
FF FF F0 00
0.0.15.255
1111 1111 1111 1111 1111 0000 0000 0000
16 Cs
4,094
/21
255.255.248.0
FF FF F8 00
0.0.7.255
1111 1111 1111 1111 1111 1000 0000 0000
8 Cs
2,046
/22
255.255.252.0
FF FF FC 00
0.0.3.255
1111 1111 1111 1111 1111 1100 0000 0000
4 Cs
1,022
/23
255.255.254.0
FF FF FE 00
0.0.1.255
1111 1111 1111 1111 1111 1110 0000 0000
2 Cs
510
/24
255.255.255.0
FF FF FF 00
0.0.0.255
1111 1111 1111 1111 1111 1111 0000 0000
1C
254
/25
255.255.255.128
FF FF FF 80
0.0.0.127
1111 1111 1111 1111 1111 1111 1000 0000
1/2 C
126
/26
255.255.255.192
FF FF FF C0
0.0.0.63
1111 1111 1111 1111 1111 1111 1100 0000
1/4 C
62
/27
255.255.255.224
FF FF FF E0
0.0.0.31
1111 1111 1111 1111 1111 1111 1110 0000
1/8 C
30
/28
255.255.255.240
FF FF FF F0
0.0.0.15
1111 1111 1111 1111 1111 1111 1111 0000
1/16 C
14
/29
255.255.255.248
FF FF FF F8
0.0.0.7
1111 1111 1111 1111 1111 1111 1111 1000
1/32 C
6
/30
255.255.255.252
FF FF FF FC
0.0.0.3
1111 1111 1111 1111 1111 1111 1111 1100
1/64 C
2
/31
255.255.255.254
FF FF FF FE
0.0.0.1
1111 1111 1111 1111 1111 1111 1111 1110
1/128 C
0
/32
255.255.255.255
FF FF FF FF
0.0.0.0
1111 1111 1111 1111 1111 1111 1111 1111
1/256 C
1
CIDR Notation example
Number of Usable
IPs
1111 1111 1111 1111 1111 1000 0000 0000
Number of
Classfull
Networks
8 Cs
0.0.252.0
1111 1111 1111 1111 1111 1100 0000 0000
4 Cs
1,022
/23
0.0.254.0
1111 1111 1111 1111 1111 1110 0000 0000
2 Cs
510
/24
0.0.0.255
1111 1111 1111 1111 1111 1111 0000 0000
1C
254
/25
0.0.0.127
1111 1111 1111 1111 1111 1111 1000 0000
1/2 C
126
/26
0.0.0.63
1111 1111 1111 1111 1111 1111 1100 0000
1/4 C
62
/27
0.0.0.31
1111 1111 1111 1111 1111 1111 1110 0000
1/8 C
30
/28
0.0.0.15
1111 1111 1111 1111 1111 1111 1111 0000
1/16 C
14
CIDR Prefix
Length
Dotted Decimal
Netmask
Binary
/21
0.0.248.0
/22
2,046
Source: CIDR conversion table, University of Wisconsin: https://kb.wisc.edu/ns/page.php?id=3493
CIDR Notation

xxx.xxx.xxx.xxx/n (n is # of (leftmost) ‘1’ bits in the
mask

IPv4 Class C address example

192.60.128.0/22 =
11111111.11111111.11111100.00000000
CIDR Notation

192.60.128.0/23 =
11111111.11111111.11111110.00000000
Classless Inter-domain
Routing (CIDR)

CIDR aggregation REQUIRES network
segments to contiguous or numerically
adjacent (cannot aggregate 192.168.20.0
and 192.168.23.0 unless 192.168.21.0 and
192.168.22.0 are also included in
192.168.20.20/22
Summary


Routing

Static and Dynamic routing

Routing Protocols

EGPs

IGPs
CIDR
Download