SlideShare ist ein Scribd-Unternehmen logo
1 von 52
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

FTP, SMTP, Telnet,
HTTP,…

TCP, UDP
IP, ARP, ICMP
Network Interface

9. TCP/IP
1

Reference: Charles L. Hedrick, “Introduction to the Internet Protocols”, Rutgers
University, http://oac3.hsc.uth.tmc.edu/staff/snewton/tcp-tutorial/
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

A. What is TCP/IP?
• TCP/IP is a set of protocols developed to allow
cooperating computers to share resources across a
network
• TCP stands for “Transmission Control Protocol”
• IP stands for “Internet Protocol”
• They are Transport layer and Network layer
protocols respectively of the protocol suite
• The most well known network that adopted
TCP/IP is Internet – the biggest WAN in the world
2
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

What is a protocol?
• A protocol is a collection of rules and procedures
for two computers to exchange information
• Protocol also defines the format of data that is
being exchanged

3
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

Why TCP/IP is so popular?
• TCP/IP was developed very early
• Technologies were widely discussed and circulated
in documents called “Request for Comments”
(RFC) – free of charge
• Supported by UNIX operating system

4
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

TCP/IP Model
• Because TCP/IP was developed earlier than the
OSI 7-layer mode, it does not have 7 layers but
only 4 layers
TCP/IP Protocol Suite
FTP, SMTP, Telnet,
HTTP,…

TCP, UDP
IP, ARP, ICMP
Network Interface

5

OSI 7-layer
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

• Application layer protocols define the rules when
implementing specific network applications
• Rely on the underlying layers to provide accurate
and efficient data delivery
• Typical protocols:

6

• FTP – File Transfer Protocol
• For file transfer
• Telnet – Remote terminal protocol
• For remote login on any other computer on the
network
• SMTP – Simple Mail Transfer Protocol
• For mail transfer
• HTTP – Hypertext Transfer Protocol
• For Web browsing
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

• TCP/IP is built on “connectionless” technology,
each datagram finds its own way to its destination
• Transport Layer protocols define the rules of
• Dividing a chunk of data into segments
• Reassemble segments into the original chunk

• Typical protocols:

7

• TCP – Transmission Control Protocol
• Provide further the functions such as reordering
and data resend
• UDP – User Datagram Service
• Use when the message to be sent fit exactly into a
datagram
• Use also when a more simplified data format is
required
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

• Network layer protocols define the rules of how to
find the routes for a packet to the destination
• It only gives best effort delivery. Packets can be
delayed, corrupted, lost, duplicated, out-of-order
• Typical protocols:
• IP – Internet Protocol
• Provide packet delivery
• ARP – Address Resolution Protocol
• Define the procedures of network address / MAC
address translation
• ICMP – Internet Control Message Protocol
• Define the procedures of error message transfer
8
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

Application Layer
Application

Transport
Network
Network Interface

9
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

B. Example: SMTP
SMTP Server

Client

SMTP

Virtual

TCP
IP, ARP, ICMP
Network Interface

10

SMTP

TCP

Actual

IP, ARP, ICMP
Network Interface
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

• The underlying layers have guaranteed accurate
data delivery
• We need to make a lot agreements with the server
in application layer before sending mail

11

1. Agree on how data is represented
• Binary or ASCII
2. Ensure the right recipient
• There may be 1000 users served by the server
3. Ensure the client has the right to send mail
• Some clients are not welcome
4. How to tell the server it is the end of the message
• All mail looks the same
:
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

• Example: SMTP
The following mail is to be sent:
Date: Fri, 18 Jan 02 13:26:31 EDT
From: enpklun@polyu.edu.hk
To: tchsun@eee.hku.hk
Subject: meeting
Let’s get together Monday at 1pm.

12
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

Client

SMTP Server
access port 25 of server
220 eee.hku.hk SMTP Service
at 20 Jan 02 05:17:18 EDT

HELO polyu.edu.hk
250 eee.hku.hk – Hello,
polyu.edu.hk
MAIL From:
<enpklun@polyu.edu.hk>
250 MAIL accepted
13
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

Client

SMTP Server

RCPT To:<tchsun@eee.hku.hk>
250 Recipient accepted
DATA
354 Start mail input;
end with .
Date: Fri, 18 Jan 02 13:26:31 EDT
From: enpklun@polyu.edu.hk
To: tchsun@eee.hku.hk
Subject: meeting

14

Let’s get together Monday at 1pm.
.
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

• The agreement made in the SMTP protocol
• All messages use normal text
• All ASCII characters
• The responses all begin with numbers
• To indicate the status when receiving the command
• Some words are reserved words
• HELO, MAIL, RCPT…
• Mail ends with a line that contains only a period

• The information passed with the SMTP messages
• The recipient name
• The sender name
• The mail
15
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

C. Domain Name (mentioned before)
• Every computer has a network address
• e.g. 158.132.161.99
• To access a computer, we need to specify its
network address
• Human beings are weak in memorizing numbers
• We prefer computer name or domain name
• e.g. hkpu10.polyu.edu.hk
• Need a machine on the Internet to convert name to
number
16
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

Domain name hierarchy
Example:
hkpu10.polyu.edu.hk
Computer name
• The domain
within edu.hk
• One of the
educational
institutions in
H.K.
17

• The domain
within hk
• Note: edu.hk
is not the
same as edu

Root domain name
other examples:
com – commercial company
org – general organization
net – major network centre
gov – government org.
mil – militrary group
edu – education org.
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

• An organization needs to register its domain name
• e.g. PolyU has registered its name to the domain
of edu.hk
• Once a domain name is assigned, the organization
is free to assign other names belong to its domain
• e.g. we can have
hkpu10.polyu.edu.hk
smtp.polyu.edu.hk
mail.polyu.edu.hk
18
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

Client

Where is
www.yahoo.com?

Domain Name Server
(DNS) of polyu.edu.hk

usually UDP
Address of
www.yahoo.com
Where is
www.yahoo.com?

Become
client
Where is
yahoo.com?

Address of
www.Yahoo.com

Address of the
DNS of
Yahoo.com

DNS of Yahoo.com
19

DNS of com
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

• Nevertheless, such a complicated procedure needs
not perform in most cases
• Client computers usually remember the answers
that it got before
• It reduces the loading to the root DNS
• To further reduce loading, there can be many root
DNS on the Internet
• e.g. there are a few “com” root DNS

20
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

Transport Layer
Message

Application

Segments
Transport
Network
Network Interface

21

h M

h M

h M
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

D. TCP and UDP
TCP – Transmission Control Protocol
• TCP is a connection-oriented protocol
• Does not mean it has a physical connection between
sender and receiver
• TCP provides the function to allow a connection
virtually exists – also called virtual circuit

• TCP provides the functions:
• Dividing a chunk of data into segments
• Reassembly segments into the original chunk
• Provide further the functions such as reordering and
data resend
22

• Offering a reliable byte-stream delivery service
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

Dividing and Reassembly
Source Port

TCP

Destination
Port

Sequence Number
Acknowledgement
Number

Message
Checksum
Message Data

23
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

Sender

1

2
Timeout
A2
retransmit

A1
1

24

Recipient

2

3
A3
3
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

• A Typical Procedure
• Sender
• TCP divides a message into segments
• Add sequence no.
• Send the segments in sequence and wait for
acknowledgement
• If an acknowledgement for a segment is not received
for a certain period of time, resend it until an
acknowledgement is received

• Recipient
• When receiving segments, send the
acknowledgement with correct number
• Reassembly the segments back to the message
25
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

Port Multiplexing
• A computer may perform a number of network
applications at the same time
• FTP + SMTP + HTTP, etc.

• Each computer has only one network address, how
can it serve so many applications at the same time?
⇒ by port multiplexing
FTP
Port 21

26

Network add:
158.132.161.99

SMTP
Port 25

HTTP
Port 80
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

Well-known Port Numbers

• Some port numbers are reserved for some
purposes
•
•
•
•

Port 21: FTP – file transfer
Port 25: SMTP – mail transfer
Port 23: TELNET – remote login
Port 80: HTTP – Web access

• These port numbers are well known to all
computers in the network
• E.g. whenever a client access port 25 of the server,
it means the client needs SMTP service
27
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

Client

SMTP port
= 1357

SMTP Server
Located by: network
address + TCP port
no.
Source Port
= 1357

Destination
Port = 25

Sequence Number
Acknowledgement
Number
Checksum

28

Message Data

SMTP port
= 25
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

Client A

SMTP + FTP Server
Network address:
158.132.161.99

SMTP port
= 1357

Client B

29

FTP port
= 1361

SMTP port
= 25
FTP port
= 21
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

Network Layer
Message

Application

Segments
Transport
Network
Network Interface

30

h M
h h M

h M
h h M

h M
h h M

Datagrams / Packets
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

E. Network Addresses and
Subnets
• A header is added to each segment in the
Network layer

3
Segment

IP

Time to
Live

Protocol

Total
Length
Header
CheckSum

Source Address
Destination Address

Segment
31
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

• Total Length – Total length of a packet (up to
65535 bytes)
• Time to Live – How many times this packet can
be routed on the network (up to 255)
• Protocol – The transport layer protocol that
the packet belongs to
• TCP: 6
• UDP: 17
• ICMP: 1

32

• Source address – the network address of the
computer that sends the data
• Destination address – the network address of
the computer that the data is sending to
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

• (Already mentioned)
• Each computer (host) must have a unique
network address (or IP address for TCP/IP suite)
• Each IP address is 32-bit long (four bytes)
• The four-byte address is written out as a.b.c.d
• e.g.
Byte 1
Byte 2
Byte 3
Byte 4
158

33

132

161

99

• IP addresses are hierarchical
• network I.D. and host I.D.
• Each Network I.D. on the Internet needs to be
registered to the Internet Assigned Number
Authority
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

Class A – for very large network
1 bit

7 bits

24 bits

0 Net I.D.

Host I.D.

• Only 27 (63) networks can belong to this class
• Each network, there are 224 hosts or computers
• Very few class A networks in the world
• e.g. Arpanet – the earliest packet switched
WAN (started 40 years ago)
34
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

Class B – for medium size network
2 bits
1 0

14 bits
Net I.D.

16 bits
Host I.D.

• 214 (16384) networks can belong to this class
• Each network, there are 216 (65536) hosts or
computers
• Polyu’s address belongs to this group
• e.g. 158.132.14.1

1001 1110
35

1000 0100

Network I.D.

0000 1110

0000 0001

Host I.D.
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

Class C – for small network
3 bits

21 bits

8 bits

1 1 0

Net I.D.

Host I.D.

• 221 networks can belong to this class
• Each network, there are only 28 (256) hosts or
computers

36
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

Class D – for multicast network
4 bits
1 1 1 0

28 bits
Group no.

• Packets are addressed to a multicast group
• Not often supported on Internet

37
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

Special Addresses

38

• Host I.D. = all ‘1’s ⇒ Directed broadcast
“Broadcast to all hosts in the network or
subnetwork”, not assigned
• Host I.D. = all ‘0’s ⇒ “This network”, not
assigned
• Network I.D. = 127 is reserved for loopback and
diagnostic purposes, not assigned
• Network I.D. + Host I.D. = all ‘1’s ⇒ Limited
broadcast
“Broadcast to all hosts in the current network”,
not assigned
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

Subnets
• A class B address can have 65536 hosts
• Difficult to manage
• Usually subdivide into a few small subnets
• Subnetting can also help to reduce broadcasting
traffic
158.132.1.0
Router

158.132.0.0
Total 65536 hosts

Router

158.132.2.0
158.132.3.0

39

All traffic to
158.132.0.0

All traffic to
158.132.0.0

Each subnet 256 hosts
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

Subnet Mask
• How does the router know which subnet a packet
should go?
• For each interface of the router, a subnet mask is
provided to redefine which part of the address is
Net ID and which part is Host ID
• Become classless addressing
A subnet mask: 255.255.255.0
1111 1111.1111 1111. 1111 1111. 0000 0000
40

‘1’s Net ID

‘0’s Host ID
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

158.132.1.10

Router
E0

A packet with
destination address
158.132.1.10

S0
S1
S2

Routing Table

S0
Subnet
Mask
AND

41

S1

S2

158.132.1.0

158.132.2.0

158.132.3.0

255.255.255.0 255.255.255.0 255.255.255.0

158.132. 1. 10
255.255.255. 0
158.132. 1. 0

1001 1110.1000 0100.0000 0001.0000
1010
AND 1111 1111.1111 1111.1111 1111.0000 0000
1001 1110.1000 0100.0000 0001.0000

Advantage: easy to compute
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

F. Routing
• How a packet finds its way to a computer in a
network?
• By using Routers
• Routing is the selection of a path to guide a
packet from the source to the destination
• Criteria in selecting a path may be:
• Shortest path
• Quickest path
• Cheapest path
42
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

Internet
router

U.S.
212.64.123.98

The red path is the
shortest path
43

Hong Kong
158.132.161.99
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

44

• Each router has a table that records the
estimated distance to all other routers
• If a router knows the entire network topology,
the shortest path can be calculated
• To achieve this, routers broadcast Link State
Advertisement to all other routers periodically
• By means of routing protocol
• Each router knows the exact topology, and
then calculates the shortest path
• In practice, it is not possible for a router to all
paths. Only the nearer ones are kept
• Hence can give wrong estimation
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

Host A
158.132.148.66
Default gateway: Router C

Subnet
158.132.166.0
S0

Router A

T0
T1

T0
S1

45

S1
T1

S1 158.132.166.0 Direct
255.255.255.0
T1 160. 64. 0. 0 Forward
255.255. 0. 0

T0

S0
Router C

Routing Table

Router B T0

Routing Table
S0 160. 64.124.0 Direct
255.255.255.0
S1 160. 64.123.0 Direct
255.255.255.0

S0

Subnet
160.64.124.0

S1
Subnet
160.64.123.0
Host B
160.64.123.98
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

46

1. Host A wants to send a packet to Host B with address
160.64.123.98
2. Host A checks that 160.64.123.98 is not in the same
network
3. Send packet to default gateway (Router C)
4. Default gateway finds that it cannot provide the best
route for the packet, inform Host A to send the
packet to Router A next time
5. Router C sends the packet to Router A
6. Router A checks from the table the packet should
forward to Router B
7. Router B receives the packet and checks in its table
the packet should directly deliver to subnet
160.64.123.0
8. Host B (160.64.123.98) receives the packet
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

Data Link and
Physical Layers
Message

Application

Segments
Transport
Network

h M
h h M

h M

h M

h h M

h h M

Packets

Network Interface
h h h M

47

h h h M

Frames
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

G. Ethernet Encapsulation and
ARP
• An IP packet should be encapsulated into a
frame for transmission by data link layer
• e.g. if Ethernet (or IEEE 802.3) is used:
Preamble

Des. Add

7
1
2/6
Bytes Byte Bytes
48

Sour. Add

2/6
Bytes

Length

IP Packet

FCS

2
46 - 1500 Bytes
4
Bytes
Bytes

IEEE 802.3 Frame
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

• Only the hardware address (MAC address) is
unique to a host
• Need to convert a network address to MAC
address
Source IP =
158.132.148.66

Destination IP = 158.132.148.132
Packet

Ethernet
Packet

49

Ethernet
Frame

Ethernet address = ?
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

ARP – Address Resolution Protocol
Case 1

1. Broadcast: Who has got IP address
158.132.148.132? What’s your
Ethernet address?

2. Reply: I do. My Ethernet address is
00-60-8C-41-37-52
3.

50

Ethernet Frame

Ethernet address = 00-60-8C-41-37-52
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

ARP – Address Resolution Protocol
Case 2

1. Broadcast: Who has got IP address
158.132.148.132? What’s your
Ethernet address?

Router

3.

2. Reply: The IP you indicated is not in your network.
You can give the packet to me first. My MAC address
is 00-60-8C-12-34-56
Ethernet Frame

51

Ethernet address = 00-60-8C-12-34-56
ENG224
INFORMATION TECHNOLOGY – Part I
9. TCP/IP

ARP Cache
• Will have a heavy traffic if so many ARP
broadcast messages are generated
• Each host will have a cache to store the
mappings (from IP to MAC address) that were
obtained before
IP Address
158.132.148.80

00-60-8C-27-35-9A

158.132.148.28

52

MAC Address
02-60-8C-1A-37-49

• An entry will only be kept in the cache for a
limited amount of time (say, 2 minutes)

Weitere ähnliche Inhalte

Was ist angesagt?

Wireshark working and basics
Wireshark working and basicsWireshark working and basics
Wireshark working and basicsM A Hafeez
 
InternetWorking With TCP\IP
InternetWorking With TCP\IPInternetWorking With TCP\IP
InternetWorking With TCP\IPhunghanamhus
 
Http Protocol
Http ProtocolHttp Protocol
Http ProtocolN R Z Malik
 
Analogue_GlenBrumpton_NUCUG_Final_1.2_Cleaned
Analogue_GlenBrumpton_NUCUG_Final_1.2_CleanedAnalogue_GlenBrumpton_NUCUG_Final_1.2_Cleaned
Analogue_GlenBrumpton_NUCUG_Final_1.2_CleanedGlen Brumpton
 
Web Server Technologies I: HTTP & Getting Started
Web Server Technologies I: HTTP & Getting StartedWeb Server Technologies I: HTTP & Getting Started
Web Server Technologies I: HTTP & Getting StartedPort80 Software
 
PLNOG 9: Ivan Pepelnjak - OpenFlow and SDN: hype, useful tools or panacea?
PLNOG 9: Ivan Pepelnjak - OpenFlow and SDN: hype, useful tools or panacea?PLNOG 9: Ivan Pepelnjak - OpenFlow and SDN: hype, useful tools or panacea?
PLNOG 9: Ivan Pepelnjak - OpenFlow and SDN: hype, useful tools or panacea?PROIDEA
 
02 coms 525 tcpip - introduction to tcpip
02   coms 525 tcpip -  introduction to tcpip02   coms 525 tcpip -  introduction to tcpip
02 coms 525 tcpip - introduction to tcpipPalanivel Kuppusamy
 
TCPLS presentation @ietf 109
TCPLS presentation @ietf 109TCPLS presentation @ietf 109
TCPLS presentation @ietf 109Olivier Bonaventure
 
Innovation is back in the transport and network layers
Innovation is back in the transport and network layersInnovation is back in the transport and network layers
Innovation is back in the transport and network layersOlivier Bonaventure
 
US07FFT-mod_ftp.ppt
US07FFT-mod_ftp.pptUS07FFT-mod_ftp.ppt
US07FFT-mod_ftp.pptwebhostingguy
 
Solving the Problems of FTP
Solving the Problems of FTPSolving the Problems of FTP
Solving the Problems of FTPFileCatalyst
 
Network testing and debugging
Network testing and debuggingNetwork testing and debugging
Network testing and debuggingSADEED AMEEN
 
The Application Layer
The Application LayerThe Application Layer
The Application Layeradil raja
 
Part 6 : Internet applications
Part 6 : Internet applicationsPart 6 : Internet applications
Part 6 : Internet applicationsOlivier Bonaventure
 
[Advantech] ADAM-3600 open vpn setting Tutorial step by step
[Advantech] ADAM-3600 open vpn setting Tutorial step by step [Advantech] ADAM-3600 open vpn setting Tutorial step by step
[Advantech] ADAM-3600 open vpn setting Tutorial step by step Ming-Hung Hseih
 
Indroduction to SIP
Indroduction to SIPIndroduction to SIP
Indroduction to SIPChien Cheng Wu
 
Net essentials6e ch5
Net essentials6e ch5Net essentials6e ch5
Net essentials6e ch5APSU
 
Hypertexttransferprotocolhttp 131012171813-phpapp02
Hypertexttransferprotocolhttp 131012171813-phpapp02Hypertexttransferprotocolhttp 131012171813-phpapp02
Hypertexttransferprotocolhttp 131012171813-phpapp02Nidhitransport
 

Was ist angesagt? (20)

Wireshark working and basics
Wireshark working and basicsWireshark working and basics
Wireshark working and basics
 
InternetWorking With TCP\IP
InternetWorking With TCP\IPInternetWorking With TCP\IP
InternetWorking With TCP\IP
 
Http Protocol
Http ProtocolHttp Protocol
Http Protocol
 
Analogue_GlenBrumpton_NUCUG_Final_1.2_Cleaned
Analogue_GlenBrumpton_NUCUG_Final_1.2_CleanedAnalogue_GlenBrumpton_NUCUG_Final_1.2_Cleaned
Analogue_GlenBrumpton_NUCUG_Final_1.2_Cleaned
 
Web Server Technologies I: HTTP & Getting Started
Web Server Technologies I: HTTP & Getting StartedWeb Server Technologies I: HTTP & Getting Started
Web Server Technologies I: HTTP & Getting Started
 
PLNOG 9: Ivan Pepelnjak - OpenFlow and SDN: hype, useful tools or panacea?
PLNOG 9: Ivan Pepelnjak - OpenFlow and SDN: hype, useful tools or panacea?PLNOG 9: Ivan Pepelnjak - OpenFlow and SDN: hype, useful tools or panacea?
PLNOG 9: Ivan Pepelnjak - OpenFlow and SDN: hype, useful tools or panacea?
 
02 coms 525 tcpip - introduction to tcpip
02   coms 525 tcpip -  introduction to tcpip02   coms 525 tcpip -  introduction to tcpip
02 coms 525 tcpip - introduction to tcpip
 
TCPLS presentation @ietf 109
TCPLS presentation @ietf 109TCPLS presentation @ietf 109
TCPLS presentation @ietf 109
 
Innovation is back in the transport and network layers
Innovation is back in the transport and network layersInnovation is back in the transport and network layers
Innovation is back in the transport and network layers
 
US07FFT-mod_ftp.ppt
US07FFT-mod_ftp.pptUS07FFT-mod_ftp.ppt
US07FFT-mod_ftp.ppt
 
HTTP
HTTPHTTP
HTTP
 
Solving the Problems of FTP
Solving the Problems of FTPSolving the Problems of FTP
Solving the Problems of FTP
 
Network testing and debugging
Network testing and debuggingNetwork testing and debugging
Network testing and debugging
 
The Application Layer
The Application LayerThe Application Layer
The Application Layer
 
Part 6 : Internet applications
Part 6 : Internet applicationsPart 6 : Internet applications
Part 6 : Internet applications
 
[Advantech] ADAM-3600 open vpn setting Tutorial step by step
[Advantech] ADAM-3600 open vpn setting Tutorial step by step [Advantech] ADAM-3600 open vpn setting Tutorial step by step
[Advantech] ADAM-3600 open vpn setting Tutorial step by step
 
Indroduction to SIP
Indroduction to SIPIndroduction to SIP
Indroduction to SIP
 
Net essentials6e ch5
Net essentials6e ch5Net essentials6e ch5
Net essentials6e ch5
 
Hypertexttransferprotocolhttp 131012171813-phpapp02
Hypertexttransferprotocolhttp 131012171813-phpapp02Hypertexttransferprotocolhttp 131012171813-phpapp02
Hypertexttransferprotocolhttp 131012171813-phpapp02
 
10 routing-bgp
10 routing-bgp10 routing-bgp
10 routing-bgp
 

Andere mochten auch

WiFi for mobile networks
WiFi for mobile networksWiFi for mobile networks
WiFi for mobile networkst_bindseil
 
basic it presentation........
basic it presentation........basic it presentation........
basic it presentation........vlsaroj
 
Firewall fundamentals
Firewall fundamentalsFirewall fundamentals
Firewall fundamentalsThang Man
 
Ipv4 &amp; ipv6
Ipv4 &amp; ipv6Ipv4 &amp; ipv6
Ipv4 &amp; ipv6alibefkani
 
Firewall Essentials
Firewall EssentialsFirewall Essentials
Firewall EssentialsSylvain Maret
 
Firewall Penetration Testing
Firewall Penetration TestingFirewall Penetration Testing
Firewall Penetration TestingChirag Jain
 
Presentation on dns
Presentation on dnsPresentation on dns
Presentation on dnsAnand Grewal
 
Smtp
SmtpSmtp
SmtpEri Alam
 
Introduction to DNS
Introduction to DNSIntroduction to DNS
Introduction to DNSJonathan Oxer
 
TCP/IP Model
TCP/IP ModelTCP/IP Model
TCP/IP Modelfarhan516
 
Presentation on Domain Name System
Presentation on Domain Name SystemPresentation on Domain Name System
Presentation on Domain Name SystemChinmay Joshi
 
File Transfer Protocol
File Transfer ProtocolFile Transfer Protocol
File Transfer Protocolguest029bcd
 
Domain Name System DNS
Domain Name System DNSDomain Name System DNS
Domain Name System DNSAkshay Tiwari
 
DNS - Domain Name System
DNS - Domain Name SystemDNS - Domain Name System
DNS - Domain Name SystemPeter R. Egli
 
TCP-IP Reference Model
TCP-IP Reference ModelTCP-IP Reference Model
TCP-IP Reference ModelMukesh Tekwani
 
Amplitude Modulation ppt
Amplitude Modulation pptAmplitude Modulation ppt
Amplitude Modulation pptPriyanka Mathur
 

Andere mochten auch (20)

WiFi for mobile networks
WiFi for mobile networksWiFi for mobile networks
WiFi for mobile networks
 
Computer networks protocols
Computer networks protocolsComputer networks protocols
Computer networks protocols
 
basic it presentation........
basic it presentation........basic it presentation........
basic it presentation........
 
Firewall fundamentals
Firewall fundamentalsFirewall fundamentals
Firewall fundamentals
 
Ipv4 &amp; ipv6
Ipv4 &amp; ipv6Ipv4 &amp; ipv6
Ipv4 &amp; ipv6
 
Firewall Essentials
Firewall EssentialsFirewall Essentials
Firewall Essentials
 
TCP/IP
TCP/IPTCP/IP
TCP/IP
 
Firewall Penetration Testing
Firewall Penetration TestingFirewall Penetration Testing
Firewall Penetration Testing
 
Presentation on dns
Presentation on dnsPresentation on dns
Presentation on dns
 
Domain name system
Domain name systemDomain name system
Domain name system
 
Smtp
SmtpSmtp
Smtp
 
Introduction to DNS
Introduction to DNSIntroduction to DNS
Introduction to DNS
 
TCP/IP Model
TCP/IP ModelTCP/IP Model
TCP/IP Model
 
Presentation on Domain Name System
Presentation on Domain Name SystemPresentation on Domain Name System
Presentation on Domain Name System
 
File Transfer Protocol
File Transfer ProtocolFile Transfer Protocol
File Transfer Protocol
 
Domain Name System DNS
Domain Name System DNSDomain Name System DNS
Domain Name System DNS
 
DNS - Domain Name System
DNS - Domain Name SystemDNS - Domain Name System
DNS - Domain Name System
 
TCP-IP Reference Model
TCP-IP Reference ModelTCP-IP Reference Model
TCP-IP Reference Model
 
Amplitude Modulation ppt
Amplitude Modulation pptAmplitude Modulation ppt
Amplitude Modulation ppt
 
5. icmp
5. icmp5. icmp
5. icmp
 

Ähnlich wie tcpip

tcp ip protocols.ppt
tcp ip protocols.ppttcp ip protocols.ppt
tcp ip protocols.pptssuser3acfba
 
The Internet protocol suite, commonly known as TCP/IP, is a framework for org...
The Internet protocol suite, commonly known as TCP/IP, is a framework for org...The Internet protocol suite, commonly known as TCP/IP, is a framework for org...
The Internet protocol suite, commonly known as TCP/IP, is a framework for org...MathivananP4
 
tcp-140613123317-phpapp01.pptx
tcp-140613123317-phpapp01.pptxtcp-140613123317-phpapp01.pptx
tcp-140613123317-phpapp01.pptxtouseeqzulfiqar1
 
Comptia Security + Chapter 1 501
Comptia Security           + Chapter 1 501Comptia Security           + Chapter 1 501
Comptia Security + Chapter 1 501AbdulalimBhnsawy
 
Computer network coe351- part2- final
Computer network coe351- part2- finalComputer network coe351- part2- final
Computer network coe351- part2- finalTaymoor Nazmy
 
testppt ch01(1)
testppt ch01(1)testppt ch01(1)
testppt ch01(1)ryaekle
 
Transport Layer Numericals
Transport Layer NumericalsTransport Layer Numericals
Transport Layer NumericalsManisha Keim
 
ADDRESSING PADA TCP IP
ADDRESSING PADA TCP IPADDRESSING PADA TCP IP
ADDRESSING PADA TCP IPJennifer Daniel
 
Primer to Browser Netwroking
Primer to Browser NetwrokingPrimer to Browser Netwroking
Primer to Browser NetwrokingShuya Osaki
 
Building the Internet of Things with Thingsquare and Contiki - day 2 part 2
Building the Internet of Things with Thingsquare and Contiki - day 2 part 2Building the Internet of Things with Thingsquare and Contiki - day 2 part 2
Building the Internet of Things with Thingsquare and Contiki - day 2 part 2Adam Dunkels
 
Datacom_Section_2_-_Protocols.ppt
Datacom_Section_2_-_Protocols.pptDatacom_Section_2_-_Protocols.ppt
Datacom_Section_2_-_Protocols.pptKristopher Hefner
 
Get into Networking by Clearing Comptia Network+ Test
Get into Networking by Clearing Comptia Network+ TestGet into Networking by Clearing Comptia Network+ Test
Get into Networking by Clearing Comptia Network+ Testcertblaster
 
TCP and UDP
TCP and UDP TCP and UDP
TCP and UDP Ramesh Giri
 

Ähnlich wie tcpip (20)

TCP/ IP
TCP/ IP TCP/ IP
TCP/ IP
 
tcp ip protocols.ppt
tcp ip protocols.ppttcp ip protocols.ppt
tcp ip protocols.ppt
 
The Internet protocol suite, commonly known as TCP/IP, is a framework for org...
The Internet protocol suite, commonly known as TCP/IP, is a framework for org...The Internet protocol suite, commonly known as TCP/IP, is a framework for org...
The Internet protocol suite, commonly known as TCP/IP, is a framework for org...
 
tcp-140613123317-phpapp01.pptx
tcp-140613123317-phpapp01.pptxtcp-140613123317-phpapp01.pptx
tcp-140613123317-phpapp01.pptx
 
Web Engineering Lecture2
Web Engineering Lecture2 Web Engineering Lecture2
Web Engineering Lecture2
 
Overview of TCP IP
Overview of TCP IPOverview of TCP IP
Overview of TCP IP
 
Tcp/ip
Tcp/ipTcp/ip
Tcp/ip
 
User Datagram Protocol
User Datagram ProtocolUser Datagram Protocol
User Datagram Protocol
 
Comptia Security + Chapter 1 501
Comptia Security           + Chapter 1 501Comptia Security           + Chapter 1 501
Comptia Security + Chapter 1 501
 
Computer network coe351- part2- final
Computer network coe351- part2- finalComputer network coe351- part2- final
Computer network coe351- part2- final
 
testppt ch01(1)
testppt ch01(1)testppt ch01(1)
testppt ch01(1)
 
Transport Layer Numericals
Transport Layer NumericalsTransport Layer Numericals
Transport Layer Numericals
 
Networking in python by Rj
Networking in python by RjNetworking in python by Rj
Networking in python by Rj
 
ADDRESSING PADA TCP IP
ADDRESSING PADA TCP IPADDRESSING PADA TCP IP
ADDRESSING PADA TCP IP
 
Primer to Browser Netwroking
Primer to Browser NetwrokingPrimer to Browser Netwroking
Primer to Browser Netwroking
 
Building the Internet of Things with Thingsquare and Contiki - day 2 part 2
Building the Internet of Things with Thingsquare and Contiki - day 2 part 2Building the Internet of Things with Thingsquare and Contiki - day 2 part 2
Building the Internet of Things with Thingsquare and Contiki - day 2 part 2
 
Datacom_Section_2_-_Protocols.ppt
Datacom_Section_2_-_Protocols.pptDatacom_Section_2_-_Protocols.ppt
Datacom_Section_2_-_Protocols.ppt
 
Get into Networking by Clearing Comptia Network+ Test
Get into Networking by Clearing Comptia Network+ TestGet into Networking by Clearing Comptia Network+ Test
Get into Networking by Clearing Comptia Network+ Test
 
TCP and UDP
TCP and UDP TCP and UDP
TCP and UDP
 
TCP/IP(networking)
TCP/IP(networking)TCP/IP(networking)
TCP/IP(networking)
 

KĂźrzlich hochgeladen

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 

KĂźrzlich hochgeladen (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

tcpip

  • 1. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP FTP, SMTP, Telnet, HTTP,… TCP, UDP IP, ARP, ICMP Network Interface 9. TCP/IP 1 Reference: Charles L. Hedrick, “Introduction to the Internet Protocols”, Rutgers University, http://oac3.hsc.uth.tmc.edu/staff/snewton/tcp-tutorial/
  • 2. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP A. What is TCP/IP? • TCP/IP is a set of protocols developed to allow cooperating computers to share resources across a network • TCP stands for “Transmission Control Protocol” • IP stands for “Internet Protocol” • They are Transport layer and Network layer protocols respectively of the protocol suite • The most well known network that adopted TCP/IP is Internet – the biggest WAN in the world 2
  • 3. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP What is a protocol? • A protocol is a collection of rules and procedures for two computers to exchange information • Protocol also defines the format of data that is being exchanged 3
  • 4. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP Why TCP/IP is so popular? • TCP/IP was developed very early • Technologies were widely discussed and circulated in documents called “Request for Comments” (RFC) – free of charge • Supported by UNIX operating system 4
  • 5. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP TCP/IP Model • Because TCP/IP was developed earlier than the OSI 7-layer mode, it does not have 7 layers but only 4 layers TCP/IP Protocol Suite FTP, SMTP, Telnet, HTTP,… TCP, UDP IP, ARP, ICMP Network Interface 5 OSI 7-layer
  • 6. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP • Application layer protocols define the rules when implementing specific network applications • Rely on the underlying layers to provide accurate and efficient data delivery • Typical protocols: 6 • FTP – File Transfer Protocol • For file transfer • Telnet – Remote terminal protocol • For remote login on any other computer on the network • SMTP – Simple Mail Transfer Protocol • For mail transfer • HTTP – Hypertext Transfer Protocol • For Web browsing
  • 7. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP • TCP/IP is built on “connectionless” technology, each datagram finds its own way to its destination • Transport Layer protocols define the rules of • Dividing a chunk of data into segments • Reassemble segments into the original chunk • Typical protocols: 7 • TCP – Transmission Control Protocol • Provide further the functions such as reordering and data resend • UDP – User Datagram Service • Use when the message to be sent fit exactly into a datagram • Use also when a more simplified data format is required
  • 8. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP • Network layer protocols define the rules of how to find the routes for a packet to the destination • It only gives best effort delivery. Packets can be delayed, corrupted, lost, duplicated, out-of-order • Typical protocols: • IP – Internet Protocol • Provide packet delivery • ARP – Address Resolution Protocol • Define the procedures of network address / MAC address translation • ICMP – Internet Control Message Protocol • Define the procedures of error message transfer 8
  • 9. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP Application Layer Application Transport Network Network Interface 9
  • 10. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP B. Example: SMTP SMTP Server Client SMTP Virtual TCP IP, ARP, ICMP Network Interface 10 SMTP TCP Actual IP, ARP, ICMP Network Interface
  • 11. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP • The underlying layers have guaranteed accurate data delivery • We need to make a lot agreements with the server in application layer before sending mail 11 1. Agree on how data is represented • Binary or ASCII 2. Ensure the right recipient • There may be 1000 users served by the server 3. Ensure the client has the right to send mail • Some clients are not welcome 4. How to tell the server it is the end of the message • All mail looks the same :
  • 12. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP • Example: SMTP The following mail is to be sent: Date: Fri, 18 Jan 02 13:26:31 EDT From: enpklun@polyu.edu.hk To: tchsun@eee.hku.hk Subject: meeting Let’s get together Monday at 1pm. 12
  • 13. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP Client SMTP Server access port 25 of server 220 eee.hku.hk SMTP Service at 20 Jan 02 05:17:18 EDT HELO polyu.edu.hk 250 eee.hku.hk – Hello, polyu.edu.hk MAIL From: <enpklun@polyu.edu.hk> 250 MAIL accepted 13
  • 14. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP Client SMTP Server RCPT To:<tchsun@eee.hku.hk> 250 Recipient accepted DATA 354 Start mail input; end with . Date: Fri, 18 Jan 02 13:26:31 EDT From: enpklun@polyu.edu.hk To: tchsun@eee.hku.hk Subject: meeting 14 Let’s get together Monday at 1pm. .
  • 15. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP • The agreement made in the SMTP protocol • All messages use normal text • All ASCII characters • The responses all begin with numbers • To indicate the status when receiving the command • Some words are reserved words • HELO, MAIL, RCPT… • Mail ends with a line that contains only a period • The information passed with the SMTP messages • The recipient name • The sender name • The mail 15
  • 16. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP C. Domain Name (mentioned before) • Every computer has a network address • e.g. 158.132.161.99 • To access a computer, we need to specify its network address • Human beings are weak in memorizing numbers • We prefer computer name or domain name • e.g. hkpu10.polyu.edu.hk • Need a machine on the Internet to convert name to number 16
  • 17. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP Domain name hierarchy Example: hkpu10.polyu.edu.hk Computer name • The domain within edu.hk • One of the educational institutions in H.K. 17 • The domain within hk • Note: edu.hk is not the same as edu Root domain name other examples: com – commercial company org – general organization net – major network centre gov – government org. mil – militrary group edu – education org.
  • 18. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP • An organization needs to register its domain name • e.g. PolyU has registered its name to the domain of edu.hk • Once a domain name is assigned, the organization is free to assign other names belong to its domain • e.g. we can have hkpu10.polyu.edu.hk smtp.polyu.edu.hk mail.polyu.edu.hk 18
  • 19. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP Client Where is www.yahoo.com? Domain Name Server (DNS) of polyu.edu.hk usually UDP Address of www.yahoo.com Where is www.yahoo.com? Become client Where is yahoo.com? Address of www.Yahoo.com Address of the DNS of Yahoo.com DNS of Yahoo.com 19 DNS of com
  • 20. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP • Nevertheless, such a complicated procedure needs not perform in most cases • Client computers usually remember the answers that it got before • It reduces the loading to the root DNS • To further reduce loading, there can be many root DNS on the Internet • e.g. there are a few “com” root DNS 20
  • 21. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP Transport Layer Message Application Segments Transport Network Network Interface 21 h M h M h M
  • 22. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP D. TCP and UDP TCP – Transmission Control Protocol • TCP is a connection-oriented protocol • Does not mean it has a physical connection between sender and receiver • TCP provides the function to allow a connection virtually exists – also called virtual circuit • TCP provides the functions: • Dividing a chunk of data into segments • Reassembly segments into the original chunk • Provide further the functions such as reordering and data resend 22 • Offering a reliable byte-stream delivery service
  • 23. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP Dividing and Reassembly Source Port TCP Destination Port Sequence Number Acknowledgement Number Message Checksum Message Data 23
  • 24. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP Sender 1 2 Timeout A2 retransmit A1 1 24 Recipient 2 3 A3 3
  • 25. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP • A Typical Procedure • Sender • TCP divides a message into segments • Add sequence no. • Send the segments in sequence and wait for acknowledgement • If an acknowledgement for a segment is not received for a certain period of time, resend it until an acknowledgement is received • Recipient • When receiving segments, send the acknowledgement with correct number • Reassembly the segments back to the message 25
  • 26. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP Port Multiplexing • A computer may perform a number of network applications at the same time • FTP + SMTP + HTTP, etc. • Each computer has only one network address, how can it serve so many applications at the same time? ⇒ by port multiplexing FTP Port 21 26 Network add: 158.132.161.99 SMTP Port 25 HTTP Port 80
  • 27. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP Well-known Port Numbers • Some port numbers are reserved for some purposes • • • • Port 21: FTP – file transfer Port 25: SMTP – mail transfer Port 23: TELNET – remote login Port 80: HTTP – Web access • These port numbers are well known to all computers in the network • E.g. whenever a client access port 25 of the server, it means the client needs SMTP service 27
  • 28. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP Client SMTP port = 1357 SMTP Server Located by: network address + TCP port no. Source Port = 1357 Destination Port = 25 Sequence Number Acknowledgement Number Checksum 28 Message Data SMTP port = 25
  • 29. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP Client A SMTP + FTP Server Network address: 158.132.161.99 SMTP port = 1357 Client B 29 FTP port = 1361 SMTP port = 25 FTP port = 21
  • 30. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP Network Layer Message Application Segments Transport Network Network Interface 30 h M h h M h M h h M h M h h M Datagrams / Packets
  • 31. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP E. Network Addresses and Subnets • A header is added to each segment in the Network layer 3 Segment IP Time to Live Protocol Total Length Header CheckSum Source Address Destination Address Segment 31
  • 32. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP • Total Length – Total length of a packet (up to 65535 bytes) • Time to Live – How many times this packet can be routed on the network (up to 255) • Protocol – The transport layer protocol that the packet belongs to • TCP: 6 • UDP: 17 • ICMP: 1 32 • Source address – the network address of the computer that sends the data • Destination address – the network address of the computer that the data is sending to
  • 33. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP • (Already mentioned) • Each computer (host) must have a unique network address (or IP address for TCP/IP suite) • Each IP address is 32-bit long (four bytes) • The four-byte address is written out as a.b.c.d • e.g. Byte 1 Byte 2 Byte 3 Byte 4 158 33 132 161 99 • IP addresses are hierarchical • network I.D. and host I.D. • Each Network I.D. on the Internet needs to be registered to the Internet Assigned Number Authority
  • 34. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP Class A – for very large network 1 bit 7 bits 24 bits 0 Net I.D. Host I.D. • Only 27 (63) networks can belong to this class • Each network, there are 224 hosts or computers • Very few class A networks in the world • e.g. Arpanet – the earliest packet switched WAN (started 40 years ago) 34
  • 35. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP Class B – for medium size network 2 bits 1 0 14 bits Net I.D. 16 bits Host I.D. • 214 (16384) networks can belong to this class • Each network, there are 216 (65536) hosts or computers • Polyu’s address belongs to this group • e.g. 158.132.14.1 1001 1110 35 1000 0100 Network I.D. 0000 1110 0000 0001 Host I.D.
  • 36. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP Class C – for small network 3 bits 21 bits 8 bits 1 1 0 Net I.D. Host I.D. • 221 networks can belong to this class • Each network, there are only 28 (256) hosts or computers 36
  • 37. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP Class D – for multicast network 4 bits 1 1 1 0 28 bits Group no. • Packets are addressed to a multicast group • Not often supported on Internet 37
  • 38. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP Special Addresses 38 • Host I.D. = all ‘1’s ⇒ Directed broadcast “Broadcast to all hosts in the network or subnetwork”, not assigned • Host I.D. = all ‘0’s ⇒ “This network”, not assigned • Network I.D. = 127 is reserved for loopback and diagnostic purposes, not assigned • Network I.D. + Host I.D. = all ‘1’s ⇒ Limited broadcast “Broadcast to all hosts in the current network”, not assigned
  • 39. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP Subnets • A class B address can have 65536 hosts • Difficult to manage • Usually subdivide into a few small subnets • Subnetting can also help to reduce broadcasting traffic 158.132.1.0 Router 158.132.0.0 Total 65536 hosts Router 158.132.2.0 158.132.3.0 39 All traffic to 158.132.0.0 All traffic to 158.132.0.0 Each subnet 256 hosts
  • 40. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP Subnet Mask • How does the router know which subnet a packet should go? • For each interface of the router, a subnet mask is provided to redefine which part of the address is Net ID and which part is Host ID • Become classless addressing A subnet mask: 255.255.255.0 1111 1111.1111 1111. 1111 1111. 0000 0000 40 ‘1’s Net ID ‘0’s Host ID
  • 41. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP 158.132.1.10 Router E0 A packet with destination address 158.132.1.10 S0 S1 S2 Routing Table S0 Subnet Mask AND 41 S1 S2 158.132.1.0 158.132.2.0 158.132.3.0 255.255.255.0 255.255.255.0 255.255.255.0 158.132. 1. 10 255.255.255. 0 158.132. 1. 0 1001 1110.1000 0100.0000 0001.0000 1010 AND 1111 1111.1111 1111.1111 1111.0000 0000 1001 1110.1000 0100.0000 0001.0000 Advantage: easy to compute
  • 42. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP F. Routing • How a packet finds its way to a computer in a network? • By using Routers • Routing is the selection of a path to guide a packet from the source to the destination • Criteria in selecting a path may be: • Shortest path • Quickest path • Cheapest path 42
  • 43. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP Internet router U.S. 212.64.123.98 The red path is the shortest path 43 Hong Kong 158.132.161.99
  • 44. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP 44 • Each router has a table that records the estimated distance to all other routers • If a router knows the entire network topology, the shortest path can be calculated • To achieve this, routers broadcast Link State Advertisement to all other routers periodically • By means of routing protocol • Each router knows the exact topology, and then calculates the shortest path • In practice, it is not possible for a router to all paths. Only the nearer ones are kept • Hence can give wrong estimation
  • 45. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP Host A 158.132.148.66 Default gateway: Router C Subnet 158.132.166.0 S0 Router A T0 T1 T0 S1 45 S1 T1 S1 158.132.166.0 Direct 255.255.255.0 T1 160. 64. 0. 0 Forward 255.255. 0. 0 T0 S0 Router C Routing Table Router B T0 Routing Table S0 160. 64.124.0 Direct 255.255.255.0 S1 160. 64.123.0 Direct 255.255.255.0 S0 Subnet 160.64.124.0 S1 Subnet 160.64.123.0 Host B 160.64.123.98
  • 46. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP 46 1. Host A wants to send a packet to Host B with address 160.64.123.98 2. Host A checks that 160.64.123.98 is not in the same network 3. Send packet to default gateway (Router C) 4. Default gateway finds that it cannot provide the best route for the packet, inform Host A to send the packet to Router A next time 5. Router C sends the packet to Router A 6. Router A checks from the table the packet should forward to Router B 7. Router B receives the packet and checks in its table the packet should directly deliver to subnet 160.64.123.0 8. Host B (160.64.123.98) receives the packet
  • 47. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP Data Link and Physical Layers Message Application Segments Transport Network h M h h M h M h M h h M h h M Packets Network Interface h h h M 47 h h h M Frames
  • 48. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP G. Ethernet Encapsulation and ARP • An IP packet should be encapsulated into a frame for transmission by data link layer • e.g. if Ethernet (or IEEE 802.3) is used: Preamble Des. Add 7 1 2/6 Bytes Byte Bytes 48 Sour. Add 2/6 Bytes Length IP Packet FCS 2 46 - 1500 Bytes 4 Bytes Bytes IEEE 802.3 Frame
  • 49. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP • Only the hardware address (MAC address) is unique to a host • Need to convert a network address to MAC address Source IP = 158.132.148.66 Destination IP = 158.132.148.132 Packet Ethernet Packet 49 Ethernet Frame Ethernet address = ?
  • 50. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP ARP – Address Resolution Protocol Case 1 1. Broadcast: Who has got IP address 158.132.148.132? What’s your Ethernet address? 2. Reply: I do. My Ethernet address is 00-60-8C-41-37-52 3. 50 Ethernet Frame Ethernet address = 00-60-8C-41-37-52
  • 51. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP ARP – Address Resolution Protocol Case 2 1. Broadcast: Who has got IP address 158.132.148.132? What’s your Ethernet address? Router 3. 2. Reply: The IP you indicated is not in your network. You can give the packet to me first. My MAC address is 00-60-8C-12-34-56 Ethernet Frame 51 Ethernet address = 00-60-8C-12-34-56
  • 52. ENG224 INFORMATION TECHNOLOGY – Part I 9. TCP/IP ARP Cache • Will have a heavy traffic if so many ARP broadcast messages are generated • Each host will have a cache to store the mappings (from IP to MAC address) that were obtained before IP Address 158.132.148.80 00-60-8C-27-35-9A 158.132.148.28 52 MAC Address 02-60-8C-1A-37-49 • An entry will only be kept in the cache for a limited amount of time (say, 2 minutes)