fall 2006computer networks19-1 chapter 19. host-to-host delivery: internetworking, addressing, and...

43
Fall 2006 Computer Networks 19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internet works 19.2 Addressi ng 19.3 Routing

Upload: irma-wright

Post on 15-Jan-2016

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-1

Chapter 19. Host-to-Host Delivery:

Internetworking, Addressing, and Routing

19.1 Internetworks

19.2 Addressing

19.3 Routing

Page 2: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-2

Position of network layer

• The network layer is responsible for host-to-host delivery

Page 3: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-3

Network layer duties

• Other issues– Address resolution– Multicasting– Routing protocols

Page 4: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-4

Internetwork

• Data exchange between networks: internetwork

Page 5: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-5

Links in an internetwork

• Frame in data link layer does not carry any routing information

• Problem: How does S1 know that data should be sent out from interface f3 ?

Page 6: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-6

Network layer in an internetwork

• Network layer is responsible for host-to-host delivery and for routing the packets

Page 7: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-7

Network layer at the source

• Responsible for creating a packet that carries two universal addresses: destination and source addresses

Page 8: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-8

Network layer at a router

• Network layer at the switch or router is responsible for routing the packet.

Page 9: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-9

Network layer at the destination

• Responsible for address verification

Page 10: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-10

Switching

• Switching at the network layer in the Internet is done using the datagram approach to packet switching.

Page 11: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-11

Datagram approach

• Switching at the network layer in the Internet is done using the datagram approach to packet switching

• Advantages: no call setup and VC identifier

• Disadvantages: out of order

Page 12: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-12

Internet as a Connectionless Network

• Communication at the network layer in the Internet is connectionless

• Connection-oriented service: Virtual circuit approach to packet switching such as in Frame Relay and ATM

• Connectionless service: datagram approach

• In connectionless service, the network layer protocol treats each packet independently

• Why Internet has chosen connectionless ?– Internet is made of so many heterogeneous networks that is almost

impossible to create a connection from the source to the destination without knowing the nature of the networks in advance

Page 13: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-13

Addressing

• An IP address is a 32-bit address.

• The IP addresses are unique and universal.

• Dotted-decimal notation

Page 14: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-14

Example

• Change the following IP addresses from binary notation to dotted-decimal notation.

a. 10000001 00001011 00001011 11101111

b. 11111001 10011011 11111011 00001111

• We replace each group of 8 bits with its equivalent decimal number and add dots for separation:

a. 129.11.11.239

b. 249.155.251.15

Page 15: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-15

Classful addressing

• In classful addressing, the address space is divided into five classes: A, B, C, D, E

• A new architecture, called classless addressing was introduced in the mid-1990s

Page 16: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-16

Finding the address class

Page 17: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-17

Class in decimal notation

Page 18: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-18

Example

• Find the class of each address:

a. 227.12.14.87

b. 252.5.15.111

c. 134.11.78.56

a. The first byte is 227 (between 224 and 239); the class is D.

b. The first byte is 252 (between 240 and 255); the class is E.

c. The first byte is 134 (between 128 and 191); the class is B.

Page 19: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-19

Netid and hostid

• IP address in classes A, B, and C is divided into netid and hostid

Page 20: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-20

Class and Blocks• Problem in classful addressing is that each class is divided into a fixed number of bl

ocks with each block having a fixed size• Millions of class A addresses are wasted.

Page 21: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-21

Blocks in class B

• Many class B addresses are wasted.

Page 22: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-22

Blocks in class C

• The number of addresses in class C is smaller than the needs of most organizations.

Page 23: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-23

Network address

• In classful addressing, the network address is the one that is assigned to the organization.• A network address is different from a netid. A network address has both netid and hostid,

with 0s for the hostid.

Page 24: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-24

Sample Internet with classful addresses

Page 25: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-25

Subnetting (two levels of hierarchy)

• IP addresses are designed with two levels of hierarchy.

Page 26: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-26

Subnetting (three levels)

• A network is divided into several smaller groups with each subnetwork having its own subnetwork address

Page 27: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-27

Addresses in a network with and without subnetting

• Hierarchy concept in a telephone number

Page 28: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-28

Mask

• The network address can be found by applying the default mask to any address in the block (including itself).

• It retains the netid of the block and sets the hostid to 0s.

Class In Binary In Dotted-Decimal Using Slash

A11111111 00000000 00000000 00000000 255.0.0.0 /8

B11111111 11111111 00000000 00000000 255.255.0.0 /16

C 11111111 111111111 11111111 00000000 255.255.255.0 /24

Page 29: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-29

Subnet mask

• Combine serveral class C blocks to create a larger range of addresses

Supernetting

Page 30: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-30

Classless addressing

• Classful addressing has created many problems

• Many ISPs and service users need more addresses

• Idea is to have variable-length blocks that belong to no class

• CIDR (Classless InterDomain Routing) for classless addressing, instead of classful routing

• DHCP (Dynamic Host Configuration Protocol) for dynamic addressing– DHCP provides the following information dynamically (on demand)– IP address, subnet mask, IP address of a router, IP address of a name server

Page 31: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-31

DHCP• Client-server program• DHCP server has two databases, one binds statically physical addresses to IP addresses and

another makes DHCP dynamic by assigning available (unused) IP addresses for a negotiable period of time

Page 32: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-32

Network Address Translation: NAT

• NAT enables a user to have a large set of addresses internally and one address, or a small set of addresses, externally.

Range Total

10.0.0.0 to 10.255.255.255 224

172.16.0.0 to 172.31.255.255 220

192.168.0.0 to 192.168.255.255 216

Addresses for private networks

Page 33: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-33

Address translation

• Address translation for source address of outgoing packet and for destination address of incoming packet

Page 34: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-34

Translation table

• Using (1) one IP address, (2) a pool of IP address, and (3) both IP addresses and port numbers

Page 35: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-35

Five-column translation table

Private Address

Private Port

ExternalAddress

External Port

TransportProtocol

172.18.3.1 1400 25.8.3.2 80 TCP

172.18.3.2 1401 25.8.3.2 80 TCP

... ... ... ... ...

Page 36: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-36

Routing Techniques

• Routing requires a host or router to have a routing table

• When a router receives a packet to be forwarded, it looks at the routing table to find the route to the final destination

• Several techniques can make the size of the routing table manageable and handle issues such as security– Next-Hop Routing– Network-Specific Routing– Host-Specific Routing– Default Routing

Page 37: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-37

Next-hop routing

• To reduce the contents of a routing table• Routing table holds only the information that leads to the next hop instead of

holding information about the complete route

Page 38: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-38

Network-specific routing

• To reduce the routing table and simplify the searching process

Page 39: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-39

Host-specific routing• Inverse of network-specific routing• Destination host address is given in the routing table• Not efficient, but administrator has greater control over routing

Page 40: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-40

Default routing

• Another technique to simplify routing

Page 41: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-41

Static versus dynamic routing

• Static routing table– Information entered manually– Small internet that does not change very often

• Dynamic routing table– Updated periodically using one of the dynamic routing protocols such

as RIP, OSPF, BGP– Update all the tables in the routers upon changes in Internet

Page 42: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-42

Routing table for classful addressing

• Routing table needs a minimum of four columns (it normally has more)• When a packet arrives, the router applies the mask to the destination address to find the corresponding

destination network address. If found, the packet is sent out from the corresponding interface in the table. If not found, the packet is delivered to the default interface.

Page 43: Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing

Fall 2006 Computer Networks 19-43

Routing table for classless addressing (CIDR)

• Routing table size can be increased or decreased• Decrease if the block of addresses assigned to an organization is larger than the blo

ck in classful addressing• Mostly increase because the intent of classless addressing is to divide up the blocks

of class A and class B addresses.

• To solve the problem of gigantic routing table– Hierarchical routing– Geographical routing– Routing table searching algorithms