IP default-network command is driving me insane

MrXpertMrXpert Member Posts: 586 ■■■□□□□□□□
Hello
I am have major problems with IP default-network command to the extent I don't seem to know whether i am coming or going icon_sad.gif

My understanding of it is is that its used within EIGRP or RIP?
And you use it to specify a single exit point but in order for it to work the route to that network must already exist in the router's routing table. It then propagates the default route to other routers via a routing protocol.
Although i have the basics down i just can't seem to get it working.

Can anyone perhaps take me through the basics of setting it up? an idiots guide to it?
I'm an Xpert at nothing apart from remembering useless information that nobody else cares about.

Comments

  • NetworkVeteranNetworkVeteran Member Posts: 2,338 ■■■■■■■■□□
    Sure. Suppose you have a network like so--


    10.1.0.0/16
    RouterA
    10.2.0.0/16
    RouterB
    1.0.0.0/8
    ISP

    On RouterB, you would enter "ip default-network 1.0.0.0" to indicate that 1.0.0.0 is the way out of the local AS. When RouterB advertises 1.0.0.0/8 to RouterA, it will set a bit to indicate the same.

    Now go lab the command so you can really get its intracacies!
  • poguepogue Member Posts: 213
    Keep in mind, I believe this is a "classful" command, so using

    ip default-network 1.1.1.0

    will not work without further tweaking.

    If you have no auto-summary configured in EIGRP, then the classful networks may not be advertised to the other routers in the domain. In this case, you may have to configure a static route to the classful network in question, redistribute ths static route into EIGRP, and THEN flag this network as the default route with the ip default-network command.

    This was a little confusing to me as well when I was studying, so hopefully I got this right and it is helpful.

    Russ
    Currently working on: CCNA:Security
    Up next: CCNA:Voice
  • MrBrianMrBrian Member Posts: 520
    When you use the default-network command you're just telling the router to use a classful network in the routing table as the default route/default network/gateway of last resort, whatever you want to call it.. so when it has a packet to send, and it's not in the routing table, it will send it to the next hop used for that network. So with a static default route (0.0.0.0/0 a.b.c.d), you're saying for any packet not matched, send it to this next hop (or exit interface).. but with the default-network, you're flagging a network to be the default.. and the important part is the next hop used to get to that network. For example, if you flagged the 10 network, and it's in your table as a /8, the routing table will say "Gateway of last resort is a.b.c.d to network 10.0.0.0." When the router has something to send that doesn't match anything, it will then look at this network, and forward the packets to the next hop IP used to reach that network.

    NOTE: in order for it to work, the network has to be classful. So if you have a 10.0.0.0/16.. it won't take(it would have to be / 8... it's funky in that way.

    Here's a vid that helped me a lot at first. This guy Keith has tons of vids and they're all money.
    Default-Gateway vs Default-Network Cisco - YouTube
    Currently reading: Internet Routing Architectures by Halabi
  • MrXpertMrXpert Member Posts: 586 ■■■□□□□□□□
    Thanks a bunch for all your help. I'm getting a bit more familiar with it now. It's a funny old command.
    I'm an Xpert at nothing apart from remembering useless information that nobody else cares about.
Sign In or Register to comment.