Networking Fundamentals and Protocols Guide
Networking Fundamentals and Protocols Guide
These questions test your understanding of the basic building blocks of networking.
o Define the OSI and TCP/IP models and explain the function of each layer (especially
the first four).
• What are the different types of network topologies (e.g., Star, Mesh, Bus)?
These focus on the rules and services that make the internet work.
o Name the default port numbers for common protocols like HTTP, HTTPS, FTP, and
SSH.
These look at how you manage traffic and protect the network.
o Name a common Interior Gateway Protocol (IGP) and Exterior Gateway Protocol
(EGP).
• Describe the steps you would take to troubleshoot a user who suddenly can't access the
internet.
• What is the purpose of the ping and traceroute (or tracert) commands?
• A user can access a website using its IP address but not its domain name. What is the likely
problem?
• What are the basic modes of operation on a Cisco device (User EXEC, Privileged EXEC,
Global Configuration)? (Often asked if the company uses Cisco equipment).
• What command would you use to check the IP address configuration on a Windows/Linux
machine? (ipconfig or ifconfig/ip a)
For fresher interviews, it's not enough to just give a definition. You should aim to explain the why.
Instead of just saying: "A router works at Layer 3," say: "A router works at Layer 3 (Network Layer)
because its primary function is to use IP addresses to forward packets between different,
segmented networks, making it the 'brain' that directs traffic across the internet."
Do you want me to generate sample answers for any of these questions, or would you like to focus
on questions for a specific technology like Cisco or Linux networking?
1
A computer network is a system where multiple computing devices are interconnected to share
resources and exchange data.1 These devices (like computers, servers, printers, and phones) are
linked using communication channels (cables or wireless media) and use a set of rules, or protocols,
to communicate with each other.2
Networking Models
The structure and functions of a network are typically described using layered models.3 The two
most prominent models are the OSI Model and the TCP/IP Model.
The Open Systems Interconnection (OSI) model is a conceptual framework used to describe the
function of a networking system.4 It is a seven-layer model that standardizes how different hardware
and software products should interact.5
The Transmission Control Protocol/Internet Protocol (TCP/IP) model is a more practical, four-layer
model widely used in current networking, as it directly maps to the protocols used on the Internet.6
Application, Combines the top three OSI layers. Handles applications and
Application
Presentation, Session high-level protocols (HTTP, DNS, SMTP).
As a network engineer fresher, you must master the details of the lower four layers:
• Function: Deals with the physical transmission and reception of unstructured raw bits over a
physical communication medium.
• Key Concepts: Cables (Ethernet, Fiber), electrical signals, radio frequencies, hubs, repeaters.
• Function: Provides the means to transfer data between network entities and detects and
possibly corrects errors that may occur at the Physical Layer.
• Key Concepts: MAC Addresses (48-bit physical address), Switches (which use the MAC
address table), Frames, VLANs, and protocols like ARP.
Layer 3: Network Layer
• Function: Responsible for routing and logical addressing. It determines the best path for
data (packets) across multiple networks.
• Key Concepts: IP Addresses (IPv4/IPv6), Routers, and routing protocols (e.g., OSPF, EIGRP).
• Function: Provides a reliable and ordered data delivery service (TCP) or a fast, connectionless
service (UDP) to applications. It also handles port numbers (e.g., Port 80 for HTTP) to
manage multiple application sessions.
• Key Concepts: TCP (Three-Way Handshake, flow control) and UDP (faster, no
acknowledgment).
These devices operate at different layers of the OSI model and have distinct functions:1
OSI Layer Physical Layer (Layer 1) Data Link Layer (Layer 2) Network Layer (Layer 3)
Repeats signal to all Filters and forwards frames Forwards packets between
Function connected devices based on MAC Addresses different networks based
(broadcasting). (unicasting). on IP Addresses.
• Collision Domain: A network segment where data packets from multiple devices can collide
if they attempt to transmit simultaneously.2 If a collision occurs, all devices in that domain
must stop and retransmit.3
o Switches and Routers create separate collision domains for each port, significantly
reducing collisions.4
• Broadcast Domain: A logical division of a computer network where all nodes can reach each
other by sending a broadcast message. A broadcast message is sent to all devices within that
domain.
o Routers stop broadcasts. They form the boundary between broadcast domains.
Universally unique, burned into the Network Unique within its network, assigned
Uniqueness
Interface Card (NIC) by the manufacturer. by a network administrator or DHCP.
The MAC address is used for local communication within a single network segment, while the IP
address is used for end-to-end communication across different networks (routing).
A Subnet Mask is a 32-bit number (for IPv4) that is used to divide an IP address into two parts: the
Network Address and the Host Address. It essentially tells a device which part of an IP address
identifies the network and which part identifies the specific host on that network.5
• In binary, the bits that are '1' in the subnet mask represent the Network Address portion.6
• The bits that are '0' represent the Host Address portion.7
For example, with the common mask [Link] (or /24), the first three octets identify the
network, and the last octet identifies the host.
Subnetting is the process of dividing a large network into smaller, more efficient subnetworks
(subnets).8 It's important for several reasons:
1. Reduced Broadcast Traffic: Smaller networks mean smaller broadcast domains.9 This reduces
the amount of unnecessary traffic a host receives, improving network performance.10
2. Efficient IP Address Usage: It allows for more efficient allocation of a limited number of IPv4
addresses by reserving the right number of hosts for each sub-network.11
3. Security and Management: Subnets can logically segment groups (like departments, floors,
or different device types), which enhances security by restricting access and simplifies
network management and troubleshooting.12
IPv4 (Internet Protocol version 4) and IPv6 (Internet Protocol version 6) are the two versions of the
Internet Protocol used to identify devices and route traffic on the internet.
Address
32 bits 128 bits
Length
Decimal numbers
Hexadecimal numbers separated by colons (e.g.,
Format separated by periods (e.g.,
2001:0db8:85a3:0000:0000:8a2e:0370:7334).
[Link]).
It is being rapidly
depleted, which is the
Necessity Solves the address depletion problem.13
main reason for the
transition to IPv6.
Network Topologies
A network topology is the arrangement of the various elements (links, nodes, etc.) of a computer
network.
Failure of one
Failure of the central device
Every device connects to a device/cable only affects
Star (hub/switch) brings down the
central hub or switch. that device. Easy to
whole network.
install.
Topology Description Advantage Disadvantage
Devices are connected in a Manages heavy network Failure of one link can break
Ring circular fashion, with data loads well since all nodes the entire ring (unless using a
traveling in one direction. get equal access. dual-ring setup).
A large area: a
city or a large High speed, Shared (often A city-wide
Metropolitan
MAN campus that moderate owned by a public Wi-Fi
Area Network
connects latency. service provider). system.
multiple LANs.
The Internet
A large
Shared (often itself, or a large
geographic area:
Wide Area Slower speed, relies on public corporation
WAN across states,
Network higher latency. telecom connecting its
countries, or
infrastructure). branches
continents.
globally.
Transport Layer Protocols: TCP vs. UDP
Guarantees packets arrive in the correct No guarantee; packets may arrive out of
Ordering
order. order or be dropped.
Flow/Error Yes, handles retransmissions and No, the application layer must handle
Control windowing. errors.
Header
20-60 bytes (larger). 8 bytes (minimal).
Overhead
Where accuracy is critical (e.g., file Where speed is critical (e.g., streaming,
Use Case
transfer, web browsing). gaming, voice/video).
Examples HTTP, HTTPS, FTP, SSH, SMTP DNS, DHCP, SNMP, VoIP, Gaming
This is the process TCP uses to establish a reliable connection before data transfer:
1. SYN (Synchronize): The client sends a packet with the SYN flag set to the server, proposing a
connection and a starting Sequence Number.
2. SYN-ACK (Synchronize-Acknowledge): The server receives the SYN, sets its own SYN flag,
and sets the ACK flag. The Acknowledgement Number is set to the client's Sequence
Number $+1$. It also sends its own starting Sequence Number.
3. ACK (Acknowledge): The client receives the SYN-ACK and sends a final ACK packet back to
the server. The Acknowledgement Number is set to the server's Sequence Number $+1$.
• Function: ARP is used to map a Layer 3 IP Address to a Layer 2 MAC Address within the same
Local Area Network (LAN).1
• How it works: A device broadcasts an ARP Request containing the target IP address. The
device with that IP address responds with an ARP Reply containing its MAC address. The
requestor then caches this mapping (ARP table).
4. Acknowledge: DHCP server sends a final ACK, confirming the lease and configuration
parameters.
• Role: DNS is the "phone book" of the Internet. Its primary role is to translate human-
readable domain names (e.g., [Link]) into machine-readable IP addresses (e.g.,
[Link]).
• Function in communication: When you type a website name, your computer queries a DNS
server to get the IP address, which is necessary for the Network Layer (IP) to route the traffic.
• Function: NAT is a method used by routers to modify the IP address information in the
header of IP packets while they are in transit.
2. Security: It hides the internal network's private IP structure from the outside world.
Port Number
• Function: A port number is a 16-bit number (range 0 to 65535) used to identify a specific
process or service running on a host (server or client). It allows a device to direct incoming
data to the correct application (e.g., web server, mail server, etc.).
• It combines with the IP address (e.g., $[Link]:80$) to form a socket, which uniquely
identifies a single connection endpoint.
Default Gateway
• Function: The default gateway is the IP address of the device (usually a router) that acts as a
bridge between the local network and all other remote networks (including the Internet).
• When a device needs to send a packet to an IP address outside its own local network, it
forwards the packet to the Default Gateway.
• Purpose: A VLAN is a logical grouping of network devices that allows a single physical switch
to be segmented into multiple virtual switches. This is used for:
2. Security: Isolating sensitive devices or users from the rest of the network.
• Trunking allows a single physical link (the trunk) between switches (or a switch and a router)
to carry traffic for multiple VLANs.
• 802.1Q is the IEEE standard for trunking. It works by inserting a 4-byte tag into the Ethernet
frame header. This tag contains the VLAN ID (VID), which the receiving switch uses to
determine which VLAN the packet belongs to.
• Dynamic Routing: Routers use Routing Protocols to automatically discover and calculate the
best paths to all networks.
•
Protocol Type Protocol Name
Interior Gateway Protocol (IGP) OSPF (Open Shortest Path First) or EIGRP/RIP
• Role: STP is a Layer 2 protocol that prevents switching loops in a network with redundant
links.2
• It works by detecting loops and strategically placing certain switch ports into a blocking
state. If the primary active link fails, STP recalculates and unblocks the redundant link to
restore connectivity (a process called convergence).
• Firewall: A security system that monitors and controls incoming and outgoing network traffic
based on predefined security rules. It typically operates at Layer 3/4.
o Role: Acts as a gatekeeper, filtering traffic based on IP addresses, port numbers, and
sometimes application data, protecting the internal network from external threats.
• Access Control List (ACL): A sequential list of permit or deny statements (rules) applied to
network traffic on a router or switch.
o Role: ACLs are the rule sets used to implement packet filtering, often configured on
a router to act as a basic firewall or to control routing updates.
• Function: A VPN creates a secure, encrypted tunnel over an insecure network (like the
Internet).
• Role: It allows remote users to securely access a private network as if they were physically
present on the local network.
1. Check Physical Connection (Layer 1): Is the cable plugged in? Are the link lights on? (If Wi-Fi,
is it connected to the correct network?)
o Run ipconfig (Windows) or ip a (Linux) to check for a valid IP address, Subnet Mask,
and Default Gateway.
o If the IP starts with 169.254.x.x (APIPA), it indicates the device failed to get an
address from the DHCP server.
o Ping a reliable public IP address (e.g., $[Link]$ for Google's DNS). If this fails, the
router or ISP is the likely issue.
o If $[Link]$ works, but a domain name fails, move to the next step.
• Ping: Uses ICMP (Internet Control Message Protocol) to test connectivity and response time
(latency) between two hosts. It checks if a destination is reachable.
• Traceroute (or tracert on Windows): Uses ICMP and the Time-To-Live (TTL) field to map the
path (the sequence of routers or "hops") a packet takes to reach a destination. It's used to
identify exactly where a connection is failing or where excessive latency begins.3
• The fact that the IP address works confirms the client has a valid IP, Default Gateway, and
Layer 3 connectivity to the target network. The failure of the domain name indicates that the
client cannot successfully translate the domain name into that working IP address.
• Troubleshooting Tool: Use the nslookup or dig command to manually query the configured
DNS server.
• Windows: ipconfig