Class Nine - Lyle School of Engineering
Download
Report
Transcript Class Nine - Lyle School of Engineering
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)
TELNET
TELNET
server
TELNET
client
Host
TELNET
server
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
File Transfer Protocol (FTP)
Host
Storage
Client
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.
FTP Example
99,760 bits per second
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.
Domain Name Service (DNS)
TELNET
Sun_server
(1) Name Query “Sun_Server”
(2) Query Response “198.1.1.1”
(3) Connection
11000
1
198.1.1.1
198.1.1.2
DNS Resolver
Name Server
101010
Database containing
the mapping for
Sun_Server 198.1.1.1
• 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
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.
DNS Components
• Domain Name Space and resource records
• Name servers
• Resolvers
Domain Structure
Root Server
com
.firm
edu
.arts
com
.nom
gov
.rec
mil
.info
net
.web
The extra top-level domains (TLDs) that are shown as the bottom set
of boxes are proposed, they are shown here as examples,
and as of this writing have not been adopted.
.store
Name Servers
graydon.com
Upstream name
server for other domains
vax.
mail.
host.
Database file
marketing zone
vax 192.32.1.15
mail MX vax
host 192.32.1.17
.marketing.graydon.com
.engineering.graydon.com
engineering zone
hr zone
.hr.graydon.com
manufacturing zone
.manufacturing.graydon.com
Name Servers (continued)
Query “labhost.bnr.ca.us”
Root server
Referral to us server
Query
“labhost.bnr.ca.us”
Query “labhost.bnr.ca.us”
.us server
Referral to ca.us server
Name Server
IP address of
“labhost.bnr.ca.us”
Query “labhost.bnr.ca.us”
.ca.us server
Referral to bnr.ca.us server
Query “labhost.bnr.ca.us”
bnr.ca.us server
IP address of “labhost.bnr.ca.us”
Query Functions Types
Query “Host”
Response “Can’t find it”
Query “Host.jj.com”
Root server
Name Server
Response “IP Address”
jj.com
• 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
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
SOA Record
Authoritative for domain
Naugle.com
1567
18000
3600
604800
86400)
IN
Name server for domain
SOA
ns1.Naugle.com.
;Serial
;Refresh after five hours
;Retry after 1 hour
;Expire after one week
;Minimum TTL of 1 day
Information for the secondary server
Matt.NT1Server.Naugle.com
Person responsible
Name Server Records
• Naugle.com.
• Naugle.com.
IN NS ns0.Naugle.com.
IN NS ns1.Naugle.com.
• Naugle.com.
• Naugle.com.
• Naugle.com.
IN NS ns2.Naugle.com.
IN NS ns3.Naugle.com.
IN NS ns4.Naugle.com.
Address Records
LocalHost.Naugle.com. IN A
127.0.0.1
DatabaseServer.Naugle.com.
IN A
HRServer.Naugle.com. IN A
128.1.15.1
EngServer.Naugle.com. IN A
128.1.59.150
128.1.1.1
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.
Mail Exchange Records (MX)
engineering.naugle.com.
mail.naugle.com.
engineering.naugle.com.
mail1.naugle.com.
engineering.naugle.com.
mail2.naugle.com.
INMX
5
INMX
5
INMX 10
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!!
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 BBNNCETBLK 192.1.0.0-192.1.255.255
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
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.
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).
SMTP Flow
SMTP
sender
SMTP receiver
Accept connection
send READY
TCP Call on port 25
SEND MAIL command
Send OK
Send OKs for
recipients;
otherwise, reject
Identify recipients to receiver
Send mail
Send OK at end
Response to Quit
Quit
DNS Interaction for Mail
DNS lookup for MX record for ibm.com
Sender SMTP
Internet
mail.ibm.com
Receiver SMTP
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.
POP Operation
POP
Server
POP Client
TCP port 110 connection
attempt
Send authentication
Retrieve all messages
Send QUIT command
Session closed
Read messages locally
“POP3 server ready” reply
Wait for authentication
Process authentication and if
okay, enter transaction state
Lock mailbox for user.
Assign messages numbers
Send messages
Delete (possibly) messages
Quit received
Perform update on mailbox
SMTP, DNS, and POP Topology
Your
PC
Your ISP
Retrieve mail
Send mail
POP Server
mnaugle
user1
user2
DNS
SMTP
POP3/SMTP
root DNS
Internet
Remote ISP
DNS
send mail
Joe’s PC
SMTP
joe
Retrieve mail
POP Server