Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

CLIL module - A.S.

2022/23

TCP/IP Architecture
Lesson 3 – (part 1)
In this lesson
TCP/IP Architecture : De Facto standard
A bit of history

TCP / IP layers

Main protocols overview: TCP, UDP, IP, HTTP, FTP, …

IP addresses
IPv4 : mention to NAT systems
IPv6

TCP / IP – Contents
TCP/IP : history
Development of TCP/IP and Internet are strictly
connected: TCP/IP success is due to Internet popularity
and viceversa
1969 – ARPAnet : in USA 4 Universities are connected
1974: first official document describing TCP
specifications (RFC 675)
1982: definition of “TCP/IP” and “Internet”

TCP / IP – History
TCP/IP : Internet Protocol Suite

TCP / IP – The Internet Protocol Suite


TCP/IP : 4 layers
Internet Protocol Suite: main Protocols

Layer 4: Application FTP , HTTP , SMTP , TELNET

Layer 3: Transport
TCP , UDP

Layer 2: Internet
IP
Layer 1: Network ethernet

TCP / IP – main Protocols


OSI model VS TCP/IP
OSI model: TCP/IP model:
De Jure Standard De Facto Standard

TCP / IP – OSI vs TCP/IP


TCP/IP : encapsulation
User DATA Application
converted for
transmission

segment TCP Segment of Transport


HEADER Upper layer DATA ( host-to-host )
IP HEADER TCP Segment of
packet Internet
HEADER Upper layer DATA

MAC LLC
IP HEADER TCP Segment of FCS
frame HEADER HEADER
HEADER Upper layer DATA
Network
bits
1011000100010110101001011100010101010010 interface

Transm. medium

TCP / IP – encapsulation
TCP/IP : Network layer
Network (interface): layer 1 of TCP/IP model and
corresponds to layers 1 and 2 of OSI model
Encapsulation into frames:
FRAME = HEADER + DATA + FCS
FCS (Frame control Sequence): to detect transmission
errors
Usually FCS implements the CRC (Cyclic Redundancy
Check)
Physical addressing: MAC address

TCP / IP – Network layer


Simple CRC method : parity bit
An extra bit 1 or 0 is added to the sequence
so that the total number of “1” is even
Extra bit
Data bits (parity bit)

01110011 01010011 1

The total number of “1” is even

TCP / IP – CRC
2 dimensions CRC
ONE error detected:
It’s possible to correct
NO errors
1 0 1 0 1 1 1 0 1 0 1 1
Parity
1 1 1 1 0 0 1 0 1 1 0 0
error
0 1 1 1 0 1 0 1 1 1 0 1

0 0 1 0 1 0 0 0 1 0 1 0

Parity error

TCP / IP – CRC
TCP/IP : Internet layer

Internet: layer 2 of TCP/IP model and


corresponds to layer 3 of OSI model
Internet layer is responsible for:
Fragmentation into packets and reassembly
CLNS (ConnectionLess Network Service)
Error detection (but no correction)
Logical Addressing
 IP protocol and IP addresses
Routing

TCP / IP – Internet layer


TCP/IP : Transport layer
Transport: layer 3 of TCP/IP model and corresponds to layer 4 of OSI
model

Provides host-to-host communication services to transport data


CONS (Connection Oriented Network Service)  TCP
CLNS (ConnectionLess Network Service)  UDP

Application addressing: sockets (ports).

Segmentation and reassembly

2 main protocols
TCP (Transmission Control Protocol)
UDP (User Datagram Protocol)

TCP / IP – Transport layer


TCP vs UDP
TCP provides a Connection Oriented Network Service
(CONS )
Reliable: it guarantees that data get to destination (the receiver
must confirm) (like registered mail)
Error checking and re-transmission

UDP provides a ConnectionLess Network Service (CLNS )


No error checking, no re-transmission
No acknowledgment by the receiver (not reliable) (like a
postcard)
High speed communication

TCP / IP – TCP vs UDP


TCP vs UDP: applications
Applications that use TCP
World Wide Web
File Transfer (FTP)
Remote terminal (TELNET)
Electronic mail (SMTP)

Applications that use UDP


Audio / video Streaming
Teleconference
Telephony (VoIP)

TCP / IP – TCP vs UDP


Internet Protocol (layer 2)
Designed to interconnect different Network Systems
Multi-protocol support: can support any higher level
protocol
Provides a CLNS service (Datagram)
Fragmentation into packets and reassembly
Error detection but no correction
Routing between networks
Logical addressing (IP addresses)

TCP / IP – Internet Protocol


… break …

Let’s see …

… Transmission Media …

TCP / IP – Transmission media


IP addresses
Each (public) IP address is unique all over the world: it
identifies 1 and only one host
Public IP addresses have been assigned by IANA
(Internet Assigned Number Authority), up to 1998, then
by ICANN (Internet Corporation for Assigned Names
and Numbers) to applying ISP
Special addresses can be used for private Networks.

TCP / IP – IP addresses
IP address (IPv4)
An IP address is a 32-bits number  4 bytes (octets) (IPv4)
Usually expressed using decimal dotted notation: the value
of each byte is written in decimal format, using a “.” to
separate numbers.
Example: the address 01111100 00100111 10001100 00001001
is written as: 124 . 39 . 140 . 9

32 bits allow 232 – 1 = 4294967295 possible addresses (0


cannot be used)  too few addresses !!!
 IP addresses are exhausted since 2011 !!!

TCP / IP – IP address
IP address
31 January 2011 last IP address (IPv4) was assigned by
IANA.
How to solve the problem?
IPv6: 8 groups 16 bits each; the value of each group is
expressed in hexadecimal format and separated by “:”
(colon)  the number of addresses is: 2128
Example: 35A9 : 203F : 1206 : C47D : 4ADC : 6018 : F34B : 00F5

NAT (Network Address Translation) : commonly used by


ISP (Internet Service Provider) to avoid expensive updating
to IPv6.

TCP / IP – IP address
NAT (Network Address Translation)
How does it work ?

All devices connected to LAN are masked by a router enabled


to handle Address Translation (NAT router), so that all
computers connected to the LAN are “seen” as a single device
from the Internet. Thus, only one public IP address is needed.

10.0.0.1
10.0.0.4
10.0.0.2
138.76.29.7
Public IP 10.0.0.3

TCP / IP – NAT
NAT
The Tanslation mechanism works using ports: NAT router assigns
a specific port number to each request coming from LAN.

Example: [ S = sender D = destination ] Port number

Translation Tabella di traduzione NAT


WAN side LAN side
138.76.29.7 , 5001 10.0.0.1 , 3345
S=10.0.0.1, 3345
D=128.119.40.186, 80
Translation
10.0.0.1
138.76.29.7
10.0.0.4
IP Pubblico
10.0.0.2

10.0.0.3
TCP / IP – NAT
NAT
From the Internet (WAN) only the output address
(138.76.29.7) of the NAT router is known.
Port number is a 16 bits number, that allows NAT router to
handle up to 216 = 65536 connections simultaneously,
using only a single public IP address!

Tabella di traduzione NAT

S=138.76.29.7, 5001 Lato WAN Lato LAN


S=10.0.0.1, 3345
D=128.119.40.186, 80 138.76.29.7, 5001 10.0.0.1, 3345 D=128.119.40.186, 80

S=128.119.40.186, 80 10.0.0.1
D=138.76.29.7, 5001 S=128.119.40.186, 80
D=10.0.0.1, 3345

10.0.0.2
138.76.29.7 10.0.0.4
Public IP 10.0.0.3

TCP / IP – NAT
IP structure

Composed of Network Number and Host Number.

The Network Number identifies a network; it’s the


same for all devices connected to the network.

The Host Number identifies a single host in the


network.

TCP / IP – IP structure
IP classes
IP addresses are divided into 5 classes:
A , B , C , D , E.

Classe A
The first bit (most significant bit) is 0
1 byte Network number (most significant byte), 3 bytes Host
Number
Classe B
The first 2 bits (most significant bits) are 10
2 bytes Network number (most significant bytes), 2 bytes Host Number

TCP / IP – IP classes
IP classes
Classe C:
The first 3 bits (most significant bits) are 110
3 byte Network number (most significant bytes), 1 byte
Host Number

Classe D: reserved for multicast addressing. They start


with 1110.
Classe E: Reserved for futur use. They start with 11110.

TCP / IP – IP classes
IP structure and classes

TCP / IP – IP structure and classes


Router Example of transmission
Process P1
B Process P2
H1 D
H2
213
A E F

C LAN

Tab A Tab C Tab E


A ------
---- A A A C

B B B A B D Left Column: destination


C C C ------ C C Right Column: next node to get to destination
D B D D D D

E C
B E E E --------

F C
B F E F F
Due to traffic jam, routing tables are updated

TCP / IP – Transmission example


Conclusion

Round-up
HOMEWORK
IPv6: calculate how many IP addresses each hair
Read the Text on IP addresses and do the
exercises from EdPuzzle

TCP / IP – Conclusion

You might also like