What does asterisk meant in route command

4

3

I have two network interfaces present in two different subnets and are configured as DHCP. When I run route command I am getting following output with asterisk in Gateway. What is the meaning of it?

enter image description here

Update : I have cropped the default route in the image

Poorna

Posted 2013-04-10T03:16:11.410

Reputation: 265

Unrelated, but I'd suggest using the -n option to avoid doing DNS lookups, thus making it faster. – lorenzog – 2014-02-03T16:59:19.300

Answers

7

The snowflakes indicate that there is no default route (some other router) to the networks associated with the local interfaces. That is, any IP packet going to any of those networks (subnets) can be reached via the indicated interface (eth0, wlan0, lo).

$ (route ;echo; route -n ) | grep -v '^[KD]'
10.3.0.0        *               255.255.255.224 U     0      0        0 eth0
192.168.0.0     *               255.255.255.0   U     2004   0        0 wlan0
link-local      *               255.255.0.0     U     2      0        0 eth0
loopback        localhost.local 255.0.0.0       UG    0      0        0 lo
default         192.168.0.1     0.0.0.0         UG    2004   0        0 wlan0

10.3.0.0        0.0.0.0         255.255.255.224 U     0      0        0 eth0
192.168.0.0     0.0.0.0         255.255.255.0   U     2004   0        0 wlan0
169.254.0.0     0.0.0.0         255.255.0.0     U     2      0        0 eth0
127.0.0.0       127.0.0.1       255.0.0.0       UG    0      0        0 lo
0.0.0.0         192.168.0.1     0.0.0.0         UG    2004   0        0 wlan0

In other words 10.3.0.0/27 is on eth0 and 192.168.0.0/24 is on wlan0, but to reach anyone else (excluding 127.*), this machine must send stuff to 192.168.0.1

Ярослав Рахматуллин

Posted 2013-04-10T03:16:11.410

Reputation: 9 076

I love the way you call it a snowflake... :) – varun – 2018-04-18T18:01:51.007

6

Just answered a similar question:

Why there is only one Default Gateway?

The "*" or 0.0.0.0 gateway indicates the network is directly reachable - no gateway needed. The default gateway is an address where packets are sent if they don't match a more specific route - i.e. if they are destined for a core router & the broader internet.

Julian

Posted 2013-04-10T03:16:11.410

Reputation: 341

1

From here,

The Gateway column identifies the defined gateway for the specified network. An asterisk (*) appears in this column if no forwarding gateway is needed for the network.

cutrightjm

Posted 2013-04-10T03:16:11.410

Reputation: 3 966

Someone feel free to post another answer, that's all I have, lol – cutrightjm – 2013-04-10T03:28:13.327

1Does that just mean you can directly reach that network over that interface (i.e. an ARP request sent from that interface will get a result?) – cpast – 2013-04-10T03:28:39.433

No idea, that's all I have – cutrightjm – 2013-04-10T03:30:45.197

I found following information in man pages Gateway : The gateway address or '*' if none set. Genmask : The netmask for the destination net; '255.255.255.255' for a host destination and '0.0.0.0' for the default route. How does the interface figures out the default route ? In case if both the interfaces are present in two different subnets, what is the meaning of default route? – Poorna – 2013-04-10T03:37:26.147