To design and simulate simple computer networks using Star, Mesh, Bus, and Extended Star topologies in Cisco Packet Tracer.
- Cisco Packet Tracer
Network topology refers to the physical or logical arrangement of devices in a computer network. Different topologies provide different levels of reliability, scalability, cost, and ease of maintenance.
1. Star Topology
- All computers are connected to a central switch.
- Easy to manage and troubleshoot.
- Failure of the central switch affects the entire network.
2. Mesh Topology
- Devices are connected through multiple paths.
- Provides high reliability and fault tolerance.
- Requires more connections and cabling.
3. Bus Topology
- All devices share a common communication backbone.
- Uses less cabling in a traditional bus arrangement.
- Failure of the main backbone can disrupt the network.
4. Extended Star Topology
- Multiple star networks are connected through a central switch or other network devices.
- Suitable for larger networks.
- Allows the network to be expanded easily.
- Open Cisco Packet Tracer and create a new project.
- Select the required end devices, such as PCs, and network devices, such as switches and routers.
- Arrange the devices according to each topology.
- Connect the devices using suitable cables.
- Configure IP addresses and subnet masks on the PCs. For example, use
192.168.1.1,192.168.1.2, and192.168.1.3with subnet mask255.255.255.0. - Use the Add Simple PDU tool or the
pingcommand to test connectivity between devices. - Observe the packet flow and verify successful communication.
- Star topology uses a central switch to connect all devices.
- Mesh topology provides multiple communication paths between devices.
- Bus topology uses a shared backbone, while extended star topology connects multiple star networks.
Successfully designed and simulated Star, Mesh, Bus, and Extended Star network topologies using Cisco Packet Tracer and studied their structure and connectivity.
To implement an Error Control Protocol for detecting and controlling errors during data transmission.
Why needed: To detect and correct errors that may occur during data transmission.
Why needed: To determine whether the received data contains errors.
Why needed: To detect simple errors by adding an extra bit to the transmitted data.
Why needed: To detect and correct single-bit errors in transmitted data.
Why needed: Extra bits are added to the original data to help detect or correct errors.
Why needed: To transmit the data along with the required error-control information.
Why needed: To check the received data for errors and perform correction when possible.
Why needed: To identify and correct an incorrect bit without retransmitting the entire data.
Why needed: To send the data again when an error is detected but cannot be corrected.
To write a program to demonstrate subnetting and find the subnet mask.
An IP address is a unique address assigned to a device on a network.
Why needed:
It identifies the source and destination devices in a network.
IPv4 is a 32-bit address represented in four octets.
Why needed:
It provides the addressing scheme on which subnetting is performed.
Subnetting is the process of dividing a larger network into smaller networks called subnets.
Why needed:
It helps divide a network efficiently and manage different groups of devices.
A subnet is a smaller logical network created from a larger network.
Why needed:
It separates devices into smaller network groups and reduces unnecessary network traffic.
A subnet mask determines which portion of an IP address represents the network and which portion represents the host.
Why needed:
It is used to identify the network and determine how the IP address is divided into subnets and hosts.
The network address identifies a particular subnet.
Why needed:
It determines the starting address of a subnet and identifies the network itself.
The host portion identifies an individual device within a subnet.
Why needed:
It allows different devices to be uniquely identified within the same subnet.
CIDR notation represents the number of network bits using a prefix such as /24.
Why needed:
It provides a simple way to represent the network portion of an IP address and determine the subnet mask.
Borrowed bits are host bits taken and used as network bits during subnetting.
Why needed:
They are used to create multiple smaller subnets from one larger network.
The number of subnets is determined using the formula:
2^n
where n is the number of borrowed bits.
Why needed:
It helps determine how many subnets can be created.
The number of usable hosts in a subnet is determined using:
2^h - 2
where h is the number of remaining host bits.
Why needed:
It determines how many devices can be assigned IP addresses within each subnet.
To implement the Distance Vector Routing algorithm using Python and determine the shortest path and minimum cost between routers in a network.
- Router: A network device represented by A, B, C, etc.
- Cost: The distance/metric required to travel between two routers.
- Distance Vector: A table containing the minimum known cost from one router to every destination.
- Next Hop: The immediate router through which a packet should be forwarded.
- INF (999): Represents no direct connection between two routers.
- Shortest Path: The route having the minimum total cost.
-
The user enters the number of routers and the network cost matrix.
-
Each router initially knows the cost of reaching itself and its directly connected neighbors.
-
Routers update their distance vectors using the formula:
D(i,j) = min(D(i,j), C(i,k) + D(k,j)) -
The process continues until no routing table changes occur.
-
The final routing tables show the destination, minimum cost, and next hop.
-
The user can then enter a source and destination router to find the shortest path.
The Distance Vector algorithm repeatedly exchanges routing information and updates routes when a cheaper path is found. The final routing table contains the minimum cost and next hop for every reachable destination. The experiment demonstrates how routers dynamically determine efficient paths without knowing the complete network topology.
To implement client-server communication using Transmission Control Protocol (TCP) in Python.
TCP is a connection-oriented transport-layer protocol that provides reliable, ordered delivery of a byte stream. Before exchanging application data, the client establishes a connection with the server.
- Create a TCP socket using Python's
socketmodule. - Bind the socket to the server's IP address and port number.
- Call
listen()to wait for client connections. - Use
accept()to accept an incoming connection. - Receive client data using
recv(). - Send a response using
send()orsendall(). - Close the connection and release the socket resources.
- Create a TCP socket.
- Connect to the server using its IP address and port number.
- Send a message to the server.
- Receive and display the server's response.
- Close the connection.
| Function | Purpose |
|---|---|
socket() |
Creates a socket |
bind() |
Associates the server socket with a local address |
listen() |
Waits for connection requests |
accept() |
Accepts a client connection |
connect() |
Establishes a client connection |
send() / sendall() |
Transmits data |
recv() |
Receives data |
close() |
Closes the socket |
The TCP client and server establish a connection and exchange messages, demonstrating reliable, connection-oriented communication.
To implement client-server communication using User Datagram Protocol (UDP) in Python.
UDP is a connectionless transport-layer protocol that sends independent datagrams without establishing a connection beforehand. It has lower protocol overhead than TCP but does not guarantee delivery, ordering, or duplicate protection.
- Create a UDP socket using
socket.SOCK_DGRAM. - Bind the socket to a local IP address and port number.
- Wait for client datagrams using
recvfrom(). - Process the received message.
- Send a response using
sendto(). - Close the socket when communication is complete.
- Create a UDP socket.
- Prepare a message for the server.
- Send the datagram to the server using
sendto(). - Receive the server's response using
recvfrom(). - Display the response and close the socket.
| Feature | TCP | UDP |
|---|---|---|
| Communication | Connection-oriented | Connectionless |
| Reliability | Reliable delivery | No delivery guarantee |
| Data format | Byte stream | Datagrams |
| Ordering | Ordered byte stream | No ordering guarantee |
| Overhead | Generally higher | Generally lower |
| Examples | Web traffic, file transfer | DNS queries, real-time applications |
The UDP client and server exchange datagrams without establishing a connection, demonstrating connectionless communication.
To configure and test DHCP, DNS, Web Server, and Email Server services in Cisco Packet Tracer.
- Assign IP addresses dynamically using DHCP.
- Resolve domain names to IP addresses using DNS.
- Host and access web pages using HTTP.
- Send and receive emails using SMTP and POP3.
- Test connectivity between clients and servers.
- Cisco Packet Tracer
- PCs or client computers
- Server devices
- Network switch
- Ethernet cables
- Router, if communication across multiple networks is required
Connect the PCs and servers to a network switch. Configure each server with an appropriate static IP address. If the topology contains multiple subnets, configure a router and the necessary routes or gateways.
A single server may provide multiple services, or separate servers may be used for DHCP, DNS, web hosting, and email.
The following values are illustrative and should be adapted to your actual Packet Tracer topology.
| Device | Example IP Address | Purpose |
|---|---|---|
| Router | 192.168.1.1 |
Default gateway |
| DHCP Server | 192.168.1.2 |
Automatic IP assignment |
| DNS Server | 192.168.1.3 |
Name resolution |
| Web Server | 192.168.1.4 |
Website hosting |
| Email Server | 192.168.1.5 |
Email services |
| Client PCs | 192.168.1.100 onwards |
Access network services |
| Subnet Mask | 255.255.255.0 |
Network identification |
Ensure that server IP addresses are excluded from the DHCP address pool to avoid address conflicts.
To configure a DHCP server to automatically assign IP addresses and other network parameters to client PCs.
DHCP automatically provides clients with network configuration, including an IP address, subnet mask, default gateway, and DNS server address.
DHCP commonly uses UDP port 67 on the server and UDP port 68 on the client.
- Add a server to the Packet Tracer workspace.
- Connect the server and client PCs to a switch.
- Open the server and select Desktop → IP Configuration.
- Assign the server a static IP address, subnet mask, and default gateway.
- Open Services → DHCP.
- Turn the DHCP service ON.
- Enter the following settings:
- Pool Name:
LAN_POOL - Default Gateway:
192.168.1.1 - DNS Server:
192.168.1.3 - Starting IP Address:
192.168.1.100 - Subnet Mask:
255.255.255.0 - Maximum Number of Users:
50
- Pool Name:
- Click Add to create the pool.
- Open each client PC and select Desktop → IP Configuration → DHCP.
- Verify that each PC receives a valid IP address and network settings.
- Run
ipconfigon a client PC to inspect its IP configuration. - Check that the assigned IP address belongs to the configured DHCP pool.
- Ping the default gateway or another reachable device.
The DHCP server dynamically assigns IP addresses and network configuration to client PCs.
To configure DNS so clients can access servers using domain names rather than numerical IP addresses.
DNS translates domain names into IP addresses. In this experiment, an A record maps a domain name to an IPv4 address.
DNS generally uses UDP port 53 for queries and can also use TCP port 53.
- Add a DNS server or use a server already present in the topology.
- Assign the server a static IP address, such as
192.168.1.3. - Open Services → DNS.
- Turn the DNS service ON.
- Add an A record for the website:
- Name:
www.networklab.local - Address:
192.168.1.4
- Name:
- Click Add to save the DNS record.
- Configure clients to use
192.168.1.3as their DNS server, either manually or through DHCP. - Open a client PC's web browser and enter
http://www.networklab.local.
| Field | Value |
|---|---|
| Domain Name | www.networklab.local |
| Record Type | A |
| Destination IP | 192.168.1.4 |
The destination IP must match the configured web server address.
- Ping the configured domain name from a client.
- Open the domain name in the web browser.
- Confirm that the website resolves to the correct web server.
The DNS server resolves the configured domain name to its corresponding IP address, enabling name-based access to network services.
To configure a web server and access a hosted web page from client PCs using HTTP.
A web server stores and delivers web content to clients. HTTP is an application-layer protocol commonly used to request and transfer web pages over TCP port 80. HTTPS uses TLS to secure HTTP communication, typically over TCP port 443.
- Add a server and connect it to the network switch.
- Assign the server a static IP address, such as
192.168.1.4. - Open Services → HTTP.
- Turn HTTP ON.
- If required, enable HTTPS.
- Edit the default
index.htmlpage to display a custom message. - Ensure that the DNS server has an A record pointing
www.networklab.localto192.168.1.4. - Open a client PC and select Desktop → Web Browser.
- Enter the web server's IP address or domain name.
- Web Server IP:
192.168.1.4 - URL by IP:
http://192.168.1.4 - URL by domain:
http://www.networklab.local
- Access the page using the server's IP address.
- Access the same page using the configured domain name.
- Confirm that the custom HTML page loads successfully.
The web server hosts and delivers a web page to client PCs over HTTP.
To configure an email server and exchange messages between client PCs using SMTP and POP3.
An email server enables users to send and retrieve electronic messages.
- SMTP (Simple Mail Transfer Protocol): Used to send and relay email.
- POP3 (Post Office Protocol version 3): Used by clients to retrieve email from a mailbox.
SMTP commonly uses TCP port 25 in basic lab configurations, while POP3 commonly uses TCP port 110.
- Add an email server and assign a static IP address, such as
192.168.1.5. - Open Services → EMAIL.
- Set the email domain to
networklab.local. - Enable SMTP and POP3.
- Create the required user accounts, for example:
- Username:
alice, Password:alice123 - Username:
bob, Password:bob123
- Username:
- Add each account to the server.
Use these example credentials only in the isolated lab simulation; do not reuse them for real accounts.
- Open the first client PC.
- Navigate to Desktop → Email.
- Enter the following details:
- Display Name:
Alice - Email Address:
alice@networklab.local - Incoming Mail Server:
192.168.1.5 - Outgoing Mail Server:
192.168.1.5 - Username:
alice - Password:
alice123
- Display Name:
- Save the configuration.
- Repeat the process on the second PC for
bob@networklab.local, using Bob's account credentials. - Compose a message from Alice's account addressed to
bob@networklab.local. - Send the email.
- Open Bob's email application and use the receive/check-mail function.
| Parameter | Example |
|---|---|
| Email Domain | networklab.local |
| Sender | alice@networklab.local |
| Receiver | bob@networklab.local |
| Outgoing Protocol | SMTP |
| Incoming Protocol | POP3 |
| Email Server IP | 192.168.1.5 |
- Confirm that SMTP and POP3 are enabled on the server.
- Check that client account credentials and server addresses are correct.
- Send a message from one configured account to another.
- Retrieve the message on the receiving PC and verify its contents.
The email server enables message transmission and retrieval between configured email accounts using SMTP and POP3.
After configuring the four services, perform these tests:
| Test | Expected Outcome |
|---|---|
| Obtain IP using DHCP | Client receives a valid address from the pool |
| Ping a reachable device | Replies are received if connectivity and policies permit |
| Resolve a DNS name | The name maps to the configured server IP |
| Open the website | The configured HTML page appears |
| Send an email | The sending client submits the message successfully |
| Retrieve an email | The receiving client displays the delivered message |
Use Simulation Mode in Cisco Packet Tracer to observe packet exchanges and understand how the protocols operate.
- DHCP failure: Check that DHCP is ON, the pool is configured, and the pool has available addresses.
- DNS failure: Verify the DNS service, the A record, and the DNS address configured on the client.
- Website failure: Confirm that HTTP is ON and the web server IP address is correct.
- Email failure: Verify the domain, user accounts, SMTP/POP3 settings, and client credentials.
- Connectivity failure: Check cabling, interface status, IP addresses, subnet masks, gateways, and routing where required.
| Protocol | Full Form | Purpose | Transport |
|---|---|---|---|
| DHCP | Dynamic Host Configuration Protocol | Automatic IP configuration | UDP |
| DNS | Domain Name System | Name-to-address resolution | UDP or TCP |
| HTTP | Hypertext Transfer Protocol | Web page transfer | TCP |
| SMTP | Simple Mail Transfer Protocol | Email sending and relay | TCP |
| POP3 | Post Office Protocol v3 | Email retrieval | TCP |
| TCP | Transmission Control Protocol | Reliable, ordered byte-stream communication | Transport protocol |
| UDP | User Datagram Protocol | Connectionless datagram communication | Transport protocol |
After completing these experiments, students should be able to:
- Implement Distance Vector Routing and understand routing-table updates.
- Develop TCP client-server programs using Python sockets.
- Implement UDP communication using datagram sockets.
- Configure DHCP pools and automatically assign IP addresses.
These experiments provide hands-on experience with routing algorithms, socket programming, and application-layer network services. Python is used to explore routing and client-server communication, while Cisco Packet Tracer provides a visual environment for configuring and testing DHCP, DNS, web hosting, and email services.
Together, the experiments strengthen the understanding of computer networks, protocol behavior, client-server architecture, and practical network troubleshooting.