Tutorial 2 - CN
Tutorial 2 - CN
Tutorial 2 - CN
Experiment No: 2
Aim: To study TCP/IP protocol suite, networking devices and addressing mechanisms.
Date:
Objectives:
Theory:
IP serves as the addressing and routing mechanism for data packets in a network. It assigns unique
numerical addresses to each device, allowing data to be directed to the correct destination. It also
manages the path these data packets take as they traverse the network.
TCP, on the other hand, ensures the reliable and orderly delivery of data between devices. It
establishes connections, breaks data into smaller packets, and then reassembles them at the destination.
If any packets are lost or corrupted during transit, TCP requests retransmission to guarantee the
integrity and order of data.
The TCP/IP protocol suite is organized into five layers, each with a specific role in facilitating
communication across networks.
1. Application Layer: The top layer, the Application Layer, provides a platform for software
applications to interact with the network. It includes various protocols for specific tasks, such as
Hypertext Transfer Protocol (HTTP) for web browsing, Simple Mail Transfer Protocol (SMTP) for
email, File Transfer Protocol (FTP) for file transfers etc.
13
B.E.-IV-AI&DS Computer Networks (3144302)
2. Transport Layer: The Transport Layer ensures communication between two processes running on
two end devices (source and destination). It breaks data into smaller segments, adds error-checking
information, and reassembles them at the other end. Transmission Control Protocol (TCP) and User
Datagram Protocol (UDP) are vital transport protocols. TCP is reliable protocol and UDP is unreliable
protocol.
3. Network Layer: The Network Layer focuses on routing data between different networks. It assigns
unique IP addresses to devices and decides how data should move from the source to the destination.
Internet Protocol (IP) is the primary protocol at this layer.
4. Link Layer: The Link Layer is responsible for forming data packets and addressing them for
delivery. It manages local network connections and controls the flow of data over these connections.
Ethernet and Wi-Fi are commonly used here.
5. Physical Layer: At the lowest level, the Physical Layer deals with the actual hardware and
transmission of raw bits. It manages the physical medium, like cables or wireless signals, ensuring data
can be sent and received reliably. Key components include network cables and network interface
cards.
→ Networking Devices:
Networking devices are specialized hardware or software components designed to facilitate the
communication and data exchange between devices within a network. These devices play crucial roles
in establishing and maintaining computer networks, enabling the transmission of data, and ensuring
network functionality. They are essential for forming and maintaining networks of various scales and
purposes, from local area networks (LANs) to global internet connections.
1. Hub: A hub is a basic networking device that works at the Physical Layer. When it receives data
from one device, it sends it to all other connected devices. This indiscriminate broadcasting can lead to
network congestion and inefficiency as all devices hear the data, even if it's not meant for them. Hubs
are simple and inexpensive but not suitable for modern networks where efficient data transmission is
crucial.
2. Repeater: A repeater, also operating at the Physical Layer, is like a signal booster. It regenerates
and strengthens network signals, allowing them to travel longer distances without degradation.
Repeaters are handy in situations where network cables need to span large areas, ensuring that data
signals remain clear and can reach their intended destinations. They are often used to extend the reach
of a network.
14
B.E.-IV-AI&DS Computer Networks (3144302)
3. Switch: Switches function at the Data Link Layer and have replaced hubs in most network
environments. Think of switches as smart traffic directors. They can understand MAC addresses,
unique identifiers for network devices. When data is sent, a switch examines the destination MAC
address and sends the data only to the specific port where the intended recipient is connected. This
selective forwarding reduces network traffic and enhances efficiency compared to hubs. Switches are
essential for modern local area networks.
4. Bridge: Bridges also work at the Data Link Layer and are used to connect two or more network
segments. Bridges help reduce collision domains, improving network performance. They inspect
incoming data packets, check source and destination MAC addresses, and decide whether to forward
or filter the data based on their knowledge of network segments. Bridges are useful for segmenting a
network or isolating specific traffic to enhance security.
5. Router: Routers are complex devices that operate at the Network Layer. They're like intelligent
traffic controllers for data. Routers make decisions about where to send data packets based on their
destination IP addresses. They maintain routing tables that store information about how to reach
different networks and use these tables to forward data to the right destination. Routers also provide
features like Network Address Translation (NAT), which allows multiple devices in a local network to
share a single public IP address for internet access, enhancing network security. Routers are essential
for directing data between different networks and ensuring efficient data transmission.
6. Gateway: A gateway is a device or software application that connects two dissimilar networks,
often with different protocols or communication methods. It's like a language translator between
networks. Gateways convert data from one network format to another, allowing them to communicate.
For example, a home router can be considered a gateway because it connects a local area network
using Ethernet with the internet, which uses different protocols. Gateways are crucial for ensuring
seamless data transfer between networks with varying technologies and standards. They facilitate the
interaction between different networks, ensuring that data can flow smoothly despite their differences.
→ Addressing Mechanisms:
2. IP Addressing:IP (Internet Protocol) addressing is a network layer addressing scheme that provides
logical identification and location of devices on a global scale. IPv4, using 32-bit addresses like
"192.168.1.1," and IPv6, with longer addresses like "2001:0db8:85a3:0000:0000:8a2e:0370:7334," are
examples. IP addresses facilitate routing and enable devices to communicate over the internet.
15
B.E.-IV-AI&DS Computer Networks (3144302)
3. Port Addressing: Port addressing is used in the transport layer of the OSI model. It identifies
specific services on a device. Ports are represented as numbers ranging from 0 to 65535. For instance,
HTTP typically uses port 80, while HTTPS uses port 443. This addressing type allows multiple
services on a single device to share the same IP address by using different port numbers.
4. URL Addressing: URL (Uniform Resource Locator) addressing is used to specify resources on the
internet. It combines IP addresses or domain names with paths and, optionally, port numbers. For
example, "https://www.example.com:8080/path/to/resource" contains the domain name
("www.example.com"), the protocol ("https"), the port number (":8080"), and the path to a specific
resource ("/path/to/resource"). URL addressing makes it easy for users to access web content and
services.
Question:
Answer:
16
B.E.-IV-AI&DS Computer Networks (3144302)
Suggested References:
1. Computer Networking- A Top-Down approach (6th edition), Kurose and Ross, Pearson
2. Data Communications and Networking (5th edition), Behrouz Forouzan, McGraw Hill
Understanding Understanding
for experiment for experiment
objective-3 objective-3
Answer to Question
with understanding
17