Title: DCN286 INTRODUCTION TO DATA COMMUNICATION TECHNOLOGY
1DCN286 INTRODUCTION TO DATA COMMUNICATION
TECHNOLOGY
- TCP/IP Transport and Application protocols
2TCP/IP model
Data unit ISO/OSI Layer Description DoD Model Layer
Data Application Network processes to applications Application
Data Presentation Data representation and encryption Application
Data Session Interhost communication Application
Segment Transport End to end connection Transport
Packet Network Logical address and best routing path Internetwork
Frame Data Link Physical addressing Network Interface
Bit Physical Binary transmission Network Interface
3TCP and UDP
- The two important Transport layer protocols
- They help to transfer data from one application
process on one computer to the correct
application process on another computer. - TCP (Transmission Control Protocol)
- Connection-oriented protocol, more reliable and
slower. - UDP (User Datagram Protocol)
- Connection-less, faster, simpler and not reliable
(no error checking).
4TCP and UDP comparison
Features TCP UDP
Flow control and windowing Yes No
Connection-oriented Yes No
Error recovery Yes No
Segmentation and reassembly of data Yes No
In-order delivery of data Yes No
Identifying application using port numbers Yes Yes
5To use TCP or UDP (optional)
Protocol Application
TCP FTP data
TCP FTP Control
TCP Telnet
TCP SMTP
TCP, UDP DNS
UDP TFTP
TCP HTTP (web)
TCP POP3
UDP SNMP
UDP RIP
6Flow Control
- Receiver needs time to process data and inform
sender how fast the data could be sent to it. Two
methods to control flow - Dynamic sliding windows
- Withholding acknowledgments
7Dynamic Sliding Windows
- Receiver advises window (size of data limit)
- Sender keeps sending data until the limit. Stop
and wait for ACK. - Receiver processed data and sent ACK and next
window value to sender. - Sender starts sending data until reach the limit.
Then, wait for ACK and next window value.
8Withholding Acknowledgments
- Another option of receiver is wait to send
ACK. - Receiver informs sender the window size.
- Sender keeps sending data until limit of window.
- Receiver only sends out ACK after complete the
processing - Sender receives ACK and window size and starts
next round sending.
9Window
- The max value of data sender can send before an
acknowledgment.
10TCP Three way handshake
- First segment has a SYN flag but does not have
the ACK flag set. (SYN1 and ACK0) - The second has both SYN and ACK set
- The third and ongoing segment have only ACK
11TCP error recovery (reliability)
- TCP acknowledges the receipt of data by the
Acknowledgment Number filed of the TCP header. - It identifies the next byte expected to be
received. NOT the last byte received. - Sender ? 1000 ? 1002 ? 1003 ? Receiver
- Sender ? 1001 ? Receiver (because received 1000)
12Segmentation
- TCP received data from application protocols and
break them into small pieces for transmission.
TCP header is put in front of each chunk. - Maximum Segment Size (MSS) max length of TCP
data filed. Ethernet frames allow 1500 data bytes
in data field. TCP and IP header are 20 bytes
each. 1460 is the MSS in Ethernet
13Reassembly and in-order delivery
- In-order delivery Sent by sequence.
- Reassembly according to the SEQ number. Receiver
may temporary store segments into memory and wait
for other segments for reassembly by sequence.
14TCP and UDP header
2 bits 2 4 4 4 6 6 2 2 2 3 1
Source port Dest. Port Seq Number Ack Number Offset Reserved Flags Window Size Check sum Urgent Options PAD
2 2 2 2
Source Port Dest Port Length Checksum
15Port number
- Application may use multiple port numbers in the
same time. A unique port number is needed for
each TCP or UDP connection. - Such port numbers are dynamic port number. A host
can dynamic allocate 1024 (210) to 65,535 (216)
port numbers
16Uses of port number
Type of port Range of port number value Purpose
Dynamic 49,152-65,535 Allocated by client for each new application process
Well-known 0-1023 For high privilege processes, used so that all clients know the correct port number
Registered 1024-49,151 Equivalent to Well-known port, but for nonprivileged application process.
17Well-known ports
Port number Protocol Application
20 TCP FTP data
21 TCP FTP Control
23 TCP Telnet
25 TCP SMTP
53 TCP, UDP DNS
69 UDP TFTP
80 TCP HTTP (web)
110 TCP POP3
161 UDP SNMP
520 UDP RIP
18Application layer
- In DoD model, application layer, application
protocols define the format of the data being
transferred (such as binary or ASCII text)
encryption and the rules for transferring data. - In ISO/OSI model, application layer is only
responsible for application interface. Encryption
is in Presentation layer which is also
responsible for data representation. Session
layer is to combine message communication between
hosts.
19DNS (Domain Name Service)
- Tranlate between Full Qualified Domain Name and
IP address. - Domain name is in human language such as
www.cisco.com and IP address is in the numbering
format. - Top level domain could be in 3 categories
- Tradition .com, .net, .edu, .gov, .mil, .org
- Country code ck, uk, jp, pl, ru, etc, etc.
- New released .info, .aero, .museum, .name,
.coop, .biz, .pro.
20HTTP (Hypertext Transfer Protocol)
- Application layer protocol
- Distribute, collaborate and retrieve inter-linked
resource from web pages - Default port is 80 (could use different port)
- Typical requests
- ? Head asks for the meta-information
- Get requests a representation of the specified
resource. - Post submit data to be processed
- Put Uploads a representation of the specified
resource. - Delete Deletes the specified resource.
- Trace echoes back the received request
- Options returns the HTTP methods that the server
supports for specified URL
21HTTPS (Hypertext Transfer Protocol Secure)
(Optional)
- HTTPS is a combination of the HTTP and a network
security protocol - HTTPS has also been known as "Hypertext Transfer
Protocol over Secure Socket Layer", but now HTTPS
may be secured by the Transport Layer Security
(TLS) instead of Secure Sockets Layer (SSL)
protocol. - An https URL may specify a TCP port. If it does
not, the connection uses port 443 (unsecured HTTP
typically uses port 80)
22HTML, DHTML and XML (Optional)
- HTML (HyperText Markup Language) the predominant
markup language for Web pages. - DHTML (Dynamic HyperText Markup Language) is a
collection of technologies used together to
create interactive and animated web sites by
using a combination of a static markup language
(such as HTML), a client-side scripting language
(such as JavaScript), a presentation definition
language (such as CSS), and the Document Object
Model. - XML (Extensible Markup Language) is a
general-purpose specification for creating custom
markup languages. It can perfectly present shared
structured data.
23Sample code of HTML (optional)
- Sample html code
- lt!DOCTYPE htmlgt
- lthtmlgt
- ltheadgt
- lttitlegtTitle bar displaylt/titlegt
- lt/headgt
- ltbodygt
- ltpgtHello This is my page!!lt/pgt
- lt/bodygt
- lt/htmlgt
24Web server (optional)
- The web server is to
- Host web pages
- Answer HTTP requests
- Logging clients visits
- Offer authentication if it is required
- Bandwidth throttling
- Could be running on Windows IIS or Unix/Linux
system
25Web client and browser (optional)
- Web clients are using browser to display and
interact with text, images, videos, music, games
and other information typically located on a Web
page at a Web site on the World Wide Web or a
local area network. - Typical browsers
- Internet Explorer,
- Opera,
- Mozilla Firefox,
- Safari,
- Avant Browser
- Maxthon,
- AOL Explorer
26E-Mail protocols SMTP, POP3 and IMAP
- SMTP (Simple Mail Transfer Protocol) is an
Internet standard for electronic mail (e-mail)
transmission across Internet Protocol (IP)
networks. - POP3 (Post Office Protocol version 3) is an
application-layer Internet standard protocol used
by local e-mail clients to retrieve e-mail from a
remote server over a TCP/IP connection. - Internet Message Access Protocol (commonly known
as IMAP or IMAP4, and previously called Internet
Mail Access Protocol, Interactive Mail Access
Protocol and Interim Mail Access Protocol is an
application layer Internet protocol operating on
port 143 that allows a local client to access
e-mail on a remote server.
27Email access (optional)
- Web mail (hotmail, yahoo, gmail, and exchange web
access) - Outlook
- Outlook express
- Telnet
- Blackberry (BIS and BES)
- Many freeware courier, Eudora, Foxmail, Opera
Mail, Window Live Mail, etc, etc.
28telnet smtp.example.com 25 (optional)
- 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 FROMltbob_at_example.orggt
- S 250 Ok
- C RCPT TOltalice_at_example.comgt
- S 250 Ok
- C DATA
- S 354 End data with ltCRgtltLFgt.ltCRgtltLFgt
- C From "Bob Example" ltbob_at_example.orggt
- C To Alice Example ltalice_at_example.comgt
- C Date Tue, 15 Jan 2008 160243 -0500
- C Subject Test message
- C
- C Hello Alice.
- C This is a test message with 5 headers and 4
lines in the body. - C Your friend,
- C Bob
- C .
29File transfer application protocols
- HTML can also be used to transfer files
- TFTP is faster and using UDP port 69
- FTP support authentication and using TCP port 20
and 21 - FTP (TFTP) server hosts the files and documents
in a structured directory tree. - Client uses various programs to get, upload files
and documents. The programs could be SmartFTP,
FileZilla, CuteFTP, WISE-FTP, etc, etc.
30Telnet
- Telnet is a network protocol used on the Internet
or local area networks - The term telnet also refers to software which
implements the client part of the protocol.
Telnet clients are available for virtually all
computer platforms. (Start ? Run cmd ? telnet
/?) - The client-server protocol is using TCP port 23
by default. And it does not encrypt any data sent
over the connection (including the password).
Thus, all information can be captured by network
sniffer.
31SSH (optional)
- Secure Shell or SSH is a network protocol that
allows data to be exchanged using a secure
channel between two networked devices. - SSH was designed as a replacement for TELNET
which is an insecure remote shells and transfer
password in clear text format.
32SNMP (Simple Network Management Protocol)
- An SNMP-managed network consists of three key
components - Managed devices (a computer or a network host
such as router and switch) - Agents (software running in the managed devices)
- Network-management station (central management
work station in which application server is
executed) - It is possible to configure a Cisco router as a
SNMP server
33What is the Network address of 172.16.132.70/20?
34Another Example of Network Address172.16.4.35/27
Host Address 172. 16. 4. 35
Binary Host Address 10101100 00010000 00000100 00100011
Binary Subnet Mask 11111111 11111111 11111111 11100000
Binary Network Address 10101100 00010000 00000100 0010000
Network Address 172. 16. 4. 32
35Private IP addressJust to remember
Certain blocks are reserves as private IP address used in company / organization internal networks. More computers could have unique IP address in IPV4. Certain blocks are reserves as private IP address used in company / organization internal networks. More computers could have unique IP address in IPV4. Certain blocks are reserves as private IP address used in company / organization internal networks. More computers could have unique IP address in IPV4. Certain blocks are reserves as private IP address used in company / organization internal networks. More computers could have unique IP address in IPV4. Certain blocks are reserves as private IP address used in company / organization internal networks. More computers could have unique IP address in IPV4.
Class Range of IP address Range of Network number Default network mask Total number of networks
A 10.0.0.0 10.255.255.255 10.0.0.0 10.0.0.0 /8 (255.0.0.0) 1
B 172.16.0.0 172.31.255.255 172.16.0.0 172.31.255.255 /12 (255.240.0.0) 16
C 192.168.0.0 192.168.255.255 192.168.0.0 192.168.255.255 /16 (255.255.0.0) 256
- Thus, it is possible for many companies /
organizations using same network address
internally. (For instance, 10.10.10.10 could be
used for computer Tom in company Apple and by
computer Jerry in company Boss) But, again, the
potential duplicated addresses are used
internally.
36Class B table
of bit borrowed Subnet Mask of Usable Subnets of available Hosts
.11000000.00000000 255.255.192.0 4 16,382
.11100000.00000000 255.255.224.0 8 8,190
.11110000.00000000 255.255.240.0 16 4,094
.11111000.00000000 255.255.248.0 32 2046
.11111100.00000000 255.255.252.0 64 1022
.11111110.00000000 255.255.254.0 128 510
.11111111.00000000 255.255.255.0 256 254
.11111111.10000000 255.255.255.128 512 126
.11111111.11000000 255.255.255.192 1024 62
.11111111.11100000 255.255.255.224 2048 30
.11111111.11110000 255.255.255.240 4096 14
.11111111.11111000 255.255.255.248 8192 6
.11111111.11111100 255.255.255.252 16384 2