Network Layer
Dr. Alexios Louridas
What are we going to see?

Internetworking
A collection of networks to provide data delivery of host-to-host.
H# are hosts
R# are routers
Store and Forward Packet Switching

IP and Routing
Internet Protocol (IP)
Governs the transmission of data over the internet.
Responsible for Routing data packets.
-
Sender
-
Encapsulates segments into datagrams and sends them from the sending host to the receiving host
-
-
Receiver
-
Datagrams are delivered to the transport layer
-
-
Every host and router
-
Network layer protocols that operate at the network, data link, and physical layers
-
-
A router examines the header fields in all IP datagrams that pass through it
Network Layer

Encapsulation
Message
Message
Message
Message
H_t
H_t
H_t
H_n
H_n
H_l
segment
datagram
frame
-
Routing Protocols
-
RIP, OSPF, BGP
-
-
IP Protocol
-
Address
-
Datagram Format
-
Packet handling
-
-
ICMP Protocol
-
Error reports
-
Router Signals
-
-
Forwarding Table
Internet network Layer (disassembled)

IP Datagram Format
- Internet Protocol Address
- Identification for a device using the Internet Protocol
- Location identification
- What are they?
- A 32 bit number (IPv4)
- A 128 bit number (IPv6)
- Who manages it?
- Internet Assigned Numbers Authority (IANA)
- Internet providers
- Local administrators for a business or YOU at home
- Internet Assigned Numbers Authority (IANA)
IP Address
- Human Readable notation
- In decimals
- Example: 169.198.5.1
- In decimals
- 4 Billion addresses
IPV4
- Human Readable notation
- In Hexadecimals
- Example:
1000:ab3:0:1234:0:567:
- 340 undecillion addresses
IPV6

Address Classes
- IPv4 addresses divided in
- Network portion
- Host ID
- At the beginning of IP protocol addresses were designed based on classes:
- Class A
- Class B
- Class C
- Class D
- Multicasting
- Class E
- experimental
-
Class A network range
-
0-127
-
Really 0-126 as 127 is reserved
-
-
Class B network range
-
128-191
-
-
Class C network range
-
192-223
-
Network Ranges

- Class A supports 16777214 hosts
- Class B supports 65534 hosts
- Class C supports 254 hosts
- What if I only need 50 hosts or even worse 300?
- IP wastage
Calculate number of hosts


SUBNETting
-
To avoid IP wastage
-
Create smaller networks (sub networks; subnets) inside large networks
-
How?
-
Borrow bits from the Host ID
-
-
Still have wastage but a lot more reduced

SUBNETting
-
How do we know that 192.168.1.32 is an IP address or a subnet
- Subnet Masks
Class A: 255.0.0.0
Class B: 255.255.0.0
Class C: 255.255.255.0
- Subnet 192.168.1.32 is then represents as :
192.168.1.32 255.255.255.224 (or 192.168.1.32/27)

Classless Inter-Domain Routing (CIDR)
- Classes no longer apply, most networks are classless
- To slow down exhaustion of IPv4 addresses
- Introduced in 1993
- Now we only have a network represented by a network address and a prefix length (the number of 1s in the subnetmask)
Network layer
Forwarding
Connects one network to another network
Routing
Determines the best route to the destination before forwarding traffic to the next router along the path
Routers
Responsible for routing traffic between network
Efficient path
Routing table used to determine the most efficient path to reach the destination



Router Architecture
datagrams journey
Buffering
Routers use buffers to temporarily store packets when the receiving interface is busy or congested. The buffer allows the router to hold onto packets until it can forward them to the next hop on the network. Without buffering, packets could be lost or dropped, resulting in data loss or network congestion.
Classifier
When a router receives a packet, it needs to determine which output interface to send the packet to. To make this determination, the router uses a classifier to examine the packet header and match it against predefined rules. The classifier can identify the source and destination addresses, protocol type, and other attributes of the packet to make the routing decision.
Scheduling
Once a router has classified a packet and determined the output interface, it needs to schedule the packet for transmission. The scheduling algorithm determines the order in which packets are sent, based on factors such as packet priority, available bandwidth, and network congestion. Scheduling algorithms can help ensure that high-priority packets are sent first, while still maintaining overall network performance
The concept of net neutrality is based on the idea that the internet should be an open and level playing field, where all users have equal access to information and online resources, regardless of their location, financial resources, or the type of device they use to access the internet.
If network neutrality is not enforced, ISPs could prioritize or block certain types of internet traffic, including specific websites, applications, or services. This could have significant implications for how routers function and how data is transmitted over the internet.
https://www.youtube.com/watch?v=fpbOEoRrHyU
https://worldpopulationreview.com/country-rankings/countries-without-net-neutrality
Network Neutrality
Summary - Comparison
-
Message Complexity
-
Link State Algorithms sent O(nE) messages.
-
Distance Vector Algorithms exchange messages only to neighbours.
-
-
Convergence
- Link State Algorithms may have some oscillations.
- Distance Vector Algorithms may have routing loops and count-to-infinity problem.
-
Link Failures in Link State Algorithms
-
Node can advertise incorrect link cost.
-
Each node computes only its own table.
-
-
Link Failures in Distance Vector Algorithms
-
Can advertise incorrect path cost.
-
Each node’s table used by others so error propagates through the network.
-
Network Layer - IP Addressing
By Alexios Louridas
Network Layer - IP Addressing
- 145