Network Layer Flashcards

1
Q

What is network layer?

A

This is the third layer in the OSI model. It is responsible for routing data from one device to another across networks. It ensures that packets reach the correct destination using IP addresses. It also manages congestion and handles errors.

  • When you send an email, your message is broken into packets, which are routed through the internet and reassembled at the receiver’s end.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a OSI model?

A

Open Systems Interconnection

Is a framework that describes how data moves through a network. It has 7 layers, each with a specific function:

Physical – Wires, cables, and signals (how data is physically transmitted).

Data Link – Manages direct connections between devices (MAC addresses, error detection).

Network – Finds the best path for data (IP addresses, routing).

Transport – Ensures reliable data delivery (TCP, UDP).

Session – Manages communication sessions (start, maintain, and end connections).

Presentation – Translates and encrypts data (formatting, compression, encryption).

Application – Interfaces for user applications (web browsers, email, etc.).

  • When you send a WhatsApp message, the data moves through all 7 layers, from converting text into bits to routing it across networks until it reaches your friend. 📱➡️🌍➡️📱
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is Routing?

A

Routing decides the best path for packets to take from the source to the destination. Routers use routing tables and protocols to find the most efficient way.

Think of Google Maps choosing the best route for your car trip. If one road is blocked, it finds another alternative route—just like a router does with data!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is forwarding?

A

Forwarding is the process of moving packets from one router to the next until they reach their final destination.

Imagine sorting letters in a post office. Each letter has an address, and workers put it in the correct delivery truck. Similarly, routers sort and forward packets.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is Router architecture?

A

A router has different parts:

  • Input Ports – Receive incoming packets
  • Switching Fabric – Moves packets inside the router
  • Output Ports – Send packets to the next hop
  • Routing Processor – Decides where packets should go

Think of a train station. Passengers (packets) enter from different gates (input ports), move through the station (switching fabric), and exit to their train (output ports).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is Control plane vs data plane?

A

Control Plane: Decides where packets should go (brain of the router).

Data Plane: Forwards packets at high speed (muscle of the router).

A traffic light system represents the control plane (decides when cars go), while the cars driving represent the data plane (moving based on the decision).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is Decentralized Switching

A

Each router processes packets locally, without depending on a central controller. It uses preloaded forwarding tables to quickly determine output interfaces for packets.

A router in an ISP backbone network does not wait for external instructions; instead, it consults its own forwarding table to forward packets.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is Destination-Based Forwarding

A

Destination-Based Forwarding is when a router or switch sends packets based only on the destination address.

Forwarding decisions are made only based on the destination IP address. The router does not consider other fields like source address or protocol type.

A router receives a packet with destination IP 192.168.1.100 and checks its forwarding table to send it to the appropriate next-hop router.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is Generalized Forwarding

A

Packets can be forwarded based on multiple header fields, not just the destination address. This allows for policy-based routing or quality of service (QoS) enforcement.

A firewall router forwards packets only if they match specific protocol types or port numbers (e.g., allowing only HTTP (port 80) traffic).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is Switcing fabrics?

A
  • The switching fabric moves packets from input ports to output ports inside a router. Different methods include memory-based, bus-based, or interconnection networks.
  • A high-speed router uses an interconnection network to prevent congestion when handling multiple parallel data streams.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is First Come First Serve (FCFS)

A
  • Packets are transmitted in the order they arrive, without priority. It is also known as FIFO (First-In-First-Out) scheduling.

A router handling low-priority traffic (e.g., bulk data transfers) uses FCFS, ensuring fairness but not prioritization.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is Priority Scheduling

A
  • Packets with higher priority are sent before lower-priority packets. It is commonly used for latency-sensitive traffic.

A VoIP (voice-over-IP) packet is sent before an email download packet to maintain real-time voice quality.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is Round Robin Scheduling

A

The router cycles through queues, sending one packet from each queue in turn.

A Wi-Fi router serving multiple devices ensures equal bandwidth allocation by sending one packet per device per cycle.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is Internet Protocol (IP)

A

IP is a connectionless protocol that assigns unique addresses to devices and ensures packets are routed correctly.

A packet from 192.168.1.1 to 8.8.8.8 (Google DNS) is routed across multiple networks using IP

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is Weighted Fair Queueing (WFQ)

A

Packets are allocated bandwidth based on priority weights assigned to different traffic classes.

A video streaming packet gets more bandwidth than a regular web page request.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

IPv4 Datagram Format

A

The IPv4 datagram contains:

  • Source & Destination IP addresses
  • TTL (Time-to-Live) to prevent infinite loops
  • Checksum for error detection

An IPv4 packet has a 20-byte header followed by the payload (e.g., a TCP segment carrying a webpage request).

16
Q

CIDR (Classless Inter-Domain Routing)

A

CIDR allows variable-length subnet masks instead of fixed classes (A, B, C), making IP address allocation more efficient.

A network with 192.168.1.0/24 can be divided into smaller subnets, such as 192.168.1.0/26 and 192.168.1.64/26.

17
Q

IPv6

A

IPv6 uses 128-bit addresses, solving the address exhaustion problem of IPv4. It includes auto-configuration and better security.

A new IoT device automatically assigns itself an IPv6 address using stateless address autoconfiguration (SLAAC).

18
Q

Tunneling

A

IPv6 packets can be encapsulated inside IPv4 packets to allow IPv6 traffic over IPv4-only

A 6to4 tunnel lets IPv6-enabled hosts communicate over an IPv4 backbone.

19
Q

VPN (Virtual Private Network)

A

A VPN encrypts traffic between two endpoints over an untrusted network (e.g., the internet).

A remote employee connects to a corporate network securely using a VPN tunnel.

20
Q

IPsec

A

IPsec provides encryption, authentication, and integrity for IP traffic.

An IPsec tunnel secures communication between two branch offices over the internet.