Aspects of TCP/IP • Development and Target of TCP/IP • TCP/IP ...

hollowtabernacleΔίκτυα και Επικοινωνίες

26 Οκτ 2013 (πριν από 3 χρόνια και 7 μήνες)

52 εμφανίσεις

Digital Networks:Aspects of TCP/IP
·
T
E
L
E
CO
MMUNI
CA
T
ION
S
·

A
P
P
L
I
ED
I
NFORMATION
T
H
E
O
R
Y

ULM
SC
I
END
O
DOCEND
O
C
U
RA
N
D
O
UNI
V
ER
SITAT
1
Aspects of TCP/IP
 Development and Target of TCP/IP
 TCP/IP versus OSI
 IP (Internet Protocol)
{ Addressing
{ Routing
{ Fragmentation
{ Supporting Protocols
 TCP (Transmission Control Protocol)
{ Overview
{ Addressing and Multiplexing
{ Error and Flow Control
{ Connection Management
 UDP (User Datagram Protocol)
Digital Networks:Aspects of TCP/IP
·
T
E
L
E
CO
MMUNI
CA
T
ION
S
·

A
P
P
L
I
ED
I
NFORMATION
T
H
E
O
R
Y

ULM
SC
I
END
O
DOCEND
O
C
U
RA
N
D
O
UNI
V
ER
SITAT
2
Development and Target of TCP/IP
 TCP/IP is a synonym for a whole protocol family with TCP
and IP as a part of it
 TCP/IP is the Basis of the internet
 In 1969 the Advanced Research Project Agency (ARPA) of
the US department of defense charged several universities
and research centers to develop a robust wide area network.
Aim of this"ARPANET":
{ Connect computers all over the USA
{ Integrate all kind of networks (local area networks,wide
area networks,mobile radio networks,...)
{ Robust against the breakdown of parts of the network
 In 1983 TCP/IP becomes standard of all networks of the US
department of defense
 In 1983 the military MILNET was split o ARPANET
 More and more new networks were developed and con-
nected to ARPANET by gateways (Computer Science Net-
work CSNET,"Wissenschaftsnetz"WIN,...)
The INTERNET as a global network was born
Digital Networks:Aspects of TCP/IP
·
T
E
L
E
CO
MMUNI
CA
T
ION
S
·

A
P
P
L
I
ED
I
NFORMATION
T
H
E
O
R
Y

ULM
SC
I
END
O
DOCEND
O
C
U
RA
N
D
O
UNI
V
ER
SITAT
3
Growth of the Internet
ARPAnet (1969):
Growth of Internet in the last 10 years:
Digital Networks:Aspects of TCP/IP
·
T
E
L
E
CO
MMUNI
CA
T
ION
S
·

A
P
P
L
I
ED
I
NFORMATION
T
H
E
O
R
Y

ULM
SC
I
END
O
DOCEND
O
C
U
RA
N
D
O
UNI
V
ER
SITAT
4
TCP/IP versus OSI
43
2b
RS-232-C
X.21
Token Ring
IEEE 802.5 ,
HDLCIEEE 802.2, Logical Link Control (LLC)
IEEE 802.4 ,
Token Bus
IEEE 802.3 ,
Ethernet
CSMA/CD
Transmission Control Protocol
(TCP)
(UDP)
User Datagram Protocol
File Transfer Protocol
(FTP)
Network File System
(NFS)
2a
1
Telnet5-7
Simple Mail Transfer
Protocol
(SMTP)
Internet Protocol (IP)
 TCP/IP is organized in 4 layers instead of 7 (OSI)
 Almost no specication of layer 1,since the INTERNET (lat.
inter=between) is a connection between the networks.Many
LAN protocols (Ethernet,...) can be used as well as point to
point connections and ATM.
 The internet protocol performs the point to point connection
of LANs in the lower layers.It therefore corresponds with the
network layer of OSI.
 IP guarantees no reliable data transmission,so the Transmis-
sion Control Protocol TCP provides reliable data transmission.
 Together with the User Datagram Protocol UDP,TCP builds
a host to host layer ($transport layer in OSI).
 Upper layer protocols support working at remote terminals via
TELNET,le transfer via FTP,Hypertext Transfer Protocol
HTTP (!WWW),...
Digital Networks:Aspects of TCP/IP
·
T
E
L
E
CO
MMUNI
CA
T
ION
S
·

A
P
P
L
I
ED
I
NFORMATION
T
H
E
O
R
Y

ULM
SC
I
END
O
DOCEND
O
C
U
RA
N
D
O
UNI
V
ER
SITAT
5
Example:Connected Network
FTPclient
Ethernetdriver
Ethernetdriver
driver
token ring
driver
token ring
IP
TCP
FTPserver
token ring
protocol
Ethernetprotocol
TCP
IP
IP
TCP protocol
IP protocol
IP protocol
FTP protocol
Ethernet
token ring
Digital Networks:Aspects of TCP/IP
·
T
E
L
E
CO
MMUNI
CA
T
ION
S
·

A
P
P
L
I
ED
I
NFORMATION
T
H
E
O
R
Y

ULM
SC
I
END
O
DOCEND
O
C
U
RA
N
D
O
UNI
V
ER
SITAT
6
Internet Protocol
 IP performs data transfer between local networks with dif-
ferent standards.
 IP uses data transmission services of these LANs together
with additional WANs.
!The demand of IP to these"supporting"networks must
be as small as possible.The only requirement to lower
layers:transmission of datagrams (length,reliability,and
so on,is not relevant).
 Connections between subnetworks are done by IP routers
(gateways).
 These IP routers exchange information about existing con-
nections between themselves,and the load of these con-
nections.They also know all the computers in their own
network.
Main task of IP protocol:
Addressing,Routing,and Fragmentation
Digital Networks:Aspects of TCP/IP
·
T
E
L
E
CO
MMUNI
CA
T
ION
S
·

A
P
P
L
I
ED
I
NFORMATION
T
H
E
O
R
Y

ULM
SC
I
END
O
DOCEND
O
C
U
RA
N
D
O
UNI
V
ER
SITAT
7
The IP Header
(TTL)
32-bit destination IP adress
32-bit source IP address
3-bit flags
16-bit identification
8-bit time to live
4-bit
version
4-bit header
length
8-bit type of service
(TOS)
16-bit total length (in bytes)
13-bit fragement offset
16-bit header checksum8-bit protocol
options (if any)
data
31
20Bytes
0 15 16
Digital Networks:Aspects of TCP/IP
·
T
E
L
E
CO
MMUNI
CA
T
ION
S
·

A
P
P
L
I
ED
I
NFORMATION
T
H
E
O
R
Y

ULM
SC
I
END
O
DOCEND
O
C
U
RA
N
D
O
UNI
V
ER
SITAT
8
IP { Addressing (1)
 ARPANET connects LANs with dierent standards.To
avoid restrictions,a new addressing convention was devel-
oped.
 Other reason for the development of a new addressing con-
vention:Suppose that the Ethernet addressing was chosen.
The length of 46 bits means 2
46
= 7  10
13
possible receiver
addresses all of which have to be known by the router.
!Hierarchical addressing is used to allow simple routing
 Idea of hierachical addressing:
{ All computers in a network (e.g.LAN) are considered as
a subnetwork.
{ Each subnetwork has its own address.
{ The overall address of a computer in the LAN consists
of the subnetwork`s address and an identication number
that allows to distinguish between computers within the
LAN.
{ The overall address has to be unique
{ The datagram address consists of both parts.
{ Each subnetwork has its own router that knows all com-
puters of its network.
{ Additional hierachical levels are possible.
Digital Networks:Aspects of TCP/IP
·
T
E
L
E
CO
MMUNI
CA
T
ION
S
·

A
P
P
L
I
ED
I
NFORMATION
T
H
E
O
R
Y

ULM
SC
I
END
O
DOCEND
O
C
U
RA
N
D
O
UNI
V
ER
SITAT
9
IP { Addressing (2)
0101101110
computer
computer
computer
multicast address
8 bit 8 bit 8 bit 8 bit
network
network
network
 The internet addresses are divided into 4 classes:
{ A small no.of class A subnetworks (2
7
= 128) with a
very high no.of computers (2
24
= 16:7 million).
{ A higher no.of class B networks (2
14
= 16384) with
a smaller no.of computers (2
16
= 65536) compared
with class A.
{ A very high no.of class C subnetworks (2
21
= 2:1
million) with a small no.of computers (2
8
= 256).
{ Class D addresses are so-called multicast addresses for
transmitting a datagram to many receivers.
 The addresses are written byte by byte in decimal numbers
seperated by dots.
 Example:134.60.24.171
{ 134 = 10000110:!class B address
{ 134.60 is the subnetwork of the university of Ulm
{ 24.171:a single computer of the depart.of TAIT
Digital Networks:Aspects of TCP/IP
·
T
E
L
E
CO
MMUNI
CA
T
ION
S
·

A
P
P
L
I
ED
I
NFORMATION
T
H
E
O
R
Y

ULM
SC
I
END
O
DOCEND
O
C
U
RA
N
D
O
UNI
V
ER
SITAT
10
IP-Adress Usage (1998)
Source:http://www.caida.org/outreach/resources/learn/ipv4space/
Digital Networks:Aspects of TCP/IP
·
T
E
L
E
CO
MMUNI
CA
T
ION
S
·

A
P
P
L
I
ED
I
NFORMATION
T
H
E
O
R
Y

ULM
SC
I
END
O
DOCEND
O
C
U
RA
N
D
O
UNI
V
ER
SITAT
11
IP { Routing
 The routing in ARPANET (INTERNET) is hierachical.
 The lowest level is the subnetwork (LAN).Within a LAN
all computers can communicate as there are point to point
connections.Therefore no routing is necessary.
 The upper level has to transmit datagrams from router to
router.The routing is done by a shortest path algorithm:
{ At the beginning a distributed Bellman-Ford Algorithm
was used.The routing tables were sent to neighbouring
routers every 625 ms.This leads to jumping weights of
the connections and therefore many pakets transmitted
in circles.
{ Since 1973 an incremental Dijkstra algorithm is used for
routing.
Digital Networks:Aspects of TCP/IP
·
T
E
L
E
CO
MMUNI
CA
T
ION
S
·

A
P
P
L
I
ED
I
NFORMATION
T
H
E
O
R
Y

ULM
SC
I
END
O
DOCEND
O
C
U
RA
N
D
O
UNI
V
ER
SITAT
12
AS Core (April 2005)
Source:http://www.caida.org/
Digital Networks:Aspects of TCP/IP
·
T
E
L
E
CO
MMUNI
CA
T
ION
S
·

A
P
P
L
I
ED
I
NFORMATION
T
H
E
O
R
Y

ULM
SC
I
END
O
DOCEND
O
C
U
RA
N
D
O
UNI
V
ER
SITAT
13
IP { Fragmentation
32 Bits
Type of Service Total length
Datagram Identification Fragment offset
Header checksumProtocolTime to live
Source address
Destination address
Options
Data
M
F
DF
IHLVersion
 The networks connected with ARPA INTERNET use pack-
ets of dierent lengths (ALOHANET:256 bits,Ethernet:
max.12144,Token Bus IEEE 802.4:max.65528)
 The block sizes of the data delivered from TCP might be
too long for the used connections.
{ They are divided into several smaller parts.
{ One header for each part but no check sum (!frag-
mentation,no segmentation)
 Process of fragmentation:
{ unwrap datagram (remove header)
{ divide it into parts small enough
{ Add new header to each fragment
Digital Networks:Aspects of TCP/IP
·
T
E
L
E
CO
MMUNI
CA
T
ION
S
·

A
P
P
L
I
ED
I
NFORMATION
T
H
E
O
R
Y

ULM
SC
I
END
O
DOCEND
O
C
U
RA
N
D
O
UNI
V
ER
SITAT
14
IP { supporting protocols
 Internetwork Control Message Protocol (ICMP)
{ Exchange messages concerning the co-operation of dier-
ent internet modules (request for time stamp,messages
used for ow control,...)
 Address and Reverse Address Resolution Protocol
{ ARP:Data with an internet address reaches a router.
This router uses a table to nd the corresponding LAN
address or sends a broadcast message to all stations to
nd the receiver.
{ RARP:Assign internet address to computer which only
knows its LAN address.
 Domain Name Service
{ Domain name server converts the domain notation into
internet addresses (examples for top level domains:.com
= companies,.de = germany,.ru = russia,...)
{ Example:134.60.24.171 $callisto.e-technik.uni-ulm.de
Digital Networks:Aspects of TCP/IP
·
T
E
L
E
CO
MMUNI
CA
T
ION
S
·

A
P
P
L
I
ED
I
NFORMATION
T
H
E
O
R
Y

ULM
SC
I
END
O
DOCEND
O
C
U
RA
N
D
O
UNI
V
ER
SITAT
15
Transmission Control Protocol TCP { Overview (1)
 Task of TCP:
{ Connection management
{ Addressing and multiplexing
{ Error control
{ Flow control
 The Transmission Control Protocol gets data of any length
and divides it into segments (with check sum) of maximum
length of 64 kByte.
further fragmentation, datagrams
original message
data sequenceULPTCP
IP
IP in
Gateways
segments
TPDU
data
Header
TCP−
fragments
datagrams
data
Header
IP−
Header
TCP−
Header
TCP−
data
Header
data
IP−
data
Header
IP−
Header
TCP−
data
Header
IP−
Header
IP−
data
Header
IP−
data
Header
TCP−
Header
IP−
data
Header
IP−
data
Header
TCP−
Digital Networks:Aspects of TCP/IP
·
T
E
L
E
CO
MMUNI
CA
T
ION
S
·

A
P
P
L
I
ED
I
NFORMATION
T
H
E
O
R
Y

ULM
SC
I
END
O
DOCEND
O
C
U
RA
N
D
O
UNI
V
ER
SITAT
16
Transmission Control Protocol TCP { Overview (2)
Structure of one TCP segment:
URG
ACK
SYN
RST
32 Bits
Source port Destination port
Sequence number
Request number
Checksum
Window
Urgent Pointer
Options
Data
PS
H
F
I
N
Reserved
TCP
length
header
Digital Networks:Aspects of TCP/IP
·
T
E
L
E
CO
MMUNI
CA
T
ION
S
·

A
P
P
L
I
ED
I
NFORMATION
T
H
E
O
R
Y

ULM
SC
I
END
O
DOCEND
O
C
U
RA
N
D
O
UNI
V
ER
SITAT
17
TCP { Addressing and Multiplexing
 Computers capable of multi tasking must be able to com-
municate to another computer with several application pro-
cesses.This is one task of the transport layer protocol TCP.
 To distinguish between dierent processes each process gets
its own 16 bit address,a so-called port.
 The combination of internet address and port is called socket
and is unique within the whole Internet.
overall address =
network
address
address
host
address
process
internet address port
socket
++
 How does a process know what port it has to connect with
at the destination computer?
{ Ports 0 to 255 are so-called"well known ports"that are
assigned to xed application protocols (FTP:20 and 21,
TELNET:23,...)
{ All other ports communicate with the"ARPANET Initial
Connection Protocol".A Process Server observes one
well known port for requests of services.It assigns a free
port to the service process.
Digital Networks:Aspects of TCP/IP
·
T
E
L
E
CO
MMUNI
CA
T
ION
S
·

A
P
P
L
I
ED
I
NFORMATION
T
H
E
O
R
Y

ULM
SC
I
END
O
DOCEND
O
C
U
RA
N
D
O
UNI
V
ER
SITAT
18
TCP { Error Control and Flow Control
 The transmission over the internet is an unreliable service:
The physical channel may cause bit errors and packets may
get lost.
 TCP uses a selective repeat ARQ(automatic repeat request)
protocol for error control:If a datagramis not acknowledged
within a certain period of time,all eventually lost or wrong
packets are transmitted once more.
 There are two dierences to a normal ARQ protocoll
{ The rst byte of a session does not start with sequence
number 0 but with an arbitrary value.
{ Besides the request number there is no eld that says
what segments were correctly received.Instead of this
all segments are repeated if there is no acknowledge by
means of an increased request number within a certain
period of time.
 For the purpose of ow control,the size of the transmission
window can be assigned to the eld"window".
Digital Networks:Aspects of TCP/IP
·
T
E
L
E
CO
MMUNI
CA
T
ION
S
·

A
P
P
L
I
ED
I
NFORMATION
T
H
E
O
R
Y

ULM
SC
I
END
O
DOCEND
O
C
U
RA
N
D
O
UNI
V
ER
SITAT
19
TCP { Connection Management
 Connection management consists of 3 parts:establish,mon-
itore and release connections.
 One problem that arises when an end to end connection is
established is that after releasing an old connection some
old datagrams may remain somewhere in the network.They
could disturb a new connection.To combat this eect,the
Sequence number is initialized with the initial sequence num-
ber,created by a counter that runs faster than the sequence
numbers during transmission.Old segments have a smaller
sequence number than the new ones and are discarded.
 The connection is established with a 3 way handshake
Request
Accept
Request
Callrequest
Callaccept
Connected
Callaccept und Callrequest
A
B
Connected
Accept
( begin of transmission )
 The release of a connection is simply done by a Disconnect
Request TPDU:Abort:Packets may get lost,graceful close:
wait until all packets are transmitted.
 TCP has no means for monitoring a connection.
Digital Networks:Aspects of TCP/IP
·
T
E
L
E
CO
MMUNI
CA
T
ION
S
·

A
P
P
L
I
ED
I
NFORMATION
T
H
E
O
R
Y

ULM
SC
I
END
O
DOCEND
O
C
U
RA
N
D
O
UNI
V
ER
SITAT
20
User Datagram Protocol (UDP)
 To transmit data via TCP a connection has to be estab-
lished and afterwards released.This causes a large overhead
especially for short messages and a delay in transportation.
 These disadvantages are avoided by the UDP that provides
a connectionless service for short messages.
 Only the port address of transmitter and receiver,the total
length and,optionally,the check sum is put ahead the data
32 Bits
Destination port
Total length Checksum
Data
Source port