Viewing and Changing Your Computer's Routing Table

Here, you use the route command to view and change your computers internal routing table. Even though your computer is not a router, it maintains an internet routing table with entries for the network interface network, the loopback network, and details of other internal networks.

  1. Open a command prompt window by typing cmd in the run box as shown in previous weeks and ensure you run as administrator by right clicking on "cmd" when it appears as a search result as shown in following image.

  2. To view your routing table, type route print | more and press Enter. The | more after the route print command causes output to be displayed one screen at a time

    You should see the following results for your route print | more command.

  3. Next, examine the output of the route print command. Your computer's network interfaces are listed at the top, and the IPv4 Route Table lists entries in the routing table, which has five columns:

    Network Destination The network destination your computer compares with the destination IP address of outgoing packets to determine where to send them.
    Netmask The subnet mask of the network destination. A value of indicates that the address in the Network Destination column is a specific IP address rather than a network address; it's referred to as a "host route." A value of is used when the network destination is, indicating the default route or gateway.
    Gateway The next hop address or the on-link, which means the network is connected directly to an interface. Make a note of the value in this the network destination, as you need it later.
    Interface The address of the interface Windows uses to send the packet to the network destination.
    Metric - The metric assigned to the route. If there are two entries for the network destination, the lower metric is the route chosen.

    Press the spacebar one or more times to display the rest of the output. You'll see a row of output labeled Persistent Routes. If you create a route manually and it is to stay in the table between reboots, it is listed here. You will also see your default route listed under Persistent Routes in the IPv4 section of the output.

  4. To verify that you can communicate with the Internet, type ping press Enter. If the ping is successful, your default network is working correctly. You should see the following results for your ping command.

    In case you are wondering about the ip address Google Public DNS operates recursive name servers for public use at the two following IP addresses: and for IPv4 service, as well as 2001:4860:4860::8888 and 2001:4860:4860::8844, for IPv6 access. The addresses are mapped to the nearest operational server by anycast routing. Google Public DNS is a free alternative Domain Name System (DNS) service that is offered to Internet users around the world. The public DNS service and servers that are offered are maintained and owned by Google. It functions as a recursive name server providing domain name resolution for any host on the Internet. The service was announced on 3 December 2009, in an effort described as "making the web faster and more secure". As of 2014, Google Public DNS is the largest public DNS service in the world, handling 400 billion requests per day. Google Public DNS is not related to Google Cloud DNS, which is a free DNS hosting service.

  5. Type route delete and press Enter to delete your default route. Try to ping again. The ping will fail. You have 'broken' your Internet Connection.

    Next, return to the Command Prompt and Type route print | more and press Enter. You will see that the network destination is no longer in the table. Press the spacebar more times to display the rest of the output.

  6. To create the default route entry and restore your routing table, type route add -p mask default gateway and press Enter (replacing default-gateway with the address you noted in Step 3). e.g. route add -p mask (as shown next). Note your default-gateway IP may differ - see step 3 above where you record it from the route print table command.

  7. Display the routing table again to verify that your default route is ok.