Top Banner
Selected TCP/IP Applications •Remote Terminal Emulation (TELNET) •File Transfer Protocol (FTP) •Trivial File Transfer Protocol (TFTP) •Simple Mail Transfer Protocol (SMTP) •Post Office Protocol (POP) •Domain Name Service (DNS) •Simple Network Management Protocol (SNMP)
29

Selected TCP/IP Applications Remote Terminal Emulation (TELNET) File Transfer Protocol (FTP) Trivial File Transfer Protocol (TFTP) Simple Mail Transfer.

Dec 18, 2015

Download

Documents

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: Selected TCP/IP Applications Remote Terminal Emulation (TELNET) File Transfer Protocol (FTP) Trivial File Transfer Protocol (TFTP) Simple Mail Transfer.

Selected TCP/IP Applications

•Remote Terminal Emulation (TELNET)

•File Transfer Protocol (FTP)

•Trivial File Transfer Protocol (TFTP)

•Simple Mail Transfer Protocol (SMTP)

•Post Office Protocol (POP)

•Domain Name Service (DNS)

•Simple Network Management Protocol (SNMP)

Page 2: Selected TCP/IP Applications Remote Terminal Emulation (TELNET) File Transfer Protocol (FTP) Trivial File Transfer Protocol (TFTP) Simple Mail Transfer.

TELNET

TELNETTELNETclientclient

HostHost

TELNET TELNET serverserver

TELNET TELNET serverserver

Page 3: Selected TCP/IP Applications Remote Terminal Emulation (TELNET) File Transfer Protocol (FTP) Trivial File Transfer Protocol (TFTP) Simple Mail Transfer.

TELNET Options• Each side of the connection requests or tells its partner

the options it wants or can do.• Options are formatted in:

– WILL or WON’T <option> – DO or DON’T <option>

• Negotiates options such that symmetry can be set up between two stations.

• Options include:– Ability to echo– Terminal type– Setting line mode so that groups of characters can be

sent

Page 4: Selected TCP/IP Applications Remote Terminal Emulation (TELNET) File Transfer Protocol (FTP) Trivial File Transfer Protocol (TFTP) Simple Mail Transfer.

File Transfer Protocol (FTP)

ClientClient

HostHost

StorageStorage

Page 5: Selected TCP/IP Applications Remote Terminal Emulation (TELNET) File Transfer Protocol (FTP) Trivial File Transfer Protocol (TFTP) Simple Mail Transfer.

FTP Commands• open–creates a connection between two hosts.

• close–closes a connection between two hosts.

• bye–ends the FTP session.

• binary–indicate that the file is binary data.

• get–get the remote file.

• mget–wildcard to get multiple files.

• put - puts a file to the remote resource.

• mput - wildcard to put multiple files.

• cd - change directory on the remote device.

• dir - get a directory listing on the remote device.

• ldir - get a local directory.

• hash - display hash marks during the transfer.

Page 6: Selected TCP/IP Applications Remote Terminal Emulation (TELNET) File Transfer Protocol (FTP) Trivial File Transfer Protocol (TFTP) Simple Mail Transfer.

FTP Example

99,760 bits per second

Page 7: Selected TCP/IP Applications Remote Terminal Emulation (TELNET) File Transfer Protocol (FTP) Trivial File Transfer Protocol (TFTP) Simple Mail Transfer.

Trivial File Transfer Program (TFTP)

• A simplex file transfer program.

• Uses UDP.

• Transfers 512 bytes at a time.

• Transfers one segment at a time.

• Acknowledged by the application.

• Any datagram less than 512 bytes indicates the last datagram in the transfer.

• Popular for network booting of devices.

Page 8: Selected TCP/IP Applications Remote Terminal Emulation (TELNET) File Transfer Protocol (FTP) Trivial File Transfer Protocol (TFTP) Simple Mail Transfer.

Domain Name Service (DNS)

• Provides a naming service for TCP/IP.– Provides many functions related to IP addresses and names

• Three components– A name server, a name resolver, and a database

Name ServerName Server

198.1.1.1198.1.1.1198.1.1.2198.1.1.2Database containing Database containing

the mapping for the mapping for Sun_Server 198.1.1.1Sun_Server 198.1.1.1

(1) Name Query “Sun_Server”(1) Name Query “Sun_Server”

(2) Query Response “198.1.1.1”(2) Query Response “198.1.1.1”

(3) Connection(3) Connection

DNS ResolverDNS Resolver

TELNETTELNETSun_serverSun_server

110001100011

101010101010

Page 9: Selected TCP/IP Applications Remote Terminal Emulation (TELNET) File Transfer Protocol (FTP) Trivial File Transfer Protocol (TFTP) Simple Mail Transfer.

DNS Structure

• Hierarchical in structure.• Each level provides further definition.• Each branch is called a level (63 characters in length).• Internet Registry provides uniqueness in names.• A single domain is assigned and may be further defined

by the local site.

Page 10: Selected TCP/IP Applications Remote Terminal Emulation (TELNET) File Transfer Protocol (FTP) Trivial File Transfer Protocol (TFTP) Simple Mail Transfer.

DNS Components

• Domain Name Space and resource records

• Name servers

• Resolvers

Page 11: Selected TCP/IP Applications Remote Terminal Emulation (TELNET) File Transfer Protocol (FTP) Trivial File Transfer Protocol (TFTP) Simple Mail Transfer.

Domain StructureRoot ServerRoot Server

comcom eduedu comcom govgov milmil netnet

.firm.firm .arts.arts .nom.nom .rec.rec .info.info .web.web .store.store

The extra top-level domains (TLDs) that are shown as the bottom setThe extra top-level domains (TLDs) that are shown as the bottom setof boxes are proposed, they are shown here as examples,of boxes are proposed, they are shown here as examples,

and as of this writing have not been adopted.and as of this writing have not been adopted.

Page 12: Selected TCP/IP Applications Remote Terminal Emulation (TELNET) File Transfer Protocol (FTP) Trivial File Transfer Protocol (TFTP) Simple Mail Transfer.

Name Serversgraydon.comgraydon.com

.engineering.graydon.com.engineering.graydon.com

.marketing.graydon.com.marketing.graydon.com

.hr.graydon.com.hr.graydon.com

.manufacturing.graydon.com.manufacturing.graydon.com

marketing zonemarketing zone

engineering zoneengineering zone

hr zonehr zone

manufacturing zonemanufacturing zone

vax.vax. mail.mail. host.host.

vax 192.32.1.15vax 192.32.1.15mail MX vaxmail MX vax

host 192.32.1.17host 192.32.1.17

Upstream nameUpstream nameserver for other domainsserver for other domains

Database fileDatabase file

Page 13: Selected TCP/IP Applications Remote Terminal Emulation (TELNET) File Transfer Protocol (FTP) Trivial File Transfer Protocol (TFTP) Simple Mail Transfer.

Name Servers (continued)

Query Query “labhost.bnr.ca.us”“labhost.bnr.ca.us”

IP address of “labhost.bnr.ca.us”IP address of “labhost.bnr.ca.us”

Name ServerName Server

Query “labhost.bnr.ca.us”Query “labhost.bnr.ca.us”

Query “labhost.bnr.ca.us”Query “labhost.bnr.ca.us”

Query “labhost.bnr.ca.us”Query “labhost.bnr.ca.us”

Query “labhost.bnr.ca.us”Query “labhost.bnr.ca.us”

IP address of IP address of “labhost.bnr.ca.us”“labhost.bnr.ca.us”

Referral to bnr.ca.us serverReferral to bnr.ca.us server

Referral to ca.us serverReferral to ca.us server

Referral to us serverReferral to us server

Root serverRoot server

.us server.us server

.ca.us server.ca.us server

bnr.ca.us serverbnr.ca.us server

Page 14: Selected TCP/IP Applications Remote Terminal Emulation (TELNET) File Transfer Protocol (FTP) Trivial File Transfer Protocol (TFTP) Simple Mail Transfer.

Query Functions Types

• Two types of queries: recursive and iterative.– Recursion means that the server must find the answer or return an error code– The resolver is an example of a recursive query– Iterative allows a server to return the best-known information– Servers are examples of both recursive and iterative

Query “Host”Query “Host”

Response “Can’t find it”Response “Can’t find it”

Query “Host.jj.com”Query “Host.jj.com” Root serverRoot server

jj.comjj.com

Name ServerName Server jj.comjj.com

host.jj.com

host.jj.com

Response “IP Address”Response “IP Address”

Page 15: Selected TCP/IP Applications Remote Terminal Emulation (TELNET) File Transfer Protocol (FTP) Trivial File Transfer Protocol (TFTP) Simple Mail Transfer.

Example DNS Database• Records in the database include:

– A–host’s IP address– PTR–host’s domain name, host identified by its IP address– CNAME–host’s canonical name, host identified by an alias

domain name– MX–host’s or domain’s mail exchanger– NS–host’s or domain’s name server(s)– SOA–Indicates authority for the domain– TXT–generic text record– SRV–service location record– RP–text name of the person responsible for the domain

DNS

Page 16: Selected TCP/IP Applications Remote Terminal Emulation (TELNET) File Transfer Protocol (FTP) Trivial File Transfer Protocol (TFTP) Simple Mail Transfer.

SOA Record

Naugle.comNaugle.com ININ SOASOA ns1.Naugle.com. Matt.NT1Server.Naugle.com. (ns1.Naugle.com. Matt.NT1Server.Naugle.com. (15671567 ;Serial;Serial1800018000 ;Refresh after five hours;Refresh after five hours36003600 ;Retry after 1 hour;Retry after 1 hour604800604800 ;Expire after one week;Expire after one week86400)86400) ;Minimum TTL of 1 day;Minimum TTL of 1 day

Authoritative for domainAuthoritative for domainName server for domainName server for domain

Person responsiblePerson responsibleInformation for the secondary serverInformation for the secondary server

Page 17: Selected TCP/IP Applications Remote Terminal Emulation (TELNET) File Transfer Protocol (FTP) Trivial File Transfer Protocol (TFTP) Simple Mail Transfer.

Name Server Records

• Naugle.com. IN NS ns0.Naugle.com.

• Naugle.com. IN NS ns1.Naugle.com.

• Naugle.com. IN NS ns2.Naugle.com.

• Naugle.com. IN NS ns3.Naugle.com.

• Naugle.com. IN NS ns4.Naugle.com.

Page 18: Selected TCP/IP Applications Remote Terminal Emulation (TELNET) File Transfer Protocol (FTP) Trivial File Transfer Protocol (TFTP) Simple Mail Transfer.

Address RecordsLocalHost.Naugle.com. IN A 127.0.0.1

DatabaseServer.Naugle.com. IN A 128.1.1.1

HRServer.Naugle.com. IN A 128.1.15.1

EngServer.Naugle.com. IN A 128.1.59.150

NS0.Naugle.com. IN A 128.1.1.2

NS1.Naugle.com. IN A 128.1.15.2

NS2.Naugle.com. IN A 128.1.16.190

NS3.Naugle.com. IN A 128.1.59.100

NS4.Naugle.com. IN A 128.1.59.101

;Aliases

NT1.Naugle.com. IN CNAME DBServer.Naugle.com

NT2.Naugle.com. IN CNAME HRServer.Naugle.com.

Page 19: Selected TCP/IP Applications Remote Terminal Emulation (TELNET) File Transfer Protocol (FTP) Trivial File Transfer Protocol (TFTP) Simple Mail Transfer.

Mail Exchange Records (MX)

engineering.naugle.com. INMX 5 mail.naugle.com.

engineering.naugle.com. INMX 5 mail1.naugle.com.

engineering.naugle.com. INMX 10 mail2.naugle.com.

Page 20: Selected TCP/IP Applications Remote Terminal Emulation (TELNET) File Transfer Protocol (FTP) Trivial File Transfer Protocol (TFTP) Simple Mail Transfer.

Playing with the Database

• nslookup <domain name> <IP Address>

• Go to Web site:://ds/internic.net/cool/dns.html

• Use this to see if a domain name is already assigned!!

Page 21: Selected TCP/IP Applications Remote Terminal Emulation (TELNET) File Transfer Protocol (FTP) Trivial File Transfer Protocol (TFTP) Simple Mail Transfer.

WHOIS Command • Enables you to get more information on domain names, networks, etc.,

on the Web.

• ://ds.internic.net/cgi-bin/whois.

• “whois ascend.com” (without the quotes).

• Details Ascend.com domain such as:– Administrative contact (who to call)– Domain servers

• Can determine IP address blocks.– WHOIS net 192.1– BBN Corporation NETBLK-BBN-CNETBLK BBN-NCETBLK 192.1.0.0-

192.1.255.255

Page 22: Selected TCP/IP Applications Remote Terminal Emulation (TELNET) File Transfer Protocol (FTP) Trivial File Transfer Protocol (TFTP) Simple Mail Transfer.

More DNS Information• 2136 PS: P. Vixie, S. Thomson, Y. Rekhter, J. Bound, “Dynamic Updates

in the Domain Name System (DNS UPDATE)”, 04/21/97 (26 pages).

• 2137 PS: D. Eastlake, “Secure Domain Name System Dynamic Update,” 04/21/97 (11 pages) (.txt format).

• 1996 PS: P. Vixie, “A Mechanism for Prompt Notification of Zone Changes (DNS NOTIFY),” 08/28/96 (7 pages) (.txt format).

• 1995 PS: M. Ohta, “Incremental Zone Transfer in DNS”, 08/28/96 (8 pages) (.txt format).

• www.isc.org

• DNS and BIND – Book by Paul Albitz and Cricket Liu– ISBN 1-56592-236-0

Page 23: Selected TCP/IP Applications Remote Terminal Emulation (TELNET) File Transfer Protocol (FTP) Trivial File Transfer Protocol (TFTP) Simple Mail Transfer.

Simple Mail Transfer Protocol (SMTP)

•Today known as Electronic Mail, or email.•RFCs 821, 822, 974.•Email still cannot transport packages and other items.•Email is very fast and guarantees delivery.•Three protocols are used for today’s email.–SMTP–operates over TCP–POP–operates over TCP–DNS–operates over UDP

•SMTP allows for the sending/receiving of email.•POP allows us to intermittently retrieve email.•DNS makes it simple.

Page 24: Selected TCP/IP Applications Remote Terminal Emulation (TELNET) File Transfer Protocol (FTP) Trivial File Transfer Protocol (TFTP) Simple Mail Transfer.

SMTP Functions• A message is created, properly addressed, and transmitted using

SMTP sender, which transmits it to an SMTP receiver, which stores the file.

• Address has the format of:– local-part@domain-name– Example: [email protected]– Mail service record in DNS:

• naugle.com IN MX 10 NT1mail_server.eng.naugle.com• SMTP was set up to handle only text.

– Based on the history of the protocol• Email applications convert using a variety of protocols like MIME

(Multipurpose Internet Mail Extensions).

Page 25: Selected TCP/IP Applications Remote Terminal Emulation (TELNET) File Transfer Protocol (FTP) Trivial File Transfer Protocol (TFTP) Simple Mail Transfer.

SMTP Flow

SEND MAIL command SEND MAIL command

Send OKSend OK

Identify recipients to receiverIdentify recipients to receiverSend OKs forSend OKs forrecipients;recipients;otherwise, rejectotherwise, reject

SMTPSMTPsendersender

SMTP receiverSMTP receiver

TCP Call on port 25TCP Call on port 25Accept connectionAccept connectionsend READYsend READY

Send mailSend mailSend OK at endSend OK at end

QuitQuitResponse to QuitResponse to Quit

Page 26: Selected TCP/IP Applications Remote Terminal Emulation (TELNET) File Transfer Protocol (FTP) Trivial File Transfer Protocol (TFTP) Simple Mail Transfer.

DNS Interaction for Mail

Sender SMTPSender SMTP

Receiver SMTPReceiver SMTP

InternetInternet

mail.ibm.commail.ibm.com

DNS lookup for MX record for ibm.comDNS lookup for MX record for ibm.com

Page 27: Selected TCP/IP Applications Remote Terminal Emulation (TELNET) File Transfer Protocol (FTP) Trivial File Transfer Protocol (TFTP) Simple Mail Transfer.

Post Office Protocol (POP)• SMTP is set up to send and receive mail by hosts

that are up full time.– No rules for those hosts that are intermittent on

the LAN• POP emulates you as a host on the network.

– It receives SMTP mail for you to retrieve later• POP accounts are set up for you by an ISP or your

company.• POP retrieves your mail and downloads it to your

personal computer when you sign on to your POP account.

Page 28: Selected TCP/IP Applications Remote Terminal Emulation (TELNET) File Transfer Protocol (FTP) Trivial File Transfer Protocol (TFTP) Simple Mail Transfer.

POP Operation

TCP port 110 connectionTCP port 110 connectionattemptattempt ““POP3 server ready” replyPOP3 server ready” reply

Wait for authentication Wait for authentication

Send authenticationSend authentication Process authentication and ifProcess authentication and ifokay, enter transaction stateokay, enter transaction stateLock mailbox for user.Lock mailbox for user.Assign messages numbersAssign messages numbersSend messagesSend messagesDelete (possibly) messagesDelete (possibly) messages

Retrieve all messagesRetrieve all messagesSend QUIT commandSend QUIT commandSession closedSession closed

Quit receivedQuit receivedPerform update on mailboxPerform update on mailbox

Read messages locallyRead messages locally

POPPOPServerServer

POP ClientPOP Client

Page 29: Selected TCP/IP Applications Remote Terminal Emulation (TELNET) File Transfer Protocol (FTP) Trivial File Transfer Protocol (TFTP) Simple Mail Transfer.

SMTP, DNS, and POP TopologyYourYourPCPC

POP3/SMTPPOP3/SMTP

mnauglemnaugleuser1user1user2user2

SMTPSMTP

Your ISPYour ISP

Send mailSend mail

Retrieve mailRetrieve mail

InternetInternet

SMTPSMTP

DNSDNS

joejoe POP ServerPOP ServerJoe’s PCJoe’s PC

send mailsend mail

Retrieve mailRetrieve mail

DNSDNS

Remote ISPRemote ISP

root DNSroot DNS

POP ServerPOP Server