Lab 2: Introduction To Networking Command Ipconfig
Lab 2: Introduction To Networking Command Ipconfig
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 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.
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.
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
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
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
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
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”.
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.