Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Community Member

confused with 'ip default-network' command

Hi,

My lab is configured like this.

R1(s1)----(s1)R2(s2)-----(s2)R3

R1 and R2 are connected via serial1 interfaces and R2 and R3 are connected via serial2 interfaces.

I am confused with 'ip default-network' command. I read a few notes about it and what they explain and what I see when I test it in a lab; has got some differences.

Almost all the notes that I read say;

If I give 'ip default-network 1.1.1.0' command in R2 (because I can reach 1.1.1.0/24 network from R2) I should see a gateway of last resort in R3.

But the reality is a little different from this.

What actually happens is, this doesn't happen when I have given 'no auto-summary' command given in R1 and R2. But if I again say, 'auto-summary' in R1 and R2, then in R3 I see the gateway of last resort set to R2.

My second doubt is, when I give the command 'show ip protocol' in R1 and R2, I see something called, "(this router)" under Gateway. The outputs of show run, show ip route, show ip protocol commands are posted below.

Can someone please clarify this to me?

Thanks in advance!

R1#sh run

Building configuration...

Current configuration : 1115 bytes

!

version 12.1

no service single-slot-reload-enable

service timestamps debug uptime

service timestamps log uptime

no service password-encryption

!

hostname R1

!

!

!

!

!

!

ip subnet-zero

!

!

interface Loopback0

ip address 1.1.1.1 255.255.255.0

!

interface Ethernet0

description First ethernet interface connects to wg_sw_a

no ip address

shutdown

!

interface Serial0

description First serial interface is configured as a DTE interface

bandwidth 64

no ip address

shutdown

no fair-queue

!

interface Serial1

bandwidth 64

ip address 10.10.10.1 255.255.255.0

!

router eigrp 100

network 1.0.0.0

network 10.0.0.0

auto-summary

no eigrp log-neighbor-changes

!

ip classless

ip default-network 1.0.0.0

ip http server

!

end

R1#sh ip route

Gateway of last resort is 0.0.0.0 to network 1.0.0.0

* 1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

D* 1.0.0.0/8 is a summary, 01:09:23, Null0

C 1.1.1.0/24 is directly connected, Loopback0

D 2.0.0.0/8 [90/40640000] via 10.10.10.2, 01:09:04, Serial1

3.0.0.0/24 is subnetted, 1 subnets

D 3.3.3.0 [90/41152000] via 10.10.10.2, 01:09:03, Serial1

D 20.0.0.0/8 [90/41024000] via 10.10.10.2, 01:09:04, Serial1

10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

D 10.0.0.0/8 is a summary, 01:09:24, Null0

C 10.10.10.0/24 is directly connected, Serial1

R1#sh ip protocol

Routing Protocol is "eigrp 100"

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

Default networks flagged in outgoing updates

Default networks accepted from incoming updates

EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0

EIGRP maximum hopcount 100

EIGRP maximum metric variance 1

Redistributing: eigrp 100

Automatic network summarization is in effect

Automatic address summarization:

10.0.0.0/8 for Loopback0

Summarizing with metric 40512000

1.0.0.0/8 for Serial1

Summarizing with metric 128256

Maximum path: 4

Routing for Networks:

1.0.0.0

10.0.0.0

Routing Information Sources:

Gateway Distance Last Update

(this router) 90 01:10:04

10.10.10.2 90 01:09:44

Distance: internal 90 external 170

4 REPLIES
Community Member

Re: confused with 'ip default-network' command

R2#sh run

Building configuration...

Current configuration : 1146 bytes

!

version 12.1

no service single-slot-reload-enable

service timestamps debug uptime

service timestamps log uptime

no service password-encryption

!

hostname R2

!

!

!

!

!

!

ip subnet-zero

no ip domain-lookup

!

!

!

!

interface Loopback0

ip address 2.2.2.2 255.255.255.0

!

!

interface Serial1

bandwidth 64

ip address 10.10.10.2 255.255.255.0

clockrate 64000

!

interface Serial2

bandwidth 64

ip address 20.20.20.1 255.255.255.0

!

router eigrp 100

network 2.0.0.0

network 10.0.0.0

network 20.0.0.0

auto-summary

no eigrp log-neighbor-changes

!

ip classless

ip http server

!

end

R2#sh ip route

Gateway of last resort is 10.10.10.1 to network 1.0.0.0

D* 1.0.0.0/8 [90/40640000] via 10.10.10.1, 01:11:53, Serial1

2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

D 2.0.0.0/8 is a summary, 01:11:58, Null0

C 2.2.2.0/24 is directly connected, Loopback0

3.0.0.0/24 is subnetted, 1 subnets

D 3.3.3.0 [90/40640000] via 20.20.20.2, 01:11:50, Serial2

20.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

D 20.0.0.0/8 is a summary, 01:11:58, Null0

C 20.20.20.0/24 is directly connected, Serial2

10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

D 10.0.0.0/8 is a summary, 01:11:59, Null0

C 10.10.10.0/24 is directly connected, Serial1

R2#sh ip protocols

Routing Protocol is "eigrp 100"

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

Default networks flagged in outgoing updates

Default networks accepted from incoming updates

EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0

EIGRP maximum hopcount 100

EIGRP maximum metric variance 1

Redistributing: eigrp 100

Automatic network summarization is in effect

Automatic address summarization:

20.0.0.0/8 for Loopback0, Serial1

Summarizing with metric 40512000

10.0.0.0/8 for Loopback0, Serial2

Summarizing with metric 40512000

2.0.0.0/8 for Serial1, Serial2

Summarizing with metric 128256

Maximum path: 4

Routing for Networks:

2.0.0.0

10.0.0.0

20.0.0.0

Routing Information Sources:

Gateway Distance Last Update

(this router) 90 01:12:35

10.10.10.1 90 01:12:26

20.20.20.2 90 01:12:25

Distance: internal 90 external 170

Community Member

Re: confused with 'ip default-network' command

R3#sh run

Building configuration...

Current configuration : 1125 bytes

!

version 12.1

no service single-slot-reload-enable

service timestamps debug uptime

service timestamps log uptime

no service password-encryption

!

hostname R3

!

!

!

!

!

!

ip subnet-zero

no ip domain-lookup

!

!

!

!

interface Loopback0

ip address 3.3.3.3 255.255.255.0

!

interface Serial2

bandwidth 64

ip address 20.20.20.2 255.255.255.0

clockrate 64000

!

router eigrp 100

network 3.0.0.0

network 20.0.0.0

no auto-summary

no eigrp log-neighbor-changes

!

ip classless

ip http server

!

end

R3#sh ip route

Gateway of last resort is 20.20.20.1 to network 1.0.0.0

D* 1.0.0.0/8 [90/41152000] via 20.20.20.1, 01:13:47, Serial2

D 2.0.0.0/8 [90/40640000] via 20.20.20.1, 01:13:47, Serial2

3.0.0.0/24 is subnetted, 1 subnets

C 3.3.3.0 is directly connected, Loopback0

20.0.0.0/24 is subnetted, 1 subnets

C 20.20.20.0 is directly connected, Serial2

D 10.0.0.0/8 [90/41024000] via 20.20.20.1, 01:13:47, Serial2

R3#sh ip protocols

Routing Protocol is "eigrp 100"

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

Default networks flagged in outgoing updates

Default networks accepted from incoming updates

EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0

EIGRP maximum hopcount 100

EIGRP maximum metric variance 1

Redistributing: eigrp 100

Automatic network summarization is not in effect

Maximum path: 4

Routing for Networks:

3.0.0.0

20.0.0.0

Routing Information Sources:

Gateway Distance Last Update

20.20.20.1 90 01:14:33

Distance: internal 90 external 170

Community Member

Re: confused with 'ip default-network' command

Aloha Omal,

I am not sure where the confusion is coming from.  But if you look at all three routers you see the default summary route for network 1.0.0.0/8 under the "sh ip route" command.  Also, you see the gateway of last resort has now been set.

R1#sh run
Building configuration...

router eigrp 100
network 1.0.0.0
network 10.0.0.0
auto-summary
no eigrp log-neighbor-changes
!
ip classless
ip default-network 1.0.0.0
ip http server
!

R1#sh ip route

Gateway of last resort is 0.0.0.0 to network 1.0.0.0

*   1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
D*      1.0.0.0/8 is a summary, 01:09:23, Null0

+++++
R2#sh run
Building configuration...

R2#sh ip route

Gateway of last resort is 10.10.10.1 to network 1.0.0.0

D*   1.0.0.0/8 [90/40640000] via 10.10.10.1, 01:11:53, Serial1

+++++
R3#sh run
Building configuration...

R3#sh ip route

Gateway of last resort is 20.20.20.1 to network 1.0.0.0

D*   1.0.0.0/8 [90/41152000] via 20.20.20.1, 01:13:47, Serial2

+++++

Here are few words from a Cisco "pdf" regarding the "ip default-network" command.  Maybe this will help as well.

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.

HTH

Hall of Fame Super Silver

Re: confused with 'ip default-network' command

Hello Omal,

>> What actually happens is, this doesn't happen when I have given 'no auto-summary' command given in R1 and R2. But if I again say, 'auto-summary' in R1 and R2, then in R3 I see the gateway of last resort set to R2.

the ip default-network command requires to use a major network (Class A, B,C) and works by setting a flag in the internal route data structure that tells that this IP network can be used to send packets without a route for their destination.

For this reason you need to use the network command under router eigrp in R1 (you have ip default-network on R1).

From this derives an interaction with auto-summary  settings:

because your loopback emulating the default network has actually a subnet of the major network 1.0.0.0/8 when auto-summary is disabled major network 1.0.0.0/8 is not advertised to EIGRP neighbors, and you don't see the gateway of last resort set on R2 and R3.

By enabling auto-summary the net 1.0.0.0/8 is advertised to R2 and the ip default network command becomes effective.

if you had used ip default network 192.168.3.0 and you had configured ip address 192.168.3.1 255.255.255.0 (mask = major network class this is a Class C) you should be able to see ip default network in action even with auto-summary disabled (no auto-summary).

2)  (this router) from the point  of view of EIGRP process the default network is outside the EIGRP domain and this just means that: at least one route is placed in EIGRP routing domain in local node and it is the default network.

Hope to help

Giuseppe

1037
Views
0
Helpful
4
Replies
CreatePlease to create content