Sunteți pe pagina 1din 5

Network Layer (OSI Layer 3)

Provides services to exchange the individual pieces of data over the network between
identified end devices.

Functii
1/Adresare
2/Incapsulare
3/Rutare
4/Decapsulare

1/Adresare
identifica in mod unic modurile comunicarii in internet
Identifica sursa și destinatia comunicarii
Fiecare pachet in parte primeste adresa IP sursa și destinatie

2/Incapsulare
Preia PDU de la layer 4 si Adauga adresa IP sursa și destinatie PDU-ului
Adauga info specifice layer-ului de network unui segment.
Pentru layerul 3 OSI -Network layer- PDU se numeste PACKET, acesta contine in headerul
adaugat acum adresele IP

3/Rutare
Drumul pe care se transporta informatia in internet in functie de adresa destinatie, acesta
este ales de routere.
IP este protocol routat
Protocoale de routare: RIP EIGRP
Procesul de routare la rutere se bazeaza pe adresa IP

4/Decapsulare
La destinatie se inlatura headerul de network
Rezulta segmentul care este mai departe,TCP sau UDP

Spre doesebire de layer OSI 4-Transport- layer 3 specifica structura si metoda de


prelucrare a packet-ului folosit in comunicare.

PROTOCOALE
 Internet Protocol version 4 (IPv4)
 Internet Protocol version 6 (IPv6)
 Novell Internetwork Packet Exchange (IPX)
 AppleTalk
 Connectionless Network Service (CLNS/DECNet)

IP
1. Beste effort (unreliable)-nu are overhead pt a confirma primirea
2. Connectionless- nu se stabileste conexiunea inainte de a trimite packetul
3. Media Independent-nu tine cont de metoda de transmisie
El trebuie sa fie rapid, nu face controlul erorilor etc.
Contine un MTU (maximum transition unit), ce cat de mare poate fi packet-ul pentru a
incape pe un mediu de transport, dar preeia informatii de mai jos.
Unreliable means simply that IP does not have the capability to manage, and recover
from, undelivered or corrupt packets
Since protocols at other layers can manage reliability, IP is allowed to function very
efficiently at the Network layer

HEADER

This course will consider these 6 key fields:


1. IP Source Address
2. IP Destination Address
3. Time-to-Live (TTL)
4. Type-of-Service (ToS)
5. Protocol
6. Fragment Offset

Ver.-versiunea...IP v 4/6
IHL.- internet header lenght- multiplu de 4 bytes, default 5*4=20 bytes
Type of service-tipul de info din mesaj, 1byte, decide prioritatea
Packet lenght-header + data
Randul 2 e pentru fragmentare
TTL- Time-to-Live-1Byte, scade cu 1 pe masura ce packet-ul trece de un router
Protocol-marcheaza protocolul incapsulat in interiorul pachetului.
Example values are: 01 ICMP 06 TCP 17 UDP
Checksum-verificare integritatea pachetului
Source/destination add-adresele IP
Options-alte optiuni
Padding-pentru ca headerul trebuie sa aiba byti acesta completeaza
Identification-identifica fragmentele care fac parte din pachetul original
Flags 3 biti:
 DF dont fragment- impiedica fragmentarea cand este setat 1
 MF more fragments.
 Fragment offset-folosit impreuna cu cele doua pentru a inseria
fragmentele din pachetul original,contine ordinea

Fragmentarea doar la nivel de routere


 Daca MF e diferit de 0 folose fragment offset pentru reasamblare
 Daca MF e 0 și fragment offset e diferit de 0 el stie ca e ultimul pachet
 Daca MF e 0 și fragment offset e 0 avem pachet nefragmentat

Adresare IP
structura de adresare-> IERARHICA
subnet mask cu ip determina din ce retea este un host
IP: 192.168.0 1
SM: 255.255.255.0
192.168.0 identifica reteaua;.1 identifica hostul

IP: 192.168.0.1
SM:255.255.0.0
192.168 identifica reteaua, .0.1 identifica hostul

Impartirea retelelor
 Organizare mai eficienta
 Alocare eficienta de adrese
 Securitate
 Performanta mai buna

Domeniul de broadcast : Aria maxima in care se va propaga un broadcast


Routerul imparte domeniul de broadcast, el imparte retelele

Criterii de impartire
 Zona geografica
 Autoritate
 Functie, sau grup de lucru

Routare:
 Numele-ceea ce cautam
 Adresa- unde se afla
 Ruta - cum ajungem acolo

Gateway-cale de iesire din orice retea


Rutarea se face la fiecare hop in functie de informatia de pe routerul respectiv
Common issues with large networks are:
 Performance degradation
 Security issues
 Address Management

Performance degradation
Large numbers of hosts connected to a single network can produce volumes of data traffic
that may stretch network resources such as bandwidth and routing capability.
Limitarea nr de broadcasturi

GATEWAY
Also known as the default gateway, is needed to send a packet out of the local network. I
This gateway is a router interface connected to the local network.
The gateway interface has a Network layer address that matches the network address of
the hosts. The hosts are configured to recognize that address as the gateway.
The default gateway is configured on a host

Routes in a routing table have three main features:


 Destination network
 Next-hop
 Metric

The router will do one of three things with the packet:


 Forward it to the next-hop router
 Forward it to the destination host
 Drop it

Packet forwarding
Packet Examination: routerul decapsuleaza packet-ul si citeste IP urile si verifica in
routing table sa vada unde este reteaua.
Next Hop Selection: dupa decapsulare routerul verifica daca este direct conectat la
reteaua care trebuie sa primeasca pachetul, daca nu o contine el va reincapsula
datele pe care le-a primit si le va trimite la routerul urmator
Using the Default Route: The default route is also known as the Gateway of Last Resort.
The router at each hop knows only the address of the next-hop
This process may occur a number of times until the packet reaches its destination
network
Default routes are important because the gateway router is not likely to have a route to
every possible network on the Internet.