0% found this document useful (0 votes)
6 views31 pages

Model Suggestion DCNH

The document covers key concepts in data communication and networking, including the roles of gateways, TCP vs. UDP, and the OSI model layers. It explains protocols like NAT, IP fragmentation, and CSMA/CD, detailing their functions and limitations. Additionally, it addresses various networking standards, IP addressing, and the importance of error detection and correction.

Uploaded by

rupdebnathr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views31 pages

Model Suggestion DCNH

The document covers key concepts in data communication and networking, including the roles of gateways, TCP vs. UDP, and the OSI model layers. It explains protocols like NAT, IP fragmentation, and CSMA/CD, detailing their functions and limitations. Additionally, it addresses various networking standards, IP addressing, and the importance of error detection and correction.

Uploaded by

rupdebnathr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

Data Communication and Networking

Short Question: (Marks:1)

1. What is the role of a gateway in a network?

Ans: A gateway in a network serves as a connection point between two different networks, often operating
with different protocols. Its primary role is to translate communication between these networks, enabling data
to flow smoothly from one network to another.

2. Which of the following is true about the TCP sliding window mechanism?

Ans: The TCP sliding window mechanism is a fundamental part of how TCP ensures reliable, efficient data
transmission. It allows multiple packets to be sent before needing an acknowledgment, improving throughput.

3. What is the key difference between TCP and UDP?

Ans: TCP is connection-oriented and provides reliable data transfer, while UDP is connectionless and does not
guarantee delivery.

4. What is the main purpose of the Session layer in the OSI model?

Ans: The main purpose of the Session layer (Layer 5) in the OSI model is to: Establish, manage, and
terminate sessions between two communicating devices.

5. In a VPN, what does the term 'tunnelling' refer to?

Ans: The process of encapsulating one network protocol within another to securely transmit data over a public
network like the internet.

6. Which of the following is used to calculate the theoretical maximum data rate for a communication
channel?

Ans: Shannon-Hartley Theorem

7. What is the maximum data rate for a 10GBase-T Ethernet connection?

Ans: 10 Gbps (Gigabits per second)

8. In a TCP/IP network, which of the following represents a valid IP address in Class C?

Ans: 192.0.0.0 to 223.255.255.255

9. Which of the following is a class of IP address used for multicast communication?

Ans: Class D

10. What is the purpose of the ARP protocol in networking?

Ans: Map an IP address to a MAC (Media Access Control) address on a local area network (LAN).

11. Which of the following is true about IPv6?

Ans: IPv6 uses 128-bit addresses, allowing for a vastly larger address space than IPv4's 32-bit addresses.
12. Which of the following is the correct use of a NAT (Network Address Translation)?

Ans: To map private IP addresses within a local network to a public IP address for communication over the
internet.

13. Which of the following does not belong to the TCP/IP model?

Ans: Session and Presentation layer

14. Which of the following is the correct definition of a subnet mask?

Ans: A 32-bit address used to divide an IP address into network and host portions.

15. Which of the following is the main purpose of the TCP three-way handshake?

Ans: To establish a reliable connection between a client and a server before data transmission begins.

16. What is the main advantage of using a star topology?

Ans: Centralized management and easier fault isolation.

17. Which layer of the OSI model is responsible for defining the electrical, mechanical, and functional
aspects of a network?

Ans: The Physical Layer

18. Which of the following is the function of a gateway?

Ans: Connecting different networks and translating data between them, often involving different protocols.

19. Which of the following is the correct format for an IPv6 address?

Ans: Eight groups of four hexadecimal digits, separated by colons.

20. What is the purpose of an IP address in a network?

Ans: Identify and locate devices within a network, enabling them to communicate with each other.

21. Which of the following is a connection-oriented protocol?

Ans: A connection-oriented protocol is one that establishes a connection between the sender and receiver
before data transmission begins and ensures reliable, in-order delivery of data.

22. Which of the following is the maximum data transfer rate of a T1 line?

Ans: 1.544 Mbps (Megabits per second)

23. Which of the following is the default subnet mask for a Class C network?

Ans: 255.255.255.0

24. Which of the following protocols is used to send email over a network?

Ans: SMTP (Simple Mail Transfer Protocol)

25. What type of cable is used for Ethernet networking?

Ans: Twisted Pair Cable (specifically Cat5e, Cat6, or Cat6a cables)

26. Which of the following topologies has the central device that controls the flow of data?

Ans: Star Topology

27. What does the term "latency" refer to in networking?


Ans: The time it takes for data to travel from the source to the destination across a network.

28. Which of the following Ethernet standards provides a maximum data transfer rate of 1 Gbps?

Ans: Gigabit Ethernet (IEEE 802.3ab)

29. Which of the following is the correct range of private IP addresses according to RFC 1918?

Ans: According to RFC 1918, the correct range of private IP addresses for IPv4 is:

1. Class A: 10.0.0.0 to 10.255.255.255 (10.0.0.0/8)

2. Class B: 172.16.0.0 to 172.31.255.255 (172.16.0.0/12)

3. Class C: 192.168.0.0 to 192.168.255.255 (192.168.0.0/16)

30. In the OSI model, the physical layer is responsible for

Ans: The transmission and reception of raw bit streams over a physical medium.

31. Which of the following is used to map domain names to IP addresses?

Ans: DNS (Domain Name System)

32. What is the primary function of the Transport layer in the OSI model?

Ans: To provide end-to-end communication and ensure reliable data transfer between devices on different
networks.

33. What is the maximum data rate of a 100Base-TX Ethernet network?

Ans: 100 Mbps (Megabits per second)

34. What is the full form of IP in networking?

Ans: Internet Protocol

35. Which type of network is used to connect devices within a building or campus?

Ans: LAN (Local Area Network)

36. In networking, what does the acronym 'SSID' stand for?

Ans: In networking, SSID stands for Service Set Identifier. It is the name assigned to a Wi-Fi network,
allowing devices to identify and connect to the correct wireless network among many others.

37. Which of the following is used to connect multiple networks together?

Ans: To connect multiple networks together, a router is typically used. A router allows different networks (such
as local area networks, LANs, or wide area networks, WANs) to communicate with each other, directing data
between them.

38. Which of the following is an example of a private IP address range as per RFC 1918?

Ans: According to RFC 1918, the following are the private IP address ranges:

1. 10.0.0.0 - 10.255.255.255 (Class A)

2. 172.16.0.0 - 172.31.255.255 (Class B)

3. 192.168.0.0 - 192.168.255.255 (Class C)


39. Which protocol operates at the Transport layer of the OSI model?

Ans: The protocols that operate at the Transport layer (Layer 4) of the OSI model are:

1. Transmission Control Protocol (TCP) – This is a connection-oriented protocol, providing reliable


communication with error correction.

2. User Datagram Protocol (UDP) – This is a connectionless protocol, providing faster communication
but without reliability guarantees like TCP.

40. What is the primary function of a router in a network?

Ans: The primary function of a router in a network is to forward data packets between different networks.
Routers determine the best path for the data to travel across multiple networks and ensure that the packets reach
their destination.

41. Which of the following is a valid IPv4 address?

Ans: To determine which of the options is a valid IPv4 address, it must meet the following criteria:

• It consists of four octets (numbers) separated by dots.

• Each octet is a number between 0 and 255.

• No octet can exceed 255 or be negative.

42. What is the full form of MAC in the context of networking?

Ans: It refers to a unique identifier assigned to network interfaces for communications on the physical network
segment. The MAC address is used at the Data Link layer (Layer 2) of the OSI model to ensure that data is
delivered to the correct device on a local network. It is usually a 48-bit address, often displayed in hexadecimal
format.

43. Which layer of the OSI model is responsible for logical addressing?

Ans: At this layer, devices are assigned IP addresses (Internet Protocol addresses), which are used to logically
identify and route data between devices across different networks. The Network layer is responsible for
determining the best path for data to travel across the network using these logical addresses.

44. Which protocol is used to automatically assign IP addresses to devices on a network?

Ans: DHCP allows devices (such as computers, smartphones, and printers) to receive an IP address
automatically when they connect to a network, eliminating the need for manual configuration of IP addresses.

45. What is the maximum length of a single Ethernet cable segment in a 10Base-T network?

Ans: In a 10Base-T Ethernet network, the maximum length of a single cable segment is 100 meters (about 328
feet). This limit applies to the distance between a device (like a computer or switch) and the Ethernet hub or
switch it's connected to using twisted-pair cabling (Cat 5 or higher).

46. Which of the following is an example of a connectionless protocol?

Ans: Unlike connection-oriented protocols like TCP (Transmission Control Protocol), UDP does not establish a
connection before sending data. It simply sends packets to the recipient without ensuring that they are received
or acknowledging their receipt, making it faster but less reliable.
47. Which of the following is used to identify a device on a network?

Ans: An IP (Internet Protocol) address uniquely identifies each device on a network, allowing it to send and
receive data. Other identifiers like MAC addresses are also used, particularly within a local network, but IP
addresses are the primary means of identification across networks.

48. What is the function of a hub in a network?

Ans: A hub in a network functions as a basic device that connects multiple computers or other network
devices together in a Local Area Network (LAN) and allows them to communicate.

49. Which layer of the OSI model is responsible for error detection and correction?

Ans: The Data Link layer (Layer 2) of the OSI model is responsible for error detection and correction.

50. Which of the following is a guided transmission medium?

Ans: A guided transmission medium is one where signals are transmitted through a physical path. The correct
examples include:

• Twisted pair cables

• Coaxial cables

• Fiber optic cables

Short Answer type questions (Marks:5)

1. Explain how NAT works in IPv4 and its limitations. How does Carrier Grade NAT (CGNAT) help ISPs
manage address shortages?

Ans: NAT (Network Address Translation) is a method used to allow multiple devices on a local private
network to share a single public IP address for accessing the internet. Here's how it works:

1. Private IP Addresses: Devices within a local network are assigned private IP addresses (e.g.,
192.168.x.x).

2. Translation: When a device sends data to the internet, the NAT-enabled router modifies the packet’s
source IP address from the private IP to the router’s public IP address.

3. Port Mapping: To keep track of which internal device sent which request, NAT uses port numbers
and maintains a translation table.

4. Incoming Traffic: When the response comes back from the internet, NAT checks its table and forwards
the packet to the correct internal device based on the port mapping.

Limitations of NAT in IPv4

1. Breaks End-to-End Connectivity: NAT hides internal addresses, making direct communication (e.g.,
for VoIP, peer-to-peer apps) difficult without special techniques like port forwarding or STUN.

2. Complexity in Protocols: Some protocols that embed IP addresses in the payload (like FTP, SIP) may
not work correctly without NAT-aware applications or helper protocols.

3. Limited Port Availability: Since NAT relies on port numbers for multiple devices sharing one IP, it
can run out of ports for large-scale connections.
4. Security Assumptions: NAT is often mistakenly used as a security layer, though it does not replace a
proper firewall.

2. Explain how IP fragmentation works and why it is necessary. What are the risks of fragmentation, and
how does the Don't Fragment (DF) bit help mitigate these risks?

Ans: IP fragmentation occurs when a packet is too large to be transmitted over a network with a smaller
Maximum Transmission Unit (MTU). To ensure the packet reaches its destination, it is broken into
smaller fragments that can be transmitted individually and reassembled at the destination.

Process of Fragmentation (IPv4):

1. Original Packet exceeds the MTU (e.g., an Ethernet MTU is typically 1500 bytes).

2. Router or Sending Host splits the packet into fragments small enough to pass through the network.

3. Each Fragment contains:

o The same Identification field to group them together.

o A Fragment Offset to specify the fragment’s position in the original packet.

o A More Fragments (MF) flag to indicate whether more fragments follow.

4. Reassembly happens at the destination host, which uses the Identification and Offset to reconstruct
the original packet.

Fragmentation Is Necessary

• MTU Mismatch: Different links along a path may support different MTU sizes.

• Compatibility: Some applications send large packets that must be transmitted across networks with
smaller MTUs.

• Transmission Efficiency: Without fragmentation, oversized packets would be dropped entirely.

Risks of Fragmentation

1. Performance Overhead: Fragmentation increases CPU and memory usage due to extra processing at
both routers (for fragmentation) and hosts (for reassembly).

2. Packet Loss Sensitivity: If any one fragment is lost, the entire original packet must be retransmitted,
even if most of it arrived successfully.

3. Security Risks:

o Evasion Techniques: Attackers can craft overlapping or out-of-order fragments to bypass


firewalls or IDS systems.

o Fragment Bombs: Malicious fragments designed to exhaust resources during reassembly.

4. Troubleshooting Difficulty: Fragmented traffic is harder to analyze and monitor effectively.

5. Incompatibility: Some networks or middleboxes may block or mishandle fragments.

The DF (Don't Fragment) bit is a flag in the IPv4 header that tells routers not to fragment the packet
under any circumstances.
How It Helps Mitigate Risks:

• Path MTU Discovery (PMTUD): By setting the DF bit, a host can send progressively larger packets
to find the largest MTU along the path without causing fragmentation. If a router encounters a too-large
packet with DF set, it drops the packet and returns an ICMP "Fragmentation Needed" message.

• Avoids Fragmentation: Encourages applications and hosts to adapt packet sizes to the path’s
limitations, thus avoiding fragmentation altogether.

• Improved Reliability: Reduces risk of packet loss due to fragmented parts and simplifies reassembly
at the destination.

• Better Security: Prevents evasion attacks that rely on fragmented traffic.

3. Explain the working of CSMA/CD (Collision Detection) in wired Ethernet. How does CSMA/CA
(Collision Avoidance) improve performance in wireless networks?

Ans: Ethernet

CSMA/CD is a network protocol used in wired Ethernet networks (especially legacy ones like 10Base-T
and 100Base-T) to manage access to the shared communication medium and handle collisions.

How CSMA/CD Works:

1. Carrier Sense (CS): A device listens to the network to check if the medium is idle.

2. Multiple Access (MA): Multiple devices can access the same medium and may attempt to send data.

3. Transmit: If the medium is clear, the device starts transmitting.

4. Collision Detection (CD): While transmitting, the device monitors the medium for signals that
indicate a collision (two devices transmitting at the same time).

5. Collision Handling:

o If a collision is detected, all devices stop transmitting immediately.

o Each device waits for a random backoff time before attempting to retransmit (this prevents
repeated collisions).

6. Retry: After waiting, devices check the medium again before retransmitting.

CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance) – Used in Wireless Networks

In wireless networks, CSMA/CA is used instead of CSMA/CD because collision detection is not
feasible—a device cannot listen while it transmits due to the nature of radio communication.

How CSMA/CA Works:

1. Carrier Sense: The device checks if the wireless medium is idle.

2. Collision Avoidance:

o If the medium is busy, it waits a random backoff time.

o Once idle, it waits a further Inter-Frame Space (IFS) before transmitting.

3. Optional RTS/CTS (Request to Send / Clear to Send):

o The sender sends an RTS.

o The receiver replies with a CTS.


o All other devices hearing RTS or CTS know to remain silent, reducing chances of collision
(especially due to hidden nodes).

4. Transmit Data: If no response or interference occurs, the device sends the data.

5. Acknowledgment: The receiver sends an ACK to confirm successful delivery.

4. Explain why UDP is preferred over TCP in real-time applications like video streaming and online
gaming.

Ans: UDP (User Datagram Protocol) is preferred over TCP (Transmission Control Protocol) in real-
time applications like video streaming, online gaming, VoIP, and live broadcasts due to its low-latency
and minimal overhead.

UDP Challenges

1. Application-Level Handling:

o Error Correction: Use of Forward Error Correction (FEC) to recover from packet loss
without retransmission.

o Buffering and Jitter Control: Small buffers help smooth playback despite packet delay
variations.

o Sequence Numbers: Applications can include sequence numbers to detect and reorder out-
of-order packets.

2. Adaptive Bitrate Streaming (for video):

o Adjusts video quality dynamically based on current network conditions to avoid buffering or
delays.

3. Latency Optimization:

o Real-time apps prioritize speed over reliability, accepting some packet loss as a trade-off for
responsiveness.

4. Security Measures:

o Implement application-level authentication and encryption (e.g., DTLS for secure UDP).

o Use rate limiting and filtering to reduce the risk of abuse or DDoS.

5. What is the function of NAT (Network Address Translation) in a router?

Ans: Key Functions of NAT:

a) IP Address Sharing: NAT enables all devices in a local network (with private IPs like 192.168.x.x) to
share one public IP address when communicating with external networks.

b) Address Translation: It translates the private IP addresses of devices into the router's public IP
address for outbound traffic, and vice versa for inbound responses.

c) Port Mapping: NAT uses port numbers to keep track of which internal device is communicating with
which external service.

d) Security: NAT hides internal network structure, providing a basic level of security by not exposing
private IPs directly to the internet.

6. Describe the role of the transport layer in ensuring reliable data transmission in TCP.

Ans: 1. Connection Establishment and Termination


• TCP uses a three-way handshake to establish a reliable connection between sender and receiver
before data transmission:

o SYN → SYN-ACK → ACK

• Ensures both ends are ready and agree on initial sequence numbers.

2. Reliable Data Transfer

• TCP guarantees delivery of all data segments in the correct order.

• If any segment is lost, corrupted, or received out of order, TCP will retransmit or reorder them.

3. Error Detection and Correction

• Each TCP segment includes a checksum to detect errors during transmission.

• Corrupted segments are discarded and retransmitted upon detection.

4. Flow Control

• TCP uses a sliding window mechanism to ensure that a fast sender does not overwhelm a slow
receiver.

• The receiver advertises a window size indicating how much data it can accept.

5. Congestion Control

• TCP adjusts its sending rate based on network congestion using algorithms like:

o Slow Start

o Congestion Avoidance

o Fast Retransmit and Fast Recovery

6. Segmentation and Reassembly

• The transport layer breaks large data streams into segments for transmission.

• At the receiving end, TCP reassembles these segments into the original message.

7. Explain the function of DNS in a network.

Ans: Functions of DNS in a Network:

1. Domain Name Resolution:

o The primary function of DNS is to resolve domain names into their associated IP addresses.

o For example, when you type www.google.com into your browser, DNS translates this into the
IP address that corresponds to Google’s web server, such as 142.250.190.78.

2. Hierarchical Structure:

o DNS uses a hierarchical system of servers to find the requested information. It starts from the
root DNS servers, queries top-level domain (TLD) servers (e.g., .com, .org), and then
queries authoritative DNS servers for the specific domain.

3. Caching:
o DNS servers and clients cache domain name resolutions to reduce load and improve speed.
This means that once a domain has been resolved to an IP address, it can be stored
temporarily, and future requests for the same domain can be answered more quickly.

4. Support for Services Other than Web:

o DNS doesn't just translate website names. It can resolve names for other services like email
servers (MX records), VoIP systems (SRV records), and more.

5. Load Balancing:

o DNS can distribute the load by returning different IP addresses for the same domain based on
round-robin DNS or geolocation-based DNS.

6. Redundancy:

o Multiple DNS servers provide redundancy in case one server goes down, ensuring that domain
name resolution is still possible.

7. Reverse DNS:

o DNS can also perform reverse lookups, where it maps IP addresses back to domain names,
a process often used for security and troubleshooting.

8. What is the difference between analog and digital signals?

Ans: The key difference between analog and digital signals lies in the way they represent and transmit
information.

1. Representation of Data:

• Analog Signal:

o An analog signal represents data using continuous waveforms that vary smoothly over time.

o It can take any value within a certain range and is often used to represent real-world
phenomena like sound, light, and temperature.

o Examples: A traditional vinyl record, audio signals in a microphone, or radio waves.

• Digital Signal:

o A digital signal represents data using discrete values or binary numbers (0s and 1s).

o The signal is a sequence of pulses or discrete steps, where each pulse corresponds to a specific
bit (either a 0 or 1).

o Examples: Computer data transmission, digital audio, or video signals.

2. Representation of Data:

Characteristic Analog Signal Digital Signal

Nature Continuous Discrete

Continuous wave (sine


Representation Square waves (0s and 1s)
waves)
Characteristic Analog Signal Digital Signal

Can take any value Can only take specific, finite values (usually
Value Range
within a given range 0 or 1)

Can be affected by
Less susceptible to noise, more accurate
Accuracy noise, leading to
over long distances
distortion

Retains quality over long distances, only


Degrades gradually over
Signal Quality degraded at very long distances or with
distance
severe interference

Requires a wider
More efficient, uses less bandwidth for
Bandwidth bandwidth for
transmission
transmission

Analog audio, AM/FM Digital TV signals, data on the internet, digital


Example
radio signals audio

9. What are the different types of topologies used in networking? Explain each.

Ans: In networking, topology refers to the physical or logical arrangement of devices and cables in a network. It
determines how devices are connected, how data flows, and how failure of one component affects the entire
network. Here are the most common types of network topologies:

1. Bus Topology

• Description: All devices (computers, printers, etc.) are connected to a single central cable called a bus
or backbone. Data is sent in one direction along the bus, and each device listens for messages addressed
to it.

• Characteristics:

o Simple and easy to implement.

o Inexpensive because it uses minimal cabling.

o Data collision can occur when multiple devices send data at the same time.

o A failure in the bus can bring down the entire network.

2. Star Topology

• Description: All devices are connected to a central device, usually a switch or hub. Data is sent from
the sender device to the central device, which then forwards it to the recipient.

• Characteristics:

o Easy to manage because all devices are connected to a central point.

o Failure of a single device does not affect the rest of the network, but failure of the central
device (hub/switch) brings down the entire network.

o Requires more cabling than bus topology.


3. Ring Topology

• Description: Devices are connected in a circular fashion, where each device is connected to exactly
two other devices, forming a closed loop. Data travels in one direction (in most cases) around the ring
until it reaches the recipient.

• Characteristics:

o Data travels in a unidirectional or bidirectional manner.

o If a device or connection fails, it can break the loop and disrupt the entire network.

o Can be expensive to set up and maintain.

4. Mesh Topology

• Description: Every device is connected to every other device in the network. This creates a
redundant and robust connection, where multiple paths exist between devices.

• Characteristics:

o Highly reliable due to multiple redundant paths. If one path fails, the data can be rerouted
through another path.

o Complex and expensive to install and manage due to the large number of connections.

o Provides high fault tolerance and security.

5. Tree Topology (Hybrid)

• Description: Combines aspects of star and bus topologies. Devices are organized in a hierarchical
structure, where multiple star networks are connected to a central bus or backbone.

• Characteristics:

o Scalable and allows for the creation of larger networks.

o A failure in the backbone can affect the entire network, but failures in individual branches
won’t impact other branches.

o Requires more cabling than a basic star or bus topology.

• Use Case: Suitable for large networks such as campus networks or enterprise networks where
scalability and hierarchical structuring are needed.

6. Hybrid Topology

• Description: A combination of two or more topologies. For example, a star-bus hybrid where multiple
star networks are connected through a bus.

• Characteristics:

o Provides flexibility to suit specific needs.

o Can be expensive and complex to implement and maintain.

o Offers the benefits of different topologies while mitigating some of their drawbacks

10. Explain the working of the ARP protocol.

Ans: Working of ARP (Step-by-Step Process):


1. ARP Request:

o When a device (let's call it Device A) wants to communicate with another device (Device B)
on the same network but only knows Device B's IP address, it needs to discover Device B's
MAC address.

o Device A sends an ARP Request broadcast message to all devices in the network, asking:
"Who has IP address X.X.X.X? Tell me your MAC address."

o This message is a broadcast because Device A doesn't know the MAC address of any device
initially, so it needs to ask everyone on the local network.

2. ARP Reply:

• Device B, the one with the IP address 192.168.1.10, receives the ARP request and checks if the request
matches its own IP.

• If it matches, Device B sends an ARP Reply message directly to Device A, saying:


"I have IP address 192.168.1.10, and my MAC address is XX:XX:XX:XX:XX:XX."

• This reply is unicast (sent directly to Device A), not a broadcast, because Device A specifically asked
for this information.

11. What is the difference between IPv4 and IPv6?

Ans: Key Differences between IPv4 and IPv6:

1. Address Length:

• IPv4:

o 32-bit address.

o Written as 4 decimal octets, separated by periods (e.g., 192.168.1.1).

o Supports around 4.3 billion unique IP addresses.

• IPv6:

o 128-bit address.

o Written as 8 groups of 4 hexadecimal digits, separated by colons (e.g.,


2001:0db8:85a3:0000:0000:8a2e:0370:7334).

o Supports approximately 340 undecillion (3.4×10²⁸) unique IP addresses, which is an


enormous increase compared to IPv4.

12. What is the role of a router in a network?

Ans: Key Functions of a Router:

1. Packet Forwarding:

• Routing Packets: The primary function of a router is to forward data packets from one network to
another based on their IP address. When a device sends data, the router checks the destination IP
address of the packet and decides which path it should take to reach the correct destination network.

• Routing Table: Routers maintain a routing table that lists the best paths to various network
destinations. The router uses this table to determine where to send each packet.

2. Network Segmentation:
• Routers connect different subnets or networks together. This allows larger networks to be broken
down into smaller, more manageable segments. Routers help direct traffic between these subnets while
also ensuring that devices in different networks can communicate with one another.

3. Interconnecting Different Networks:

• Routers connect different types of networks, such as local area networks (LANs), wide area
networks (WANs), or the internet. For example, a router connects a home network to an ISP
(Internet Service Provider) or connects multiple branch offices of a company.

4. Determining Best Path (Routing):

• Dynamic Routing: Routers can use routing protocols like RIP, OSPF, or BGP to dynamically
discover and update the best routes for data packets. These protocols allow routers to exchange routing
information and automatically adapt to network changes, such as network congestion, failures, or new
paths.

• Static Routing: In some cases, network administrators may configure static routes, where the paths
are manually defined. These are fixed and do not change unless modified by the administrator.

5. Network Address Translation (NAT):

• NAT is a process used by routers to translate private IP addresses (used within a local network) into
a public IP address (used on the internet). This is especially useful in IPv4 networks, where the
number of public IP addresses is limited.

• NAT allows multiple devices in a private network to share a single public IP address when accessing
external resources, such as websites or services on the internet.

13. What is the OSI model? Explain its layers.

Ans: The 7 Layers of the OSI Model:

Layer 1: Physical Layer

• Function: The Physical Layer is responsible for the physical transmission of data over a medium
(such as cables, fiber optics, or wireless signals). It deals with the hardware and the physical
connections in the network.

Layer 2: Data Link Layer

• Function: The Data Link Layer provides reliable data transfer over the physical link by organizing
data into frames. It also handles error detection and correction, ensuring that the data sent between
devices is accurate and free from errors.

Layer 3: Network Layer

• Function: The Network Layer is responsible for routing data from the source to the destination across
different networks. It determines the best path for data to travel from one point to another and handles
logical addressing.

Layer 4: Transport Layer

• Function: The Transport Layer is responsible for ensuring that data is delivered reliably and in the
correct order. It provides end-to-end communication between devices and handles flow control, error
recovery, and retransmission.

Layer 5: Session Layer


• Function: The Session Layer establishes, manages, and terminates communication sessions between
applications on different devices. It provides mechanisms for opening, closing, and managing a session,
ensuring that data is correctly synchronized and maintained.

Layer 6: Presentation Layer

• Function: The Presentation Layer is responsible for data translation, encryption, and compression. It
ensures that the data is in a format that the application layer can understand, regardless of the system or
platform differences between the sender and receiver.

Layer 7: Application Layer

• Function: The Application Layer is the closest layer to the end user and deals with high-level network
protocols and services that applications use to communicate over the network. It provides services
directly to user applications.

14. Explain the difference between a hub and a switch.

Ans:

1. Hub:

A hub is a simple, basic networking device that connects multiple computers or network devices together in a
star topology.

2. Switch:

A switch is a more advanced networking device that also connects multiple devices in a network, but it
functions in a much smarter way compared to a hub.

15. What is the significance of an IP address in networking?

Ans: Significance of an IP Address in Networking:

1. Device Identification:

• Unique Identification: An IP address uniquely identifies each device (such as computers, routers,
smartphones, etc.) on a network. Just like a home address allows the postal service to deliver mail to a
specific location, an IP address ensures that data reaches the correct destination on a network.

• Host Address: In an IP-based network, each device or host is assigned a unique IP address to
differentiate it from other devices in the network.

2. Routing Data Across Networks:

• Data Delivery: The primary role of an IP address is to ensure that data packets are delivered to the
correct destination device. When data is sent over a network, routers use the destination IP address to
determine the best route for the packet to travel.

• Routing Process: When a device sends data, the data is broken into small packets. These packets
contain both the source and destination IP addresses, which routers use to forward the packets from one
network to another, across potentially multiple networks, until they reach their destination.

3. Network Communication:

• Local Area Networks (LANs): In a LAN, IP addresses are used to identify each device within the
network. Devices communicate with one another using these IP addresses to send and receive data.
• Wide Area Networks (WANs) and the Internet: On the internet, every device, website, or server has
a unique IP address. This address allows devices to send requests to websites, access services, and
exchange data globally.

4. IP Addressing and Subnetting:

• Subnetting: IP addresses are divided into networks and sub-networks using subnetting, allowing
administrators to efficiently allocate IP addresses and organize networks. This is essential for managing
large networks.

• Network Organization: Subnetting divides a larger network into smaller segments, improving
network performance, security, and scalability. Each subnet can have its own range of IP addresses to
identify devices within that subnet.

• Private and Public IPs: There are both private and public IP addresses. Private IP addresses are used
within internal networks (e.g., home or office networks) and are not routable on the internet. Public IP
addresses are assigned to devices or networks that are accessible from the internet.

5. Types of IP Addresses:

• IPv4 (Internet Protocol Version 4): The most commonly used IP address format, consisting of 32 bits,
and represented in dotted decimal format (e.g., 192.168.1.1). IPv4 provides approximately 4.3 billion
unique IP addresses.

• IPv6 (Internet Protocol Version 6): Due to the shortage of available IPv4 addresses, IPv6 was
developed to provide a much larger address space, using 128 bits. It allows for a virtually unlimited
number of unique IP addresses. IPv6 addresses are represented in hexadecimal format (e.g.,
2001:0db8:85a3:0000:0000:8a2e:0370:7334).

• Dynamic IP Address: An IP address that is assigned by a DHCP server (Dynamic Host Configuration
Protocol) and can change over time.

• Static IP Address: A fixed IP address manually assigned to a device, which does not change unless
manually reconfigured. Static IPs are often used for servers, printers, and devices requiring consistent
access.

• Private and Public IP:

o Private IP addresses are used for internal network communication (e.g., 192.168.x.x,
10.x.x.x).

o Public IP addresses are used for devices that need to be accessible from the internet (e.g., web
servers, DNS servers).

16. What are the functions of the transport layer in the OSI model?

Ans: 1. Segmentation and Reassembly:

• Segmentation: The transport layer takes large chunks of data from the application layer and breaks
them into smaller, manageable units called segments (for TCP) or datagrams (for UDP). This allows
the data to be transmitted more efficiently over the network.

• Reassembly: At the receiving end, the transport layer reassembles these segments or datagrams back
into the original message before passing it to the application layer.

2. End-to-End Communication:
• Communication Between Devices: The transport layer ensures end-to-end communication between
devices in different networks. Unlike lower layers (like the Network Layer), which handle
communication between devices on the same local network, the transport layer is responsible for the
entire communication from the source to the destination, often across multiple networks.

• Port Numbers: The transport layer uses port numbers to distinguish between different applications or
services running on the same device. For example, port 80 is used for HTTP traffic, while port 443 is
used for HTTPS.

3. Error Detection and Error Recovery:

• Error Detection: The transport layer checks for errors in the data segments or packets. For example,
TCP uses a checksum to verify the integrity of data segments and ensure that no errors occurred during
transmission.

• Error Recovery: If a segment is lost or corrupted, the transport layer provides mechanisms to request
retransmission of the data. For example, TCP uses acknowledgments and sequence numbers to
ensure reliable data delivery and perform error recovery.

4. Flow Control:

• Flow Control: The transport layer manages the rate at which data is sent to prevent overwhelming the
receiving device. Flow control ensures that the sender does not send data faster than the receiver can
process it.

• Windowing: In TCP, flow control is achieved using a sliding window mechanism, which ensures that
only a certain number of data segments can be in transit at a time.

5. Connection Establishment and Termination:

• Connection-Oriented Communication: The transport layer manages connection-oriented


communication (e.g., TCP), which requires a connection to be established before data transfer begins.
This is done through a three-way handshake process in TCP:

1. SYN: The sender sends a synchronization request.

2. SYN-ACK: The receiver responds with a synchronization acknowledgment.

3. ACK: The sender confirms the connection.

• Connection Termination: When the communication is complete, the transport layer is responsible for
properly terminating the connection (e.g., by using a four-way handshake in TCP).

6. Multiplexing and Demultiplexing:

• Multiplexing: The transport layer allows multiple applications to use the network at the same time by
assigning different port numbers to each communication stream. This is called multiplexing, as it
allows the transport layer to send data from multiple sources (applications) simultaneously.

• Demultiplexing: At the destination, the transport layer uses the destination port number to direct the
incoming data to the correct application or process. This is called demultiplexing, where the transport
layer identifies which application should receive the data.

7. Reliable and Unreliable Communication:

• Reliable Communication (TCP): The transport layer can provide reliable communication (TCP),
which guarantees data delivery, error correction, and flow control. TCP ensures that the data is received
in the correct order, without errors, and that lost data is retransmitted.
• Unreliable Communication (UDP): Alternatively, the transport layer can provide unreliable
communication (UDP), where there is no guarantee of delivery, order, or error checking. This is useful
for applications like video streaming or online gaming where speed is critical, and occasional data loss
is acceptable.

17. What is the difference between TCP and UDP?

Ans: 1. Connection-Oriented vs. Connectionless:

• TCP (Transmission Control Protocol):

o Connection-Oriented: TCP establishes a reliable connection between the sender and


receiver before transmitting data. This connection is established through a three-way
handshake.

o Example: A web browser using HTTP (or HTTPS) communicates over TCP because it needs
reliable delivery of data.

• UDP (User Datagram Protocol):

o Connectionless: UDP does not establish a connection before sending data. It simply sends
datagrams to the destination, without ensuring that the destination is ready or that the data
has been received correctly.

o Example: Streaming services, VoIP calls, and online gaming often use UDP to ensure faster
transmission, even at the cost of occasional data loss.

2. Reliability:

• TCP:

o Reliable Delivery: TCP guarantees that data is delivered to the destination without errors and
in the correct order. If any data is lost or corrupted during transmission, TCP requests the
sender to retransmit the missing or damaged data.

o Acknowledgments: TCP uses acknowledgments (ACKs) to confirm the successful receipt of


data. If an acknowledgment is not received, the sender retransmits the data.

o Error Checking and Correction: TCP provides built-in error detection and correction
mechanisms.

• UDP:

o Unreliable Delivery: UDP does not guarantee delivery. There is no retransmission of lost or
corrupted data, and packets may arrive out of order. It simply sends data as quickly as
possible, without ensuring its integrity or order.

o No Acknowledgments: UDP does not send acknowledgments, making it faster but less
reliable than TCP.

o Error Checking: UDP does perform error checking through checksums, but it does not
perform correction. If an error is detected, the data is discarded without retrying.

3. Speed and Overhead:

• TCP:

o Slower: Due to its connection establishment (three-way handshake), error checking,


retransmission, and flow control mechanisms, TCP tends to be slower than UDP.
o Higher Overhead: The protocol requires more overhead because of its features such as
connection management, flow control, and congestion control.

• UDP:

o Faster: Since UDP does not establish a connection and does not perform error checking or
flow control, it is much faster and has lower overhead than TCP.

o Lower Overhead: UDP's header is smaller than TCP's, and the lack of connection setup and
error correction mechanisms reduces the overall processing required for each packet.

4. Data Integrity and Ordering:

• TCP:

o Data Integrity: TCP ensures that the data arrives in the same order it was sent, and it
guarantees that no data is missing.

o Data Ordering: Data packets are numbered, and the receiver can reorder packets that arrive
out of sequence.

• UDP:

o No Guarantee of Ordering: UDP does not ensure that packets arrive in the correct order. If
packets are received out of order, the application must handle the reordering (if necessary).

o No Data Integrity Guarantee: Data integrity is not guaranteed. UDP simply transmits the
data as is, and it's up to the application to decide how to handle errors or loss.

5. Flow Control and Congestion Control:

• TCP:

o Flow Control: TCP uses flow control mechanisms like the sliding window to ensure that the
sender does not overwhelm the receiver.

o Congestion Control: TCP detects network congestion (e.g., through packet loss) and adjusts
the data transmission rate accordingly to avoid network overload.

• UDP:

o No Flow Control: UDP has no flow control mechanisms. The sender can send data as fast as
it can without regard to the receiver's ability to process it.

o No Congestion Control: UDP does not have any built-in congestion control mechanisms. If
the network is congested, UDP will continue to send packets, which may result in packet loss.

18. Explain the function of a switch in a network.

Ans: 1. Packet Forwarding:

• Switches receive data packets from devices (like computers, printers, or servers) on a network and
forward them to their intended destination.

• Unlike a hub (which sends data to all connected devices), a switch intelligently forwards the data only
to the device that needs it, based on the device's MAC (Media Access Control) address. This helps
reduce network traffic and improves overall network performance.

2. MAC Address Table:


• Learning: Switches maintain a MAC address table (also called a forwarding table). When a device
sends data to the switch, the switch learns the source MAC address of the sender and the port it is
connected to.

• Forwarding: The switch uses the destination MAC address in the incoming data frame to look up the
corresponding port in the MAC address table. It then forwards the data only to the appropriate port
(and therefore to the correct device), reducing unnecessary traffic.

• Table Updates: The switch dynamically updates the MAC address table as devices join, leave, or
change their network ports. If a device is moved, the switch will learn its new port and update the table
accordingly.

3. Collision Domain Isolation:

• A switch helps segregate collision domains. In a hub-based network, all devices are in the same
collision domain, meaning that if two devices try to send data simultaneously, a collision can occur.

• A switch creates separate collision domains for each device connected to it. As a result, only the device
that is the intended recipient of a particular packet will be affected by a collision (if one occurs), and
not the entire network.

4. Full-Duplex Communication:

• Switches typically support full-duplex communication, meaning that data can flow in both directions
(send and receive) simultaneously.

• This is an improvement over the traditional half-duplex communication supported by hubs, where data
can only flow in one direction at a time. Full-duplex communication doubles the potential throughput
of the network link.

19. What are the different types of transmission media used in data communication?

Ans:

1. Guided (Wired) Transmission Media:

Guided media refers to physical cables or wires through which data is transmitted. These are typically used for
local area networks (LANs), wide area networks (WANs), and other wired communications.

a. Twisted Pair Cable:

• Description: Twisted pair cables consist of pairs of copper wires twisted together. The twisting helps to
reduce electromagnetic interference (EMI) from external sources.

• Types:

o Unshielded Twisted Pair (UTP): Commonly used in networking for Ethernet connections.
UTP cables are inexpensive and easy to install but are susceptible to interference.

o Shielded Twisted Pair (STP): Contains additional shielding around the wires to protect
against interference and crosstalk. It is more expensive than UTP and is used in environments
with high interference.

• Use Cases: Ethernet networks (e.g., Cat 5e, Cat 6), telephone systems, and local area networks.

b. Coaxial Cable:

• Description: Coaxial cables have a central copper core for signal transmission, surrounded by
insulation, a metallic shield to block interference, and an outer insulating layer.
• Types:

o Thin Coaxial Cable: Also called RG-58, used in older Ethernet systems (10BASE2).

o Thick Coaxial Cable: Also called RG-8, used in older systems and for cable television
(CATV) services.

• Use Cases: Cable TV, internet connections (Cable ISPs), older Ethernet networks (10BASE2), and
security camera systems.

c. Fiber Optic Cable:

• Description: Fiber optic cables use light to transmit data instead of electrical signals. The cable
consists of glass or plastic fibers that transmit data as pulses of light.

• Types:

o Single-mode Fiber: Has a small core and transmits data using a single light beam over long
distances, ideal for high-speed, long-distance communication.

o Multimode Fiber: Has a larger core and transmits data using multiple light beams, typically
used for shorter distances.

• Advantages: High bandwidth, long-distance transmission, immune to electromagnetic interference


(EMI).

• Use Cases: High-speed internet, backbone connections in data centers, inter-building communication,
and long-distance communication.

2. Unguided (Wireless) Transmission Media:

Unguided media refers to wireless transmission where data is sent through the air using radio waves,
microwaves, or infrared light.

a. Radio Waves:

• Description: Radio waves are electromagnetic waves used for wireless communication. They can
travel long distances and pass through obstacles.

• Types:

o Low Frequency: Used for AM radio.

o Very High Frequency (VHF) and Ultra High Frequency (UHF): Used for FM radio,
television, and mobile communication.

• Use Cases: AM/FM radio broadcasting, mobile phones, satellite communication, wireless LANs (Wi-
Fi), and Bluetooth.

b. Microwaves:

• Description: Microwaves are high-frequency radio waves that travel in straight lines and are typically
used for point-to-point communication over long distances.

• Types:

o Terrestrial Microwaves: Used for communication between towers on the Earth's surface
(ground-based).

o Satellite Microwaves: Used for communication between Earth and satellites in space.
• Use Cases: Long-distance phone lines, satellite communication, and microwave relays for TV
broadcasting.

20. What is data communication? Explain its components.

Ans: Components of Data Communication:

Data communication involves several key components, each of which plays a vital role in ensuring the accurate
and efficient transfer of data. The main components are:

1. Message:

• Description: The message is the actual data or information that is being transmitted between devices.
This could be text, images, audio, video, or any other form of data.

2. Sender (Transmitter):

• Description: The sender is the device or system that initiates the transmission of data. It could be a
computer, smartphone, server, or any other device capable of generating and sending data.

3. Receiver (Receiver Device):

• Description: The receiver is the device or system that receives the transmitted data and decodes it into
a readable format for the end user.

4. Transmission Medium (Communication Channel):

• Description: The transmission medium is the physical path over which the data travels from the sender
to the receiver. It can be either guided (wired) or unguided (wireless).

5. Protocols:

• Description: Protocols are sets of rules and conventions that govern the communication process
between devices. These rules ensure that data is transmitted, received, and interpreted correctly.

Long Answer Type Questions (15 Marks)

1. Compare and contrast IPv4 and IPv6 Security Mechanisms.

Ans:

IPv4 and IPv6 are both Internet Protocol versions used for addressing and routing data across networks.
However, IPv6 was designed with security enhancements in mind, whereas IPv4 relies on optional or
external mechanisms for security. Here's a comparison of their security mechanisms:

1. Built-in Security Support

IPv4:

• Security is optional and not natively integrated.

• IPsec (Internet Protocol Security) is available for IPv4, but it is not mandatory.

• Implementations vary widely, which may result in inconsistencies or vulnerabilities.

IPv6:
• IPsec is mandatory for IPv6 compliance (as per the original specification, RFC 4301).

• Although mandatory in specification, actual enforcement depends on the OS and implementation.

• Provides more consistent support for secure communication across IPv6 networks.

Advantage: IPv6 has more standardized and consistent security mechanisms due to built-in IPsec support.

Address Spoofing & NAT

IPv4:

• NAT (Network Address Translation) is widely used, which can obscure internal addresses,
providing a basic level of security.

• However, NAT is not a true security mechanism and adds complexity to IPsec and end-to-end
connectivity.

• Vulnerable to address spoofing attacks if additional security controls (e.g., ingress filtering) are not
used.

IPv6:

• NAT is not used in IPv6; it supports end-to-end addressing.

• Instead, IPv6 relies on firewalls and IPsec for protection.

• IPv6’s larger address space makes address scanning and spoofing more difficult, but not
impossible.

Encryption and Authentication

IPv4:

• Encryption and authentication are handled externally (e.g., using SSL/TLS or optional IPsec).

• Security must be configured and managed manually by network administrators.

IPv6:

• Provides native support for authentication headers (AH) and encapsulating security payload (ESP) for
encryption.

• Simplifies implementation of end-to-end encryption across networks.

IPv6 is better suited for future applications requiring secure, scalable, and encrypted communications.

Security Extensions and Features

IPv4:

• Lacks modern security features natively.

• Depends on additional tools and configuration (VPNs, NAT, ACLs, etc.).

IPv6:

• Includes security features like:

o Secure Neighbor Discovery (SEND): Protects against ND spoofing attacks (similar to ARP
spoofing in IPv4).
o Privacy Extensions (RFC 4941): Randomizes interface identifiers to prevent tracking of
users.

o No broadcast traffic: Reduces certain types of attacks (like smurf attacks).

o Simplified and efficient routing helps reduce potential attack surfaces.

2. What are SYN Flood Attacks? How does TCP SYN Cookie Mitigation Work?

Ans: A SYN flood attack is a type of Denial-of-Service (DoS) attack that targets the TCP handshake
process, aiming to exhaust the server's resources and prevent legitimate users from establishing connections.

How the TCP 3-Way Handshake Works Normally:

a) SYN – The client sends a SYN (synchronize) packet to initiate a connection.

b) SYN-ACK – The server responds with a SYN-ACK (synchronize-acknowledge).

c) ACK – The client sends an ACK to complete the handshake.

Only after this 3-way handshake is a TCP connection fully established.

What Happens in a SYN Flood Attack:

• The attacker sends a large number of SYN packets with spoofed or nonexistent source IP addresses.

• The server replies with SYN-ACK packets and waits for the final ACK.

• Since the final ACK never arrives, the server keeps the half-open connections in memory (in a state
called SYN_RECV).

• As these half-open connections pile up, the server’s connection queue gets full, making it unable to
accept new, legitimate connections.

Result: Denial of service.

What Is TCP SYN Cookie Mitigation?

SYN cookies are a defense mechanism against SYN flood attacks, implemented on the server side.

How TCP SYN Cookies Work:

a) No state is allocated when the SYN is received.

b) Instead of saving connection information in memory, the server:

o Encodes the connection information into the TCP Sequence Number field in the SYN-
ACK packet.

c) When the client replies with the final ACK:

o The server extracts and verifies the sequence number to reconstruct the connection state.

o If valid, it allocates memory and completes the connection.

This approach lets the server avoid storing half-open connections, preventing its resources from being tied
up by fake SYN requests.

Advantages of SYN Cookies:


• Stateless defense: No memory is used for unconfirmed connections.

• Prevents resource exhaustion during SYN floods.

• Can be selectively enabled when SYN queue thresholds are breached.

Limitations:

• Reduced performance for legitimate high-volume traffic.

• Only basic TCP options (like window scaling and selective ACKs) can be supported because these
options are not stored during the initial SYN.

• May affect compatibility with some applications expecting full TCP feature negotiation.

3. Explain the working of TCP Congestion Control Mechanisms.

Ans:

Key Concepts Behind TCP Congestion Control:

• Congestion happens when the network is overwhelmed with too much traffic, causing packet loss and
delays.

• TCP assumes that packet loss is a sign of congestion and reacts by reducing the data transmission rate.

Main TCP Congestion Control Mechanisms:

1. Slow Start

• Purpose: Avoid sending too much data too quickly on a new connection.

• How it works:

o Starts with a small congestion window (cwnd), typically 1 or 2 MSS (Maximum Segment
Size).

o For each ACK received, cwnd increases exponentially (doubles every RTT).

• Continues until:

o It reaches a threshold called ssthresh (slow start threshold), or

o Packet loss is detected.

2. Congestion Avoidance

• Purpose: Prevent congestion once a fair transmission rate is reached.

• How it works:

o Once cwnd ≥ ssthresh, growth becomes linear rather than exponential.

o For each RTT, cwnd increases by 1 MSS.

• This phase is more conservative.

3. Fast Retransmit

• Purpose: Quickly detect packet loss without waiting for a timeout.

• How it works:
o If 3 duplicate ACKs are received, TCP assumes a segment is lost and retransmits it
immediately.

4. Fast Recovery

• Purpose: Avoid going back to slow start after packet loss.

• How it works:

o Upon detecting packet loss with duplicate ACKs:

▪ Set ssthresh = cwnd / 2

▪ Set cwnd = ssthresh

▪ Skip slow start and go directly into congestion avoidance

• This speeds up recovery compared to restarting from the beginning.

How TCP Reacts to Packet Loss (Congestion Signal):

Loss Detection Method Action Taken

Timeout cwnd reset to 1 MSS; enter slow start

3 Duplicate ACKs cwnd halved; fast retransmit and enter congestion avoidance

Important Terms Recap:

• cwnd (Congestion Window): Controls how much data TCP can send without receiving ACKs.

• ssthresh (Slow Start Threshold): Point at which TCP switches from slow start to congestion
avoidance.

• RTT (Round Trip Time): Time it takes for a signal to go from sender to receiver and back.

4. Explain how BGP (Border Gateway Protocol) routes the internet.

Ans:

BGP (Border Gateway Protocol) is the protocol that routes data between autonomous systems (ASes) on
the Internet. It is often called the "backbone" routing protocol of the Internet because it determines the best
path for data to travel across thousands of networks globally.

What Is an Autonomous System (AS)?

An AS is a large network or group of networks under a single administrative domain (e.g., an ISP, a data
center, or a large organization) that shares a common routing policy. Each AS is identified by a unique AS
number (ASN).

How BGP Routes the Internet

1. Establishing BGP Peering

• BGP routers (called peers) in different ASes establish TCP sessions (usually on port 179) to exchange
routing information.

• These are either:


o eBGP (external BGP): Between routers in different ASes

o iBGP (internal BGP): Between routers within the same AS

2. Exchange of Routes (Prefixes)

• BGP peers exchange routing information about IP prefixes (e.g., 203.0.113.0/24), which represent
blocks of IP addresses.

• Each route comes with attributes, such as:

o AS_PATH: List of ASes the route has passed through (used to prevent loops)

o NEXT_HOP: IP address to reach the destination

o LOCAL_PREF, MED, COMMUNITY, etc.

3. Best Path Selection

BGP uses a decision process to select the best route when multiple routes to a destination are available.
Criteria include:

1. Highest LOCAL_PREF

2. Shortest AS_PATH

3. Lowest origin type

4. Lowest MED (Multi-Exit Discriminator)

5. eBGP preferred over iBGP

6. Lowest IGP metric to the NEXT_HOP

7. Router ID (tie-breaker)

Only the best route is advertised to other peers.

4. Propagation of Routes

• Once a BGP router selects the best path, it advertises that path to its other BGP neighbors.

• Over time, BGP routers across the globe build a complete view of reachable IP networks, known as
the global routing table.

5. Explain the difference between Symmetric and Asymmetric Encryption.

Ans:

Symmetric and Asymmetric encryption are two fundamental methods of securing data using cryptographic
algorithms, but they differ in how keys are used for encryption and decryption.

1. Symmetric Encryption

• Definition: Uses the same key for both encryption and decryption.

• Key Concept: Shared secret — both sender and receiver must have the same key.

• Speed: Faster than asymmetric encryption.

• Examples: AES, DES, Blowfish, RC4


Pros:

• High performance (suitable for encrypting large amounts of data)

• Simple to implement

Cons:

• Key distribution is a challenge (how to share the key securely)

• If the key is compromised, anyone can decrypt the data

2. Asymmetric Encryption

• Definition: Uses a key pair — a public key for encryption and a private key for decryption.

• Key Concept: Only the private key can decrypt data encrypted with the public key.

• Speed: Slower than symmetric encryption

• Examples: RSA, ECC, ElGamal

Pros:

• No need to share private keys (solves key distribution problem)

• Enables digital signatures for authentication and integrity

Cons:

• Slower and more computationally intensive

• Not ideal for bulk data encryption

6. Explain the working of ARP (Address Resolution Protocol) with frame format.

Ans: See slide for ARP Frame format

7. What is a subnet mask, and why is it used? Give an example.

Ans: See Slide

8. Compare Circuit Switching and Packet Switching.

Ans: See Slide

9. Explain TCP 3-Way Handshake.

Ans: See Slide

10. What is DNS, and how does it work.

Ans: See Slide

11. What is MAC Address and IP Address with frame and packet format.

Ans: See Slide

12. What is IPv4 and IPv6? How do they difference?

Ans:

IPv4 (Internet Protocol version 4) and IPv6 (Internet Protocol version 6) are versions of the Internet
Protocol used to identify devices and route traffic across networks.
IPv4 (Internet Protocol version 4)

• 32-bit address (e.g., 192.168.1.1)

• Provides about 4.3 billion unique addresses

• Widely used but nearing exhaustion of available addresses

• Dotted decimal format (four octets)

IPv6 (Internet Protocol version 6)

• 128-bit address (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334)

• Provides 340 undecillion (3.4×10^38) addresses

• Designed to solve IPv4 exhaustion

• Hexadecimal and colon-separated format

Key Differences Between IPv4 and IPv6

Feature IPv4 IPv6

Address Length 32 bits 128 bits

Address Format Decimal (e.g., 192.0.2.1) Hexadecimal (e.g., 2001:db8::1)

Address Space ~4.3 billion addresses 3.4×10³⁸ addresses

Header Size 20 bytes (variable) 40 bytes (fixed)

Security Optional (IPsec) Mandatory (IPsec built-in)

Configuration Manual or DHCP Auto-configuration (SLAAC)

Broadcast Supported Not supported (uses multicast)

NAT Commonly used Not required (enough addresses)

Fragmentation Done by router Done by source device

13. What are the advantages of fiber optic cables over copper cable

Ans:

Fiber optic cables offer several key advantages over copper cables:

a) Higher Bandwidth: Fiber optics can carry much more data at higher speeds than copper cables. This is
because light signals can transmit data much faster than electrical signals used by copper cables.

b) Longer Distances: Fiber optic cables can transmit data over much longer distances without significant
loss of signal quality. Copper cables experience signal degradation over long distances, requiring
repeaters or amplifiers to maintain the signal.
c) Immunity to Electromagnetic Interference: Fiber optic cables are not affected by electromagnetic
interference (EMI), which can be a problem for copper cables, especially in environments with heavy
electrical equipment.

d) Better Security: Fiber optic cables are more secure than copper cables because it’s harder to tap into
fiber optics without being detected. Copper cables are more vulnerable to eavesdropping or tampering.

e) Thinner and Lighter: Fiber optic cables are thinner and lighter than copper cables, making them easier
to install and manage, especially in areas with limited space.

f) Lower Power Consumption: Fiber optics typically require less power to transmit data, making them
more energy-efficient compared to copper cables.

g) Less Signal Attenuation: Fiber optic signals degrade more slowly than electrical signals in copper
cables, meaning fiber optics can maintain signal integrity over longer distances without the need for
repeaters or boosters.

h) Greater Reliability: Fiber optics are less susceptible to environmental factors like weather conditions,
water, or temperature fluctuations, which can affect copper cables.

14. What is the difference between a hub, switch, and router?

Ans:

A hub, switch, and router are all networking devices, but they serve different purposes and function in distinct
ways. Here's a breakdown of their differences:

1. Hub:

• Function: A hub is a simple networking device that connects multiple devices in a network. It
broadcasts data to all connected devices, regardless of the destination.

• How it Works: When a hub receives data from one device, it sends the data to all other devices
connected to it. All devices connected to a hub share the same bandwidth.

• Efficiency: Hubs are inefficient because they send data to all devices on the network, causing potential
collisions and network congestion.

• Layer: Operates at the Physical Layer (Layer 1) of the OSI model.

• Usage: Rarely used today, as switches have largely replaced hubs.

2. Switch:

• Function: A switch is more intelligent than a hub. It connects multiple devices and sends data only to
the device that needs it, rather than broadcasting it to all devices.

• How it Works: When a switch receives data, it reads the destination MAC address and sends the data
only to the device with that specific MAC address.

• Efficiency: Switches are more efficient than hubs because they reduce network traffic and collisions by
targeting data transmission to specific devices.

• Layer: Operates at the Data Link Layer (Layer 2) of the OSI model, though some advanced switches
operate at the Network Layer (Layer 3) (Layer 3 switches).

• Usage: Commonly used in local area networks (LANs) to efficiently manage data flow.

3. Router:
• Function: A router connects different networks, such as a local area network (LAN) to the internet
(wide area network, or WAN), and directs data between them.

• How it Works: Routers determine the best path for data to travel from one network to another by
reading the destination IP address and forwarding the data to the appropriate network or device. They
also manage traffic between multiple networks and can assign IP addresses.

• Efficiency: Routers manage network traffic between networks, ensuring that data reaches its
destination across different networks, often performing additional functions like network address
translation (NAT) and firewall protection.

• Layer: Operates at the Network Layer (Layer 3) of the OSI model.

• Usage: Commonly used in home and business networks to connect local networks to the internet and
route traffic between different subnets.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy