0% found this document useful (0 votes)
4 views38 pages

Practical 2 To 4

CN pr 2 to 4

Uploaded by

Sujal Gadhvi
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)
4 views38 pages

Practical 2 To 4

CN pr 2 to 4

Uploaded by

Sujal Gadhvi
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/ 38

Computer Network (3150710) 240673107017

Practical: 2
Aim: Implement and study on the Cisco Packet Tracer.
What Is Cisco packet Tracer?
Cisco Packet Tracer is a powerful network simulation and visualization tool developed by
Cisco Systems. It is primarily used for teaching, learning, and practicing networking concepts.
It allows users to create complex network topologies, simulate their behavior, and troubleshoot
issues — all in a virtual environment without requiring physical networking hardware.

Definition Of Cisco Packet:


Cisco Packet Tracer is a graphical simulation tool that enables users to create virtual network
topologies and interact with simulated network devices such as routers, switches, PCs, wireless
devices, and IoT (Internet of Things) components.

Overall, Cisco Packet Tracer is an essential tool in the field of computer networking education,
offering hands-on experience in a virtual environment that mirrors real-world network
infrastructure and operations.

18
Computer Network (3150710) 240673107017

➢ Components of Cisco Packet:

1. Network Devices
• Router
• Switches
• Hubs
• Wireless devices
• Security
• WAN Emulation

2. End Devices
• Home
• Smart city
• Industrial
• Power grid
• Network Controller
• Printers / Server
• Smart phone / Tablet
• TV
• Generic wireless/wired

3. Components
• Boards
• Actuators
• Sensors

4. Connections
• Structuring Cables
• USB

5. Miscellaneous
• Routers
• Laptop/ PC

6. Multiusers Connections

19
Computer Network (3150710) 240673107017

1. Network Devices:

• Network devices are physical devices that allow hardware on a computer network to
communicate and interact with each other.
• Network devices like hubs, repeaters, bridges, switches, routers, gateways, and router help
manage and direct data flow in a network.
• They ensure efficient communication between connected devices by controlling data
transfer, boosting signals, and linking different networks.
• Each device serves a specific role, from simple data forwarding to complex routing between
networks. In this article, we are going to discuss different types of network devices in detail.

A. Routers:
• A router is a device like a switch that routes data packets based on their IP addresses.

• The router is mainly a Network Layer device. Routers normally connect LANs and WANs
and have a dynamically updating routing table based on which they make decisions on
routing the data packets.
• The router divides the broadcast domains of hosts connected through it.

20
Computer Network (3150710) 240673107017

B. Switches:
• A switch is a multiport bridge with a buffer designed that can boost its efficiency(a large
number of ports imply less traffic) and performance.
• A switch is a data link layer device.

• The switch can perform error checking before forwarding data, which makes it very
efficient as it does not forward packets that have errors and forward good packets
selectively to the correct port only.
• In other words, the switch divides the collision domain of hosts, but the broadcast domain
remains the same.
C. Hubs:
• A hub is a multiport repeater.
• A hub connects multiple wires coming from different branches, for example, the
connector in star topology which connects different stations.

• Hubs cannot filter data, so data packets are sent to all connected devices.
• In other words, the collision domain of all hosts connected through Hub remains one.
• Also, they do not have the intelligence to find out the best path for data packets which
leads to inefficiencies and wastage.

21
Computer Network (3150710) 240673107017

D. Wireless devices:
• "Wireless" means without wire, media that is made up of electromagnetic waves (EM
Waves) or infrared waves.
• Antennas or sensors will be present on all wireless devices. Cellular phones, wireless
sensors, TV remotes, satellite disc receivers, and laptops with WLAN cards are all
examples of wireless devices.

• For data or voice communication, a wireless network uses radiofrequency waves rather
than wires.

E. Security:
• Any action intended to safeguard the integrity and usefulness of your data and network is
known as network security.
• In other words, Network security is defined as the activity created to protect the integrity
of your network and data.

F. WAN Emulation:
• WAN (Wide Area Network) emulation in Cisco Modeling Labs (CML) allows users to
recreate real-world network conditions within a virtual lab environment, enabling
testing of network performance and behavior under various WAN conditions without
needing physical WAN links.
• This is achieved by configuring simulated bandwidth, latency, packet loss, and other
impairments using the WAN Emulator node type.

2. End Devices:
• An end device is a web-enabled hardware device that serves as either the source or
destination of data transferred through a network.

22
Computer Network (3150710) 240673107017

• For instance, it may be a workstation, laptop, desktop computer, printer, scanner, tablet,
or cell phone.

• End devices play the role of interface between an end user and the communication
network.

A. Network Controllers:
• A network controller is a software that orchestrates network functions.
• It serves as an intermediary between the business and the network infrastructure.
• The organization enters their desired business objectives into the controller which in
turn sets up the network to deliver on those objectives.

B. Printers:
• A printer is a device that accepts text and graphics output from a computer, and it
transfers this information to paper, sheets.

• Printers can print any information that has been passed to them, whether it be Text,
Numbers or Images.
• It depends on the type of printer that determines what quality or colour the printed
matter will be.

23
Computer Network (3150710) 240673107017

C. Servers:
• A Server is a program or a device that provides functionality for called clients which
are other programs or devices.
• This architecture is called the client-server model.
• A single overall computation is distributed across multiple processes or devices.
• Servers can provide various functionalities called services.
• These services include sharing data or resources among multiple clients or
performing computations for a client.
• Multiple clients can be served by a single server, and a single client can use multiple
servers.

3. Components:

A. Boards:
• "boards" generally refer to printed circuit boards (PCBs), with the most prominent
being the motherboard, which acts as the central nervous system of a computer,
connecting all other components.
• Other types of boards include daughter boards (providing extra functionality like Wi-
Fi) and expansion cards (adding localized components like extra USB ports).
• Additionally, there are specific boards like network interface cards (NICs) (also
known as Ethernet cards) that enable wired network connections.

B. Actuators:
• Actuators are devices that convert a control signal into a physical action or motion.
• They are crucial for translating control signals into real-world movements, enabling
automation and precise control in various applications.
• Actuators receive a control signal and energy from a source, then use that energy to
perform a mechanical action, such as moving a valve, adjusting a damper, or rotating
a shaft.

24
Computer Network (3150710) 240673107017

C. Sensors:
• Sensors are devices that detect and respond to physical or environmental conditions,
converting those changes into electrical signals that can be processed by a computer
system.
• They play a crucial role in various applications, from monitoring environmental
factors to controlling industrial processes.
• Sensors can be broadly categorized based on their power requirements (active vs.
passive), the means of detection, the type of output signal (analog or digital), and the
conversion phenomenon they employ.

4. Connections:
• Connections refer to the pathways that enable communication between devices.
• These connections, also known as links, can be physical (like cables) or logical (like
established through protocols).
• They facilitate the transfer of data and allow for resource sharing between networked
devices.

A. Structuring Cables:
• Structured cabling is the design and installation of a cabling system that will support
multiple hardware uses and be suitable for today's needs and those of the future.
• With a correctly installed system, current and future requirements can be met, and
hardware that is added in the future will be supported.
• Structured cabling design and installation is governed by a set of standards that
specify wiring data centers, offices, and apartment buildings for data or voice
communications using various kinds of cable, most commonly Category 5e (Cat
5e), Category 6 (Cat 6), and fiber-optic cabling and modular connectors.

B. USB:
• USB, or Universal Serial Bus, is a standardized connection technology that allows
communication between devices and a host controller like a computer.
• It's widely used for connecting peripherals like mice, keyboards, printers, and
storage devices, as well as for charging mobile devices.

25
Computer Network (3150710) 240673107017

• USB supports both data transfer and power delivery, and its versatility makes it a
common choice for a wide range of applications.

5. Miscellaneous:
• "miscellaneous" refers to a collection of unrelated or diverse items, often grouped together
for convenience or because they don't fit neatly into a specific category.

• In the context of computer networks, "miscellaneous" can encompass various aspects like
different types of network topologies, connection types, or specific protocols not
categorized under the main types like LANs, WANs, or MANs. It can also refer to a
collection of network devices or resources that don't fall into a specific class.

A. Routers:
• A Router is a networking device that forwards data packets between computer networks.
• One or more packet-switched networks or subnetworks can be connected using a router.
• By sending data packets to their intended IP addresses, it manages traffic between different
networks and permits several devices to share an Internet connection.
• A router has several interfaces by which it can connect to several host systems. Routers are
the devices that are operated on the Network Layer of the OSI Model, these are the most
common devices used in networking.

B. PC / Laptop:
• "PC" and "laptop" generally refer to individual computing devices connected within a
network.
• A computer network is a system that allows multiple devices, including PCs and laptops,
to communicate and share resources.
• Laptops are a type of portable PC, offering the same functionality in a smaller, battery-
powered package.

26
Computer Network (3150710) 240673107017

6. Multiusers Connections
• Multi-user connections in computer networks (specifically referencing Packet Tracer's

Multiuser feature) involve multiple users connecting to a single network simulation or


environment, allowing them to interact with and modify the same network topology
simultaneously.

• This enables collaborative network design and troubleshooting within a shared virtual
space.

Commands:
1) hostname

• What it does: prints the system’s host name (the machine’s network name). Useful to
confirm which machine you’re on.
• Linux examples:
• hostname → prints short host name.
• hostname -f → prints fully qualified domain name (FQDN).
• hostnamectl (systemd) → shows host name plus OS info and related settings.
• Windows: hostname in CMD also prints the computer name.
• Why use it: quick identity check in scripts or when you SSH into multiple machines.
2) ping

• What it does: sends ICMP “echo request” packets to a host and listens for replies. Tests
basic network reachability, latency, and packet loss.
• Key fields in the output: packet size, reply source, time= (round-trip ms), TTL (time-to-
live). Summary usually shows packets transmitted/received and round-trip stats
(min/avg/max).
• Linux: ping -c 4 example.com (send 4 pings).
• Windows: ping -n 4 example.com.
• Advanced options: interval between pings, timeout per packet, packet size.

27
Computer Network (3150710) 240673107017

3) ipconfig /all (Windows) / ifconfig -a, ip addr show (Linux)

• What they show: network interfaces and their configuration: IP addresses (IPv4/IPv6),
subnet mask, default gateway, DNS servers, MAC (physical) address, DHCP info, etc.
• Windows: ipconfig /all shows adapter list, MAC (Physical Address), DHCP server, lease
times, DNS servers.
• Linux (older): ifconfig -a shows all interfaces (including down).
• Linux (modern/preferred): ip addr show or ip -4 addr show — better, more consistent
output.

4) netstat (or ss)

• What it does: shows active network connections, listening ports, routing tables, interface
statistics depending on options. Very useful to see which ports are open and which
processes are using network sockets.
• Windows: netstat -ano → lists all connections (-a), numeric addresses/ports (-n) and
associated PID (-o). Combine with tasklist /FI "PID eq 1234" to identify the process name.
• Linux: netstat -tulnp (tcp/udp listening with numeric addresses and PID/program) — but
ss -tulnp is the modern replacement (faster, more capable).
• flags: -t tcp, -u udp, -l listening, -n numeric, -p show pid/program.

5) nslookup (or dig / host)

• What it does: queries DNS to resolve hostnames to IPs (and vice versa), and to query
specific DNS records (A, AAAA, MX, TXT, etc.). Good for diagnosing DNS problems.
• Interactive use: nslookup → then type queries interactively; you can also specify server:
server 8.8.8.8 inside interactive mode.
• One-shot examples:
• nslookup example.com
• nslookup -type=MX google.com (look up MX records).
• Linux alternatives: dig example.com (preferred by many for more detailed output) or host
example.com. Example: dig +short example.com returns IPs only.
6) Process listing (ps on Linux, tasklist on Windows) / process management

• What it does: shows running processes so you can monitor CPU/memory usage and
identify which program corresponds to a PID.

Linux:

• ps aux or ps -ef → full listing. Columns: USER, PID, %CPU, %MEM, VSZ, RSS, STAT,
START, TIME, COMMAND.

28
Computer Network (3150710) 240673107017

• top / htop → interactive real-time view of processes, resource usage.


• kill PID → send SIGTERM; kill -9 PID → SIGKILL (force).
Windows:

• tasklist → list processes.


• taskkill /PID 1234 /F → kill by PID (/F force).
• Task Manager GUI for interactive view.
7) telnet

• What it does: historically a remote terminal protocol and a client program. Today
it’s often used as a simple TCP client to test connectivity to a particular port: telnet
host port.

• Example: telnet mail.example.com 25 → tests whether you can open a TCP


connection to the SMTP port (25). If connection opens, you get a blank screen /
connection banner; if refused, you get a connection error.

• Security note: telnet transmits everything in plaintext and is insecure for remote
login — do not use telnet for interactive remoting; prefer ssh for secure remote
shells. Many systems no longer have telnet server/client installed.

EVALUATION:

Problem Analysis Understanding Timely Mock Total


& Solution
Level Completion

(3)
(3) (2) (2) (10)

Signature with date:

29
Computer Network (3150710) 240673107017

Practical : 3
Aim : Implementation of topologies using switch and Hub in Packet
Tracer.
❖ What Is Topologies?
• Topology in networking refers to the structure or layout of how computers, cables,
devices, and connections are arranged in a network. It defines how different nodes
(computers, printers, routers, etc.) in a network are physically connected (physical
topology) or logically communicate (logical topology).

❖ Types Of Topologies:
1. Bus Topology
2. Star Topology
3. Ring Topology
4. Mesh Topology
5. Hybrid Topology
6. Tree Topology

1. Bus Topology:
• A Bus Topology is one of them. All of the devices in a bus topology network are linked
together by a single cable, which is referred to as a "bus" and the cable is known as
backbone cable.
• All of the network's devices can simultaneously receive the same signal due to the
shared communication medium provided by this connection.
• Bus topology carries transmitted data through the cable because data reaches each node,
the node checks the destination address (MAC/IP address) to determine if it matches
their address.

• If the address does not match with the node, the node does nothing more.
30
Computer Network (3150710) 240673107017

• But if the addresses of nodes match to addresses contained within the data then they
process knowledge.
• In the bus, communication between nodes is done through a foremost network cable.

Advantages of Bus Topology :


• It is the easiest network topology for linearly connecting peripherals or computers.
• It works very efficiently well when there is a small network.
• The length of cable required is less than a star topology.

Disadvantages of Bus Topology:


• Bus topology is not good for large networks.
• Identification of problems becomes difficult if the whole network goes down.
• Troubleshooting individual device issues is very hard.

Applications of Bus Topology:


1. Local Area Networks (LANs): Bus topology was traditionally utilized in Ethernet
LANs , mainly in older implementations wherein Coaxial cable have been daisy-
chained to connect computer systems.
2. Industrial Control Systems: In industrial control system, bus topology is frequently
used for connecting sensors, actuators, and different devices in distributed manipulate
systems.
3. Instrumentation Networks: Bus topology is appropriate for connecting devices,
meters, and records acquisition gadgets in laboratory or commercial environments.
2. Star Topology:
• Star Topology is a network setup in which each device is connected to a central node
called a hub.
• The hub manages the data flow between the devices.
• If one device wants to send data to another device, it has to first send the information
to the hub, and then the hub transmits that data to the required device.

31
Computer Network (3150710) 240673107017

• A star may be a Local Area Network (LAN) topology where all nodes are individually
connected to a central connection point (hub).
• The number of links required to connect nodes in the star topology is N where N is the
number of nodes.
• The hub or switch manages and controls all functions of the network.

Advantages of Star Topology:


• It is very reliable as if one cable or device fails then all the others will still work.
• It is high performing as no data collisions can occur.
• It is less expensive because each device only needs one I/O port and wishes to be
connected to the hub with one link.

Disadvantages of Star Topology:


• Requires more cable than bus topology.
• If the connecting network device (network switch) fails, the nodes attached are disabled
and can't participate in network communication.
• More expensive than linear bus topology due to the value of the connecting devices
(network switches).

Applications of Star Topology:


• Home Networks: Many home networks utilize star topology for its simplicity and
effectiveness. With various devices like computers, smartphones, and printers
connecting to a central router, families can easily share resources and connect to the
internet.
• Wireless Networks: Businesses prefer star networks for their scalability and reliability.
As companies grow, they can easily expand their networks by adding new devices
without major disruptions. Moreover, centralized management allows IT departments
to monitor network performance and security more effectively.
• Telecommunication Networks: In telecommunications, star topology is used to
connect multiple nodes to a central system. This structure ensures robust
communication links and easy integration of additional services, enhancing the overall
efficiency of the telecommunications infrastructure.
• Educational Institutions: Many schools and universities implement star networks in
computer labs and administrative offices. The ease of maintenance and reliability
makes it ideal for environments with high user activity.

3. Ring Topology:
• Ring Topology may be a network configuration where device connections create a
circular data path.
32
Computer Network (3150710) 240673107017

• In this each device is connected to with its exactly two neighboring devices, like points
on a circle which forms like a ring structure.
• A number of repeaters are used for Ring topology with a large number of nodes to send
data and to prevent data loss repeaters are used in this network.

• Together, devices during a ring topology are mentioned as a hoop network.


• In this Packets travels from one device to another until they reach the desired
destination.
• In this data travels in unidirectional forms means in only one direction but it can also
do bidirectional by having 2 connections between each Network Node, it is called Dual
Ring Topology.
• It is used in LANs and WANs depending on the card of network in the computer.

Advantages of Ring topology:


• In this data flows in one direction which reduces the chance of packet collisions.
• In this topology additional workstations can be added after without impacting
performance of the network.
• Equal access to the resources.
• There is no need of server to control the connectivity among the nodes in the topology.

Disadvantages of Ring topology:


• Due to the Uni-directional Ring, a data packet (token) must have to pass through all the
nodes.
• If one workstation shuts down, it affects whole network or if a node goes down entire
network goes down.
• It is slower in performance as compared to the bus topology
• It is Expensive.

33
Computer Network (3150710) 240673107017

Application Ring Topology:


• This topology is used in the local area network and wide area networks.
• This type of topology is frequently used in the telecommunication industry and is
commonly used in SONET fiber networks.
• It is used as a backup system in various companies for their existing network.
• Once the connection is misplaced through a node, and then it uses the bidirectional
capacity to route traffic in one more way.
• It is applicable in educational institutions.

4. Mesh Topology:
• Mesh Topology is a network configuration where every device is interconnected with
every other device, providing multiple route for data to travel.
• The nodes are connected to each other completely via a dedicated link during which
information travels from nodes to nodes.

• If a mesh network has N nodes, then there are N(N-1)/2 links. Each computer not only
sends its signals but also transfer data from other computers.
• The connections within the mesh are often wired or wireless. In this article, we will
discuss the Mesh Topology in detail.

Advantages of Mesh Topology:


• In case of failure of a single device, the entire network didn't break.
• There is no traffic problem as there is a dedicated point to point links for every device.
• Mesh Topology provides high privacy and security.
• Data transmission is more consistent because failure doesn’t disrupt its processes.

Disadvantages of Mesh Topology:

34
Computer Network (3150710) 240673107017

• Mesh Topology is costly as compared to the other network topologies i.e. star, bus,
point to point topology.
• Installation of nodes are difficult in mesh topology.
• Power requirement is higher as all the nodes will need to remain active all the time and
share the load.

Applications of Mesh Topology:


• Below mentioned are some of the applications of Mesh Topology:
• Wireless Networks: Many homes and small office spaces uses Mesh Wi-fi System for
better internet coverage and connectivity.
• Industrial and Manufacturing Networks: Many industries uses mesh topology to control
machinery, ensuring better productivity.
• Smart Homes: Some advanced homes also use mesh topology for connecting home
appliances like smart lights, security systems, etc.
• Military Communication: Mesh Topology are used in Military Purposes as if one
connection fails, then there is always a chance of another connection.

5. Hybrid Topology:
• A hybrid topology is defined as a network topology that combines two or more different
network topologies.
• A hybrid topology can be a combination of bus topology, ring topology and mesh
topology.
• The selection of different types of network topologies combined together depends upon
the number of computers, their location, and the required performance.
• In the hybrid topology network sections consist of a configuration of different types of
network topologies.

35
Computer Network (3150710) 240673107017

• The structure of hybrid topology is more complex but offers various advantages such
as flexibility and fault tolerance.

Advantages of Hybrid Topology:


• Adding a new node or deleting the existing node is easy in hybrid topologies.
• Hybrid topology is more secure, reliable, and scalable as compared to individual star,
ring and mesh topology.
• Error detection and troubleshooting is easier in hybrid topology.

Disadvantages of Hybrid Topology:


• The design and implementation of hybrid network topology is difficult.
• More number of cables and other physical devices are required for hybrid topology.
• The process of installation of hybrid topology is difficult.
• The overall implementation, setup and process of hybrid topology is much more
costlier.

Application of Hybrid Topology:


• This topology is used in many fields of automated industries, the financial sector, the
banking sector, research organizations, multinational companies, educational
institutions, and many more.
• This topology is very helpful when you need to fulfill diversity within the computer
network.

6. Tree Topology:
• Network topology is the systematic arrangement of the elements (such as links and
nodes) within a communication network.
• A tree topology, or star-bus topology, is a hybrid network topology in which star
networks are interconnected via bus networks.
• Tree networks are organized hierarchically, allowing each node to have child nodes.

36
Computer Network (3150710) 240673107017

• It merges the features of both star and bus topologies.


• It includes a node known as the root that connects to one or more star networks called
branches.
• The primary purpose of tree topology is to create large and complex networks that
can span long distances and support multiple devices.
• It enables better management and control of the network structure.

Advantages of tree Topology :


• Scalability: It is highly scalable as one can expand the devices and subnetworks by
adding branches and levels to the network.
• Flexibility: It can accommodate diverse sub-network types and sizes using different
hubs and cables.
• Reliability: One can easily isolate errors with in the network without impacting the
root node. Hence, it is highly reliable as compared to other topologies.
• Security: Security is everyone’s concern. It enhances security as well as privacy
through channels or links.

Disadvantages of tree Topology:


• Complexity: The installation, configuration, and maintenance of this topology can be
complex for multi-level networks.
• Cost: The cost associated with setting this topology up is relatively high as we require
cables, hubs, and various other network devices for its proper functioning. Hence, the
overall cost increases.
• Dependency: In this topology, if the root node and backbone stop working by any
chance, then the overall network will be affected by it.

Application of tree Topology:


• Tree topology has several practical applications, the most common of which is its
usage in computer networks.
• It facilitates the connection of networks, enabling communication and data exchange
among devices.

Implementation:
Step 1: First, open the cisco packet tracer desktop and select the devices given below:

37
Computer Network (3150710) 240673107017

S.NO Device Model-Name

1. PC PC

2. Switch PT-Switch

IP Addressing Table

S.NO Device IPv4 Address Subnet Mask

pc0 192.168.0.1 255.255.255.0

pc1 192.168.0.2 255.255.255.0

pc2 192.168.0.3 255.255.255.0

pc3 192.168.0.4 255.255.255.0

• Then, create a network topology as shown below image:


• Use an Automatic connecting cable to connect the devices with others.

Step 2: Configure the PCs (hosts) with IPv4 address and Subnet Mask according to the IP
addressing table given above.
38
Computer Network (3150710) 240673107017

• To assign an IP address in PC0, click on PC0.


• Then, go to desktop and then IP configuration and there you will IPv4 configuration.

• Fill IPv4 address and subnet mask.

• Assigning an IP address using the ipconfig command, or we can also assign an IP address
with the help of a command.

• Go to the command terminal of the PC.

• Then, type ipconfig <IPv4 address><subnet mask><default gateway>(if needed)

Example: ipconfig 192.168.0.1 255.255.255.0

39
Computer Network (3150710) 240673107017

• Repeat the same procedure with other PCs to configure them thoroughly.
Step 3: Verify the connection by pinging the IP address of any host in PC0.

• Use the ping command to verify the connection.

• As we can see we are getting replies from a targeted node on both PCs.
• Hence the connection is verified.

40
Computer Network (3150710) 240673107017

Steps Implementing Star Topology using Cisco Packet Tracer:

Step 1: We have taken a switch and linked it to six end devices.

Step 2: Link every device with the switch.

Step 3: Provide the IP address to each device.

41
Computer Network (3150710) 240673107017

Step 4: Transfer message from one device to another and check the Table for Validation.

Now to check whether the connections are correct or not try to ping any device and the image
below is doing the same.

To do ping one terminal of one device and run the following command:

Command:

"ping ip_address_of _any_device"

42
Computer Network (3150710) 240673107017

Example:
ping 192.168.1.4

➢ Steps to Configure and Setup Ring Topology in Cisco Packet Tracer :


Step 1: First, open the cisco packet tracer desktop and select the devices given below:

S.NO Device Model Name

1. PC PC

2. Switch PT-Switch

• IP Addressing Table

S.NO Device IPv4 Address Subnet Mask

1. pc0 192.168.0.1 255.255.255.0

2. pc1 192.168.0.2 255.255.255.0

3. pc2 192.168.0.3 255.255.255.0

43
Computer Network (3150710) 240673107017

S.NO Device IPv4 Address Subnet Mask

4. pc3 192.168.0.4 255.255.255.0

• Then, create a network topology as shown below the image.

• Use an Automatic connecting cable to connect the devices with others.

Step 2: Configure the PCs (hosts) with IPv4 address and Subnet Mask according to the IP
addressing table given above.

• To assign an IP address in PC0, click on PC0.

• Then, go to desktop and then IP configuration and there you will IPv4 configuration.
• Fill IPv4 address and subnet mask.

44
Computer Network (3150710) 240673107017

• Assigning IP address using the ipconfig command, or we can also assign an IP address
with the help of a command.

• Go to the command terminal of the PC.

• Then, type ipconfig <IPv4 address><subnet mask><default gateway>(if needed)

Example: ipconfig 192.168.0.1 255.255.255.0

• Repeat the same procedure with other PCs to configure them thoroughly.

Step 3: Verify the connection by pinging the IP address of any host in PC0.

45
Computer Network (3150710) 240673107017

• Use the ping command to verify the connection.


• As we can see we are getting replies from a targeted node on both PCs.

• Hence the connection is verified.

• A simulation of the experiment is given below we have sent two PDU packets one
targeted from PC0 to PC2 and another targeted from PC1 to PC3.

Step 1: First, open the Cisco packet tracer desktop and select the devices given below:
Model name
S.NO Device

PC PC
1.

46
Computer Network (3150710) 240673107017

Model name
S.NO Device

Switch PT-switch
2.

IP Addressing Table:

Subnet Mask
S.NO Device IPv4 Address

pc0 192.168.0.1 255.255.255.0


1.

pc1 192.168.0.2 255.255.255.0


2.

pc2 192.168.0.3 255.255.255.0


3.

pc3 192.168.0.4 255.255.255.0


4.

• Then, create a network topology as shown below the image.


• Use an Automatic connecting cable to connect the devices with others.

Step 2: Configure the PCs (hosts) with IPv4 address and Subnet Mask according to the IP
addressing table given above.
• To assign an IP address in PC0, click on PC0.

47
Computer Network (3150710) 240673107017

• Then, go to desktop and then IP configuration and there you will IPv4 configuration.
• Fill IPv4 address and subnet mask.

• Assigning IP address using the ipconfig command.


• Also, we can also assign an IP address with the help of a command.
• Go to the command terminal of the PC.
• Then, type ipconfig <IPv4 address><subnet mask><default gateway>(if needed)
Example: ipconfig 192.168.0.1 255.255.255.0

48
Computer Network (3150710) 240673107017

• Repeat the same procedure with other PCs to configure them thoroughly.

Step 3: Verify the connection by pinging the IP address of any host in PC0.

• Use the ping command to verify the connection.


• We will check if we are getting any replies or not.
• Here we get replies from a targeted node on both PCs.

49
Computer Network (3150710) 240673107017

• Hence the connection is verified.


• A simulation of the experiment is given below we have sent two PDU packets one
targeted from PC0 to PC3 and another targeted from PC1 to PC2.

EXERCISE:
1. Create and draw the LAN of 10 computers using Class C Address.
2. Connect and draw two LAN (Each of having 6 Computers) with each other using class B
Address.
3. List out different types of transmission media with all its subcategories and explain each
in brief.

EVALUATION:
Problem Analysis & Understanding Level Timely Completion Mock Total
Solution (3)
(3) (2) (2) (10)

Signature with date:

50
Computer Network (3150710) 240673107017

Practical: 4
Aim: Implementation Of CRC generator.
❖ Introduction :

• CRCs are based on the theory of cyclic error-correcting codes.


• The use of systematic cyclic codes, which encode messages by adding a fixed-length check
value, for the purpose of error detection in communication networks, was first proposed
by W.
• Wesley Peterson in 1961.[2] Cyclic codes are not only simple to implement but have the
benefit of being particularly well suited for the detection of burst errors: contiguous
sequences of erroneous data symbols in messages.
• This is important because burst errors are common transmission errors in many
communication channels, including magnetic and optical storage devices.
• Typically an n-bit CRC applied to a data block of arbitrary length will detect any single
error burst not longer than n bits, and the fraction of all longer error bursts that it will
detect is approximately (1 − 2−n).
• Specification of a CRC code requires definition of a so-called generator polynomial.
• This polynomial becomes the divisor in a polynomial long division, which takes the
message as the dividend and in which the quotient is discarded and the remainder
becomes the result.
• The important caveat is that the polynomial coefficients are calculated according to the
arithmetic of a finite field, so the addition operation can always be performed bitwise-
parallel (there is no carry between digits).

❖ What is CRC?

• CRC (Cyclic Redundancy Check) is an error-detecting code used in digital networks and
storage devices. It detects accidental changes to raw data.
• Sender side: Message bits + CRC (remainder) = Transmitted codeword
• Receiver side: Received codeword ÷ Generator polynomial → If remainder = 0 (no
error), else (error detected).
• CRC uses binary division (modulo-2 division), where subtraction is replaced by XOR.

❖ Generate CRC Steps:


Steps for Generate a CRC code: -

51
Computer Network (3150710) 240673107017

1. Understand the Terms


• Message (M) → The original binary data to be sent.
• Generator Polynomial (G) → A binary divisor agreed upon by sender and receiver.
• Codeword → The message plus the CRC bits that will be sent.

2. Append Zeros to the Message


• Count (degree of G) - 1 zeros and append them to the message.
• If G is 4 bits, degree = 3, so append 3 zeros.

3. Perform Modulo-2 Division


• Divide the appended message by the generator polynomial using XOR instead of
subtraction.
• Only divide when the leftmost bit is 1.
• Align the divisor under the dividend and XOR bit-by-bit.
• Bring down the next bit after each step.

4. Get the Remainder


• When you finish the division, the result left in the last (degree of G) - 1 bits is the
CRC.

5. Append CRC to Original Message


• Take the original message (before adding zeros) and append the CRC remainder to it.
• This becomes the codeword sent to the receiver.

6. Transmit the Codeword


• Send the codeword over the channel.
• At the receiver end, perform the same Mod-2 division on the received codeword using
the same generator polynomial.
• If the remainder is all zeros → No Error. o If any bit in the remainder is 1 → Error
Detected.

❖ Working principles
Sender's Side:
• Select a Generator Polynomial : The sender and receiver agree on a fixed-length generator
polynomial. This polynomial is typically represented as a binary number.
• The number of bits in the CRC checksum will be one less than the number of bits in
the generator polynomial.

52
Computer Network (3150710) 240673107017

• Append Zeros to the Data: The sender takes the original data to be transmitted and
appends a number of zero bits to its end. The number of zeros added is equal to one
less than the length of the generator polynomial.
• Perform Modulo-2 Division: The augmented data (data + appended zeros) is then
divided by the generator polynomial using a process called modulo-2 division.
• This is a special type of binary division that uses the XOR operation instead of
subtraction.
• Append the Checksum: The remainder (the CRC checksum) is then appended to the
original data, replacing the zeros that were added in the previous step. This new, larger
data unit, which includes the original data and the CRC checksum, is called the
"codeword" and is then transmitted to the receiver.

Receiver's Side:
• Receive the Codeword: The receiver gets the transmitted codeword.
• Perform Modulo-2 Division: The receiver performs the same modulo-2 division,
using the same agreed-upon generator polynomial, on the entire received codeword.
• Check the Remainder: The receiver checks the remainder of this division.
• If the remainder is 0, it indicates that no errors were detected in the data during
transmission. The data is considered intact.
• If the remainder is not 0, it signifies that one or more bits were corrupted during
transmission. The receiver will then typically request that the sender re-transmit the
data.
Example:

53
Computer Network (3150710) 240673107017

Exercise:
1) Write a C Program for the CRC Generator.
Input:

54
Computer Network (3150710) 240673107017

Output:

QUIZ:
Answer the Followings:
1. What is CRC?

2. CRC is used at which Layer?

3. Find CRC for String/Frame 1101011011 and Fixed code/Generator10011?

EVALUATION:

Problem Understanding Timely Mock Total


Analysis & Level Completion
Solution
(3) (3) (2) (2) (10)

Signature with date:-

55

You might also like