Tuesday, August 7, 2012

Network+ Command Line Tools Pt 2

If you're planning on taking the Network+ exam soon, you may want to review the command line tools such as tracert, nslookup, dig, and route used to troubleshoot connectivity. You don't have to know every switch related to these command line tools but you should have a good idea of their overall purpose. This blog doesn't provide all the details about these command line tools, but combined with part 1 it should give you enough for the Network+ exam.

Many people are using the Microsoft Windows Networking Essentials book to help prepare for the Network+ exam. The book was actually written for the MTA 98-366 Networking Fundamentals exam and is helping a lot of people take and pass it. Combined with the CompTIA Network+ N10-005 Practice Test Questions (Get Certified Get Ahead) book, people have told me they have also passed the Network+ exam the first time they took it.
Realistic Practice Test Questions for the Network+ exam.
CompTIA Network+ N10-005 Practice Test Questions (Get Certified Get Ahead)

Practice Test Questions

Q. You want to determine how long it takes a packet to get to and from a router. What can you use?

A. Ipconfig
B. Traceroute
C. Nslookup
D. Netstat

Answer at end

You are running a Linux system and need to verify whether you can reach a DNS server. Which of the following commands can you
use?

A. Dnslookup
B. Dig
C. Route
D. Netstat

Answer at end
Realistic practice test questions for the Network+ N10-005 exam
Available through LearnZapp on your mobile phone

Tracert/Traceroute Command Line Tools

The tracert (or traceroute) command identifies the IP address of each of the hops between two systems. Each hop is a router and the round trip time (RTT) shows how long it takes to get to and from the two systems. Try it with this command:

tracert GetCertifiedGetAhead.com

Results

Tracing route to GetCertifiedGetAhead.com [174.122.52.195] over a maximum of 30 hops:
1 <1 em="em" ms="ms">
2 7 ms 7 ms 7 ms 10.114.228.1
3 8 ms 7 ms 11 ms 68.110.110.13
4 8 ms 7 ms 7 ms 172.212.418.165
5 8 ms 9 ms 7 ms 172.212.160.132
6 19 ms 7 ms 7 ms 68.110.18.157
7 13 ms 13 ms 13 ms 68.111.4.133
8 25 ms 39 ms 25 ms xe-1-0-2.bbr02.eq01.wdc02.networklayer.com [50.197.16.21]
9 16 ms 14 ms 13 ms ae7.bbr01.eq01.wdc02.networklayer.com [173.192.118.194]
10 24 ms 24 ms 25 ms ae0.bbr01.tl01.atl01.networklayer.com [173.192.118.153]
11 45 ms 45 ms 45 ms ae13.bbr02.eq01.dal03.networklayer.com [173.192.118.134]
12 44 ms 45 ms 48 ms po32.dsr01.dllstx3.networklayer.com [173.192.118.229]
13 44 ms 46 ms 45 ms te2-1.dsr01.dllstx2.networklayer.com [70.187.255.66]
14 45 ms 44 ms 45 ms te3-1.car11.dllstx6.networklayer.com [70.187.254.218]
15 44 ms 45 ms 46 ms stats.carnation.arvixe.com [174.122.152.195]

Trace complete.
Realistic practice test questions for the Network+ N10-005 exam
Available through LearnZapp on your mobile phone

Nslookup Command Line Tool

The name server lookup (nslookup) command is used to verify that a Domain Name System (DNS) server can resolve host names to IP addresses. It can also verify that a DNS server can resolve fully qualified domain names (FQDNs) to an IP address. A fully qualified domain name includes the host name and the domain name and is commonly used to locate web sites.

The basic syntax is:

nslookp GetCertifiedGetAhead.com

Results

Server: cdns1.cox.net
Address: 68.105.28.11
Non-authoritative answer:
Name: GetCertifiedGetAhead.com
Address: 174.122.52.195

Dig Command Line Tool

The domain information groper (dig) command is a command line tool used to query DNS servers. It provides similar functionality as nslookup but is only available on Linux/Unix-based systems. It is not available on Windows systems. You can use dig to query DNS servers to very that the DNS server is reachable, and to verify that a DNS server can resolve names to IP addresses.

Arp Command Line Tool

Each time a computer needs to communicate with a system on the same network it uses the Address Resolution Protocol (ARP) to resolve the IP address to the media access control (MAC) address. Information gathered from ARP is stored in the ARP cache and can be viewed with the arp command. The basic syntax is:
arp -a

Partial results:

Interface: 192.168.1.129 --- 0xa
Internet Address Physical Address Type
192.168.1.1 68-7f-74-ae-8b-de dynamic
192.168.1.114 10-1f-74-03-99-7d dynamic
192.168.1.122 00-90-a9-b3-b2-1d dynamic

Route Command Line Tool

You can use the route command to show or manipulate the routing table on a computer. The following command will show the routing table:

route print

Partial results

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.129 10
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
192.168.1.0 255.255.255.0 On-link 192.168.1.129 266
192.168.1.129 255.255.255.255 On-link 192.168.1.129 266
192.168.1.255 255.255.255.255 On-link 192.168.1.129 266

What's next after the Network+ exam?
Pass the Security+ exam the first time you take it with the
CompTIA Security+: Get Certified Get Ahead: SY0-301 Study Guide

Practice Test Questions with Answers

These practice test questions came from CompTIA Network+ N10-005: Practice Test Questions (Get Certified Get Ahead). This resource includes 275 realistic practice test questions and over 175 flash cards to help test your readiness so that you can take and pass the exam the first time you take it. It's available for only $9.99 in the Kindle version and you can download free Kindle apps from Amazon for just about any platform.

Q. You want to determine how long it takes a packet to get to and from a router. What can you use?

A. Ipconfig
B. Traceroute
C. Nslookup
D. Netstat

Answer: B is correct. The traceroute command shows the round trip time (RTT) for each router (or hop) in the path it traces.

A is incorrect. Ipconfig shows TCP/IP configuration information but not the RTTs.

C is incorrect. Nslookup can query DNS servers for name resolution, but doesn’t list the RTTs for routers.

D is incorrect. The netstat command shows network statistics and open connections.

--

You are running a Linux system and need to verify whether you can reach a DNS server. Which of the following commands can you
use?

A. Dnslookup
B. Dig
C. Route
D. Netstat

Answer: B is correct. The dig command (sometimes called domain information groper) is a utility available on Linux/Unix-based systems that can query domain name system (DNS) servers for specific records.

A is incorrect. Nslookup (not dnslookup) is the precursor to dig on Unix/Linux based systems and is available on Windows systems to query DNS servers.

C is incorrect. The route command allows you to view and manipulate the routing table on a system, including the default gateway.

D is incorrect. Netstat can identify open ports a system is listening on, and list other protocol statistics.

Summary

You should have a basic understanding of command line tools when preparing for the Network+ exam. This blog covered the tracert, traceroute, nslookup, dig, arp, and route and part 1 covers ping, ipconfig, and ifconfig commands and . You may also like to check out these Network+ blogs and other links:
Good Luck!