0% found this document useful (0 votes)
36 views22 pages

CN 5th - Copy

computer networking

Uploaded by

mailheretoprint
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views22 pages

CN 5th - Copy

computer networking

Uploaded by

mailheretoprint
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 22

Tribhuwan University

Kathmandu Shiksha Multiple Campus


Satungal, Kathmandu, Nepal

Lab report on Computer Networking (CACS 303)


Submitted By Submitted To
Name: Kushal Maharjan Department of BCA
Tu Registration Number: 6-2-268–13–2020 Yuba Raj Devkota
Faculty: Humanities and Social Science
Semester: Fifth Semester

Internal Examiner Signature: …………………………….

External Examiner Signature: …………………………….


Table of Content
1. List basic computer networking commands.
2. Install packet tracer and explain its features.
3. Illustrate the working principle of HUB with the help of packet tracer.
4. Illustrate the working principle of L2 Switch with the help of packet tracer.
5. Illustrate the working principle of Router with the help of packet tracer.
6. Connect computers in Local Area Network and write its steps with pics.
7. Create User & Groups. Also Share File and Folders among users.
8. Demonstrate static routing using 2 routers, 2 switches & 4 PCs.
9. Download Wireshark and explain its features.
10. Use Wireshark to trace IP Packet Header information.
11. Configure Routing using RIP Protocol.
12. Configure Dynamic Routing using OSPF Protocol.
13.Configure Routing using BGP Protocol.
14. List basic linux commands.
1. List basic computer networking commands.
There are a lot of computer networking commands with short descriptions listed here but you
should only need the ones mentioned here at the top of the page to diagnose and configure
your network.

C:>ping
C:>ipconfig
C:>ipconfig /all
C:>ipconfig /release
C:>ipconfig /renew
C:\>nbtstat –a
Remember when typing from the command prompt you can only type one command per line,
and press Enter after each one to execute it.

C:\>arp –a: is short for address resolution protocol, It will show the IP address of your computer
along with the IP address and MAC address of your router.

C:\>hostname: This is the simplest of all TCP/IP commands. It simply displays the name of your
computer.

C:\>ipconfig: The ipconfig command displays information about the host (the computer your
sitting at) computer TCP/IP configuration.

C:\>ipconfig /all: This command displays detailed configuration information about your TCP/IP
connection including Router, Gateway, DNS, DHCP, and type of Ethernet adapter in your
system.

C:\>Ipconfig /renew: Using this command will renew all your IP addresses that you are currently
(leasing) borrowing from the DHCP server. This command is a quick problem solver if you are
having connection issues, but does not work if you have been configured with a static IP
address.

C:\>Ipconifg /release: This command allows you to drop the IP lease from the DHCP server.

C:\>ipconfig /flushdns: This command is only needed if you’re having trouble with your
networks DNS configuration. The best time to use this command is after network configuration
frustration sets in, and you really need the computer to reply with flushed.

C:\>nbtstat –a: This command helps solve problems with NetBIOS name resolution. (Nbt stands
for NetBIOS over TCP/IP) Definitions
C:\netdiag: Netdiag is a network testing utility that performs a variety of network diagnostic
tests, allowing you to pinpoint problems in your network. Netdiag isn’t installed by default, but
can be installed from the Windows XP CD after saying no to the install. Navigate to the CD ROM
drive letter and open the support\tools folder on the XP CD and click the setup.exe icon in the
support\tools folder.

C:\>netstat: Netstat displays a variety of statistics about a computers active TCP/IP connections.
This tool is most useful when you’re having trouble with TCP/IP applications such as HTTP, and
FTP.

C:\>nslookup: Nslookup is used for diagnosing DNS problems. If you can access a resource by
specifying an IP address but not it’s DNS you have a DNS problem. C:\>pathping: Pathping is
unique to Window’s, and is basically a combination of the Ping and Tracert commands.
Pathping traces the route to the destination address then launches a 25 second test of each
router along the way, gathering statistics on the rate of data loss along each hop.

C:\>ping: Ping is the most basic TCP/IP command, and it’s the same as placing a phone call to
your best friend. You pick up your telephone and dial a number, expecting your best friend to
reply with “Hello” on the other end. Computers make phone calls to each other over a network
by using a Ping command. The Ping commands main purpose is to place a phone call to another
computer on the network, and request an answer. Ping has 2 options it can use to place a
phone call to another computer on the network. It can use the computers name or IP address.

C:\>route: The route command displays the computers routing table. A typical computer, with a
single network interface, connected to a LAN, with a router is fairly simple and generally
doesn’t pose any network problems. But if you’re having trouble accessing other computers on
your network, you can use the route command to make sure the entries in the routing table are
correct.

C:\>tracert: The tracert command displays a list of all the routers that a packet has to go
through to get from the computer where tracert is run to any other computer on the internet
2. Install packet tracer and explain its features.
Packet Tracer is a network simulation and visualization tool developed by Cisco Systems. It is
widely used for educational purposes, especially in networking courses and certifications such
as Cisco's CCNA (Cisco Certified Network Associate). Packet Tracer allows users to create,
configure, and simulate network environments, helping them understand and practice
networking concepts in a virtual environment.

To install Packet Tracer, you can follow these general steps:


Download Packet Tracer:
Visit the Cisco Networking Academy website or the official Cisco Packet Tracer download page.
Log in with your Cisco Networking Academy account or create one if you don't have it.
Download the appropriate version of Packet Tracer for your operating system.
Install Packet Tracer:
Run the installer that you downloaded.
Follow the on-screen instructions to install the software.

Launch Packet Tracer:


Once installed, you can launch Packet Tracer from your desktop or applications menu.
Now, let's explore some of the key features of Packet Tracer:

User-Friendly Interface:
Packet Tracer has an intuitive and user-friendly interface, making it suitable for beginners.
Users can drag and drop network devices, connectors, and other elements onto the workspace.

Device Simulation:
It allows the simulation of various networking devices, including routers, switches, PCs, servers,
and more. Users can configure these devices with different settings and protocols.

Networking Protocols:
Packet Tracer supports a variety of networking protocols such as TCP/IP, DHCP, DNS, HTTP, and
more. This allows users to simulate real-world networking scenarios and understand how these
protocols work.

Network Simulation:
Users can create and simulate network topologies, enabling them to test configurations and
troubleshoot issues without the need for physical hardware.

Packet Simulation:
Packet Tracer enables the simulation of data packets moving through the network. This feature
helps users understand the flow of data and how routers and switches handle packets.

Real-Time Simulation:
Users can run simulations in real-time to observe the dynamic behavior of the network. This
includes monitoring traffic, checking device status, and identifying potential issues.

Assessment and Labs:


Packet Tracer includes a range of pre-built labs and activities that instructors and students can
use for hands-on practice and assessments. These labs cover various networking topics and
help reinforce theoretical knowledge.
3. Illustrate the working principle of HUB with the help of packet tracer.
In networking, a hub is a basic networking device that operates at the Physical Layer (Layer 1) of
the OSI model. Unlike switches, hubs do not have the intelligence to forward traffic based on
MAC addresses. Instead, they simply broadcast incoming data to all connected devices. This
means that when a device sends data to the hub, the hub forwards that data to all other
devices connected to it.

Let's illustrate the working principle of a hub using Packet Tracer. In this example, we'll simulate
a simple network with three PCs connected to a hub.

Create a New Packet Tracer Project:


Open Packet Tracer and create a new project. Drag and drop six PCs (end devices) and a hub
from the available devices in the toolbar.

Connect Devices to the Hub:


Use the copper straight-through cables to connect each PC to the hub. Click on the cable icon in
the toolbar, then click on the PC and the hub to create the connections.

Configure IP Addresses:
Assign IP addresses to each PC so that they are on the same subnet. Right-click on each PC, go
to "Desktop," and then select "IP Configuration" to set the IP address, subnet mask, and
gateway.

Send Data Between PCs:


Open the command prompt on one of the PCs and ping the other PCs. For example, if you are
using PCs with IP addresses 10.10.10.2, and 10.10.10.6, you can ping each PC from the
command prompt:
Figure: Working principle of hub with the help of packet tracer.

Observe the results.


In this setup, the hub works by broadcasting any data it receives to all connected devices. When
one PC sends a ping to another, the hub forwards that ping to all PCs. Each PC's network
interface card (NIC) checks the destination IP address in the packet, and only the PC with the
matching IP address responds, while the others ignore the packet.

This broadcast behavior is a fundamental characteristic of hubs, and it can lead to network
congestion and reduced efficiency, especially in larger networks. Hubs have largely been
replaced by switches, which operate at the Data Link Layer (Layer 2) and can selectively forward
traffic base on MAC addresses, improving network performance.
4. Illustrate the working principle of L2 Switch with the help of packet tracer.

Let's illustrate the working principle of a Layer 2 (L2) switch using Packet Tracer. In this
example, we'll simulate a simple network with five PCs connected to a Layer 2 switch.

Create a New Packet Tracer Project:


Open Packet Tracer and create a new project. Drag and drop five PCs (end devices) and a switch
from the available devices in the toolbar.

Connect Devices to the Switch:


Use the copper straight-through cables to connect each PC to the switch. Click on the cable icon
in the toolbar, then click on the PC and the switch to create the connections.

Configure IP Addresses:
Assign IP addresses to each PC so that they are on the same subnet. Right-click on each PC, go
to "Desktop," and then select "IP Configuration" to set the IP address, subnet mask, and
gateway.

Configure the Switch:


By default, Layer 2 switches operate at the Data Link Layer (Layer 2) and don't require IP
addresses. You can, however, name the switch and enable some features. Right-click on the
switch, go to "CLI" (Command Line Interface), and use the following commands:

Verify Connectivity:
Open the command prompt on one of the PCs and ping the other PCs. For example, if you are
using PCs with IP addresses 10.10.10.1, and 10.10.10.2, you can ping each PC from the
command prompt:
Figure: Working principle of L2 switch with the help of packet tracer.

Observe the results.


In this setup, the Layer 2 switch operates by forwarding frames based on MAC addresses. When
a PC sends data to another PC on the same switch, the switch examines the destination MAC
address in the frame and forwards it only to the port where the destination device is
connected, rather than broadcasting it to all ports as a hub would.

Layer 2 switches help reduce network congestion and improve efficiency by selectively
forwarding traffic based on MAC addresses, making them a more intelligent and efficient
alternative to hubs in modern networks.
5. Illustrate the working principle of Router with the help of packet tracer.
Let's illustrate the working principle of a router using Packet Tracer. In this example, we'll
simulate a simple network with three PCs connected to a router.

Create a New Packet Tracer Project:


Open Packet Tracer and create a new project. Drag and drop three PCs (end devices) and a
router from the available devices in the toolbar.

Connect Devices to the Router:


Use the copper straight-through cables to connect each PC to the router. Click on the cable icon
in the toolbar, then click on the PC and the router to create the connections.

Configure IP Addresses:
Assign IP addresses to each PC and the router so that they are on the same subnet. Right-click
on each PC, go to "Desktop," and then select "IP Configuration" to set the IP address, subnet
mask, and gateway. For the router, set IP addresses on its interfaces.

Configure Routing on the Router:


By default, routers forward traffic between different subnets. You need to configure routing on
the router. Right-click on the router, go to "CLI" (Command Line Interface), and use the
following commands:

Verify Connectivity:
Open the command prompt on one of the PCs and ping the other PCs and the router's
interfaces. For example, if you are using PCs with IP addresses 10.0.0.1, and the router's
interfaces are 192.168.1.1 and 192.168.1.2, you can ping each address from the command
prompt:
Figure: Working principle of router with the help of packet tracer.

Observe the results.


In this setup, the router operates at the Network Layer (Layer 3) of the OSI model and connects
different subnets. When a PC wants to communicate with a device on a different subnet, it
sends the data to the router. The router examines the destination IP address, determines the
appropriate interface based on the routing table, and forwards the data to the destination
subnet.
Routers play a crucial role in connecting and routing traffic between different networks, helping
to segment and organize traffic in a more scalable and secure manner.
6. Connect computers in Local Area Network and write its steps with pics.

Hardware in Packet Tracer:

 Routers: Search for "Router" in the "Devices" panel and drag it onto the workspace.
 Switches: If needed, find "Switch" in the "Devices" panel and place it on the workspace.
 Computers: Locate "PC" in the "End Devices" panel and drag them onto the workspace.
 Cables: Look for "Fast Ethernet" or "Gigabit Ethernet" cables in the "Cables" panel.

Steps:

1. Place Devices: Arrange the router, switch (if using), and computers as desired in the
workspace.
2. Connect Devices:
o Use the appropriate cable types:
 Straight-through cable: Connect a router to a switch or computer.
 Crossover cable: If connecting two computers directly without a switch,
use a crossover cable.
o Drag the cable icon from the "Cables" panel and connect it to the corresponding
ports on the devices. Green dots should appear on the connected ports,
indicating successful connections.
3. Configure IP Addresses (DHCP or Static):
o DHCP (Automatic):
 Right-click a computer and choose "Desktop > IP Configuration."
 Select "DHCP Enabled" and click "Apply." Repeat for other computers.
o Static IP:
 Right-click a computer and choose "Desktop > IP Configuration."
 Select "Static" and enter the desired IP address, subnet mask, and default
gateway. Click "Apply." Repeat for other computers, ensuring unique
addresses.
4. Verify Connectivity:
o Right-click a computer and choose "Desktop > Command Prompt."
o Type ping followed by the IP address of another computer on the LAN (e.g., ping
192.168.1.2).
o If successful, you should see "Reply from..." messages indicating communication.
Repeat for other computers.
8. Demonstrate static routing using 2 routers, 2 switches & 4 PCs.
Steps:
Create the Network Topology:
Place 2 routers, 2 switches, and 4 PCs on the Packet Tracer workspace.
Connect the devices using copper straight-through cables for router-switch connections and
copper crossover cables for switch-switch connections.
Assign IP addresses to each PC and router interface.
Configure IP Addresses:
Assign IP addresses to the PCs and router interfaces in each network. For simplicity, let's use
the following IP scheme:
Network 1: 192.168.1.0/24
Network 2: 192.168.2.0/24
For example:
Router 1:
Interface Gig0/0: 192.168.1.1 255.255.255.0
Interface Gig0/1: [Connected to Switch 1]
Router 2:
Interface Gig0/0: 192.168.2.1 255.255.255.0
Interface Gig0/1: [Connected to Switch 2]
PCs:
PC1: 192.168.1.2
PC2: 192.168.1.3
PC3: 192.168.2.2
PC4: 192.168.2.3
Configure Static Routes:
On Router 1:
Router1> enable
Router1# configure terminal
Router1(config)# ip route 192.168.2.0 255.255.255.0 192.168.1.1
On Router 2:
Router2> enable
Router2# configure terminal
Router2(config)# ip route 192.168.1.0 255.255.255.0 192.168.2.1
These static routes tell each router how to reach the network on the other side.
Test the Configuration:
On PC1 (192.168.1.2), try to ping PC3 (192.168.2.2).
PC1> ping 192.168.2.2
On PC3 (192.168.2.2), try to ping PC1 (192.168.1.2).
PC3> ping 192.168.1.2
If the static routing is configured correctly, the PCs should be able to communicate across the
routers.
9. Download Wireshark and explain its features.

Downloading Wireshark:

1. Official Website: Go to the official Wireshark website: https://www.wireshark.org/


2. Choose your platform: Select the appropriate version for your operating system
(Windows, Mac, Linux).
3. Download: Click the download button and follow the instructions for your chosen
platform.

Features of Wireshark:

 Packet Capture: Captures network traffic flowing through your computer's network
interface.
 Packet Analysis: Decodes and analyzes captured packets, displaying detailed information
like source and destination addresses, protocols, and data payload.
 Filtering: Powerful filtering capabilities to narrow down captured packets based on
specific criteria (e.g., source IP, protocol type).
 Search: Search within captured packets for specific keywords or patterns.
 Conversations: Displays communication flows between devices, simplifying analysis of
network interactions.
 Statistics: Provides statistical summaries of captured traffic, such as packet count,
protocol distribution, and bandwidth usage.
 Export & Import: Export captured data in various formats for further analysis or sharing.
Import data from other capture tools.
 Plugin Support: Extends functionalities with plugins for specific protocols, decryption,
and more.
10. Use Wireshark to trace IP Packet Header information.
Steps:
Open Wireshark:
Launch Wireshark on your computer.
Select Network Interface:
In Wireshark, you'll see a list of available network interfaces.
Choose the network interface that corresponds to the network you want to monitor.
Start Capturing Packets:
Click on the interface you want to capture packets from.
Click on the "Start" button (usually a shark fin icon) to begin capturing packets.
Generate Some Network Traffic:
To capture IP packet headers, you'll want to generate some network traffic. This can be
achieved by using applications, browsing the internet, or performing specific network actions.
Stop Capturing:
After generating some network traffic, click on the "Stop" button (usually a red square icon) in
Wireshark to stop capturing packets.
Analyze Captured Packets:
You will now see a list of captured packets in the main Wireshark window.
Find an IP packet in the list, and click on it to see the details.
Inspect IP Packet Header:
In the details pane at the bottom of the Wireshark window, you can expand the "Internet
Protocol Version 4" section to inspect the IP packet header.
Here you'll find information such as source and destination IP addresses, Time to Live (TTL),
Protocol (e.g., TCP or UDP), and more.
11. Configure Routing using RIP Protocol.

Open Packet Tracer and place the following devices:

o Two routers (e.g., Router1 and Router2).


o Two switches (e.g., Switch1 and Switch2).
o Two PCs (e.g., PC1 and PC2).

Connect the devices using cables:

o Connect Router1 and Router2 with a straight-through cable (different networks).


o Connect each router to its respective switch with straight-through cables.
o Connect each PC to its switch with straight-through cables.

Assign IP Addresses and Subnet Masks:

Enable RIP on Routers:

Set a RIP network for routers using CLI or GLU.

Communicate from one network to another.


12. Configure Dynamic Routing using OSPF Protocol.

Open Packet Tracer and create the following network topology:

o Two or more routers (e.g., Router1, Router2, etc.).


o Multiple switches (optional, depending on your network complexity).
o Several PCs or servers connected to the switches.

Connect the devices using cables:

o Use straight-through cables to connect routers and switches to different


networks.
o Use crossover cables for direct router-to-router connections if applicable.
o Connect PCs and servers to switches using straight-through cables.

Assign IP Addresses and Subnet Masks:

Enable OSPF on Routers:

Set a network for routers using CLI or GLU.

Communicate from one network to another.


13.Configure Routing using BGP Protocol.
Create the Topology:
Open Packet Tracer and place at least two routers (e.g., Router1 and Router2).
Add switches and PCs as needed for your network structure.
Connect the devices with straight-through or crossover cables depending on the connection
type (router-switch vs. router-router).
Assign IP Addresses and Subnet Masks:
Configure unique IP addresses and subnet masks for each device, ensuring subnet masks are
compatible for inter-network routing.
Enable BGP on Routers:
Define Neighboring Routers:
Verify and Test:
Click the "Play" button in Packet Tracer.
Wait for BGP to establish peering and exchange routing information.
14. List basic linux commands.
Navigation:
pwd: Print working directory.
ls: List files and directories.
cd: Change directory.
mkdir: Create a new directory.
rmdir: Remove an empty directory.

File Operations:
touch: Create an empty file or update the timestamp of an existing file.
cp: Copy files or directories.
mv: Move or rename files and directories.
rm: Remove files or directories.
cat: Concatenate and display the content of files.
nano or vim: Text editors.

Viewing and Searching:


less or more: View file content page by page.
head and tail: Display the beginning or end of a file.
grep: Search for a pattern in a file.
find: Search for files and directories.

User Management:
whoami: Display the current username.
who: Show who is logged in.
su: Switch user.
sudo: Execute a command as the superuser (root).
useradd, userdel, passwd: User management commands.

File Permissions:
chmod: Change file permissions.
chown: Change file owner or group.
chgrp: Change group ownership.

System Information:
uname: Display system information.
df: Show disk space usage.
du: Display disk usage of a directory.

You might also like