100% found this document useful (1 vote)
485 views

Lab 2: Introduction To Networking Command Ipconfig

The document provides information about using the ipconfig and ping commands in Windows to troubleshoot TCP/IP network connectivity issues. It explains that ipconfig displays network configuration values like the IP address, subnet mask, default gateway. Ping sends ICMP echo requests to test if a host is reachable and responding on the network. Tracert traces the route between hosts to identify routing issues. The document provides detailed instructions and examples of using these commands along with explanations of related networking concepts.

Uploaded by

nouman
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
485 views

Lab 2: Introduction To Networking Command Ipconfig

The document provides information about using the ipconfig and ping commands in Windows to troubleshoot TCP/IP network connectivity issues. It explains that ipconfig displays network configuration values like the IP address, subnet mask, default gateway. Ping sends ICMP echo requests to test if a host is reachable and responding on the network. Tracert traces the route between hosts to identify routing issues. The document provides detailed instructions and examples of using these commands along with explanations of related networking concepts.

Uploaded by

nouman
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Lab 2: Introduction to Networking command

Ipconfig:

The Ipconfig command gets its name from the acronym IP (Internet Protocol)
and a shortened term for configure. It is used to 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.

To get to ipconfig, we have to get to the


command line.
Click Start, click Run, type in “cmd” & hit
enter.
Type in ipconfig & hit enter. (you can use ipconfig /all for detailed
information)You will get a screen that looks like this.

To find your computers‟ IP number, look next to “IP Address”. To find your
router‟s IP number, look next to “Default Gateway” (listed last). The router
here acts as a gateway to the Internet or another network.
There are several options available with the ipconfig command, accessible with
the command ipconfig/? To show the most information about the network
connections, use the command ipconfig/all.
This is what the important parts of all that means::
Host name:
This is the host name. This name is configurable, and is selected typically when
the machine is first setup for use. This name can be used by other machines on
the network to access this host.
Connection-specific DNS Suffix:
This will typically give you a clue into what type of connection you have, but it
is rarely needed for troubleshooting.
Description:
This is a description of the Network Adapter.
Physical Address:
This is the MAC Address of the above mentioned Network Adapter. This is a
unique identifier for the hardware. The DHCP server will assign your IP
information based on it.
DHCP Enabled:
This is pretty straight-forward. Is DHCP enabled or not? If it is enabled, your IP
isDynamic.
If it is not, it is Static.
IP Address:
This is your computer‟s IP address. Note this can differ from the address you are
assigned by your ISP.
Subnet Mask:
The subnet mask is a pretty complicated thing to explain briefly. The bottom
line is if you want two machines on a LAN to communicate to eachother
without the use of a router, the subnet mask typically needs to match. There are
exceptions to this rule.
Default Gateway:
The default gateway is the IP address of the device that will allow communication
with the Internet. In a typical home connection, this is the IP address of your
router.
DHCP Server:
This is the IP address of the device responsible for assigning you an IP address,
unless you are using a Static IP. In a typical home connection, this is the IP
address of your router.
DNS Servers:
This is the IP address of the device responsible for translating domain names into
IP addresses. I get into more detail about this in my here.
Lease Obtained:
IP addresses assigned by a DHCP server have a lease time. This can be
anywhere from a minute to weeks, months, or even years. This completely
depends on the configuration of the DHCP server. The “Lease Obtained”
section shows the date of when the DHCP lease was obtained. Lease Expires:
IP addresses assigned by a DHCP server have a lease time. This can be
anywhere from a minute to weeks, months, or even years. This completely
depends on the configuration of the DHCP server. The “Lease Expires” section
shows the date of when the DHCP lease is set to expire. After this date, the IP
address assigned to you by the DHCP server may change.

Ipconfig Command Line Options


Ipconfig has several command line options that you can utilize. You can display
all of them with the command ipconfig /?. Here is a short selection of the most
common uses.
• ipconfig /release – Releases all IPv4 addresses
(requires DHCP)
• ipconfig /renew – Renews all IPv4 addresses
(requires DHCP) ipconfig /flushdns –
Flushes the DNS cache
Part 2: Examining Routes

Netstat
On host computers, netstat command displays active TCP connections, ports on
which the computer is listening, Ethernet statistics, the IP routing table, IPv4
statistics, and IPv6 statistics. Used without parameters, netstat displays active
TCP connections. There are several options available with the netstat command,
accessible with the command netstat/?.To display the contents of the IP routing
table, use the command netstat –r.

Route command displays and modifies the entries in the local IP routing table.
Used without parameters, route displays help.

An abbreviated option list for the route command is shown in the table below.

route PRINT Prints active routes


Adds a route: route ADD network
route ADD
mask gateway
Deletes a route:
route DELETE
route DELETE network
route CHANGE Modifies an existing route

On Cisco routers, show ip route is a common IOS command used to view the
routing table of a router. The route information displayed is much more detailed
than the route information on a host computer.
Part 3: Testing TCP/IP Network Connectivity

Two tools that are indispensable when testing TCP/IP network connectivity are
ping and tracert.

ICMP

ICMP was developed to be a companion to the original Internet Protocol,


version 4. With the creation of IP version 6 (IPv6), a new version of ICMP
called ICMP version 6 (ICMPv6) was created as well, and the original ICMP is
now sometimes called ICMPv4 to differentiate it, just as the “old” IP is now
often called “IPv4”. These two versions have some differences in their
specifics, but really are very similar in overall operation.
End host and routers use ICMP as a control, messaging, and diagnostic tool.
ICMP utilizes IP to deliver its messages and is considered an integral part of IP.
ICMP messages notify a host of problems. Although ICMP does not offer a
solution to these problems, it can provide enough information for a source host
to solve some of the problems that might occur in the internetwork. The most
popular ICMP message is the echo request and reply. Utilizing the Ping utility,
these messages allow you to test connectivity between end hosts.

Originally created to allow the reporting of a small set of error conditions,


ICMP messages are now used to implement a wide range of error-reporting,
feedback and testing capabilities. While each message type is unique, they are
all implemented using a common message format, sent and received based on
relatively simple protocol rules. This makes ICMP one of the easiest TCP/IP
protocols to understand.

ICMP Standards for IPv4 and IPv6

If the host at the specified address receives the Echo request, it responds with
an ICMP Echo Reply datagram. For each packet sent, ping measures the time
required for the reply.

As each response is received, ping provides a display of the time between the
ping being sent and the response received. This is a measure of the network
performance. Ping has a timeout value for the response. If a response is not
received within that timeout, ping gives up and provides a message indicating
that a response was not received.

Ping
Ping is a utility for testing IP connectivity between hosts. Ping sends out
requests for responses from a specified host address. Ping uses a Layer 3
protocol that is a part on the TCP/IP suite called Internet Control Message
Protocol (ICMP). Ping uses an ICMP Echo Request datagram,used for two
primary purposes:
• To find out if you can reach a host
• To find out if a host is responding

Here is the syntax: ping hostname or IP address


Step 1 Access the command prompt
Use the Start menu to open the Command Prompt window. Press
Start > Programs > Accessories > Command Prompt or Start > run >cmd

Step 2 Ping the IP address of another computer


In the window, type ping, a space, and the IP address of a computer recorded in
the previous lab. The following figure shows the successful results of ping to this
IP address.

Ping uses the ICMP echo request and echo reply feature to test physical
connectivity. Since ping reports on four attempts, it gives an indication of the
reliability of the connection. Look over the results and verify that the ping was
successful. Is the ping successful? If not, perform appropriate troubleshooting.
On a Cisco device, a ping from the IOS will yield to one of several indications
for each ICMP echo that was sent. The most common indicators are:
• ! : indicates receipt of an ICMP echo reply
• . : indicates a timed out while waiting for a reply
• U : an ICMP unreachable message was received

Step 3 pings the IP address of the default gateway


Try to ping the IP address of the default gateway. If the ping is successful,
it means there is physical connectivity to the router on the local network
and probably the rest of the world.

Step 4 Ping the IP address of a DHCP or DNS server


Try to ping the IP address of any DHCP and/or DNS server.

Step 5 Ping the Loopback IP address of this computer


There are some special testing and verification cases for which we can use ping.
One case is for testing the internal configuration of IP on the local host. To
perform this test, we ping the special reserve address of local loopback
(127.0.0.1).

A response from 127.0.0.1 indicates that IP is properly installed on the host.


This response comes from the Network layer. This response is not, however, an
indication that the addresses, masks, or gateways are properly configured. Nor
does it indicate anything about the status of the lower layer of the network
stack. This simply tests IP down through the Network layer of the IP protocol.
If we get an error message, it is an indication that TCP/IP is not operational on
the host.
Step 6 Ping the hostname of another computer
Try to ping the hostname of the computer of your partner. The figure shows
the successful result of the ping the hostname.

Look over the results. Notice that the first line of output shows the host name
followed by the IP address. This means the computer was able to resolve the
host name to an IP address. Without name resolution, the ping would have
failed because TCP/IP only understands valid IP addresses, not names.
If the ping was successful, it means that connectivity and discovery of IP
addresses can be done with only a hostname. If successful, then ping a
hostname also shows that there is probably a WINS server working on the
network. WINS servers or a local “lmhosts” file resolve computer host names
to IP addresses. If the ping fails, then chances are there is no NetBIOS name to
IP addresses resolution running.
Step 7 ping the Cisco web site
Type the following command: ping www.cisco.com

Step 8 ping the Microsoft web site


Type the following command: ping www.microsoft.com

Notice that the DNS server was able to resolve the name to an IP address, but
there is no response .Some Microsoft routers are configured to ignore ping
requests. This is a frequently implemented security measure.
Tracert The tracert command is also called traceroute on other systems, such
as Cisco‟s IOS (used in its routers and switches). It is used to find out what
other devices are on the path to a destination. It works by sending out a number
of signals. Each signal has an amount of locations it can jump to, called a time
to live (TTL), when it reaches that number, the device it reaches sends back an
error message “Destination host unreachable”.

Using the command is simple. You type in tracert and an IP number or


website‟s name after it. You can see extra options by typing tracert /? in the
command line.After that, type tracert google.com in and hit Enter again. You
should get something like this:

Tracert is TCP/IP abbreviation for trace route. The preceding figure shows the
successful result when running tracert. The first output line shows the URL
followed by the IP address.

Therefore, a DNS server was able to resolve the name to an IP address. Then
there are listings of all routers the tracert requests had to pass through to get to
the destination.

Tracert uses the same echo requests and replies as the ping command but in a
slightly different way. Observe that tracert actually contacted each router three
times. Compare the results to determine the consistency of the route.Each router
represents a point where one network connects to another network and the
packet was forwarded through.

Nslookup
The nslookup allows you to query a name server and quickly find out which name
resolves to which IP address.
Whenever you are configuring a server or workstation to connect to the
Internet, you will always have to configure DNS if you want name resolution to
happen. When configuring DNS, it is very advantageous to be able to test what
IP address DNS is returning to ensure that it is working properly.

You might also like