Dave
Let me clear this up a little, you can place more than one default route in
the routing table but the router will only use the first entry.
If that link goes down the next default route will be used.
Here is the config,
interface Ethernet0/0
ip address 10.1.1.1 255.255.255.0
no ip directed-broadcast
interface Ethernet0/1
ip address 10.1.2.1 255.255.255.0
no ip directed-broadcast
Router#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip routing
Router(config)#ip route 0.0.0.0 0.0.0.0 10.1.1.3
Router(config)#ip route 0.0.0.0 0.0.0.0 10.1.2.3
Router(config)#^Z
Router#
00:08:49: %SYS-5-CONFIG_I: Configured from console by console
Router#sh 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
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
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
U - per-user static route, o - ODR
Gateway of last resort is 10.1.1.3 to network 0.0.0.0
10.0.0.0/24 is subnetted, 2 subnets
C 10.1.2.0 is directly connected, Ethernet0/1
C 10.1.1.0 is directly connected, Ethernet0/0
S* 0.0.0.0/0 [1/0] via 10.1.1.3
[1/0] via 10.1.2.3
Router#
Notice that the first ip route entry is the Gateway of last resort. Now
watch what happens when I disconnect the cable to E0/0
Router#
00:15:20: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0,
changed s
tate to down
Router#sh 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
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
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
U - per-user static route, o - ODR
Gateway of last resort is 10.1.2.3 to network 0.0.0.0
10.0.0.0/24 is subnetted, 1 subnets
C 10.1.2.0 is directly connected, Ethernet0/1
S* 0.0.0.0/0 [1/0] via 10.1.2.3
Router#
Now notice that the second ip route entry is the Gateway of last resort. Now
watch what happens when I reconnect the E0/0 cable.
Router#
00:19:27: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0,
changed s
tate to up
Router#sh 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
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
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
U - per-user static route, o - ODR
Gateway of last resort is 10.1.2.3 to network 0.0.0.0
10.0.0.0/24 is subnetted, 2 subnets
C 10.1.2.0 is directly connected, Ethernet0/1
C 10.1.1.0 is directly connected, Ethernet0/0
S* 0.0.0.0/0 [1/0] via 10.1.2.3
[1/0] via 10.1.1.3
Router#
The original default gateway is now the backup route. If you want to install
the first route as the one to use after the link is brought back up, issue a
shutdown-no shutdown command on the interface that points to the current
default gateway.
Router#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int e0/1
Router(config-if)#shutdown
Router(config-if)#
00:24:35: %LINK-5-CHANGED: Interface Ethernet0/1, changed state to
administrativ
ely down
00:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/1,
changed s
tate to down
Router(config-if)#no sh
Router(config-if)#
00:24:49: %LINK-3-UPDOWN: Interface Ethernet0/1, changed state to up
00:24:50: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/1,
changed s
tate to up
Router(config-if)#^Z
Router#
00:24:55: %SYS-5-CONFIG_I: Configured from console by console
Router#sh 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
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
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
U - per-user static route, o - ODR
Gateway of last resort is 10.1.1.3 to network 0.0.0.0
10.0.0.0/24 is subnetted, 2 subnets
C 10.1.2.0 is directly connected, Ethernet0/1
C 10.1.1.0 is directly connected, Ethernet0/0
S* 0.0.0.0/0 [1/0] via 10.1.1.3
[1/0] via 10.1.2.3
Router#
Notice that this will insert our original Gateway of last resort.
Sorry for the HTML but I wanted to use color to illustrate the key commands
and points.
Hope this helps clear up your question, forget what the book said this is
how a real router works.
Not that I'm knocking Todd's book, I love his work, but there is a lot to
say about trying it out.
Thanks
Duck
----- Original Message -----
From: Donald B Johnson Jr <[EMAIL PROTECTED]>
To: Dave Page <[EMAIL PROTECTED]>; 'Cisco List' <[EMAIL PROTECTED]>
Sent: Tuesday, August 08, 2000 11:14 AM
Subject: Re: IP classless/Default routes
> I believe that is a mistake in Todd's book. You can only have one default
> gateway set.
> Otherwise the packet would not know where to send the packet.
> Duck
> ----- Original Message -----
> From: Dave Page <[EMAIL PROTECTED]>
> To: 'Cisco List' <[EMAIL PROTECTED]>
> Sent: Monday, August 07, 2000 5:05 PM
> Subject: IP classless/Default routes
>
>
> >
> > In Todd Lammle's book for CCNA 640-407, on p. 202 he has set a default
> route
> > of BOTH 172.16.40.2 and 172.16.20.1. How does one do this, just enter
the
> > IP route command as such, one right after the other (??):
> >
> > ip route 0.0.0.0 0.0.0.0 162.16.40.2
> > ip route 0.0.0.0 0.0.0.0 162.16.20.1
> >
> > ???
> >
> >
> > The reason I ask is that in his book for CCNA 640-507, he states on page
> > 253, "Default routing is used to send packets with a remote destination
> > network not in the routing table to the next hop router. You can only
use
> > default routing on stub networks, which means that they have only one
exit
> > port out of the network."
> >
> > The two books seem to say contradictory things. Is it because the 507
> exam
> > is based on a different IOS? What gives?
> >
> >
> > Dave Page
> >
> > ___________________________________
> > UPDATED Posting Guidelines: http://www.groupstudy.com/list/guide.html
> > FAQ, list archives, and subscription info: http://www.groupstudy.com
> > Report misconduct and Nondisclosure violations to [EMAIL PROTECTED]
>
> ___________________________________
> UPDATED Posting Guidelines: http://www.groupstudy.com/list/guide.html
> FAQ, list archives, and subscription info: http://www.groupstudy.com
___________________________________
UPDATED Posting Guidelines: http://www.groupstudy.com/list/guide.html
FAQ, list archives, and subscription info: http://www.groupstudy.com
Report misconduct and Nondisclosure violations to [EMAIL PROTECTED]