Linux and Networking Lab Assignment
1. How to check the IP address of your Linux system using the command line.
Command:
ip a
Take a screenshot showing 'inet' under your active interface (like eth0 or wlan0).
2. Test the connectivity to a website using ping (use google)
Command:
ping -c 4 google.com
Capture the response lines and summary statistics.
3. Find the MAC address of your active network interface.
Command:
ip link show
Look for 'link/ether' value. Example MAC: dc:a6:32:8b:44:12
4. Command to edit the network interface, assigning the IP and gateway.
Command:
sudo nano /etc/network/interfaces
Add static IP config and restart networking service.
5. How to check the Linux Distribution with particular version.
Command:
lsb_release -a
Take a screenshot of the Distributor ID and Release info.
6. List all active TCP connections (netstat -antp)
Command:
Linux and Networking Lab Assignment
sudo netstat -antp
Look for LISTEN and ESTABLISHED states.
7. Install iperf and listen for incoming speed tests.
Commands:
sudo apt install iperf
iperf -s
Screenshot: Server listening state.
8. nslookup google.com
Command:
nslookup google.com
Note the 'Non-authoritative answer' and resolved IP.
9. Analyze active TCP connections and processes.
Command:
sudo netstat -antp
Highlight LISTEN state, external IPs, and PIDs.
10. Display CPU info (/proc/cpuinfo)
Command:
cat /proc/cpuinfo
Note model name, core count, clock speed, and vendor ID.
11. Display memory info (/proc/meminfo)
Command:
cat /proc/meminfo
Example: MemTotal = 8043456 kB, SwapFree = 2097148 kB
Linux and Networking Lab Assignment
12. View current iptables rules
Command:
sudo iptables -L
Screenshot the rule chains.
SSH and SCP
1. ssh username@IP
2. scp /local/file user@ip:/remote/path
Linux Bridge creation and verification
Commands:
sudo apt install bridge-utils
sudo brctl addbr br0
sudo brctl show
Add interface to Linux Bridge
Command:
sudo brctl addif br0 eth0
Mininet: Create topology with 1 switch and 2 hosts
Command:
sudo mn --topo=single,2
Use 'net' in CLI to view nodes and links.
Mininet: Test host connectivity
Command:
pingall (from Mininet CLI)
Screenshot successful pings.
Linux and Networking Lab Assignment
Mininet: Start with remote controller
Command:
sudo mn --controller=remote
Mininet: Simulate link failure
Command:
link h1 s1 down (inside Mininet CLI)
Mininet: Connect topology to real interface
Command:
sudo ovs-vsctl add-port s1 eth0
Integrate Mininet with OpenDaylight
Use: --controller=remote,ip=<ODL_IP>
Start ODL separately.
Update packages before installing OpenDaylight
Command:
sudo apt update && sudo apt upgrade
Install unzip to extract OpenDaylight
Command:
sudo apt install unzip
Install Java 8 for OpenDaylight
Command:
sudo apt install openjdk-8-jdk
Linux and Networking Lab Assignment
Verify Java installation
Command:
java -version
Set JAVA_HOME environment variable
Command:
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
Download OpenDaylight
Command:
wget <ODL_URL>
Unzip OpenDaylight
Command:
unzip karaf-*.zip
Start OpenDaylight Karaf Console
Command:
./bin/karaf
Install L2 Switch UI in Karaf
Command:
feature:install odl-l2switch-switch-ui
Enable RESTCONF and DLUX UI
Command:
feature:install odl-restconf odl-dlux-core
Linux and Networking Lab Assignment
OpenDaylight Web UI URL and login
URL: http://<ODL-IP>:8181/index.html
Username: admin
Password: admin
Wireshark: Capture live traffic
Open Wireshark > Select interface > Start capture
Screenshot packet list.
Mininet: Launch single switch with 3 hosts
Command:
sudo mn --topo single,3
Use 'net' to verify.
Mininet: Linear topology with 4 switches
Command:
sudo mn --topo linear,4
Wireshark: Browse website and capture
Mention one protocol seen (e.g., HTTPS, TCP).
Take a screenshot.
Wireshark: DNS Filter and Result
Filter: dns
Note queried domain and resolved IP.
Wireshark: TCP 3-way handshake
Linux and Networking Lab Assignment
Filter: tcp
Capture SYN -> SYN-ACK -> ACK
Note IPs and ports.