Ok... Here you go! Let say that you have 2 routers (R1, R2) This doesn't include other interfaces, just enough to give you the idea.
inter lo10 ip add 2.2.0.0 255.255.0.0 R1 router eigrp 1 no auto network 2.2.0.0 0.0.255.255 ip default-network 2.2.0.0 When you look at R2s routing table you will see a little "*" indicating that it the default network. R2#sh ip route 2.2.0.0 D* 2.2.0.0/16 HTHs On Jun 22, 2010, at 4:16 PM, Mustafa Yadav wrote: > Hi Adrian, > > Thanks.You explained very clearly especially for how to create static route > and advertise this as a default route.But without adding manuel static route > as far as I understood from your mail by using ip defalut-network a static > route has to be created automaticly.I was unable to create this static route > automaticly.Can it be change relase to releaase? > > r5#conf t > Enter configuration commands, one per line. End with CNTL/Z. > r5(config)#ip de > r5(config)#ip def > r5(config)#ip default-n > r5(config)#ip default-network 9.9.9.9 > r5(config)#end > r5#sh ip route > *Mar 2 07:05:22.796: %SYS-5-CONFIG_I: Configured from console by console > Codes: C - connected, S - static, 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 > i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 > ia - IS-IS inter area, * - candidate default, U - per-user static route > o - ODR, P - periodic downloaded static route > > Gateway of last resort is not set > > 1.0.0.0/24 is subnetted, 1 subnets > D EX 1.1.1.0 [170/2560002816] via 20.0.0.1, 09:28:49, FastEthernet0/0 > 3.0.0.0/24 is subnetted, 1 subnets > D EX 3.3.3.0 [170/2560002816] via 20.0.0.1, 09:28:49, FastEthernet0/0 > 20.0.0.0/24 is subnetted, 1 subnets > C 20.0.0.0 is directly connected, FastEthernet0/0 > 10.0.0.0/24 is subnetted, 2 subnets > D EX 10.1.13.0 [170/2560002816] via 20.0.0.1, 09:28:49, FastEthernet0/0 > D EX 10.11.11.0 [170/2560002816] via 20.0.0.1, 09:28:49, FastEthernet0/0 > r5# > r5# > r5#conf t > Enter configuration commands, one per line. End with CNTL/Z. > r5(config)#int lo > r5(config)#int loopback 0 > r5(config-if)#ip add > r5(config-if)#ip address > *Mar 2 07:05:41.412: %LINEPROTO-5-UPDOWN: Line protocol on Interface > Loopback0, changed state to up9.9.9.9 255.255.255.0 > r5(config-if)#end > r5#sh ip route > Codes: C - connected, S - static, 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 > i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 > ia - IS-IS inter area, * - candidate default, U - per-user static route > o - ODR, P - periodic downloaded static route > > Gateway of last resort is not set > > 1.0.0.0/24 is subnetted, 1 subnets > D EX 1.1.1.0 [170/2560002816] via 20.0.0.1, 09:29:17, FastEthernet0/0 > 3.0.0.0/24 is subnetted, 1 subnets > D EX 3.3.3.0 [170/2560002816] via 20.0.0.1, 09:29:17, FastEthernet0/0 > 20.0.0.0/24 is subnetted, 1 subnets > C 20.0.0.0 is directly connected, FastEthernet0/0 > 9.0.0.0/24 is subnetted, 1 subnets > C 9.9.9.0 is directly connected, Loopback0 > 10.0.0.0/24 is subnetted, 2 subnets > D EX 10.1.13.0 [170/2560002816] via 20.0.0.1, 09:29:17, FastEthernet0/0 > D EX 10.11.11.0 [170/2560002816] via 20.0.0.1, 09:29:17, FastEthernet0/0 > r5# > *Mar 2 07:05:50.788: %SYS-5-CONFIG_I: Configured from console by console > > > On Tue, Jun 22, 2010 at 10:16 PM, Adrian Daniel Simionov > <[email protected]> wrote: > I hope this example will make U understand how to configure this tricky > command: > > I would like to advertise a default route of 9.9.9.99 to every eigrp router: > > First create a default static route with the classfull network U are > trying to advertise: > > There are two methods for creating this static route: > > One is using the > #ip default-network 9.9.9.9 > command > Which will create a static route for you. > > Another method is by creating the static route by yourself. > > BB2#configure terminal > Enter configuration commands, one per line. End with CNTL/Z. > BB2(config)#ip route 9.0.0.0 255.0.0.0 9.9.9.99 > BB2(config)#end > BB2#sh > *Jun 22 21:42:42.851: %SYS-5-CONFIG_I: Configured from console by console > BB2#sh ip route > Codes: L - local, C - connected, S - static, 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 > i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 > ia - IS-IS inter area, * - candidate default, U - per-user static route > o - ODR, P - periodic downloaded static route, + - replicated route > > Gateway of last resort is not set > > 10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks > C 10.0.0.0/24 is directly connected, FastEthernet0/0 > L 10.0.0.1/32 is directly connected, FastEthernet0/0 > C 10.10.10.0/24 is directly connected, FastEthernet0/0 > L 10.10.10.1/32 is directly connected, FastEthernet0/0 > BB2# > > As U can see this static route is not in the routing table. Because we > don;t have a connected interface in this subnet. Now let;s add one: > > BB2(config-if)#ip address 9.9.9.9 > *Jun 22 21:44:41.251: %LINK-3-UPDOWN: Interface Loopback1, changed state to up > *Jun 22 21:44:42.251: %LINEPROTO-5-UPDOWN: Line protocol on Interface > Loopback1, changed state to up > BB2(config-if)#ip address 9.9.9.9 255.255.255.0 > BB2(config-if)#end > BB2# > *Jun 22 21:44:48.771: %SYS-5-CONFIG_I: Configured from console by console > BB2#sh ip route > Codes: L - local, C - connected, S - static, 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 > i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 > ia - IS-IS inter area, * - candidate default, U - per-user static route > o - ODR, P - periodic downloaded static route, + - replicated route > > Gateway of last resort is not set > > 9.0.0.0/8 is variably subnetted, 3 subnets, 3 masks > S 9.0.0.0/8 [1/0] via 9.9.9.99 > C 9.9.9.0/24 is directly connected, Loopback1 > L 9.9.9.9/32 is directly connected, Loopback1 > > As U can see, now we have this static route in the routing table. Now > let;s mark this one as a candidate default route: > The following command will ONLY work if we have a static route in the > routing table > (created with another ip default-network command or with ip route command) > Why? Ask CISCO ! > > BB2(config)#ip default-network 9.0.0.0 > BB2(config)#end > BB2#sh i > *Jun 22 21:46:03.119: %SYS-5-CONFIG_I: Configured from console by console > BB2#sh ip route > Codes: L - local, C - connected, S - static, 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 > i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 > ia - IS-IS inter area, * - candidate default, U - per-user static route > o - ODR, P - periodic downloaded static route, + - replicated route > > Gateway of last resort is 9.9.9.99 to network 9.0.0.0 > > S* 0.0.0.0/0 [1/0] via 9.9.9.99 > * 9.0.0.0/8 is variably subnetted, 3 subnets, 3 masks > S* 9.0.0.0/8 [1/0] via 9.9.9.99 > C 9.9.9.0/24 is directly connected, Loopback1 > L 9.9.9.9/32 is directly connected, Loopback1 > > Now this route is a default route for us, let;s make a check on eigrp > neighbor BB1: > > BB1#sh ip route > Codes: L - local, C - connected, S - static, 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 > i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 > ia - IS-IS inter area, * - candidate default, U - per-user static route > o - ODR, P - periodic downloaded static route, + - replicated route > > Gateway of last resort is not set > > 10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks > C 10.0.0.0/24 is directly connected, FastEthernet0/0 > L 10.0.0.2/32 is directly connected, FastEthernet0/0 > D 10.10.10.0/24 [90/30720] via 10.0.0.1, 00:54:29, FastEthernet0/0 > > This router is not having a default candidate yet. > For this to happen, we need to advertise this static route from BB2, > which is a default candidate for BB2 only now, into eigrp, using > redistribute static: > > BB2(config)#router eigrp 1 > BB2(config-router)#redistribute static > > And now let's check the routing table on BB1: > > BB1#sh ip route > Codes: L - local, C - connected, S - static, 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 > i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 > ia - IS-IS inter area, * - candidate default, U - per-user static route > o - ODR, P - periodic downloaded static route, + - replicated route > > Gateway of last resort is not set > > D*EX 9.0.0.0/8 [170/156160] via 10.0.0.1, 00:01:04, FastEthernet0/0 > > Voila, this route is here, marked as a default candidate route. > > Hope this clarified everything about the usage of this command. > _______________________________________________ > For more information regarding industry leading CCIE Lab training, please > visit www.ipexpert.com > > _______________________________________________ > For more information regarding industry leading CCIE Lab training, please > visit www.ipexpert.com
_______________________________________________ For more information regarding industry leading CCIE Lab training, please visit www.ipexpert.com
