dave roberts. dynamic host configuration protocol dhcp simple mail transport protocol smtp 2

Post on 22-Dec-2015

222 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

CSCI 6433Class 10

Dave Roberts

2

Agenda

Dynamic Host Configuration Protocol DHCP

Simple Mail Transport Protocol SMTP

3

DHCPv4: How does a host get started?

4

What Information Does a Host Need?

Address of default router Network mask Addresses of mail server, DNS server MTU of local network TTL value to use for IP datagrams IP address of host

5

What About Manual Configuration?

People make mistakes There aren’t enough people Hosts may be dumb and unable to

remember settings

So—we use IP to get the IP addresses that we need. The “limited broadcast” IP address is used to broadcast even before the client knows its own IP address.

6

Retransmission

Responsibility for reliable communication on the client

Requires that UDP checksum be on Requires that do not fragment bit be

on Client sets timeout, retransmits when

timeout expires Delay has a random number added After failure, delay is doubled, up to 60

seconds

7

Message Format

8

Address Allocation Methods

Manual allocation: Each IP address is allocated to a single device. DHCP communicates that address

Automatic allocation: DHCP automatically assigns an IP address permanently to a device, selecting from a pool

Dynamic allocation: DHCP assigns an IP address from a pool for a time chosen by the server or until the client gives it up (most used, by far)

9

DHCP Lease Length

DHCP administrator must pick lease length for IP addresses Short lease lengths make most effective

use of IP addresses Long lease lengths produce more

network stability Lease lengths might be from one hour to

months

10

DHCP Lease Allocation Process

11

Summary

DHCPv4 is run by hosts at startup It configures the host for network

operation

What about v6?

12

Startup with IPv6

Designers wanted startup without DHCP

Designed stateless autoconfiguration But ISPs and network managers

wanted more control, so DHCPv6 was also developed

13

DHCPv6

Server for each network; host contacts server

Host generates link-local address, uses link-local multicast to reach server

DHCPv6 allows for authentication RFC for DHCPv6 is twice the size as

RFC for DHCPv4

14

Stateless Autoconfiguration

Uses IPv6 Neighbor Discovery Protocol (NDP)

Host generates an IPv6 address and checks its uniqueness on its network

Link-local address generated with prefix in leftmost bits and MAC address in rightmost bits. Any in between are set to zero.

Host uses Duplicate Address Detection (DAD) to test whether the link-local address s unique on the subnet

15

Duplicate Address Detection Host sends neighbor solicitation message

asking for address it wants to use If other host is using it, it responds and

requesting host stops autoconfiguration This rarely happens because MAC

addresses are intended to be unique Next, host sends router solicitation

message to all-routers multicast address Response from router tells host whether to

use DHCP, whether to create global address

16

NDP

Router Discovery Next-hop routes Neighbor discovery Neighbor

unreachability detection

Address prefix discovery

Configuration parameter discovery

Stateless autoconfiguration

Duplicate address detection

Address resolution DNS server

discovery Redirect

17

ICMPv6 Message Types for NDP

Router Solicitation Router Advertisement Neighbor Solicitation Neighbor Advertisement Redirect

18

ICMPv6 Router Solicitation

19

ICMPv6 Router Advertisement

20

ICMPv6 Neighbor Solicitation

21

ICMPv6 Neighbor Advertisement

22

ICMPv6 Redirect

23

Summary

For IPv6, configurations can be managed by DHCP or automatically

Either method can provide all the parameters needed on startup

DHCP allows for more complete control of which hosts can connect to a network

Electronic mail

24

Electronic Mail

Email allows users to send memos across the Internet.

Notes can be short or quite large Notes can have multiple

attachments Must work when remote machine is

unreachable

25

Actors in the Email System

Post Office SMTP servers move email between each

other SMTP servers store email for delivery to

end users Users

POP clients pick up email from SMTP servers

POP clients hand outgoing mail to SMTP servers

26

27

Components

Delayed Delivery

28

Sender and receiver do not need to be connected to the server at the same time

29

An SMTP Transaction

MAIL command: establishes return address and bounce address

RCPT command: establishes recipient of this message

DATA signals beginning of the message text

30

Questions

What protocol do SMTP servers use to deliver messages?

How does SMTP differ between v4 and v6?

SMTP Transaction Sequence

31

32

Example

S: 220 smtp.example.com ESMTP Postfix C: HELO relay.example.org S: 250 Hello relay.example.org, I am glad to meet you C: MAIL FROM:<bob@example.org> S: 250 Ok C: RCPT TO:<alice@example.com> S: 250 Ok C: RCPT TO:<theboss@example.com> S: 250 Ok C: DATA S: 354 End data with <CR><LF>.<CR><LF> C: From: "Bob Example" <bob@example.org> C: To: "Alice Example" <alice@example.com> C: Cc: theboss@example.com C: Date: Tue, 15 January 2008 16:02:43 -0500 C: Subject: Test message C: C: Hello Alice. C: This is a test message with 5 header fields and 4 lines in the message body. C: Your friend, C: Bob C: . S: 250 Ok: queued as 12345 C: QUIT S: 221 Bye {The server closes the connection}

Alias Expansion, Mail Forwarding

33

Internetworking and Email

TCP/IP internet makes universal delivery service possible

Mail systems built on TCP/IP are inherently reliable because of end-to-end delivery

Alternatively, mail gateways are used Allow mail transfer between different systems When gateway has a message, sender discards

it

34

Question: Is email through a gateway better or worse than a direct SMTP transfer?

TCP/IP Email Standards

Format and computer interaction are specified separately

Format: header, blank line, body Body unspecified Header is key word, colon, value Some keywords required, others

optional Header is readable

35

Email Addresses

local-part @ domain-name

domain-name: name of mail destination

local-part: address of a mailbox at destination

Note: when gateways are employed, mail addresses are site-dependent

36

SMTP

Simple Mail Transport Protocol Focuses on how mail delivery system

passes messages from one machine to a server on another machine

Does not specify anything about user interface

Does not specify how mail is stored

37

Assured Delivery

SMTP server forms TCP/IP connection with receiving server

Once receiving server has put message into safe store, then it acknowledges and sender discards message

If SMTP can’t transfer message on the first try, it keeps trying

After several days of failure, SMTP reports failure to deliver.

38

SMTP Highlights

All communications is readable ASCII text

Transcript of interactions is readable Each message is acknowledged

separately Addresses of the form local-

part@domain-name

39

Mail Retrieval and Mailbox Manipulation

POP3—Post Office Protocol POP3 client creates TCP connection to

POP3 server on mailbox computer Mailbox computer runs two servers:

SMTP to place mail into user mailboxes POP3 server to allow user to extract messages

from user mailbox POP3 retrieves messages, deletes from

user mailbox Two servers must coordinate use of the

user mailbox

40

Internet Message Access Protocol

POP stores messages offline; not compatible with the use of multiple computers

IMAP allows message access, manipulation from multiple computers

Platform-independent access to mail

41

Question: How does server resource usage of IMAP compare with POP?

MIME Extension for Non-ASCII Data

MIME—Multipurpose Internet Mail Extensions

Defined to allow transmission of non-ASCII data through mail

MIME allows arbitrary data to be encoded in ASCII, transmitted as standard email message

MIME message tells recipient type of data, type of encoding used

Data type and subtype is specified MIME information is in 822 mail header

42

MIME Content Types

43

MIME Example

From: bill@acollege.eduTo: john@example.comMIME-Version: 1/0Content-Type: image/gifContent-Transfer Encoding: base64

….data for the image….

44

Mail Retrieval, Mailbox Protocols

Post Office Protocol—client login with userid/password

Client can then retrieve, delete messages

Server computer must run two servers: POP and SMTP

POP and SMTP must coordinate use of mailbox

45

Summary

Email is a very important Internet service Separate standards are used for message format

and transfer SMTP—how a mail system on one machine

transfers to a server on another POP3—how a user can retrieve contents of a

mailbox IMAP—user protocol for use from multiple

computers MIME allows arbitrary data to be exchanged using

SMTP

46

top related