Network Layer I Flashcards
(7 cards)
Network-layer services and protocols
transport segment from sending
to receiving host
sender: encapsulates segments into
datagrams, passes to link layer
- receiver: delivers segments to
transport layer protocol
*Encapsulation in networking means wrapping data with the necessary protocol information
network layer protocols in every
Internet device: hosts, routers
routers:
* examines header fields in all IP
datagrams passing through it
* moves datagrams from input ports to
output ports to transfer datagrams
along end-end path
Why is data delivered back to the transport layer?
Because the transport layer is the one that originally created the segment, and it’s responsible for:
Managing end-to-end communication
Reassembling data
Handling reliability (like in TCP)
Here’s what happens step by step:
📤 On the Sender Side:
The transport layer (e.g., TCP or UDP) creates a segment.
This segment gets encapsulated in an IP datagram by the network layer.
The IP datagram is sent over the network.
📥 On the Receiver Side:
The network layer receives the IP datagram.
It looks at the protocol field in the IP header (e.g., TCP = 6, UDP = 17).
Based on that, it knows which transport layer protocol to send the segment to.
The segment is then delivered upward to that protocol (TCP or UDP), which processes it (e.g., reorders it, checks for errors, etc.).
Two key network-layer functions
- forwarding: move packets from
a router’s input link to
appropriate router output link
▪ routing: determine route taken by packets from source to
destination
* routing algorithms
Network layer: data plane, control plane
data plane: -example
A packet with destination 192.168.1.4 arrives.
The data plane checks the forwarding table and sees:
→ Send this to output port 3
(hardware)
Control plane: -example
Router learns via OSPF that the best path to 192.168.1.0/24 is through neighbor router A.
So, it updates the forwarding table:
Packets for 192.168.1.0/24 → Output port 3
Routers communicate with each other to figure out the best routes.
This is done using routing protocols like:
OSPF (Open Shortest Path First)
RIP (Routing Information Protocol)
BGP (Border Gateway Protocol)
It builds the routing table, and from that, the router constructs the forwarding table for the data plane to use
(software)-cpu
cons of network layer service
No guarantees on:
i. successful datagram delivery to destination
ii. timing or order of delivery
iii. bandwidth available to end-end flow
possible
possibly
Router architecture
Input Ports
Receive incoming packets.
Perform physical layer (e.g., electrical signal decoding) and data link layer (e.g., Ethernet) functions.
decentralized switching:
▪ using header field values, lookup output port using
forwarding table in input port memory (“match plus action”)
▪ goal: complete input port processing at ‘line speed’
▪ input port queuing: if datagrams arrive faster than forwarding
rate into switch fabric
▪ destination-based forwarding: forward based only on
destination IP address (traditional)
▪ generalized forwarding: forward based on any set of header
field values
Longest prefix matching
when looking for forwarding table entry for given
destination address, use longest address prefix that
matches destination address.