-
Notifications
You must be signed in to change notification settings - Fork 4
/
when-is-default-gateway-used.html
9 lines (7 loc) · 1.14 KB
/
when-is-default-gateway-used.html
1
2
3
4
5
6
7
8
---
url: /2007/04/when-is-default-gateway-used/
title: "When is the default-gateway used?"
date: "2007-04-26T10:24:00.002+02:00"
tags: [ IP routing ]
---
Cisco IOS allows you to configure the <strong>ip default-gateway</strong>, but most often it looks like this setting is ignored. In fact, the default gateway is only used when an IOS device does not perform IP routing (acts like an IP host), for example, when you configure a Catalyst switch for layer-2 switching ... or when you disable IP routing on a router with <strong>no ip routing</strong> configuration command. In both cases, the <strong>show ip route</strong> command (or <strong>show ip redirects</strong> on some Catalyst switches) displays the default gateway and any ICMP redirects received from directly attached routers:<pre class="code">b2#<strong>show ip route</strong><br/>Default gateway is 192.168.0.5<br/><br/>Host Gateway Last Use Total Uses Interface<br/>1.2.3.4 192.168.0.10 0:00 13 FastEthernet0/0</pre><p class="info">Disabling IP routing on a router makes perfect sense if you use it as a (reverse) terminal server or telnet-to-X.25 gateway.</p>