0% found this document useful (0 votes)
18 views16 pages

CN Praticals 8,9,10

The document outlines three experiments focused on networking concepts, including subnetting, routing protocols, and echo client-server implementation using TCP/UDP sockets. Experiment 8 emphasizes subnetting for efficient IP address management, Experiment 9 explores static and dynamic routing protocols using CISCO Packet Tracer, and Experiment 10 details the implementation of echo client-server systems. Each experiment includes objectives, practical exercises, and conclusions highlighting the importance of network design and protocol understanding.
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)
18 views16 pages

CN Praticals 8,9,10

The document outlines three experiments focused on networking concepts, including subnetting, routing protocols, and echo client-server implementation using TCP/UDP sockets. Experiment 8 emphasizes subnetting for efficient IP address management, Experiment 9 explores static and dynamic routing protocols using CISCO Packet Tracer, and Experiment 10 details the implementation of echo client-server systems. Each experiment includes objectives, practical exercises, and conclusions highlighting the importance of network design and protocol understanding.
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/ 16

EXPERIMENT NO: 8

AIM: Design multiple subnet with suitable number of hosts. Make a plan to assign static IP addressing
across all subnet to explain implementation of subnetting.

THEORY:

Subnetting is the practice of dividing up a network into two or more networks. Common advantages of
Subnetting include enhancing routing efficiency, network management control, and improving network
security. While these are just a few of the benefits that subnetting provides, they are the most noticeable after
immediately implementing a subnet system.
This results in the logical division of an IP address into two fields: the network number or routing prefix and
The rest field or host identifier. Addresses help to identify the pieces of hardware connected to your network.
To locate a particular device you would need to organize the IP addresses in a logical way. This is where
subnetting excels as a tool to help you maintain efficiency across your network.

The subnet connection of network

Configuring routers in two ways as shown above in the network


Configuring 2 routers with each other

The subnets as created from the network configured.

8.1 Purpose:
The main objective of the proposed experiment is to divide multiple networks using the concept of

subnetting and super-netting.

8.2 Logical Flow of Practical


8.3 TOOLS/SOFTWARE:
8.4 Expected Output:

8.5 Practice Excercises:


1. Design and connect multiple networks using a serial router connection.

2. Design and connect multiple networks using a parallel router connection


Conclusion : In this project, we successfully designed multiple subnets with an appropriate number of
hosts,ensuring efficient utilization of IP addresses while minimizing wastage. By carefully analyzing the
requirements, we determined the subnet mask and the range of IP addresses for each subnet, accommodating
the necessary hosts while maintaining scalability for future expansion.
Additionally, a structured plan for assigning static IP addresses across all subnets
was developed, ensuring proper organization and ease of network management. This implementation of
subnetting enhances network security, improves performance, and simplifies troubleshooting. Through this
approach, we achieved a well-structured and efficient network design suitable for real-world applications.
EXPERIMENT NO: 9

AIM: Routing at Network Layer: Simulate Static and Dynamic Routing Protocol Configuration using
CISCO Packet Tracer.

9.1 Purpose:
The main objective of the proposed experiment is to implement static and dynamic routing protocol using

serial and parallel routing connections. It also gives an opportunity to students to learn serial and parallel

router configuration in multiple network environments.

9.2 Logical Flow of Practical

9.3 TOOLS/SOFTWARE:
Cisco Packet Tracer
9.4 Expected Output:
9.5 Practice Excercises:
1. Design an actual LAN network using 4 nodes. Design two subnets from the designed network
using class A Ip address classes.

2. Design actual Wi-Fi network using 4 nodes. Design two subnets from the designed network using
class A Ip address classes.
9.6 Conclusion : The study and simulation of static and dynamic routing protocols using CISCO Packet Tracer
provide valuable insights into the mechanisms and functionalities that underpin network layer routing. Static
routing offers
simplicity and ease of implementation, making it suitable for smaller networks with limited changes. However
, it lacks scalability and fails to adapt to network topology changes dynamically.
On the other hand, dynamic routing protocols such as RIP, OSPF, and EIGRP automatically adjust to network
variations, ensuring optimal path selection and efficient data transmission. These protocols, while more
complex, provide robustness, scalability, and better fault tolerance, making them ideal for larger and more
dynamic network environments.
By configuring and comparing both static and dynamic routing in CISCO Packet Tracer, we gain practical
experience in understanding the strengths and limitations of each approach. This exercise underscores the
importance of choosing the appropriate routing strategy based on network requirements and highlights the
critical role of routing in achieving efficient and reliable network communication.
EXPERIMENT NO: 10

AIM : Implementation of echo client server using TCP/UDP sockets.

To write a program for UDP echo client server.

ALGORITHM:

SERVER:
STEP 1: Start
STEP 2: Declare the variables for the socket
STEP 3: Specify the family, protocol, IP address and port number
STEP 4: Create a socket using socket() function
STEP 5: Bind the IP address and Port number
STEP 6: Listen and accept the client’s request for the connection
STEP 7: Read and Display the client’s message
STEP 8: Stop

CLIENT:
STEP 1: Start
STEP 2: Declare the variables for the socket
STEP 3: Specify the family, protocol, IP address and port number
STEP 4: Create a socket using socket() function
STEP 5: Call the connect() function
STEP 6: Read the input message
STEP 7: Send the input message to the server
STEP 8: Display the server’s echo
STEP 9: Close the socket
STEP 10: Stop

SOURCE CODE:

SERVER:

import socket localIP = "127.0.0.1"


localPort = 20001
bufferSize = 1024
msgFromServer = "Hello UDP Client"
bytesToSend = str.encode(msgFromServer)

# Create a datagram socket


UDPServerSocket = socket.socket(family=socket.AF_INET, type=socket.SOCK_DGRAM)
# Bind to address and ip
UDPServerSocket.bind((localIP, localPort))

print("UDP server up and listening,L") # Listen for incoming datagrams while(True): bytesAddressPair =
UDPServerSocket.recvfrom(bufferSize) message = bytesAddressPair[0] address = bytesAddressPair[1]
clientMsg = "Message from Client:{}".format(message) clientIP = "Client IP Address:{}".format(address)
print(clientMsg)
print(clientIP)

# Sending a reply to client

UDPServerSocket.sendto(bytesToSend, address)

CLIENT:
import socket msgFromClient = "Hello UDP Server" bytesToSend = str.encode(msgFromClient)
serverAddressPort = ("127.0.0.1", 20001)
bufferSize = 1024
# Create a UDP socket at client side
UDPClientSocket = socket.socket(family=socket.AF_INET, type=socket.SOCK_DGRAM)
# Send to server using created UDP socket
UDPClientSocket.sendto(bytesToSend, serverAddressPort) msgFromServer =
UDPClientSocket.recvfrom(bufferSize)

msg = "Message from Server {}".format(msgFromServer[0]) print(msg)

OUTPUT: SERVER:

CLIENT:
RESULT:
Thus the program for UDP echo client server was executed and the output was verified.

AIM:
To write a program for TCP echo client server.

SOURCE CODE:

SERVER
CLIENT:

Execution of Python TCP Server and Client modules


You can run both the server and client in separate Python instances. It is recommend that you use Python
version 3 for executing the above modules.
Next, you would first run the server module followed by the client. See below the output of both the client
and the server.

OUTPUT:

SERVER:
CLIENT:

Conclusion : Implementation of an echo client-server system using TCP/UDP sockets provides valuable
hands-on experience with socket programming and networking protocols.

Key Takeaways:

Understanding Protocols: TCP (Transmission Control Protocol) offers reliable, ordered, and error-checked
delivery of a stream of bytes, making it ideal for applications where data integrity is crucial. On the other
hand, UDP (User Datagram Protocol) provides a connectionless, lightweight solution with minimal overhead,
suitable for time-sensitive applications like video streaming or gaming.

Practical Application: This project demonstrates how to establish client-server communication, handle data
transmission, and manage multiple client connections efficiently.

Debugging and Error Handling: Through this implementation, one learns the importance of robust error
handling and debugging techniques, as network communication can be susceptible to various issues such as
data loss, packet corruption, or connection timeouts.

Scalability and Performance: While the echo server is a simple application, the principles learned can be
applied to more complex systems. Understanding the trade-offs between TCP and UDP helps in designing
scalable and high-performance network applications.

By successfully creating an echo client-server system, we lay a solid foundation for further exploration and
development in the field of network programming.

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