Skip to main content

Posts

CSL 332 Networking Lab KTU 2019 Scheme - Dr Binu V P

CSL 332 Networking Lab KTU BTech 2019 Scheme About Me Scheme Syllabus Experiments 1.Learn the Networking Commands and Network Configuration Files     Basic networking commands     More Networking commands     Network configuration Files     View the configuration and address of your network interface     Network Connectivity      View Active TCP connections     MAC address of another machine using ARP  2.  System calls in Network Programming 3.  Simple TCP/IP Client Server Program 4.  Simple UDP Client Server Program 5.Application Programs     Concurrent UDP Time Server     Checking Prime Numbers 6. Simulate ARQ Protocols  / sliding window protocols          Stop and Wait           Go-Back-N          Selective Repeat  7. Routing Protocols - Distance Vector and Link State   ...
Recent posts

CSL 332 Networking Lab- Scheme

CSL332 NETWORKING  LAB CATEGORY      L T P Credit      Year of Introduction                PCC         0 0 3      2                     2019 Preamble: The course enables the learners to get hands-on experience in network programming using Linux System calls and network monitoring tools. It covers implementation of network protocols andalgorithms, configuration of network services and familiarization of network simulators. This helps the learners to develop, implement protocols and evaluate its performance for real world networks. Prerequisite: Sound knowledge in Programming in C, Data Structures and Computer Networks Course Outcomes: After the completion of the course the student will be able to Course Outcomes CO1 Use network related commands and configuration files in Linux Operating System. (Cognitive Know...

CSL 332 Networking Lab - Syllabus

 Syllabus *Mandatory (Note: At least one program from each topic in the syllabus should be completed in the Lab) 1. Getting started with the basics of network configuration files and networking commands in Linux.* 2. To familiarize and understand the use and functioning of system calls used for network programming in Linux.* 3. Implement client-server communication using socket programming and TCP as transport layer protocol* 4. Implement client-server communication using socket programming and UDP as transport layer protocol* 5. Simulate sliding window flow control protocols.* (Stop and Wait, Go back N, Selective Repeat ARQ protocols) 6. Implement and simulate algorithm for Distance Vector Routing protocol or Link State Routing protocol.* 7. Implement Simple Mail Transfer Protocol. 8. Implement File Transfer Protocol.* 9. Implement congestion control using a leaky bucket algorithm.* 10. Understanding the Wireshark tool.* 11. Design and configure a network with multiple subnets wit...

View the configuration and address of your network interface

 To view the configuration and addresses of your computer's network interfaces in Debian/Ubuntu, you can use the following commands: 1. Using ip Command (Recommended) ip addr show Explanation: This command displays all active and inactive network interfaces along with their IP addresses, MAC addresses, and other details. Look for lines starting with inet (for IPv4) or inet6 (for IPv6). Example Output: 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 00:1a:2b:3c:4d:5e brd ff:ff:ff:ff:ff:ff inet 192.168.1.100/24 brd 192.168.1.255 scope global eth0 inet6 fe80::1a2b:3c4d:5e6f/64 scope link inet 192.168.1.100/24 – IP address and subnet mask. link/ether – MAC address. 2. Using ifconfig Command (Legacy) ifconfig Explanation: Displays similar information but is considered deprecated in favor of the ip command. You might need to install it: sudo apt install net-tools 3. Using hostname -I (Quick IP Addr...

Network Configuration Files

  Network Configuration Files in Debian/Ubuntu In Debian/Ubuntu-based systems, network configurations are managed through several files and tools. Understanding these files is essential for configuring network interfaces, setting up static IPs, or managing DNS. 1. /etc/network/interfaces This file was traditionally used to configure network interfaces on Debian-based systems. While it is still supported, modern systems often use Netplan or NetworkManager . Structure and Syntax: auto <interface> iface <interface> <family> <method> address <IP address> netmask <subnet mask> gateway <default gateway> dns-nameservers <DNS server> Example: auto eth0 iface eth0 inet static address 192.168.1.100 netmask 255.255.255.0 gateway 192.168.1.1 dns-nameservers 8.8.8.8 8.8.4.4 Explanation: auto : Automatically brings the interface up at boot. iface : Specifies the interface, address family ( inet for IPv4, inet6 for...

Active TCP Connections

To view active TCP connections on your computer after visiting a website, you can use the following commands in Debian/Ubuntu: 1. Using ss (Recommended) ss -t Explanation: Lists all active TCP connections. Faster and more modern than netstat . Options: -t – Show TCP connections only. -a – Show all connections (including listening). -n – Show numerical addresses (skip DNS resolution). -p – Show the process using the connection. ss -tanp 2. Using netstat (Legacy) netstat -at Explanation: Displays all active TCP connections. Options: -a – Show all active connections. -t – Show TCP connections. -n – Show numerical addresses (no DNS lookup). -p – Show process names. Example (with processes): netstat -antp Install netstat (if not installed): sudo apt install net-tools 3. Using lsof (List Open Files) lsof -i TCP Explanation: Lists all open TCP network connections. Shows the program associated with each connection. Example (filter for websites): lsof -i :80 -i :443 Shows HTTP (port...

Network Connectivity between your computer and other computers

 To test network connectivity between your computer and other computers, you can use several tools and commands available in Debian/Ubuntu. Here are the most common methods: 1. Ping – Basic Connectivity Test ping <IP-address or hostname> Example: ping 192.168.1.1 ping google.com Explanation: Sends ICMP echo requests to the target. If the target responds, it indicates basic connectivity. Useful for checking if a machine or server is reachable. Options: -c <number> – Limit the number of packets. ping -c 4 google.com -i <seconds> – Set interval between pings. ping -i 2 192.168.1.1 -t <ttl> – Set time to live (TTL). ping -t 64 8.8.8.8 2. Traceroute – Path and Latency Test traceroute <IP-address or hostname> Example: traceroute google.com Explanation: Shows the path packets take to reach the target. Displays each hop along the way with latency details. Install Traceroute (if not installed): sudo apt install traceroute 3. Netcat (nc) – Port Connectivity T...