Difference between "genmask" and "netmask"?

16,524

According to nixCraft:

Genmask : The netmask for the destination net; 255.255.255.255 for a host destination and 0.0.0.0 for the default route.

It's called 'genmask' because it shows the 'generality' (i.e. the netmask) of the route.

Share:
16,524

Related videos on Youtube

Thomas Hedley
Author by

Thomas Hedley

Foo bar. Baz.

Updated on September 18, 2022

Comments

  • Thomas Hedley
    Thomas Hedley almost 2 years

    In the output of route -n on Linux, you get something like this:

    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    0.0.0.0         10.0.0.1        0.0.0.0         UG    0      0        0 eth0
    10.0.0.0        0.0.0.0         255.255.255.0   U     0      0        0 eth0
    169.254.169.254 0.0.0.0         255.255.255.255 UH    0      0        0 eth0
    

    I know that Genmask refers to the netmask portion of the route, but why is it called "Genmask" instead of "netmask" like it is everywhere else? This is literally the only place I've ever seen "Genmask".

  • Thomas Hedley
    Thomas Hedley about 9 years
    The source of the "generality" thing seems to be the TLDP: tldp.org/LDP/nag/node75.html It's just odd that the output of route seems to be the only place the actual term "genmask" is used. Everywhere else it's "netmask." E.g. in my system's man files, "netmask" shows up 207 times, but "genmask" is only mentioned in the route man page.
  • sage
    sage almost 7 years
    One thing I like about the various unixen is that the primary tools do not typically/deliberately obscure ideas. It is sad to see this use of 'genmask' when 'netmask' would fit just as well in that output.