Lan Assignment 24
Lan Assignment 24
Lan Assignment 24
exercises. Submit the answers to each section in a hard copy format to your
Course Rep to be handed to your course instructor before the submission
deadline.
The final submission must include only the questions and corresponding
answers. Keep a soft copy of the screenshots on a labeled USB drive (With
group name and members), and hand it over to your course Rep for
submission on due date.
1
IPCONFIG
This command will give you a listing of your basic IP information for the computer you
are using. You will get your IP address, subnet mask, and default gateway (the
computer that connects you to the Internet). You will use your IP address for scanning,
remote administration, etc. Ipconfig will also allow you to manage your DNS resolver
cache and renew your IP address with the DHCP server. You will learn more about DNS
and DHCP in this course.
2
Figure 1-12: Output from the ipconfig /all command.
In the second command you used the /all option to get more information about each
adapter. Note that this computer has three ways of connecting to different networks.
There is a regular NIC to connect to the LAN, and a wireless card, and a Bluetooth
adapter.
b. Write down your MAC address for the computer you are using.
c. Write down the ip address of the computer that connects to the Internet (Default
Gateway)
d. Type time. Press Enter twice. (This will display the current time and provide a timestamp for
your project.)
e. Take a screen shot.
3
Figure 1-13; Output from the displaydns command.
4
address resolves connection issues.)
22. Take a screenshot. (See Figure 1-16.)
Figure 1-15: showing lease time before renewal Figure 1-16: Showing lease time after renewal.
The DHCP server loaned you an IP address for a given amount of time. (In this case it
was one day.) By renewing your IP address you can reserve this same IP address for a
longer amount of time. The information provided by the ipconfig command will come in
handy when you do the rest of the projects.
If you want a listing of all the possible options available for a given DOS command
(ipconfig) you can just type the name of the command followed by a question mark.
5
Figure 1-17: Displaying help for ipconfig.
PING
Ping is a command that will tell you if a host is reachable and alive. It works just like
pings in submarines. It sends out a packet that asks the target computer to
send it back a message saying it's actually there. It also tells you how long it took to
get back and if any of the packets were lost. This is very useful if you need to see if a
server/computer is running. You can also diagnose latency and/or packet loss issues.
This example pings www.google.com repeatedly. Feel free to ping your own university
or Web site of your choice. Instead of using "www.google.com" please use
"www.YourUniversity.edu." Timestamps will also be included at the end of each
example.
6
Figure 1-18: Output from ping command. Figure 1-19: Output from ping -t command.
7
Figure 1-20: Output from ping -n command.
8
26. Type cls
27. Press Enter.
28. Type ping www.aamusted.edu.gh -r 5
29. Press Enter.
30. Type time
31. Press Enter twice.
32. Take a screenshot. (See Figure 1-21.)
1. Can you adjust the number of packets that are sent? How?
2. What did the -t, -n, -l, -r options do?
3. Why would you experience packet loss?
4. Why would you want to send larger packets?
5. Record one of the replies from your ping command in 33 above.
9
Tracert can also provide you with information about the route packets are taking over a
network. Each router that the packet travels through to reach the destination address is
shown as a hop in the tracert output. If there is a network issue on the path, the
tracert output will stop after the last successful hop. The first hop in the output is the
default gateway of the source PC, and the last entry will be the destination address
when the tracert command completes successfully. It can be surprising how many hops
there are between you and a Web site that you visit. Oftentimes the route a packet
takes is not the shortest geographical distance. This example uses
www.aamusted.edu.gh repeatedly. Feel free to use the hostname of any other Web
site to see the response.
Figure 1-22: Output from tracert command. Fiaure 1-23: Output from tracert -d and
tracert -h commands.
10
12. Press Enter.
13. Type tracert www.google.com -h 5
14. Press Enter.
15. Type time
16. Press Enter twice.
17. Take a screenshot. (See Figure 1-23.)
18. Type pathping www.aamusted.edu.gh -q 5 -w 5
19. Press Enter.
20. Type time
21. Press Enter twice.
22. Take a screenshot. (See Figure 1-24.)
23. Type pathping www.google.com -q 5 -w 5
24. Press Enter.
25. Type time
26. Press Enter twice.
27. Take a screenshot. (See Figure 1-25.)
Figure 1-24: Output from pathping -q-w command. Figure 1-25: Output from pathping-r-w command to
Google.com
At the time the route was traced there were 14 computers or routers between this host
and www.Google.com. None of the nodes along the way timed out and most of the
packets took less than 50ms to come back.
11
C. END OF TRACERT THOUGHT QUESTIONS
NETSTAT
Netstat is the command that lists all current network connections, connection statistics,
and routing tables on your computer. The default netstat command will give you a
listing of all of the ports open on your computer as well as the foreign address of the
computer you're connected to.
Ports are like doors on your house. Information packets are addressed to a specific IP
address (location) and port number (point of entry). Your house works the same way.
It has an address (location) and door (point of entry) where packages are delivered.
Netstat can tell you which programs are sending/receiving information to/from your
computer.
12
In this example you can see multiple ports opened. The only problem is you don't know
which program is opening all of those ports. You can use the -b option to get
information about which program is opening each port.
The -a option will show all of the ports (including UDP ports) that may be open on your
machine. The –n option will show the local and foreign addresses for each connection.
The -e option will display statistics about the number of packets sent/received, errors,
and packets that were discarded.
9. Type cls
10. Press Enter.
11. Type netstat -b
12. Press Enter.
13. Take a screenshot. (See Figure 1-27.)
14. Type netstat -a
15. Press Enter.
16. Take a screenshot.
Now you know that a program avp.exe is opening a lot of ports to send/receive email.
Using the -b option you can find out if a rogue program is opening a port. This is useful
when you want to identify programs that are sending/receiving information. You don't
want rogue programs sending/receiving information.
Figure 1-28: Output from netstat -a command. Figure 1-29: Output from netstat -n and netstat -e
commands.
14
Fig 1-29: output from netstat –n and –e commands. [Hint: To appreciate it much better, keep many
tabs of your browser opened]
Figure 1-30: Output from netstat -e command. Figure 1-31: Output f'rom netstat -s command.
1. How can netstat help you track the information coming in and out of your
computer?
2. How can netstat help you diagnose network problems? [Do not list commands]
3. How would the routing table (netstat -r) be useful?
4. Why would someone need different statistics for IP, IPv6, ICMP. TCP, UDP, etc.?
15
NSLOOKUP
Objectives
• Observe the conversion of a URL to an IP address.
• Observe DNS lookup using the nslookup command.
Required Resources
• 1 PC (Windows 10)
• Internet connectivity
Background / Scenario
Domain Name System (DNS) is invoked when you type a Uniform Resource Locator
(URL), such as http://www.cisco.com, into a web browser. The first part of the
URL describes which protocol is being used. Common protocols are HTTP (Hypertext
Transfer Protocol), HTTPS (Hypertext Transfer Protocol over Secure Socket Layer),
and FTP (File Transfer Protocol). DNS uses the second part of the URL, which in this
example is www.cisco.com. DNS translates the domain name (like www.cisco.com)
to an IP address to allow the source host to reach the destination host.
Nslookup is a command that will give you all of the IP addresses that are
associated with a given domain name from the local DNS server (it's like an Internet
phone book). For example, if you wanted to find the IP addresses of www.CNN.com
you could use nslookup to identify them. Nslookup is also useful for solving DNS
problems.
There are two modes when you use nslookup (non-interactive and interactive). You
will use the non-interactive mode for this exercise and can learn more about the
interactive mode later here: http://support.microsoft.com kb 200525.
16
Figure 1-32: Output from nslookup command.
17