2

I am reading a document:

The default gateway generally refers to the 0.0.0.0/0 route, which is used when there is no clear routing entry to a destination address.

How to understand this sentence?

3 Answers 3

3

All IPv4 networks are subnets of the 0.0.0.0/0 network, so in a routing table that network matches any IPv4 network, making it a default network.

If the destination address on a packet does not match any network in a routing table, the router will simply drop the packet. A route pointing to 0.0.0.0/0 matches the network of any destination address. Such an entry in the routing table can be used so that no packets get dropped because any packet with a destination address not matching any other routing table entry will be sent toward the next hop of the 0.0.0.0/0 routing table entry, rather than being dropped.

1

The "default gateway" or "default route" is a route of last resort. 0.0.0.0/0 matches every possible IPv4 address, but it also has the shortest possible prefix, so following the "longest prefix match" rules it will only be used if no more-specific route matches.

This allows you to have a much smaller routing table, rather than having routes for every network on the internet (750K or so nowadays) you just have routes for your downstream network and then a default route that essentially says "the internet is this way".

Of course there are some routers where it is nessacery or desirble to have a routing table for the full Internet, but generally such routers are a minority.

0

The default gateway generally refers to the 0.0.0.0/0 route, which is used when there is no clear routing entry to a destination address

As per above sentences ! Default route is configured as when packets wants to reach unknown destination this default route is configured . Generally in real time default route is mostly configured to route internet traffic . When users wants to acces resources on internet with domains . Users it's might don't know which IP address it's resolve to what is destination ip address in this case traffic is routed towards ISP with default route configured in perimeter device.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.