Basic Networking Commands
Basic Networking Commands
SEM 1 2018/2019
LAB REPORT XX
1
Objectives:
Instruction:
In this lab activity students will examine a couple of
useful network related utilities that are run using the
command prompt. Students are required to print screen all
related output and include it in the lab report. Students may
Google to find some information to answer the lab questions and
list the references that being used and cited.
Command Used:
netstat, ping, tracert, nbstat, nslookup, arp, ipconfig
2
Netstat
Run the netstat /? command and answer the following questions.
netstat (network statistics) is a command-line network utility tool that displays network connections for
the Transmission Control Protocol (both incoming and outgoing), routing tables, and a number of network
interface (network interface controller or software-defined network interface) and network protocol
statistics.
-b Displays the executable involved in creating each connection or listening port. In some
cases well-known executables host multiple independent components, and in these
cases the sequence of components involved in creating the connection or listening
port is displayed. In this case the executable name is in [] at the bottom, on top is the
component it called, and so forth until TCP/IP was reached. Note that this option can
be time-consuming and will fail unless you have sufficient permissions.
-p proto Shows connections for the protocol specified by proto; proto may be any of: TCP,
UDP, TCPv6, or UDPv6. If used with the –s option to display per-protocol statistics,
proto may be any of: IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, or UDPv6.
-s Displays per-protocol statistics. By default, statistics are shown for IP, IPv6, ICMP,
ICMPv6, TCP, TCPv6, UDP, and UDPv6; the -p option may be used to specify a subset
of the default.
-q When used in conjunction with -b, will display sequence of components involved in
creating the connection or listening port for all executables.
interval Redisplays selected statistics, pausing interval seconds between each display. Press
CTRL+C to stop redisplaying statistics. If omitted, netstat will print the current
configuration information once.
3. Run netstat –a –n and fill in the following the chart for the first 3 lines of output.
Protocol Local Address Foreign Address State
TCP 0.0.0.0:135 0.0.0.0:0
3
TCP 0.0.0.0:445 0.0.0.0:0
4
Ping
Run the ping /? command and answer the following questions.
The ping command is a Command Prompt command used to test the ability of the source computer to reach
a specified destination computer. The ping command is usually used as a simple way to verify that a
computer can communicate over the network with another computer or network device.
-t Ping the specified host until stopped. To see statistics and continue - type Control-
Break; To stop - type Control-C.
5
3. What is the command used to run infinite ping? Screenshot the output of the infinite ping.
Ping www.google.com.my -t
6
7
Tracert
racert is a Windows based command-line tool that you can use to trace the path that an Internet Protocol (IP)
packet takes to its destination from a source. Tracert will determine the path taken to a destination. It does
this by sending Internet Control Message Protocol (ICMP) Echo Request messages to the destination.
8
Nbtstat
NetBIOS over TCP/IP (NBT, or sometimes NetBT) is a networking protocol that allows legacy computer
applications relying on the NetBIOS API to be used on modern TCP/IP networks.
-a (adapter Lists the remote machine's name table given its name
status)
-s (sessions) Lists local NetBIOS names.
interval Redisplays selected statistics, pausing interval seconds between each display. Press
Ctrl+C to stop redisplaying statistics.
-s (sessions) Lists sessions table converting destination IP addresses to computer NETBIOS names.
-RR Sends Name Release packets to WINS and then, starts Refresh
(ReleaseRefresh)
-c (cache) Lists the remote machine's name table given its IP address.
9
Nslookup
nslookup is a network administration command-line tool available for many computer operating
systems for querying the Domain Name System (DNS) to obtain domain name or IP address mapping or
for any other specific DNS record.
2. Run the nslookup www.upsi.edu.my and then nslookup www.usm.my . Compare and explain on
each output
3. Run the nslookup www.utusan.com.my , specify the domain’s IP address and run nslookup
<domain’s IP>. Compare and explain on each output.
1
0
Arp
Run the arp /? command and answer the following questions.
Address Resolution Protocol (ARP) is a protocol for mapping an Internet Protocol address (IP address) to a
physical machine address that is recognized in the local network
-a Displays current ARP entries by interrogating the current protocol data. If inet_addr is
specified, the IP and Physical addresses for only the specified computer are displayed.
If more than one network interface uses ARP, entries for each ARP table are
displayed.
-N if_addr Displays the ARP entries for the network interface specified by if_addr.
if_addr If present, this specifies the Internet address of the interface whose address
translation table should be modified. If not present, the first applicable interface will
be used.
-g Same as -a.
-d Deletes the host specified by inet_addr. inet_addr may be wildcarded with * to delete
all hosts.
-s Adds the host and associates the Internet address inet_addr with the Physical address
eth_addr. The Physical address is given as 6 hexadecimal bytes separated by hyphens.
The entry is permanent.
1
1
1
2
Ipconfig
pconfig (sometimes written as IPCONFIG) is a command line tool used to control the network
connections on Windows NT/2000/XP machines. There are three main commands: "all", "release", and
"renew". Ipconfig displays all current TCP/IP network configuration values and refreshes Dynamic Host
Configuration Protocol (DHCP) and Domain Name System (DNS) settings. Used without parameters,
ipconfig displays the IP address, subnet mask, and default gateway for all adapters.
1
3
END OF LAB 1
1
4