Top Banner
Class 4 Internet Protocols CSCI 6433 DAVID C. ROBERTS 1
62

Class 3 Internet Protocols

Feb 24, 2016

Download

Documents

menefer

Class 3 Internet Protocols. CSCI 6433 David C. Roberts. Agenda. Internet Protocol Routing Error and Control Messages. Internet protocol. Internet Services. Much of the Internet’s success is due to the robustness and adaptability of this architecture. Goals for IP. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Class 3 Internet Protocols

1

Class 4Internet ProtocolsCSCI 6433DAVID C. ROBERTS

Page 2: Class 3 Internet Protocols

2

Tonight The homework

A word about switches

Internet Protocol (IP)

Page 3: Class 3 Internet Protocols

3

A word about the homework

Page 4: Class 3 Internet Protocols

4

Typical Ethernet Configuration

Page 5: Class 3 Internet Protocols

5

Hub—Switch Differences

What they do

What a host sees

Setup

Page 6: Class 3 Internet Protocols

6

Bus Network Topology

Page 7: Class 3 Internet Protocols

7

Star Network Topology

Page 8: Class 3 Internet Protocols

8

Star-Bus Network Topology

Page 9: Class 3 Internet Protocols

9

The Problem

Page 10: Class 3 Internet Protocols

10

Mixed Network

Page 11: Class 3 Internet Protocols

11

How the Switch Works

Page 12: Class 3 Internet Protocols

12

CAM Table Switch has a content-addressable memory (CAM) table with a list of MAC addresses and port numbers on the switch

CAM table is built up by experience, allows selective forwarding instead of broadcast

What happens if the CAM table capacity is exceeded?

Page 13: Class 3 Internet Protocols

13

Agenda Internet Protocol Routing Error and Control Messages

Page 14: Class 3 Internet Protocols

14

Internet protocol

Page 15: Class 3 Internet Protocols

Internet Services

15

Much of the Internet’s success is due to the robustness and adaptability of this architecture.

Page 16: Class 3 Internet Protocols

16

Goals for IP Universally addressed—IP defines addressing mechanism for the network and uses these addresses for delivery

Independent of underlying protocol—IP is designed to operate over any lower-level protocol that will work with TCP/IP

Connectionless—operates without defined connections Unreliable—devices just send each datagram and then go on to the next one, don’t wait to check success

No acknowledgement—datagrams are delivered without a “thank you” note

Page 17: Class 3 Internet Protocols

17

Basic Functions of IP Addressing: mechanism for unique addressing across the entire Internet

Data Encapsulation and Packaging: accepts data from the transport layer protocols at a higher level, encapsulates them into an IP datagram, and passes them to the lower level for transmission

Fragmentation and reassembly: If the message exceeds maximum frame size, IP fragments it into multiple datagrams, and reassembles them at the destination. If a router along the communication path fragments a datagram, the same reassembly takes place at the destination.

Routing: sends a datagram to a distant network using routers

Page 18: Class 3 Internet Protocols

18

IP Operation

Page 19: Class 3 Internet Protocols

19

The Bigger Picture

Page 20: Class 3 Internet Protocols

20

Why Is IP Successful? It’s simple

Hardware, software to implement it are simple

Simplicity leads to low cost and high performance

Page 21: Class 3 Internet Protocols

21

IPv4 Datagram

Page 22: Class 3 Internet Protocols

22

IPv6 Header Format

Page 23: Class 3 Internet Protocols

23

IPv6 Base Header

Page 24: Class 3 Internet Protocols

Datagram Encapsulation

Datagram can be any length. Desirable for datagram to be carried in a single physical frame. Physical network does not know about datagram header.

24

Different physical networks have different frame sizes, so datagrams must sometimes be fragmented into frames. Routers must accept datagrams up to maximum MTU of the networks they connect to.

Page 25: Class 3 Internet Protocols

25

Page 26: Class 3 Internet Protocols

IPv4 Fragmentation

26

Fragmentation can occur at any router along the path taken by a datagram.

Fragment headers are like datagram header, except for flag that shows that it is a fragment.

Page 27: Class 3 Internet Protocols

27

IPv6 Fragmentation Source host required to find minimum MTU along path to the destination

Message is to be sent in datagrams that will fit into minimum MTU on path to the destination

Source host uses path MTU discovery (PMTUD) to find the MTU of the path to the destination

Fragmented IPv6 datagrams use a Fragment Extension Header

Page 28: Class 3 Internet Protocols

Datagram Reassembly Where are fragments reassembled?

◦ At the destination◦ When entering network with high enough MTU

Reassembled at destination◦ Avoids refragmentation and reassembly◦ Allows each to be separately routed

28

Page 29: Class 3 Internet Protocols

29

IP Forwarding

Page 30: Class 3 Internet Protocols

30

Hosts and Routers Forward

Page 31: Class 3 Internet Protocols

Direct, Indirect Delivery Direct delivery

◦ Transmission of a datagram between two machines on a single physical network

◦ Also the final step in indirect delivery

Indirect delivery◦ Transmission of a datagram between two machines that

are not connected to the same network ◦ Sender chooses router, sends datagram to it◦ Router extracts datagram from message, encapsulates it

and sends it to another router

31

Page 32: Class 3 Internet Protocols

32

Direct Delivery Sender encapsulates the datagram in a physical frame

Next-hop address is bound to destination machine’s physical hardware address

Resulting frame is sent directly to the destination machine

Question: How does the sending machine know whether to use direct delivery?

Page 33: Class 3 Internet Protocols

33

Indirect Delivery Sending host encapsulates datagram in a frame and sends to the nearest router

Router software extracts the encapsulated datagram and IP software selects the next router to receive it (or uses direct delivery)

Datagram is placed into a frame and sent over the second physical network to the next router

This continues until a router is reached that can use direct delivery

Page 34: Class 3 Internet Protocols

34

IP Operation

Page 35: Class 3 Internet Protocols

Table-Driven Forwarding Hosts and routers have IP forwarding tables Forwarding table gives “next hop”—where to send a datagram as its next step toward its destination

Size of forwarding table is an issue◦ Can’t have information about all possible hosts◦ IP forwarding is done on a network basis◦ Default next hop is used for networks not listed in routing

table Host-specific routes are useful for some situations

35

Page 36: Class 3 Internet Protocols

36

Next-Hop Forwarding Next-hop forwarding helps to keep forwarding tables small

Forwarding tables tend to have nearby networks

Forwarding table is a set of pairs (N,R)◦ N is network prefix for an Internet network◦ R is the IP address of the “next hop” router to reach N◦ Each R is a router that is reachable across a single network

Page 37: Class 3 Internet Protocols

37

Page 38: Class 3 Internet Protocols

Processing Incoming Datagrams Hosts discard datagrams not intended for them; but routers must forward them

First, if datagram is for an attached network, then it is sent on the attached network

If not, then TTL field is decremented; if it reaches zero, then datagram is discarded

Routing table is used to select outgoing network, net hop address

Datagram is sent to the next hop IP address

38

Page 39: Class 3 Internet Protocols

39

Default Routes IP forwarding software first looks for the destination network in its forward table

If not found, then the default next-hop address is used

Useful if many networks are reached through a single router

Page 40: Class 3 Internet Protocols

40

Broadcast and Multicast Forwarding becomes more complex when broadcast and multicast are included

These will be covered later

Page 41: Class 3 Internet Protocols

41

Establishing Forwarding Tables

IP forwarding relies on correct information in forwarding tables

These must be correct across the entire Internet

Their maintenance is a significant job

To be discussed later

Page 42: Class 3 Internet Protocols

Summary Routing is the method used to forward IP datagrams

Choice of where to send datagram is based on destination network address

Routing algorithm chooses next hop for a datagram

With few exceptions, routing is based on destination address only

42

Page 43: Class 3 Internet Protocols

43

Error and control messages (ICMP)

Page 44: Class 3 Internet Protocols

44

Question Suppose a router can’t contact the next hop router to forward a datagram

What should that router do?

Should it contact the router that sent it the datagram?

Page 45: Class 3 Internet Protocols

Internet Control Message Protocol Initial purpose of ICMP was to allow routers to report the cause of delivery errors to hosts

Any machine can send an ICMP message to any other machine, although some ICMP messages are sent only by routers

ICMP is used to report problems to the source of the datagram

Router finding an error cannot report the error to other routers that have processed the datagram

45

Page 46: Class 3 Internet Protocols

46

Error Reporting, Error Correction

ICMP is an error reporting mechanism

Error correction is the job of machine receiving the message

Source may refer datagram back to the originating application or take other action

Page 47: Class 3 Internet Protocols

ICMP Message Encapsulation

ICMP messages are encapsulated inside a datagram, travel the same way as every other datagram.

47

Question: Can an IP datagram carrying an ICMP message, if it causes an error, cause another IP datagram to be sent with an ICMP message about the first ICMP message?

Page 48: Class 3 Internet Protocols

ICMP Message Types 0 Echo Reply 3 Destination Unreachable 4 Source Quench 5 Redirect 8 Echo Request 9 Router Advertisement 10 Router Solicitation 11 Datagram Time Exceeded

48

12 Datagram Parameter Problem

13 Timestamp Request 14 Timestamp Reply 15 Information Request 16 Information Reply 17 Address Mask Request 18 Address Mask Reply

Obsolete—formerly used by host to find router address, now

replaced by RARP and DHCP

Page 49: Class 3 Internet Protocols

49

ICMPv4 Message Types

Page 50: Class 3 Internet Protocols

50

ICMPv6 Message Types

Page 51: Class 3 Internet Protocols

Ping Echo Request and Echo Reply

◦ Host sends ICMP echo request◦ Recipient sends ICMP echo reply to original sender

Verifies that major pieces of transport system are working◦ Host must route the datagram◦ Routers must operate, route the datagram◦ Destination machine must respond, its ICMP, IP software

must be working

ICMP Echo Request command is often called Ping

51

Page 52: Class 3 Internet Protocols

Echo Request and Reply Message Format

Sender uses IDENTIFIER and SEQ NUMBER to match replies to requests

52

Echo reply sends back the data included in the request

Page 53: Class 3 Internet Protocols

Destination Unreachable (3)

When router can’t forward or deliver an IP datagram, it sends destination unreachable message back to original source and drops the datagram

53

CODE field further describes the problem, such as network or host unreachable, destination host or network unknown, fragmentation needed and DF set

Page 54: Class 3 Internet Protocols

Congestion and Flow Control

Congestion—router is overrun with traffic. Router enqueues messages that can’t be processed in memory. If high traffic continues, memory can be exhausted.

Sources of congestion:◦ Many computers send datagrams through one router◦ High-speed computer sends many datagrams through a router

connected to its network

Datagrams can be enqueued in memory temporarily If memory is exhausted, then datagrams are discarded and Source Quench messages are sent

54

Page 55: Class 3 Internet Protocols

Source Quench Source quench is a request for the source to slow rate of datagram transmission. Usually router sends one message for every datagram that is discarded

55

Source can identify the datagram that was lost by using the datagram prefix

Page 56: Class 3 Internet Protocols

Circular Routes Time exceeded message says that hop count has reached zero, or message has timed out on arrival of fragments of a datagram.

56

Page 57: Class 3 Internet Protocols

Parameter Problem Incorrect datagram header prevents delivery, and datagram must be discarded

57

Page 58: Class 3 Internet Protocols

Clock Synchronization First machine asks for timestamp, second machine sends current time of day

58

Times in milliseconds since midnight, UT. Originate timestamp at time request was sent; receive is time of receipt of request, transmit time of transmission of reply.

Page 59: Class 3 Internet Protocols

Subnet Mask Subnet address mask specifies which part of IP address contains the network ID and which contains the host ID

59

Page 60: Class 3 Internet Protocols

Router Advertisement ICMP provides a method for a host to discover a router address dynamically, when router advertises its addresses; typically sent every ten minutes

60

Other methods are available (BOOTP, DHCP) that depend on database set up by network administrator.

Page 61: Class 3 Internet Protocols

Router Solicitation New host can’t wait 10 minutes to find a router! Solicitation allows host to request immediate advertisement.

61

Message is sent to all-routers multicast (24.0.0.2), if supported. Otherwise, send to limited broadcast address (i.e., all 1’s for hostid). In response, router sends normal router advertisement.

Page 62: Class 3 Internet Protocols

62

Summary Datagram Delivery (Internet Protocol)

Routing

ICMP