CN 5th - Copy
CN 5th - Copy
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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:
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.
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.
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.