What Is The Meaning of 0.0.0.0 In Routing Table?

last updated in Categories

My home Linux laptop is connected to ADSL router and whenever I run route -n command at the prompt it says 0.0.0.0 is set to my routers IP 192.168.1.1. What is the meaning of 0.0.0.0?

Each network host has a default route for each network card. This will create a 0.0.0.0 route for such card. The address 0.0.0.0 generally means “any address”. If a packet destination doesn’t match an individual address in the table, it must match a 0.0.0.0 gateway address. In other words, default gateway is always pointed by 0.0.0.0:
route -n
Sample outputs:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.0.31.18      0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
38.96.196.94    192.168.1.2     255.255.255.255 UGH   0      0        0 wlan0
192.168.84.0    0.0.0.0         255.255.255.0   U     0      0        0 vmnet8
192.168.1.0     0.0.0.0         255.255.255.0   U     2      0        0 wlan0
192.168.110.0   0.0.0.0         255.255.255.0   U     0      0        0 vmnet1
192.168.122.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlan0
10.0.0.0        0.0.0.0         255.0.0.0       U     0      0        0 ppp0
0.0.0.0         192.168.1.2     0.0.0.0         UG    0      0        0 wlan0

192.168.1.2 is my ISP router i.e. default gateway indicated by 0.0.0.0. Other destination such as 10.0.0.0/8 network use ppp0 interface as gateway. If you are MS-Windows user use route print command.

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

3 comment

    1. Gateway with 0.0.0.0 means this route rule do not need a gateway, you pc might connect to other device by a switch/bridge.

  1. The default route in Internet Protocol Version 4 (IPv4) is designated as the zero-address 0.0.0.0/0 in CIDR notation,[1] often called the quad-zero route. The subnet mask is given as /0, which effectively specifies all networks, and is the shortest match possible.

    See full article here: https://en.wikipedia.org/wiki/Default_route

    Have a question? Post it on our forum!