Pings
the local host, this will allow you to see if the computer is able to
send information out and receive the information back. Note that this
does not send information over a network but may allow you to see if the
card is being seen.
PING computerhope.com (204.228.150.3) 56(84) bytes of data.
64 bytes from www.computerhope.com (204.228.150.3): icmp_seq=1 ttl=63 time=0.267 ms
--- computerhope.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.267/0.267/0.267/0.000 ms
ping -s [-d] [-l] [-L] [-n] [-r] [-R] [-v] [ -i interface_address ] [-I interval] [-t ttl] host [packetsize] [count]
Ping the host google.com to see if it is alive.
Ping the host google.com once and return to the command line as shown below.
PING
google.com (204.228.150.3) 56(84) bytes of data.
Windows 95, 98, and ME syntax
/All | Display detailed information. |
/Batch [file] | Write to file or ./WINIPCFG.OUT |
/renew_all | Renew all adapters. |
/release_all | Release all adapters. |
/renew N | Renew adapter N. |
/release N | Release adapter N. |
Windows 2000 and XP syntax
ipconfig
[/? | /all | /release [adapter] | /renew [adapter] | /flushdns |
/registerdns | /showclassid adapter | /setclassid adapter [classidtoset]
]
/all | Display full configuration information. |
/release | Release the IP address for the specified adapter. |
/renew | Renew the IP address for the specified adapter. |
/flushdns | Purges the DNS Resolver cache. |
/registerdns | Refreshes all DHCP leases and re-registers DNS names |
/displaydns | Display the contents of the DNS Resolver Cache. |
/showclassid | Displays all the dhcp class IDs allowed for adapter. |
/setclassid | Modifies the dhcp class id. |
The default is to display only the IP address, subnet mask and default gateway for each adapter bound to TCP/IP.
For
Release and Renew, if no adapter name is specified, then the IP address
leases for all adapters bound to TCP/IP will be released or renewed.
For SetClassID, if no class id is specified, then the classid is removed.
To
get your computers local network IP address, subnet mask, and default
gateway typing ipconfig alone will display this information as shown
below. Keep in mind this is only your local network information. If
you're trying to determine your IP address used on the Internet we
suggest viewing our
system information page.
ipconfig
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . : hsd1.ut.comcast.net.
IP Address. . . . . . . . . . . . : 192.168.201.245
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.201.1
To
get all local network information for your computer use the /all switch
as shown below, followed by the results that would be seen when using
this command.
ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . : COMPUTERH1
DNS Servers . . . . . . . . : 123.45.67.8
111.111.111.1
111.111.111.1
Node Type . . . . . . . . . : Broadcast
NetBIOS Scope ID. . . . . . :
IP Routing Enabled. . . . . : No
WINS Proxy Enabled. . . . . : No
NetBIOS Resolution Uses DNS : No
0 Ethernet adapter :
Description . . . . . . . . : PPP Adapter.
Physical Address. . . . . . : 44-44-44-54-00-00
DHCP Enabled. . . . . . . . : Yes
IP Address. . . . . . . . . : 123.45.67.802
Subnet Mask . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . : 123.45.67.801
DHCP Server . . . . . . . . : 255.255.255.255
Primary WINS Server . . . . :
Secondary WINS Server . . . :
Lease Obtained. . . . . . . : 01 01 80 12:00:00 AM
Lease Expires . . . . . . . : 01 01 80 12:00:00 AM
1 Ethernet adapter :
Description . . . . . . . . : 3Com 3C90x Ethernet Adapter
Physical Address. . . . . . : 00-50-04-62-F7-23
DHCP Enabled. . . . . . . . : Yes
IP Address. . . . . . . . . : 111.111.111.108
Subnet Mask . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . : 111.111.111.1
DHCP Server . . . . . . . . : 111.111.111.1
Primary WINS Server . . . . :
Secondary WINS Server . . . :
Lease Obtained. . . . . . . : 11 16 00 12:12:44 AM
Lease Expires . . . . . . . :
Reference: http://www.computerhope.com/ipconfig.htm
Hostname
About hostname
Display the hostname of the machine
the command is being run on. Additional information about the term
hostname can be found on our
hostname dictionary definition.
The hostname command is an
external command and is available in the below Microsoft operating systems.
Windows 2000
Windows XP
Windows Vista
Windows 7
hostname
sethostname: Use the Network Control Panel Applet to set hostname.
hostname -s is not supported.
hostname
Running the command would display the hostname for the computer.
TRACERT and TRACEROUTE
For Windows
About tracert
The
tracert command is used to visually see a network packet being sent and
received and the amount of hops required for that packet to get to its
destination.
Users with Microsoft Windows 2000 and Windows XP who
need additional information network latency and network loss should also
consider using the
pathping command.
The tracert.exe command is an
external command that is available in the below Microsoft operating systems.
MS-DOS 6.2
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
tracert | [-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name |
Options:
-d | Do not resolve addresses to hostnames. |
-h maximum_hops | Maximum number of hops to search for target. |
-j host-list | Loose source route along host-list. |
-w timeout | Wait timeout milliseconds for each reply. |
Below is an example when we used tracert on
www.computerhope.com.
As you can see in the below example, we had a very short list and time
to get to its destination because of the location we are.
tracert computerhope.com
1 | 169 ms | 190 ms | 160 ms | slc1-tc.xmission.com [166.70.1.20] |
2 | 159 ms | 160 ms | 190 ms | cisco0-tc.xmission.com [166.70.1.1] |
3 | 165 ms | 189 ms | 159 ms | www.computerhope.com [166.70.10.23] | | | | | |
For Linux
Print the route packets take to network host.
traceroute
[-d] [-F] [-I] [-n] [-v] [-x] [-f first_ttl] [-g gateway [-g gateway] |
-r] [-i iface] [-m max_ttl] [-p port] [-q nqueries] [-s src_addr] [-t
tos] [-w waittime ] host [packetlen]
-d | Set the SO_DEBUG socket option. |
-F | Set the "don't fragment" bit. |
-I | Use ICMP ECHO instead of UDP datagrams. |
-n | Print
hop addresses numerically rather than symbolically and numerically.
This saves a nameserver address-to-name lookup for each gateway found on
the path. |
-v | Verbose
output. For each hop, the size and the destination of the response
packets is displayed. Also ICMP packets received other than
TIME_EXCEEDED and UNREACHABLE are listed as well. |
-x | Prevent
traceroute from calculating checksums. Note that checksums are usually
required for the last hop when using ICMP ECHO probes. See the -I
option. |
-f first_ttl | Set
the starting ttl value to first_ttl, to override the default value 1.
traceroute skips processing for those intermediate gateways which are
less than first_ttl hops away. |
-g gateway | Specify
a loose source route gateway. The user can specify more than one
gateway by using -g for each gateway. The maximum that can be set is 8. |
-r | Bypass
the normal routing tables and send directly to a host on an attached
network. If the host is not on a directly-attached network, an error is
returned. This option can be used to send probes to a local host through
an interface that has been dropped by the router daemon. |
-i iface | Specify
a network interface to obtain the source IP address for outgoing probe
packets. This is normally only useful on a multi-homed host. The -s
option is also another way to do this. Note that this option does not
provide a way to specify the interface on which the probe packets are
sent. |
-m max_ttl | Set the maximum ttl used in outgoing probe packets. The default is 30 hops, which is the same default used for TCP connections. |
-p port | Set
the base UDP port number used in probes. The default is 33434.
traceroute hopes that nothing is listening on UDP ports (base+(nhops-
1)*nqueries) to (base+(nhops*nqueries)-1)at the destination host, so
that an ICMP PORT_UNREACHABLE message will be returned to terminate the
route tracing. If something is listening on a port in the default range,
this option can be used to select an unused port range.nhops is defined
as the number of hops between the source and the destination. |
-q nqueries | Set the desired number of probe queries. The default is 3. |
-s src_addr | Use
the following address, which usually is given as an IP address, not a
hostname, as the source address in outgoing probe packets. On
multi-homed hosts, those with more than one IP address, this option can
be used to force the source address to be something other than the IP
address traceroute picks by default. If the IP address is not one of
this machine's interface addresses, an error is returned and nothing is
sent. When used together with the -i option, the given IP address should
be configured on the specified interface. Otherwise, an error will be
returned. |
-t tos | Set
the tos(type-of-service) in probe packets to the specified value. The
default is zero. The value must be an integer in the range from 0 to
255. Gateways along the path may route the probe packet differently
depending upon the tos value set in the probe packet. |
-w waittime | Set the time, in seconds, to wait for a response to a probe. The default is five (5) seconds. |
host | The network host. |
traceroute computerhope.com - would display results similar to the
below example.
traceroute to computerhope.com (166.70.10.23), 30 hops max, 40 byte packets
1 198.60.22.1 (198.60.22.1) 2.303 ms 1.424 ms 2.346 ms
2 krunk3.xmission.com (198.60.22.6) 0.742 ms * 1.521 ms
Note:
in this example because we are local to the address we are tracerouting
the amount of hops is very minimal. However, when you traceroute
computerhope.com you may hop more than we do.
This command is very useful for distinguishing
network or
router issues. If the domain does not work or is not available you can traceroute an IP.