View
199
Download
1
Category
Tags:
Preview:
DESCRIPTION
The slides contains a detail material about the services of networks(Common) in Data Communication
Citation preview
1
DATA COMMUNICATON 2
Common Network Common Network ServicesServices
BY;Muhammad Aurangzeb12BS(cs)27
Departament of Computer sciences-Quest
Network ServicesNetwork Services
• GOALS;
• understand most common data services in networks:o Domain Name Servers (DNS)o Remote access serviceso File transfer serviceso e-mail serviceso Streaming services
3
IntroductionIntroduction
• Network Services -> key in companies and organizations
• Work based in shared network resources & distributed services
• Great diversity of services
4
Types of Network ServicesTypes of Network ServicesConfiguration and management
o Management of hosts.o e.g. DHCP.
Remote Accesso Remote hosts are allowed to access to a network. o e.g. SSH
File managemento File transfer, storage and management o e.g. FTP.
Print serviceso Printer share.
Informationo Information sharing and queryingo e.g. WWW, video sharing, IPTV
Communicationo User communication by means of text, audio and/or video
messageso e.g. e-mail, chat, videoconference, IP telephony, games
online.5
Architecture of Network ServicesArchitecture of Network Services
• ApproachesApproaches
o Client-serverClient-server
o Peer-to-peer (P2P)Peer-to-peer (P2P)
o Hybrid of client-server and P2PHybrid of client-server and P2P
Network services 6
Client/Server architectureClient/Server architecture
7
server: always-on host permanent IP
address server farms for
scalingclients:
communicate with server
may be intermittently connected
may have dynamic IP addresses
do not communicate directly with each other
client/server
8
P2P ARCHITECTUREP2P ARCHITECTURE
• no always-on server• arbitrary end systems
directly communicate• peers are
intermittently connected and change IP addresses
• Highly scalable but difficult to manage
peer-peer
9
Hybrid of client-server and Hybrid of client-server and P2PP2PSkype
voice-over-IP P2P application centralized server: finding address of
remote party: client-client connection: direct (not through
server) Instant messaging
chatting between two users is P2P centralized service: client presence
detection/location• user registers its IP address with central
server when it comes online• user contacts central server to find IP
addresses of buddies
DNS: Domain Name DNS: Domain Name SystemSystem
10
11
Problem: Web browsing
Resource holder’s host
User’s host
Internet
DNS: Domain Name SystemDNS: Domain Name System
12
Approach: From the user’s point of view
o Identifies resource holder by means of an address (www.dte.us.es)
Cont:Cont:
13
Approach: May www.dte.us.es be used as an identifier of the
queried resource?
User’s host
Internet
www.dte.us.es
Cont:Cont:
Resource holder’s host
14
Approach: From the network’s point of view
o IP addresses are used (routing & addressing)
Internet
IP
Cont:Cont:
User’s hostResource
holder’s host
15
Approach: A mechanism to translate names into IP addresses is
necessary
Internet
www.dte.us.es
IP
DNS
Cont:Cont:
User’s hostResource
holder’s host
16
Hosts, routers: IP address (32 bits) – used to address datagrama “name”, e.g.: www.google.es – used by human beings
130.213.40.3
Myserver.dte.us.es
Cont:Cont:
Resource holder’s host
17
Name space: my-pc.cont.fake.es.
Host name
domain
Cont:Cont:
DNS: Domain Name SystemDNS: Domain Name System
18
IP Address 4 bytes in decimal format (69.146.202.8) Hierarchical structure -> precise information about host
location
Name No host location information except maybe the country
DNS: Domain Name SystemDNS: Domain Name System
19
Domain Name System: distributed database
implemented in hierarchy of many name servers
application-layer protocol host, routers, name servers to communicate to resolve names (address/name translation) DNS uses UDP services
DNS services hostname to IP
address translation host aliasing
Canonical, alias names
mail server aliasing load distribution
replicated Web servers: set of IP addresses for one canonical name
20
Basic foundations
1. App needs to know a remote IP address associated to a name
2. App requests IP address to DNS client
3. DNS client sends a request to the network
4. DNS client rcvs a reply including IP addr
5. DNS client gives IP address to app
DNS: Domain Name SystemDNS: Domain Name System
Why not centralize DNS? single point of failure traffic volume distant centralized
database maintenance
doesn’t scale!
21
Root DNS Servers
com DNS servers org DNS servers edu DNS servers
poly.eduDNS servers
umass.eduDNS servers
yahoo.comDNS servers
amazon.comDNS servers
pbs.orgDNS servers
Distributed, Hierarchical Distributed, Hierarchical DatabaseDatabase
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
22
DNS: Root name serversDNS: Root name servers
contacted by local name server that can not resolve name root name server:
contacts authoritative name server if name mapping not known
gets mapping returns mapping to local name server
13 root name servers worldwide
b USC-ISI Marina del Rey, CAl 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)
23
Local Name ServerLocal 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
24
requesting hostcis.poly.edu
gaia.cs.umass.edu
root DNS server
local DNS serverdns.poly.edu
authoritative DNS serverdns.cs.umass.edu
TLD DNS server
DNS name DNS name resolution exampleresolution example
Host at cis.poly.edu wants IP address for gaia.cs.umass.edu
iterated query:
contacted server replies with name of server to contact
“I don’t know this name, but ask this server”
recursive query:
puts burden of name resolution on contacted name server
25
DNS name resolution exampleDNS name resolution example
recursive queryiterative query
requesting hostcis.poly.edu
gaia.cs.umass.edu
root DNS server
1
23 4
5
6
authoritative DNS serverdns.cs.umass.edu
78
TLD DNS server
requesting hostcis.poly.edu
gaia.cs.umass.edu
root DNS server
local DNS serverdns.poly.edu
1
2
45
6
authoritative DNS serverdns.cs.umass.edu
7
8
TLD DNS server
3
26
DNS protocol, messagesDNS protocol, messages
Name, type fields for a query
RRs in responseto query
records forauthoritative servers
additional “helpful”info that may be used
27
DNS protocol, messagesDNS protocol, messages
Header, 6 fields, 2 bytes each
Access remote Access remote servicesservices
28
2929
Access remote servicesAccess remote services
Virtual connection to a remote terminal
“Substitutes” a direct cable
Access remote services Telnet SSH
3030
TelnetTelnet
Basically -> TCP connection (port 23) Some other features negotiated in handshake
TCP/ IPInternet
Telnetclient
Operative system
Telnetserver
Operative system
Client readsfrom terminal
Client sends to server
Server receives from client
Server sends to pseudo-terminal
No security –> even passwords are visible Solution: encryptation -> SSH Telnet is now quite obsolete
3131
SSHSSH
SSH (Secure Shell): RFC 4251 Aims similar to telnet -> provides security! TCP connection (port 22) Other additional functions
o Secure FTPo support any insecure protocol ->
tunnelingo secure connections for X Windows
servers -> graphic apps
3232
SSH. FeaturesSSH. Features
Reduces security menaces:o Man in the middle -> sniffer o Spoofing
Cyphered data -> 128-bit encryptation Security scheme -> public/private key
(RSA) Client-server arquitecture. Two versions
o SSHv1 (1995) -> vulnerabilities
o SSHv2 (1997) Improvements over SSHv1 Current standard
File Transfer ServicesFile Transfer Services
33
3434
File Transfer ServicesFile Transfer Services
File transfer between remote hosts Aims:
Remote hosts may share files Client & server file systems are independent Efficient data transfer
Two main protocols FTP (File Transfer Protocol): uses TCP -> reliable
• RFC 959 TFTP (Trivial File Transfer Protocol): uses UDP ->
more simple• RFC 1350
Network services 35Network services 35
TFTPTFTP
Trivial File Transfer Protocol File transfer Very simple protocol Non reliable -> UDP (port 69) No folders; no encryptation For transfering small files
3636
TFTPTFTP TFTP messages
Opcode(2 bytes)
Variable length data
Opcode: type of message• 01: RRQ (Read Request) • 02: WRQ (Write Request)• 03: DATA• 04: ACK• 05: Error message
Variable length data: depend on the opcode
3737
FTP: the file transfer protocolFTP: the file transfer protocol
transfer file to/from remote host client/server model
client: side that initiates transfer (either to/from remote)
server: remote host ftp: RFC 959 Uses TCP: ports 20, 21 -> reliable transfer
file transfer FTPserver
FTPuser
interface
FTPclient
local filesystem
remote filesystem
user at host
3838
FTP Client FTP Server
Data transfer
Data transfer
Control dialogue
Controldialogue
TCP protocol
Two TCP connections Data: transferred data (port 20) Control: allows the user moving through the
directory structure and downloading & uploading files (port 21)
FTPFTP
3939
FTP Client/Server modelFTP Client/Server model
FTP Client FTP Server
Data transfer
Data transfer
Control dialogue
Controldialogue
TCP protocol
FTP Client initiates connection (server’s port 21) Connection parameters are negotiated in
handshake Data port Connection mode: active/pasive Transfer mode: ASCII/binary
4040
FTP ServersFTP Servers
Configuration parameters Control port (default: port 21) Max # of connections to server & max # of connections
per IP Connection timeout Welcome & goodbye msgs Passive mode port numbers
Users & groups Authenticated users: have login & passwd -> registered
in server Anonymous users Groups: share the same properties in FTP server
4141
FTP ServersFTP Servers
Permissions Read, write, execution (rwx) Permissions for the owner, for groups & for the rest of
users
Bandwidth limit Server may limit transfer rate for the users
Logs Register data or any other info about user connections
& errors
4242
FTP ClientsFTP Clients
ftp <ip_addr> Commands
cd get put mkdir exit … Do not mistake FTP
commands typed by client for FTP control commands
FTP commands, responsesFTP commands, responses
Sample commands:• sent as ASCII text over
control channel• USER username• PASS password
• LIST return list of file in current directory
• RETR filename retrieves (gets) file
• STOR filename stores (puts) file onto remote host
Sample return codes• status code and phrase
(as in HTTP)• 331 Username OK,
password required• 125 data connection
already open; transfer starting
• 425 Can’t open data connection
• 452 Error writing file
4343
E-mail servicesE-mail services
Network services 44
E-mail servicesE-mail servicesMain features:• One of the most important services on the
Internet• Allows users to exchange mails in an easy,
fast and cheap way• Multiple receivers• Client-server scheme• Types of client apps
o Graphic interfaces (Microsoft Outlook, Mozilla Thunderbird, Apple Mail)
o Text (pine, elm, mail)o Web (Gmail, Hotmail, SquirrelMail)
45
E-mail servicesE-mail services
Related concepts:• Mail account
o Associated to user name & passwduser@domain.com
• Mailbox• Mail alias• Mail list
46
E-mail servicesE-mail services
Standards:• SMTP (Simple Mail Transfer Protocol)• IMF (Internet Mail Format)• MIME (Multipurpose Internet Mail
Extensions)• POP (Post Office Protocol)• IMAP (Internet Message Access Protocol)
47
E-mail servicesE-mail servicesComponents:• Mail User Agent (MUA)• Mail Transfer Agent (MTA)• Mail Delivery Agent (MDA)
Mail User Agents (MUA)• Mail client• Compose, edit, read mail
messages• Use two mail servers:
o Outgoing mail server (SMTP)
o Incoming mail server (POP or IMAP)
48
User mailbox
Outgoing mail
queue
MTA
MUA
MUA
MUAMTA
MUA
MUA
MTA
MUA
SMTP
SMTP
SMTP
POPIMAP
E-mail servicesE-mail servicesMail Agent Transfer (MTA)• Mail server• Stores sender’s mails for
delivery (outgoing queue) • Stores incoming mails for
their users
Mail Delivery Agent (MDA)
• In charge of copying incoming messages to user mailbox
49
MTA
MUA
MUA
MUAMTA
MUA
MUA
MTA
MUA
SMTP
SMTP
SMTP
POPIMAP
User mailbox
Outgoing mail
queue
50
Scenario: Alice sends message to Bob1) Alice uses UA to
compose message and “to” bob@someschool.edu
2) Alice’s UA sends message to her mail server; message placed in message queue
3) Client side of SMTP opens TCP connection with Bob’s mail server
4) SMTP client sends Alice’s message over the TCP connection
5) Bob’s mail server places the message in Bob’s mailbox
6) Bob invokes his user agent to read message
useragent
mailserver
mailserver user
agent
1
2 3 4 56
51
Message formatMessage format• IMF (RFC 5322)IMF (RFC 5322)• HeadersHeaders
o To:To:o From:From:o Subject:Subject:o Date: Date:
• BodyBodyo Simple text messages Simple text messages
(no extended ASCII ) up (no extended ASCII ) up to 998 characters(no to 998 characters(no CRLF)CRLF)
Headers
Body
Blank line
Network services 52
Message formatMessage format
MIME extensions:• Add funcionalityAdd funcionality
o Attached filesAttached fileso Extended ASCII Extended ASCII
• New headersNew headerso Mime-Version:Mime-Version:o Content-Type:Content-Type:
Default -> text/plainDefault -> text/plainAttachments -> Attachments ->
MultipartMultiparto Content-Description:Content-Description:o Content-Transfer-Content-Transfer-
Encoding:Encoding:
Types de encoding 7 bits 8 bits & binary quoted-printable &
base64.
Example quoted-printableF3 = ó & F1 = ñTransmisión de ñ
Transmisi=F3n de =F1
Network services 53
Web accessWeb accessFeatures:• A browser is used instead of a mail client• MUA is integrated in a web page• Host uses HTTP to communicate with web server• Web server habitually uses IMPA for the access to
the incoming msgs in the mail server
Network services 54
Problems Problems Main problems:• Unencrypted msgs are transmitted
o Use mechanisms of security (PGP, PEM, s/MIME)
• Bad uses o SPAM
StreamingStreaming
55
5656
Streaming Stored Streaming Stored Multimedia Multimedia
Stored streaming: media stored at source transmitted to client streaming: client playout
begins before all data has arrivedo timing constraint for still-to-be transmitted
data: in time for playout
5757
Streaming Streaming LiveLive Multimedia Multimedia
Examples: Internet radio talk show live sporting event
Streaming (as with streaming stored multimedia)
playback buffer playback can lag tens of seconds after
transmission still have timing constraint
Interactivity fast forward impossible rewind, pause possible!
Network services 58
Recommended