Routing - PowerPoint PPT Presentation

About This Presentation
Title:

Routing

Description:

Routing Classless Inter-Domain Routing Classful addressing scheme wasteful IP address space exhaustion A class B net allocated enough for 65K hosts Even if only 2K ... – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 14
Provided by: zhen6
Learn more at: http://www.cs.fsu.edu
Category:
Tags: routing

less

Transcript and Presenter's Notes

Title: Routing


1
Routing
2
Classless Inter-Domain Routing
  • Classful addressing scheme wasteful
  • IP address space exhaustion
  • A class B net allocated enough for 65K hosts
  • Even if only 2K hosts in that network
  • Solution CIDR
  • Eliminate class distinction
  • No A,B,C
  • Keep multicast class D

3
Classless Addressing
  • Addresses allocated in blocks
  • Number of addresses assigned always power of 2,
    and always on the boundary. That is, if 2048
    addresses, it will start with some address with
    all lower 11 bits being 0.
  • Network portion of address is of arbitrary length
  • Address format a.b.c.d/x
  • x is number of bits in network portion of address

4
Allocating Addresses
  • Assume abundant addresses are available starting
    at 194.24.0.0.
  • Cambridge university needs 2048 addresses, it is
    given 194.24.0.0 to 194.24.7.255. Mask
    255.255.248.0.
  • Oxford need 4096 addresses. Because the
    requirement is that must be on the boundary, it
    is given 194.24.16.0 to 194.24.31.255. Mask
    255.255.240.0.
  • Edinburg needs 1024 addresses, is given
    194.24.8.0 to 194.24.11.255. Mask 255.255.252.0.

5
CIDR
  • A router keeps routing table with entries
  • IP address, 32-bit mask, outgoing line
  • When an IP packet arrives, the router checks its
    routing table to find the longest match.
  • Match means anding the IP address with the
    network address mask (111110000), and check if
    the result is the same as the network address.

6
CIDR
  • Example.
  • Cambridge 194.24.0.0/21 194.24.0.0 --
    194.24.7.255
  • Edinburgh 194.24.8.0/22 194.24.8.0 --
    194.24.11.255
  • (Available) 194.24.12.0/22 194.24.12.0 --
    194.24.15.255
  • Oxford 194.24.16.0/20 194.24.16.0
    -- 194.24.31.255
  • When a packet addressing to 194.24.17.4 arrives,
    where should it be sent to?
  • And with all masks, find one that matches the
    longest.

7
CIDR Entry aggregation
  • How does a router in Tallahassee route packet to
    C,E and O, assuming that he has only two outgoing
    links?
  • All to New York.
  • Can it reduce the size of his routing table?

C
E
N
O
H
T
8
CIDR Entry Aggregation
  • From 194.24.0.0 to 194.24.31.255, all to N.
  • So aggregate the three entries into one
    194.24.0.0/19.
  • The N router can do the same thing.

C
E
N
O
H
T
9
CIDR
  • If later the free address space 194.24.12.0/22
    194.24.12.0 -- 194.24.15.255 is assigned to
    Pittsburgh and has to go through Houston, what
    should the router at Tallahassee do?

C
E
N
P
O
H
T
10
CIDR
  • When a packet arrives addressing 194.24.15.8, the
    router checks the routing table and there will be
    two matches 194.24.12.0/22 and 194.24.0.0/19.
    Pick the longest match.

11
NAT Network Address Translation
  • IP address is a scarce resource.
  • So, give a company only one or a few IP addresses
    used by the gateway router.
  • Within the company, each machine has an unique IP
    address, chosen from
  • 10.0.0.0/8
  • 172.16.0.0/12
  • 192.168.0.0/16
  • These addresses can only appear within a company
    but never on the outside Internet

12
NAT
  • Whenever a machine wants to send a packet to the
    outside, the packet will be sent to the NAT box.
  • The NAT box will convert the internal IP address
    to the real IP address of the company, and pass
    the packet to the gateway router.
  • When there is a packet destined for an internal
    machine arrived at the router, what should the
    router and NAT box do?
  • For IP packets carrying TCP or UDP, use port
    number. Other protocols are much more
    complicated.

13
NAT
  • For IP packets carrying TCP or UDP, use port
    number.
  • When an outgoing packet arrives at the NAT box,
  • The IP address is replaced
  • The source port number is replaced
  • Header checksum is recomputed
  • When a reply came for this process, use the
    replaced source port number as index to find the
    correct IP address and original port number.
Write a Comment
User Comments (0)
About PowerShow.com