Network layer definition
The network layer is the third layer in the Open System Interconnection (OSI) model. The network layer is tasked with transferring data packets from their source to their destination. The network layer is the backbone of the OSI model, but it is also vulnerable to external attacks because of its exposure to the internet.
Real network layer functions
- Connectionless (CL-mode) communication: The network layer facilitates transmissions between end points of different networks when there is no pre-arranged setup for communications. In connectionless communications, the recipient does not need to acknowledge the receipt of the data to the sender. IP-based communications are connectionless.
- Logical addressing: The network layer defines an addressing scheme for all hosts in the network. Sender and receiver IP addresses are placed in the headers of packets for routing purposes.
- Routing and forwarding: Network layer protocols determine the most suitable routes for packets from their source to their destination.
- Packetizing: Data received from upper layers of the network must be encapsulated in a packet at the source for transmission and decapsulated at the destination. The routers on the path cannot alter the source or destination address or decapsulate the packets (except in case of fragmentation).
- Fragmentation: Routers on the network layer sometimes need to break down packets into smaller data units to travel through different networks.
Examples of network layer protocols
- CLNS (Connectionless-mode Network Service)
- DDP (Datagram Delivery Protocol)
- EGP (Exterior Gateway Protocol)
- EIGRP (Enhanced Interior Gateway Routing Protocol)
- ICMP (Internet Control Message Protocol)
- IGMP (Internet Group Management Protocol)
- IPsec (Internet Protocol Security)
- IPv4/IPv6
- IPX (Internetwork Packet Exchange)
- LLARP (Low Latency Anonymous Routing Protocol)
- OSPF (Open Shortest Path First)
- PIM (Protocol Independent Multicast)
- RIP (Routing Information Protocol)