44
1 Today’s Topics* ICMP DHCP Domain Naming DNS Byte ordering Based in part on slides by Paul D. Paulson.

Today’s Topics*

Embed Size (px)

DESCRIPTION

Today’s Topics*. ICMP DHCP Domain Naming DNS Byte ordering. * Based in part on slides by Paul D. Paulson. Error detection. IP provides best-effort delivery Internet layer can detect a variety of errors: Checksum TTL expires No route to destination network - PowerPoint PPT Presentation

Citation preview

Page 1: Today’s Topics*

1

Today’s Topics*

ICMP DHCP Domain Naming

DNS Byte ordering

* Based in part on slides by Paul D. Paulson.

Page 2: Today’s Topics*

2

Error detection

IP provides best-effort delivery Internet layer can detect a variety of errors:

Checksum TTL expires No route to destination network Can't deliver to destination host (e.g., no ARP reply)

Internet layer discards datagrams with certain types of problems

Page 3: Today’s Topics*

3

ICMP

Some types of errors can be detected and reported

Internet Control Message Protocol (ICMP) provides error-reporting mechanisms

Router sends control message back to source Encapsulated in IP datagram Contains coded information about the type of

problem

Page 4: Today’s Topics*

4

ICMP Header Example Type 3 Code 0 = net unreachable

1 = host unreachable2 = protocol unreachable3 = port unreachable4 = fragmentation needed and DF set5 = source route failed

Checksum the 16-bit one's complement of the one's complement

sum of the ICMP message starting with the ICMP Type. Original IP Header + 64 bits of Data Datagram

IP header is at least 20 bytes. Remainder is used by host to match message to

appropriate process.

Page 5: Today’s Topics*

5

ICMP message types

Page 6: Today’s Topics*

6

Types of messages

Internet Control Message Protocol (ICMP) defines 2 classes of messages error messages informational messages

Page 7: Today’s Topics*

7

Error message examples

Destination unreachable router sends when it determines that a datagram

cannot be delivered to its final destination

Fragmentation required Router sends when it determines datagram is too large

for outbound network

Time exceeded message is sent in two cases

1. router sends when the TTL is reduced to zero2. destination host sends when the reassembly timer

expires before all fragments arrive.

Page 8: Today’s Topics*

8

Informational messages

Echo request/reply Sent to ICMP software on any computer In response to a request, the ICMP software is required

to send an ICMP echo reply message.

Address mask request/reply Broadcast when a host boots Router replies with the mask used in that subnet

Router path MTU discovery Distributed path discovery

Page 9: Today’s Topics*

9

ICMP Applications

ping echo traceroute Discovery

path, MTU, etc. etc.

Page 10: Today’s Topics*

10

Reachability

An internet host, A, is reachable from another host, B, if datagrams can be delivered from A to B

ping program tests reachability - sends datagram from B to A and A echoes it back to B Uses ICMP “echo request” and “echo reply”

messages Internet layer includes code to reply to

incoming ICMP “echo request” messages • Does not have to go to application layer / port

Page 11: Today’s Topics*

11

traceroute

Uses UDP with TTL field set and sends to a non-existent port

Finds route via expanding ring search Sends ICMP “echo” messages with

increasing TTL Router that decrements TTL to 0 sends

ICMP “time exceeded” ICMP message, with router's address as source address

Page 12: Today’s Topics*

12

Expanding ring search

First datagram TTL = 1 gets to first router is discarded and ICMP “time exceeded” message

is returned Next datagram

TTL = 2 gets through first router to second router is discarded and ICMP “time exceeded” message

is returned Continue until message from destination

received

Page 13: Today’s Topics*

13

”Path MTU” discovery

Fragmentation should be avoided if possible

Source can determine path MTU - smallest MTU on path from source to destination Probes path using IP datagrams with don't

fragment flag set Router responds with ICMP “fragmentation

required” message Source sends smaller probes until destination

reached

Page 14: Today’s Topics*

14

Today’s Topics

ICMP DHCP Domain Naming

DNS Byte ordering

Page 15: Today’s Topics*

15

IP addresses: how to get one?

Q: How does a host get IP address?

hard-coded by system admin in a file Windows: control-panel->network->configuration-

>tcp/ip->properties UNIX: /etc/rc.config

DHCP: Dynamic Host Configuration Protocol: dynamically get address from as server “plug-and-play”

Page 16: Today’s Topics*

16

DHCP: Dynamic Host Configuration Protocol

Goal: allow host to dynamically obtain its IP address from network server when it joins networkCan renew its lease on address in useAllows reuse of addresses (only hold address while

connected an “on”)Support for mobile users who want to join network (more

shortly)

DHCP overview: host broadcasts “DHCP discover” msg DHCP server responds with “DHCP offer” msg host requests IP address: “DHCP request” msg DHCP server sends address: “DHCP ack” msg

Page 17: Today’s Topics*

17

DHCP client-server scenario

223.1.1.1

223.1.1.2

223.1.1.3

223.1.1.4 223.1.2.9

223.1.2.2

223.1.2.1

223.1.3.2223.1.3.1

223.1.3.27

A

BE

DHCP server

arriving DHCP client needsaddress in thisnetwork

Page 18: Today’s Topics*

18

DHCP client-server scenarioDHCP server: 223.1.2.5 arriving

client

time

DHCP discover

src : 0.0.0.0, 68 dest.: 255.255.255.255,67yiaddr: 0.0.0.0transaction ID: 654

DHCP offer

src: 223.1.2.5, 67 dest: 255.255.255.255, 68yiaddrr: 223.1.2.4transaction ID: 654Lifetime: 3600 secs

DHCP request

src: 0.0.0.0, 68 dest:: 255.255.255.255, 67yiaddrr: 223.1.2.4transaction ID: 655Lifetime: 3600 secs

DHCP ACK

src: 223.1.2.5, 67 dest: 255.255.255.255, 68yiaddrr: 223.1.2.4transaction ID: 655Lifetime: 3600 secs

yiaddr is “your internet address”

Page 19: Today’s Topics*

19

Today’s Topics

ICMP DHCP Domain Naming

DNS Byte ordering

Page 20: Today’s Topics*

20

The need for naming

IP assigns 32-bit addresses to host interfaces

All applications use IP addresses through the TCP/IP protocol software

Binary addresses easy for computers to manage

… but difficult for humans to remember: E.G.: telnet 134.82.11.70

Page 21: Today’s Topics*

21

The Domain Name System

The computer needs 32-bit binary addresses

Humans "need" mnemonics DNS provides translation between

symbolic names and IP addresses

Page 22: Today’s Topics*

22

Structure of DNS names

Each name consists of a sequence of alphanumeric components separated by periods

Examples: comcast.com www.oregonstate.edu www.cnn.com classes.engr.oregonstate.edu

Note: There is not a correspondence between the DNS name components and the fields of an IP address (dotted decimal notation)

Page 23: Today’s Topics*

23

Structure of DNS names

Names are hierarchical, with most significant component on the right Top-Level Domain (TLD)

Second from right is the domain name within the TLD Approved by a global authority

Page 24: Today’s Topics*

24

Structure of DNS names

Other names may be added by the organization that owns the name hierarchical structure

Left-most component is computer name

NOTE: www does not necessarily imply web services. It’s just a computer name in a domain.

Page 25: Today’s Topics*

25

Structure of DNS names

Organizations apply for names in a TLD. E.G.: oregonstate.edu mozilla.com

Organizations determine own internal structure. E.G.: eecs.oregonstate.edu classes.eecs.oregonstate.edu www.mozilla.com en-US.www.mozilla.com

Page 26: Today’s Topics*

26

Top-level domains (TLD)

Page 27: Today’s Topics*

27

Geographic structurehttp://www.iana.org/cctld/cctld-whois.htm

TLDs are USA-centric Geographic TLDs (ccTLD)

are used for organizations in other countries. Examples:

TLD Country

.uk United Kingdom

.cn China

.in India

.jp Japan

.pg Papua New Guinea

.cl Chile

.ke Kenya

Page 28: Today’s Topics*

28

Geographic structure

Countries define their own internal hierarchy:

.ac.jp and .edu.au are used for academic organizations in Japan and Australia, respectively

Page 29: Today’s Topics*

29

Internal names

Authority for creating new subdomains is delegated to each domain

Administrator of oregonstate.edu has authority to create classes.engr.oregonstate.edu does not have to contact any central

naming authority

Page 30: Today’s Topics*

30

Physical location

DNS domains are logical concepts and need not correspond to physical location of organizations E.G., chinatoday.com is hosted partly in

Beijing, partly in San Francisco

Note: some countries sell domain names in their ccTLDs e.g. www.verisign.tv

Page 31: Today’s Topics*

31

DNS: Domain Name System

Internet routers: Use IP addresses to

forward/route datagrams (e.g., 123.14.44.2)

People: Use names

(e.g., www.amazon.com)

Question: How to map between IP

addresses and name ?

Answer: DNS

Domain Name System: distributed database:

implemented in hierarchy of many name servers

application-layer protocol: running at host, routers, & name servers to resolve names (address/name translation)

Page 32: Today’s Topics*

32

DNS

Why not centralize DNS? single point of failure traffic volume distant centralized database maintenance

doesn’t scale!

DNS services hostname to IP address

translation

Web server aliasing Canonical, alias names

mail server aliasing

load distribution replicated Web servers:

set of IP addresses for one canonical name

Page 33: Today’s Topics*

33

Root DNS Servers

com DNS servers org DNS servers edu DNS servers

poly.eduDNS servers

umass.eduDNS serversyahoo.com

DNS serversamazon.comDNS servers

pbs.orgDNS servers

Distributed, Hierarchical Database

Client wants IP for www.amazon.com; 1st approx: client queries a root server to find com DNS server client queries com DNS server to get amazon.com DNS

server client queries amazon.com DNS server to get IP address

for www.amazon.com

Page 34: Today’s Topics*

34

DNS: Root name servers

contacted by local name server that can not resolve name

13 root name servers worldwideb USC-ISI Marina del Rey, CA

l ICANN Los Angeles, CA

e NASA Mt View, CAf Internet Software C. Palo Alto, CA (and 36 other locations)

i Autonomica, Stockholm (plus 28 other locations)

k RIPE London (also 16 other locations)

m WIDE Tokyo (also Seoul, Paris, SF)

a Verisign, Dulles, VAc Cogent, Herndon, VA (also LA)d U Maryland College Park, MDg US DoD Vienna, VAh ARL Aberdeen, MDj Verisign, ( 21 locations)

Page 35: Today’s Topics*

35

TLD and Authoritative Servers

Top-level domain (TLD) servers: responsible for com, org, net, edu, etc, and all top-level

country domains uk, fr, ca, jp. Network Solutions maintains servers for 'com' TLD

Authoritative DNS servers: organization’s DNS servers, providing authoritative

hostname to IP mappings for organization’s servers (e.g., Web, mail).

can be maintained by organization or service provider

Page 36: Today’s Topics*

36

Local Name Server

does not strictly belong to hierarchy each ISP (residential ISP, company,

university) has one. also called “default name server”

when host makes DNS query, query is sent to its local DNS server acts as proxy, forwards query into hierarchy

Page 37: Today’s Topics*

37

requesting hosteecs.oregonstate.edu

gaia.cs.umass.edu

root DNS server

local DNS serverdns1.oregonstate.edu

1

23

4

5

6

authoritative DNS serverdns.cs.umass.edu

78

TLD DNS server

DNS name resolution exampleiterated query:

Host at eecs.oregonstate.edu wants IP address for gaia.cs.umass.edu

Each server replies with name of server to contact

Page 38: Today’s Topics*

38

requesting hosteecs.oregonstate.edu

gaia.cs.umass.edu

root DNS server

local DNS serverdns1.oregonstate.edu

1

2

45

6

authoritative DNS serverdns.cs.umass.edu

7

8

TLD DNS server

3 puts burden of name resolution on contacted name server heavy load?

DNS name resolution examplerecursive query:

Page 39: Today’s Topics*

39

DNS: caching and updating records

name servers cache mappings as they learn them cache entries timeout (disappear) after

some time TLD servers typically cached in local name

servers• Thus root name servers not often visited

Page 40: Today’s Topics*

40

Today’s Topics

ICMP DHCP Domain Naming

DNS Byte ordering

Page 41: Today’s Topics*

41

Byte-ordering In all modern computer architectures, strings

are stored in contiguous memory addresses in byte (character) order

However … storage of numeric values is architecture dependent 16-bit integer (2 bytes) 32-bit integer (4 bytes) etc.

Different architectures store numeric values in different byte order

Page 42: Today’s Topics*

42

Big-endian, Little-endian Big-endian

Numeric (multi-byte) values are stored in "normal" byte order

• most significant byte first Example: Decimal 1523 = 05F3 (hex)

Big-endian byte order is 05 F3

Little-endian Numeric (multi-byte) values are stored in "reverse" byte

order• least significant byte first

Example: Decimal 1523 = 05F3 (hex)Little-endian byte order is F3 05

NOTE: this refers to byte-order, NOT to the order of bits within the bytes.

Page 43: Today’s Topics*

43

Big-endian, Little-endian

Example: 32-bit dotted-decimal 128.193.35.203 = 80C123CB (hex)

Big-endian byte order is 80 C1 23 CB

Little-endian byte order is CB 23 C1 80

Page 44: Today’s Topics*

44

Big-endian, Little-endian

Intel architectures use little-endian Sparc, Solaris (and other) architectures

use big-endian Problem with communication among

various architectures. Data sent over a network is a sequence of

bytes (characters, integers, etc.) Network order is always Big-endian