{"id":257,"date":"2014-07-16T22:38:03","date_gmt":"2014-07-16T22:38:03","guid":{"rendered":"https:\/\/learncisco.net\/index.php\/gateway-and-dns-issues\/"},"modified":"2023-01-12T12:39:01","modified_gmt":"2023-01-12T05:39:01","slug":"gateway-and-dns-issues","status":"publish","type":"page","link":"https:\/\/www.learncisco.net\/courses\/icnd-2\/troubleshooting-basic-connectivity\/gateway-and-dns-issues.html","title":{"rendered":"Gateway and DNS Issues"},"content":{"rendered":"

IPv4 default gateway issues<\/h2>\n

How important is our default gateway? It’s very important. If you don’t have the correct information regarding the default gateway, you’re not going anywhere. You’re staying inside your local network, inside your subnet. You’ll never ever be able to reach destinations outside of your own subnet.<\/p>\n

We always think about the default gateway from the perspective of a client. But our router, if it doesn’t have information pointing itself to a next hop IP address for all traffic that it doesn’t have specific information for, then those destinations are unreachable. We just discussed that static route and more specifically that static default route.<\/p>\n

\"Default<\/p>\n

So here we see, our static default route configured on branch 0.0.0.0\/0 next hop IP of 192.168.1.2. We can see it’s the gateway of last resort here, gateway of last resort. So if this branch router doesn’t have anything specific in its routing table for 172, it will use this default route. This could be misleading for you, I’m worried at this point. There’s a command in global configuration mode that you might’ve seen, you might’ve used, and it didn’t work like you thought it was. It’s the command <\/span>ip default-gateway<\/strong><\/span>.<\/span><\/p>\n

The command ip default-gateway<\/strong><\/span> issued on a router does not do anything when the router is a router. If you were to turn off routing then it would take effect. So be very cautious about thinking that, that ip default-gateway command issued on our router is going to do anything for you. Again you have to turn off routing with the no ip routing<\/strong><\/span> command which you don’t usually do unless you’re making the router a host because maybe it’s running services for you, okay. So be careful about that. This is showing us the quote default gateway as installed by the ip route command and not the default-gateway command.<\/p>\n

Let’s focus on PC1 now in regards to the default gateway. If you’ve never used the route print command in Windows, essentially this is what it’s doing for you. It’s showing you the PC’s routing table. Now I’m going to use routing table loosely here. It’s not the routing table we have on our router, but it’s a listing of entries on that particular PC that’s going to point the PC to where it should send the packet. So remember when we discussed earlier in our CCNA studies that we are going to determine whether the destination we’re trying to communicate with is either local or remote. And we compare our IP address and subnet mask and that network portion. We determine from that calculation to the IP address of that destination if that IP is in the same network, traffic stays local. If not, we have to send it to our default gateway.<\/p>\n

\n
C:Windowssystem32>route print<\/div>\n
<output omitted><\/div>\n
IPv4 Route Table<\/div>\n
===========================================================================<\/div>\n
Active Routes:<\/div>\n
Network Destination \u00a0 \u00a0 \u00a0 \u00a0Netmask \u00a0 \u00a0 \u00a0 \u00a0 \u00a0Gateway \u00a0 \u00a0 \u00a0 Interface \u00a0Metric<\/div>\n
\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 0.0.0.0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a00.0.0.0 \u00a0 \u00a0 \u00a0 \u00a010.2.10.1 \u00a0 \u00a0 10.1.10.100 \u00a0 \u00a0 \u00a011<\/div>\n
<output omitted><\/div>\n<\/blockquote>\n

And the output of this route print is showing us that if we need to send our traffic to the default gateway, so 0.0.0.0, 0.0.0.0 any destination outside of our local network, send it to this particular IP address. Now, do you see anything wrong here? Let’s put on our troubleshooting hats. Do you see anything wrong? And if you do, make a mental note of it because I see something wrong here.<\/p>\n

On our client PC1 that gateway, that IP address for the default gateway appears to be wrong to me. Yeah, I’m going to assume a 24-bit mask and even if I assume a 16-bit mask, I still have a problem. The default gateway must be in your subnet. There’s no way around that. The default gateway must be in your subnet, so this isn’t going to work. This would be an indication that if the client was statically configured that we type out of it, or if the DHCP server had been configured with the wrong default-router command. Well we want to adjust that, should be the IP address of the router in the subnet and it should be 10.1.10.1 based on the topology.<\/p>\n

In both those examples we just provided, the scope of the issue would be completely different. If we type out our default gateway more than likely, only one PC would be affected by that if we were statically configuring IP addresses because we probably wouldn’t have typed, wouldn’t in all the machines. But if it was DHCP that was handing out that default gateway information, then all of the clients in that subnet would’ve been affected. So a big difference in scope here in regards to, whether we were statically configuring it or whether it was being handed out by a DHCP server.<\/p>\n

IPv4 name resolution issues<\/h2>\n

We’re Cisco folks, right? So we’re not usually the people who set up the domain name system, or DNS servers or the WINS servers. So does that mean we don’t have to care about it? No, well our job is quite simple. For name resolution so that your folks can get to your .coms, your .edus, your .cas, whatever that might be, they have to be pointed to a DNS server that is working. And there might also be an essential name resolution that is internal to your organization as well. And when our server folks want to distribute a new WINS server or a DNS server, we have to make sure that we have properly updated those parameters on the DHCP servers, that are typically the ones burdened with disseminating the name resolution servers down to your clients.<\/p>\n

Indeed, usually we will not be the ones responsible for those DNS servers, and Cisco makes a good note of it right here. We are modifying the host file on the PC to prove that DNS is working. So here you can see how to modify the host file, which is a text file and we will add this entry here 172.16.1.100; the name of server.<\/p>\n

C:WindowsSystem32driversetchosts<\/p>\n

172.16.1.100 Server<\/p><\/blockquote>\n

So now that we’re set up here, with the name of the server going back to that specific IP address, let’s go ahead and do a ping and let’s see the result we get.<\/p>\n

So we ping server instead of the IP address that you were using earlier and we can see the result here.<\/p>\n

\"Troubleshooting<\/p>\n

We received a successful response of 172.16.1.100, meaning we had name resolution from that host file. Now what do we really rely on that host file in the real world? Here is the only time I update my hosts file is when I’m working with some proprietary program that’s internal to my organization, that needs to be pointed to a backend server for that application. And I’ll read the README for it and it says, “Update your host file with this information”, that’s when I do it. So this is not a scalable solution. This is not the sort of thing that a Cisco network engineer would want to get into. This is, you’re in the weeds if you’re trying to fix problems by updating a host file. So what do we want to take away from this? This is really what we want take away. If you can ping that hostname, and DNS servers are being utilized for name resolution, what does that tell us? Well a successful ping tells us many different things here.<\/p>\n

First and foremost, you can see that, that name has to be converted to an IP address which it has been here. That means name resolution is successful. We’ve received successful replies now, so we have connectivity at layer 3 as well. Do we have connectivity at layer 2? Yeah because it was successful so we were able to successfully create our frames as well. And then they were able to be converted to bits and cross the physical wire. So by being able to ping the hostname we take it a step further and are able to verify that name resolution is working as well. So we can hit more layers of the OSI model instead of just layer 3, 2, and 1 like we do if we’re pinging an IP address.<\/p>\n","protected":false},"excerpt":{"rendered":"IPv4 default gateway issues How important is our default gateway? It’s very important. If you don’t have the correct information regarding the default gateway, you’re not going anywhere. You’re staying inside your local network, inside your subnet. You’ll never ever be able to reach destinations outside of your own subnet. We always think about the … Read more<\/a>","protected":false},"author":5,"featured_media":0,"parent":249,"menu_order":57,"comment_status":"closed","ping_status":"closed","template":"cisco-page.php","meta":{"_acf_changed":false,"footnotes":""},"acf":[],"yoast_head":"\nGateway and DNS Issues - learncisco.net<\/title>\n<meta name=\"description\" content=\"This article explains default gateway that it's very important if you don't have the correct information regarding the default gateway.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.learncisco.net\/courses\/icnd-2\/troubleshooting-basic-connectivity\/gateway-and-dns-issues.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Gateway and DNS Issues - learncisco.net\" \/>\n<meta property=\"og:description\" content=\"This article explains default gateway that it's very important if you don't have the correct information regarding the default gateway.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.learncisco.net\/courses\/icnd-2\/troubleshooting-basic-connectivity\/gateway-and-dns-issues.html\" \/>\n<meta property=\"og:site_name\" content=\"learncisco.net\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-12T05:39:01+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.learncisco.net\/courses\/icnd-2\/troubleshooting-basic-connectivity\/gateway-and-dns-issues.html\",\"url\":\"https:\/\/www.learncisco.net\/courses\/icnd-2\/troubleshooting-basic-connectivity\/gateway-and-dns-issues.html\",\"name\":\"Gateway and DNS Issues - learncisco.net\",\"isPartOf\":{\"@id\":\"https:\/\/www.learncisco.net\/#website\"},\"datePublished\":\"2014-07-16T22:38:03+00:00\",\"dateModified\":\"2023-01-12T05:39:01+00:00\",\"description\":\"This article explains default gateway that it's very important if you don't have the correct information regarding the default gateway.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.learncisco.net\/courses\/icnd-2\/troubleshooting-basic-connectivity\/gateway-and-dns-issues.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.learncisco.net\/courses\/icnd-2\/troubleshooting-basic-connectivity\/gateway-and-dns-issues.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.learncisco.net\/courses\/icnd-2\/troubleshooting-basic-connectivity\/gateway-and-dns-issues.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.learncisco.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Cisco Certification Courses\",\"item\":\"https:\/\/www.learncisco.net\/courses.html\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"CCNA 200-301\",\"item\":\"https:\/\/www.learncisco.net\/courses\/cisco-ccna.html\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Troubleshooting Basic Connectivity\",\"item\":\"https:\/\/www.learncisco.net\/courses\/cisco-ccna\/troubleshooting-basic-connectivity.html\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Gateway and DNS Issues\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.learncisco.net\/#website\",\"url\":\"https:\/\/www.learncisco.net\/\",\"name\":\"learncisco.net\",\"description\":\"Free online tests for the Cisco CCNA and CCNP exams. Test yourself with more than 4300 different questions.\",\"publisher\":{\"@id\":\"https:\/\/www.learncisco.net\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.learncisco.net\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.learncisco.net\/#organization\",\"name\":\"learncisco.net\",\"url\":\"https:\/\/www.learncisco.net\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.learncisco.net\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.learncisco.net\/wp-content\/uploads\/2021\/12\/logo-1.png\",\"contentUrl\":\"https:\/\/www.learncisco.net\/wp-content\/uploads\/2021\/12\/logo-1.png\",\"width\":154,\"height\":24,\"caption\":\"learncisco.net\"},\"image\":{\"@id\":\"https:\/\/www.learncisco.net\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Gateway and DNS Issues - learncisco.net","description":"This article explains default gateway that it's very important if you don't have the correct information regarding the default gateway.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.learncisco.net\/courses\/icnd-2\/troubleshooting-basic-connectivity\/gateway-and-dns-issues.html","og_locale":"en_US","og_type":"article","og_title":"Gateway and DNS Issues - learncisco.net","og_description":"This article explains default gateway that it's very important if you don't have the correct information regarding the default gateway.","og_url":"https:\/\/www.learncisco.net\/courses\/icnd-2\/troubleshooting-basic-connectivity\/gateway-and-dns-issues.html","og_site_name":"learncisco.net","article_modified_time":"2023-01-12T05:39:01+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.learncisco.net\/courses\/icnd-2\/troubleshooting-basic-connectivity\/gateway-and-dns-issues.html","url":"https:\/\/www.learncisco.net\/courses\/icnd-2\/troubleshooting-basic-connectivity\/gateway-and-dns-issues.html","name":"Gateway and DNS Issues - learncisco.net","isPartOf":{"@id":"https:\/\/www.learncisco.net\/#website"},"datePublished":"2014-07-16T22:38:03+00:00","dateModified":"2023-01-12T05:39:01+00:00","description":"This article explains default gateway that it's very important if you don't have the correct information regarding the default gateway.","breadcrumb":{"@id":"https:\/\/www.learncisco.net\/courses\/icnd-2\/troubleshooting-basic-connectivity\/gateway-and-dns-issues.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.learncisco.net\/courses\/icnd-2\/troubleshooting-basic-connectivity\/gateway-and-dns-issues.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.learncisco.net\/courses\/icnd-2\/troubleshooting-basic-connectivity\/gateway-and-dns-issues.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.learncisco.net\/"},{"@type":"ListItem","position":2,"name":"Cisco Certification Courses","item":"https:\/\/www.learncisco.net\/courses.html"},{"@type":"ListItem","position":3,"name":"CCNA 200-301","item":"https:\/\/www.learncisco.net\/courses\/cisco-ccna.html"},{"@type":"ListItem","position":4,"name":"Troubleshooting Basic Connectivity","item":"https:\/\/www.learncisco.net\/courses\/cisco-ccna\/troubleshooting-basic-connectivity.html"},{"@type":"ListItem","position":5,"name":"Gateway and DNS Issues"}]},{"@type":"WebSite","@id":"https:\/\/www.learncisco.net\/#website","url":"https:\/\/www.learncisco.net\/","name":"learncisco.net","description":"Free online tests for the Cisco CCNA and CCNP exams. Test yourself with more than 4300 different questions.","publisher":{"@id":"https:\/\/www.learncisco.net\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.learncisco.net\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.learncisco.net\/#organization","name":"learncisco.net","url":"https:\/\/www.learncisco.net\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.learncisco.net\/#\/schema\/logo\/image\/","url":"https:\/\/www.learncisco.net\/wp-content\/uploads\/2021\/12\/logo-1.png","contentUrl":"https:\/\/www.learncisco.net\/wp-content\/uploads\/2021\/12\/logo-1.png","width":154,"height":24,"caption":"learncisco.net"},"image":{"@id":"https:\/\/www.learncisco.net\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.learncisco.net\/wp-json\/wp\/v2\/pages\/257"}],"collection":[{"href":"https:\/\/www.learncisco.net\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.learncisco.net\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.learncisco.net\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.learncisco.net\/wp-json\/wp\/v2\/comments?post=257"}],"version-history":[{"count":2,"href":"https:\/\/www.learncisco.net\/wp-json\/wp\/v2\/pages\/257\/revisions"}],"predecessor-version":[{"id":1155,"href":"https:\/\/www.learncisco.net\/wp-json\/wp\/v2\/pages\/257\/revisions\/1155"}],"up":[{"embeddable":true,"href":"https:\/\/www.learncisco.net\/wp-json\/wp\/v2\/pages\/249"}],"wp:attachment":[{"href":"https:\/\/www.learncisco.net\/wp-json\/wp\/v2\/media?parent=257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}