In a message dated 8/19/01 4:37:05 PM Central Daylight Time, 
[EMAIL PROTECTED] writes:

<< Subj:     ip default-network [7:16507]
 Date:  8/19/01 4:37:05 PM Central Daylight Time
 From:  [EMAIL PROTECTED] (richard dumoulin)
 Sender:    [EMAIL PROTECTED]
 Reply-to:  [EMAIL PROTECTED] (richard dumoulin)
 To:    [EMAIL PROTECTED]
 

Rich,
Try this brief lab example I got from the CCO.  I think this will clear it
up
for you:
ip default-gateway
The ip default-gateway command differs from the other two commands in that
it
should only be used when ip routing is disabled on the Cisco router. For 
instance, if the router is a host in the IP world, you can use this command 
to define a default gateway for it. You might also use this command when
your
low end Cisco router is in boot mode in order to TFTP a Cisco IOS.Software 
image to the router. In boot mode, the router doesn't have ip routing
enabled.

ip default-network
Unlike the ip default-gateway command, you can use ip default-network when
ip
routing is enabled on the Cisco router. When you configure ip
default-network
the router considers routes to that network for installation as the gateway 
of last resort on the router. 

For every network configured with ip default-network, if a router has a
route
to that network, that route is flagged as a candidate default route. Let's 
look at the following routing table taken from a Cisco router: 

2513#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate 
default
Gateway of last resort is not set
     161.44.0.0 255.255.255.0 is subnetted, 1 subnets
C       161.44.192.0 is directly connected, Ethernet0
S    198.10.1.0 [1/0] via 161.44.192.2
     131.108.0.0 255.255.255.0 is subnetted, 1 subnets
C       131.108.99.0 is directly connected, TokenRing0

Note the static route to 198.10.1.0 via 161.44.192.2 and that the gateway of 
last resort isn't set. If we configure ip default-network 198.10.1.0, the 
routing table changes to the following: 

2513#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate 
default
 
Gateway of last resort is 161.44.192.2 to network 198.10.1.0
 
     161.44.0.0 255.255.255.0 is subnetted, 1 subnets
C       161.44.192.0 is directly connected, Ethernet0
S       161.44.0.0 255.255.0.0 [1/0] via 161.44.192.0 
S*    198.10.1.0 [1/0] via 161.44.192.2
     131.108.0.0 255.255.255.0 is subnetted, 1 subnets
C       131.108.99.0 is directly connected, TokenRing0
2513#show ip protocols
2513#

We can see the gateway of last resort has now been set as 161.44.192.2. This 
result is independent of any routing protocol, as shown by the show ip 
protocols command at the bottom of the output. 

We can add another candidate default route simply by configuring another 
instance of ip default-network: 

2513#config terminal
Enter configuration commands, one per line.  End with CNTL/Z.
2513(config)#ip route 171.70.24.0 255.255.255.0 131.108.99.2
2513(config)#ip default-network 171.70.24.0
2513(config)#^Z

2513#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate 
default
 
Gateway of last resort is 161.44.192.2 to network 198.10.1.0
 
     161.44.0.0 255.255.255.0 is subnetted, 1 subnets
C    161.44.192.0 is directly connected, Ethernet0
S    161.44.0.0 255.255.0.0 [1/0] via 161.44.192.0 
S*   198.10.1.0 [1/0] via 161.44.192.2
     171.70.0.0 is variably subnetted, 2 subnets, 2 masks
S    171.70.0.0 255.255.0.0 [1/0] via 171.70.24.0
S    171.70.24.0 255.255.255.0 [1/0] via 131.108.99.2
     131.108.0.0 255.255.255.0 is subnetted, 1 subnets
C    131.108.99.0 is directly connected, TokenRing0

Flagging a Default Network
Note: The ip default-network command is classful, which means if the router 
has a route to the subnet indicated by this command, it installs the route
to
the major net. At this point neither network has been flagged as the default 
network. The ip default-network command must be issued again, using the
major
net, in order to flag the candidate default route. 

2513#config terminal
Enter configuration commands, one per line. End with CNTL/Z. 
2513(config)#ip default-network 171.70.0.0
2513(config)#^Z

2513#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate 
default
 
Gateway of last resort is 161.44.192.2 to network 198.10.1.0
 
        161.44.0.0 255.255.255.0 is subnetted, 1 subnets
C       161.44.192.0 is directly connected, Ethernet0
S       161.44.0.0 255.255.0.0 [1/0] via 161.44.192.0 
S*      198.10.1.0 [1/0] via 161.44.192.2
        171.70.0.0 is variably subnetted, 2 subnets, 2 masks
S*      171.70.0.0 255.255.0.0 [1/0] via 171.70.24.0
S       171.70.24.0 255.255.255.0 [1/0] via 131.108.99.2
        131.108.0.0 255.255.255.0 is subnetted, 1 subnets
C       131.108.99.0 is directly connected, TokenRing0

If the original static route had been to the major network, we wouldn't have 
needed the extra step of configuring the default network twice. 

There are still no IP protocols running here. Without any dynamic protocols 
running, you can configure your router to choose from a number of candidate 
default routes based on whether the routing table has routes to networks 
other than 0.0.0.0/0. This command allows you to configure robustness into 
the selection of a gateway of last resort. Rather than configuring static 
routes to specific next-hops, you can have the router choose a default route 
to a particular network by checking in the routing table. 

If you lose the route to a particular network, the router selects the second 
candidate default, as specified above. You can remove the lost route by 
removing the static route in the configuration as follows:

2513#config terminal
Enter configuration commands, one per line.  End with CNTL/Z.
2513(config)#no ip route 198.10.1.0 255.255.255.0 161.44.192.2
2513(config)#^Z
2513#
%SYS-5-CONFIG_I: Configured from console by console

After removing the static route to the original default network, the routing 
table looks like this: 

2513#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate 
default
 
Gateway of last resort is 171.70.24.0 to network 171.70.0.0
 
     161.44.0.0 255.255.255.0 is subnetted, 1 subnets
C       161.44.192.0 is directly connected, Ethernet0
S       161.44.0.0 255.255.0.0 [1/0] via 161.44.192.0 
*   171.70.0.0 is variably subnetted, 2 subnets, 2 masks
S*      171.70.0.0 255.255.0.0 [1/0] via 171.70.24.0
S       171.70.24.0 255.255.255.0 [1/0] via 131.108.99.2
     131.108.0.0 255.255.255.0 is subnetted, 1 subnets
C       131.108.99.0 is directly connected, TokenRing0
2513#

Using Different Routing Protocols
Gateways of last resort selected using the ip default-network command are 
propagated differently depending on which routing protocol is propagating
the
default route. For IGRP and EIGRP to propagate the route, the network 
specified by the ip default-network command must be known to IGRP or EIGRP. 
This means the network must be an IGRP- or EIGRP-derived network in the 
routing table, or the static route used to generate the route to the network 
must be redistributed into IGRP or EIGRP. 


RIP advertises a route to 0.0.0.0. For example, note that the gateway of
last
resort on the router below was learned using the combination of the ip route 
and ip default-network commands. If we enable RIP on this router, RIP 
advertises a route to 0.0.0.0 (although not to the Token Ring network
because
of split-horizon): 

2513(config)#router rip
2513(config-router)#network 161.44.0.0
2513(config-router)#network 131.108.0.0
2513(config-router)#^Z
2513#
2513#
2513#
%SYS-5-CONFIG_I: Configured from console by console
2513#debug ip rip
RIP protocol debugging is on
2513#
RIP: sending update to 255.255.255.255 via Ethernet0 (161.44.192.1)
     default 0.0.0.0, metric 1
     network 131.108.0.0, metric 1
RIP: sending update to 255.255.255.255 via TokenRing0 (131.108.99.1)
network 161.44.0.0, metric 1
2513#

Note: In IOS release 12.0T and higher, RIP doesn't advertise the default 
router if the route is not learned via RIP. Therefore, it may be necessary
to
redistribute the route into RIP, or use the default-information originate 
command. 

OSPF, like RIP, advertises a route for 0.0.0.0 0.0.0.0. However, with OSPF, 
the router originating the default route must be configured with the 
default-information originate command. For more detailed information, see
How
Does OSPF Generate Default Routes?. 



 Would anybody be so kind to explain me how the hell is this command working?
 The more I read about it the more I get confused.
 
 Regards.




Message Posted at:
http://www.groupstudy.com/form/read.php?f=7&i=16508&t=16507
--------------------------------------------------
FAQ, list archives, and subscription info: http://www.groupstudy.com/list/cisco.html
Report misconduct and Nondisclosure violations to [EMAIL PROTECTED]

Reply via email to