Computer Networks/Ping/Host
The command to ping a host is ping <host>, where <host> is the host name or IP address of the host you want to ping. These activities will show you how to use the ping command to ping a host.
Preparation
editTo prepare for this activity:
- Start Windows.
- Log in if necessary.
Activity 1 - Ping Loopback Address
editTo test whether or not TCP/IP is functioning on the local host, first ping the loopback address 127.0.0.1:
- Open a command prompt.
- Type ping 127.0.0.1 and press Enter.
- Observe the results. You should see replies indicating success.
Activity 2 - Ping Localhost
editTo test host name cache resolution, ping the name localhost. This is an alias for the loopback address:
- Type ping localhost and press Enter.
- Observe the results. You should see replies indicating success.
Activity 3 - Ping the Host IPv4 Address
editTo test the local host IPv4 address:
- Use ipconfig to display the host IP address. Note the IPv4 Address displayed.
- Type ping <IPv4 Address> where <IPv4 Address> is the IPv4 address displayed above. For example, if the IPv4 address was 192.168.1.101, you would type ping 192.168.1.101. Then press Enter.
- Observe the results. You should see replies indicating success.
Activity 4 - Ping the Host Name
editTo test the local host name:
- Use ipconfig /all to display the host name. Note the Host Name displayed.
- Type ping <hostname> where <hostname> is the Host Name IPv4 address displayed above. For example, if the host name was host1, you would type ping host1. Then press Enter.
- Observe the results. You should see replies indicating success.
Activity 5 - Ping the Default Gateway
editTo test local network connectivity:
- Use ipconfig to display the default gateway address. Note the Default Gateway displayed.
- Type ping <default gateway address> where <default gateway address> is the default gateway address displayed above. For example, if the default gateway address was 192.168.1.1, you would type ping 192.168.1.1. Then press Enter.
- Observe the results. If you see replies indicating success, you have local network connectivity.
Activity 6 - Ping an Internet Host by IPv4 Address
edit8.8.8.8 is the IPv4 address of one of Google's public DNS servers. To test Internet connectivity:
- Type ping 8.8.8.8 and press Enter.
- Observe the results. If you see replies indicating success, you have Internet connectivity.
Activity 7 - Ping an Internet Host by Name
editgoogle-public-dns-a.google.com is the host name of one of Google's public DNS servers. To test Internet connectivity with host name resolution:
- Type ping google-public-dns-a.google.com and press Enter.
- Observe the results. If you see replies indicating success, you have Internet connectivity and host name resolution.
Activity 8 - Ping an Internet Host by IPv6 Address
edit2001:4860:4860::8888 is the IPv6 address of one of Google's public DNS servers. To test IPv6 Internet connectivity:
- Type ping 2001:4860:4860::8888 and press Enter.
- Observe the results. If you see replies indicating success, you have IPv6 Internet connectivity.
Activity 9 - Ping an Internet Host by IPv6 Name
editipv6.google.com is the IPv6-only host name of Google's web servers. To test Internet connectivity with IPv6 host name resolution:
- Type ping ipv6.google.com and press Enter.
- Observe the results. If you see replies indicating success, you have Internet connectivity and IPv6 host name resolution.
- Close the command prompt to complete this activity.
Readings
editReferences
editSee also
editTest-Connection
Powershell cmdlet- nping