The output of netstat -rn on my FreeBSD virtual machine shows that:

Destination        Gateway            Flags      Netif Expire
default        UGS      vtnet0     link#1             U        vtnet0       link#1             UHS         lo0          link#2             UH          lo0      link#1             UHS         lo0   link#1             U        vtnet0

Given the CIDR of 32, doesn't equal If so, how do packets to the destination address in question decide whether to use lo0 or vtnet0 since there's two different routes defined for that address?


1 Answer 1


The H flag indicates a route to a particular host, which will be used in preference to a route to a subnet.

It looks like the main subnet for vtnet0 is, and is just an alias (hence the /32).

See the manual pages for netstat(1) and route(8).

  • Is the Netif column for the interface that the packet is coming from? As in, any packet passing through lo0 bound for will send it to link#1, and any packet passing through vtnet0 bound for will also send it to link#1? OR, are you saying that it doesn't matter where it comes from, the preferred route will always be the one with UHS flags - in which case what would the Netif value do?
    – papiro
    Commented Feb 12, 2017 at 2:42
  • A packet arriving on any interface for the host has arrived and doesn't need to be routed anywhere. If you need a deeper understanding of the network interface, you could look at The Design and Implementation of the FreeBSD Operating System (book) Commented Feb 12, 2017 at 7:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .