Download Routing II

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

AppleTalk wikipedia , lookup

Deep packet inspection wikipedia , lookup

Multiprotocol Label Switching wikipedia , lookup

Distributed firewall wikipedia , lookup

Network tap wikipedia , lookup

Piggybacking (Internet access) wikipedia , lookup

Computer network wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Peering wikipedia , lookup

Airborne Networking wikipedia , lookup

Wake-on-LAN wikipedia , lookup

List of wireless community networks by region wikipedia , lookup

Routing wikipedia , lookup

Routing in delay-tolerant networking wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Transcript
Routing:
Part II
Outline
Algorithms
Scalability
Reading: Section 4.3
Spring 2008
CPE 0907422 Computer Networks
1
7
How to Make
Routing Scale
•
0
Netw ork
Host
14
(b)
1
0
(c)
use of a hierarchy of IP addresses
1
makes routing somewhat scalable
 router does not need to know about all hosts
16
Netw ork
Hierarchical versus Flat Addresses
–
•
(a)
24
Host
21
1
0
8
Netw ork
Host
Still
1.
2.
Too Many Networks (126 +16384 + 2,097,152 = 2,113,664 )
– Routing protocols do not scale to those kinds of numbers
Inefficient use of Hierarchical Address Space
 fore a minimal class C network with 2 hosts the efficiency is
2/255 = 0.78%
 for a minimal class B network with 256 hosts the efficiency is
256/65535 = 0.39%
Spring 2008
CPE 0907422 Computer Networks
2
Two Related Scaling Issues
• scalability of routing:
find ways to minimize number of network
numbers that get carried around in routing
protocols and stored in the routing tables
• address utilization :
making sure that IP address space does not get
consumed too quickly
Spring 2008
CPE 0907422 Computer Networks
3
The Routing Problem for the Internet
(1990 Structure)
NSFNET backbone
Stanford
ISU
BARRNET
regional
Berkeley
Westnet
regional
PARC
■■■
UNM
NCAR
MidNet
regional
UNL
KU
UA
•Tree-structured
•Provider networks built from a large number of point-to-point links that connect to routers
•End user site consists of physical networks connected by routers and bridges
•Each provider & end user network is likely to be an administratively independent entity
•Each provider’s network is usually a single autonomous system (AS): a network that is
administered independently of other ASs
Spring 2008
CPE 0907422 Computer Networks
4
The Internet Today
Large corporation
“Consumer”ISP
Peering
point
Backbone service provider
“Consumer”ISP
Large corporation
Peering
point
“Consumer”ISP
Small
corporation
• An interconnection of “backbone, Consumer ISP, and
site networks” connected to each other in arbitrary
ways
• Each group of providers interconnect with each other at
a single “peering point”
Spring 2008
CPE 0907422 Computer Networks
5
Subnetting
• Goal: reduce total number of network numbers that
are assigned
• use a single network number and allocate the IP
addresses with that network number to hosts
connected to several physical networks.
– Each physical network is referred to as subnet
– Subnets should be close to each other
At a distant point, subnets will all look like a single
network, having only one network number
A router selects one route to reach any of the subnets
Spring 2008
CPE 0907422 Computer Networks
6
Subnetting (cont)
• Adds another level to address/routing hierarchy: subnet
• Subnets visible only within site
• configure all the nodes on each subnet with a single
“subnet mask”
• Example:
Netw ork number
Host number
Class B address
111111111111111111111111
00000000
Subnet mask (255.255.255.0)
Netw ork number
Subnet ID
Host ID
Subnetted address
Spring 2008
CPE 0907422 Computer Networks
7
Subnetting (cont)
• Top 24 bits are now defined to be network number
– Lower 8 bits are the host number
– Since the top 16 bits identify the network in a class B address
 Can think of the address as having three parts:
 a network part, a subnet part, and a host part.
• We have divided what used to be
the host part into a subnet part
and a host part.
Netw ork number
Host number
Class B address
111111111111111111111111
• Subnet masks define
( variable ) partitions of
the host part of the IP address
00000000
Subnet mask (255.255.255.0)
Netw ork number
Subnet ID
Host ID
Subnetted address
Spring 2008
CPE 0907422 Computer Networks
8
Subnet Example
H1 is configured with an IP address of 128.96.34.15
and a subnet mask of 255.255.255.128
Subnet mask: 255.255.255.128
Subnet number: 128.96.34.0
The bitwise AND of these two numbers defines the
subnet number of H1 and of all other hosts on the
same subnet, 128.96.34.0
128.96.34.15
128.96.34.1
R1
H1
Subnet mask: 255.255.255.128
Subnet number: 128.96.34.128
128.96.34.130
128.96.34.139
128.96.34.129
H3
R2
10000000 01100000 00100010 00001111
11111111 11111111 11111111 10000000
10000000 01100000 00100010 00000000
H2
subnet number 128.96.34.0
128.96.33.1
128.96.33.14
Subnet mask: 255.255.255.0
Subnet number: 128.96.33.0
Note: external routers
know only of the class B
network 128.96
Spring 2008
CPE 0907422 Computer Networks
9
Subnet Example: cont. I
Subnet mask: 255.255.255.128
Subnet number: 128.96.34.0
128.96.34.15
128.96.34.1
R1
H1
Subnet mask: 255.255.255.128
Subnet number: 128.96.34.128
128.96.34.130
128.96.34.139
128.96.34.129
H3
R2
128.96.33.1
128.96.33.14
Subnet mask: 255.255.255.0
Subnet number: 128.96.33.0
Note: external routers
know only of the class B
network 128.96
Spring 2008
H2
H1wants to send a packet to a certain IP address
•Perform a bitwise AND between its own subnet
mask and the destination IP address
•Result equals the subnet number of the sending
host
Destination host is on the same subnet
•Subnet number of destination is different,
packet sent to default router (R1) to be
forwarded to another subnet
CPE 0907422 Computer Networks
10
Subnet Example: cont. II
Subnet mask: 255.255.255.128
Subnet number: 128.96.34.0
128.96.34.15
128.96.34.1
R1
H1
Subnet mask: 255.255.255.128
Subnet number: 128.96.34.128
128.96.34.130
128.96.34.139
128.96.34.129
H3
R2
128.96.33.1
H2
A datagram from H1 being sent to H2
•R1 ANDs H2’s address (128.96.34.139)
with the subnet mask of the first entry
(255.255.255.128)
•result (128.96.34.128) is NOT subnet
number for that entry (128.96.34.0)
•R1 ANDs H2’s address with the subnet
mask of the next entry (255.255.255.128)
•result (128.96.34.128) is subnet
number for that entry
•R1 delivers the datagram to H2 using
interface 1
128.96.33.14
Subnet mask: 255.255.255.0
Subnet number: 128.96.33.0
Note: external routers
know only of the class B
network 128.96
Spring 2008
Forwarding table at router R1
Subnet Number
128.96.34.0
128.96.34.128
128.96.33.0
Subnet Mask
255.255.255.128
255.255.255.128
255.255.255.0
CPE 0907422 Computer Networks
Next Hop
interface 0
interface 1
R2
11
Forwarding Algorithm
D = destination IP address
for each entry (SubnetNum, SubnetMask, NextHop)
D1 = SubnetMask & D
if D1 = SubnetNum
if NextHop is an interface
deliver datagram directly to D
else
deliver datagram to NextHop
• Use a default router if nothing matches
• Not necessary for all 1s in subnet mask to be contiguous
• Can put multiple subnets on one physical network
– forces hosts on the same network to talk to each other
through a router
Spring 2008
CPE 0907422 Computer Networks
12
Subnetting Summary
helps solve scalability problems in two ways
1. improves address assignment efficiency
 do not use up an entire class C or class B address
every time a new physical network is added
 new physical network is a new subnet
2. aggregate information
 a complex collection of physical networks looks like a
single network
 amount of information routers need to store is reduced
Spring 2008
CPE 0907422 Computer Networks
13
Still: Two Scaling Concerns
• growth of backbone routing tables
• address assignment inefficiency:
address space exhausted
32-bit IP
– subnetting can not solve the problem of requesting class
B addresses for a network with a little more than 255
hosts
– class A, B, and C addresses, force hand out of network
address space in fixed-sized chunks of three very
different sizes (16,777,216 ; 65,534 ; 254 )
Spring 2008
CPE 0907422 Computer Networks
14
A Solution for Requests of Class B Network Address
• Exhaustion of the IP address space centers on
exhaustion of the class B network numbers
• A request of a class B address is granted only if the
need is close to 64K addresses
• A number of class C addresses is given to cover
smaller expected number of hosts
– More accurately match the amount of address space
consumed to the size of requesting autonomous system,
AS
– For any AS with at least 256 hosts, address utilization of
at least 50%
– Typically utilization is much more than 50%
Spring 2008
CPE 0907422 Computer Networks
15
Drawback of Proposed Solution:
Excessive Storage Requirements at Routers
• Example: AS has 16 class C network numbers
assigned
• Every Internet backbone router needs 16 entries
for that AS.
– Path to every one of those networks is the same
– If a class B address was assigned, the same routing
information could be stored in one table entry
However address assignment efficiency would be
16 x 255/65,536 = 6.2%
Spring 2008
CPE 0907422 Computer Networks
16
Supernetting CIDR: Classless Inter-Domain Routing
• Example: Autonomous System (AS) with 16 class C
network numbers
– assign a block, (24), of contiguous class C network numbers
192.4.16 to 192.4.31
– leftmost 20 bits of all addresses are (11000000 00000100
0001), remaining bits are (0000 – 1111)
leftmost 20-bit is the network # , 12-bits for host #
For this example, max # of hosts is 212
 # of hosts < # of hosts in a class B network, (216)
 # of hosts > # of hosts in a class C network, (28)
• CIDR assigns block of contiguous network numbers to nearby
networks
 hand out blocks of class C addresses that share a common prefix
 each block contains a number of class C networks that is a power of two
Spring 2008
CPE 0907422 Computer Networks
17
Improvements via Supernetting
• Higher address efficiency
– handing out addresses in chunks smaller than a class B
network
• Reducing growth of backbone routing tables
– a single network prefix can be used in forwarding tables
for a greater # of hosts
multiple network addresses that would be assigned
to a single AS collapse onto one CIDR network
address
Spring 2008
CPE 0907422 Computer Networks
18
Supernetting (cont.)
• All “concerned” routers must understand CIDR
addressing
• Network number may be of any length
– in a router, network #s are represented by (value/
length) pairs, where length gives number of bits in the
network prefix
Sample entries in a routing table (exercise 4.46, hex
numbers used):
 {C4.5E.2.0/ 23 ; next hop A }
 {C4.5E.C0.0/ 18 ; next hope C }
» Packet C4.5E.D1.02 forwarded to ?
» Packet C4.5E.03.87 forwarded to ??
Spring 2008
CPE 0907422 Computer Networks
19
Route Propagation
• Autonomous System or (Routing Domain)
– corresponds to an administrative domain
– examples: university, company, backbone network
• Smart propagation of routing information
– hosts know a local router
– local routers know site routers
– site routers know core routers, the routers that make up the backbone
of the Internet.
– core routers know everything
• Two-level route propagation hierarchy
– Interior routing protocol for intradomain (within domain) routing
 each AS selects its own protocol
– Exterior routing protocol for interdomain (between domains) routing
 Internet-wide standard protocol
Spring 2008
CPE 0907422 Computer Networks
20
Popular Interior Router (Gateway) Protocols:
Intradomain Routing
• RIP: Route Information Protocol (pp.269 – 277)
– distance-vector algorithm
– distributed with Unix
– based on hop-count
• OSPF: Open Shortest Path First (pp. 277 – 289)
–
–
–
–
Open: nonproprietary
uses link-state algorithm
recent Internet standard
supports load balancing
multiple routes to destination assigned the same cost
– supports authentication (of routing updates)
Spring 2008
CPE 0907422 Computer Networks
21
BGP-4, Border Gateway Protocol: Interdomain Routing (pp. 306 – 315)
• AS (domain) Types
– stub AS: has a single connection to one other AS
carries local traffic only
– multihomed AS: has connections to more than one AS
refuses to carry transit traffic
– transit AS: has connections to more than one AS
carries both transit and local traffic
• Each AS has:
– one or more border routers (gateways)
– one border router is designates as BGP speaker &
establishes BGP sessions to other BGP speakers in
other domains to advertise:
local networks
other reachable networks (transit AS only)
gives path information
Spring 2008
CPE 0907422 Computer Networks
22
BGP Example Advertisements
• Speakers for AS4 advertises local networks
• Speaker for “transit” AS2 advertises reachability to P
and Q
– network 128.96, 192.4.153, 192.4.32, and 192.4.3, can be reached
directly from AS2
Customer P
(AS 4)
128.96
192.4.153
Customer Q
(AS 5)
192.4.32
192.4.3
Customer R
(AS 6)
192.12.69
Customer S
(AS 7)
192.4.54
192.4.23
Regional provider A
(AS 2)
Backbone netw ork
(AS 1)
Regional provider B
(AS 3)
• Speaker for backbone advertises path information
– networks 128.96, 192.4.153, 192.4.32, and 192.4.3 can be reached
along the path (AS1, AS2)
• Speaker can cancel previously advertised paths
Spring 2008
CPE 0907422 Computer Networks
23
IP Version 6 (Section 4.3.5)
• Features
–
–
–
–
–
–
–
128-bit addresses (classless)
multicast
authentication and security
end-to-end fragmentation
autoconfiguration
real-time service
protocol extensions
• Header
– 40-byte “base” header
– extension headers (fixed order, mostly fixed length)
 fragmentation
 source routing
 authentication and security
 other options
Spring 2008
CPE 0907422 Computer Networks
24