What Is The Meaning of 0.0.0.0 In Routing Table?

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:

ADVERTISEMENTS

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.

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallCentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
3 comments… add one
  • Mike Dec 5, 2012 @ 20:20

    What does 0.0.0.0 mean in the Gateway column, not Destination? Drop the packet?

    • FIro Oct 28, 2016 @ 2:52

      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.

  • NetLover Feb 22, 2016 @ 21:05

    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

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.