Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What's the benefits of using "ip default-network"

Status
Not open for further replies.

pissallio

IS-IT--Management
Oct 2, 2004
36
CN

I had the following static route added to the route table :
(config)#ip route 198.10.1.0 255.255.255.0 161.44.192.2
2513#show ip route

Gateway of last resort is not set

161.44.0.0/24 is subnetted, 1 subnets
C 161.44.192.0 is directly connected, Ethernet0
131.108.0.0/24 is subnetted, 1 subnets
C 131.108.99.0 is directly connected, Serial0
S 198.10.1.0/24 [1/0] via 161.44.192.2

I can now reach the 198.10.1.0 through 161.44.192.2
After that if i use "ip default-network 198.10.1.0",the output of route table is:

Gateway of last resort is 161.44.192.2 to network 198.10.1.0
161.44.0.0/24 is subnetted, 1 subnets
C 161.44.192.0 is directly connected, Ethernet0
131.108.0.0/24 is subnetted, 1 subnets
C 131.108.99.0 is directly connected, Serial0
S* 198.10.1.0/24 [1/0] via 161.44.192.2

Note that the gateway of last resort is set and the original static route becomes the candidate route.

But i don't understand what's the benefit after using "ip default-network 198.10.1.0" ?
If i dont't use the "ip default-network 198.10.1.0" ,what will be the result ?
Thanks in advance.
 
Ok, don't quote me on this. But the way I understand it (I really don't) Whatever the router 'doesn't know what to do with' it sends it to 198.10.1.0 (the default-network address)... But I'm not sure, anyone wanna clarify?

Alex
 
Don't use a default network... Instead use a default route.

Code:
ip route 0.0.0.0 0.0.0.0 161.44.192.2
 
Im only studying for my CCNA so I may be off

but you are comparing two different commands

your first command 'ip route' will setup a specific route for a specific network.

your second command of ip default-gateway (or the other example of ip route 0.0.0.0....) tells the router what to do if it cannot find a route for traffic. Think of it as "everything else" traffic. If its not taken care of in your routing tables, then send it here.

If you dont use this command it will drop traffic wanting to goto an unknown network.

 
Hi all,

I too am sitting my CCNA and currently in the process of configuring a Cisco 1760 for ADSL access.

I have not set an ip default-gateway on my router and do not have a problem.

The command ip route 0.0.0.0 0.0.0.0 161.44.192.2 defines where to send packets if the destination address is not know by the router. The 0.0.0.0 0.0.0.0 covers any destination ip address and subnet mask, the 161.44.192.2 defines the ip address of where to send the packets.

You can also send the packets to an interface for example ip route 0.0.0.0 0.0.0.0 Dialer1. This would allow all hosts on the network internet access (provided the Dialer interface and NAT are configured of course)

Not sure how much this helps but should answer the question of whether you need the ip default-gateway command

:)
 
ip default-gateway is used moreso if 'ip routing' is disabled


BuckWeet
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top