What is the UH flag in routing table

12,149

TL;DR UH flags in routing tables means:

  • U: route is up
  • H: this is a route to a single host (and not a network)

The different flags are:

 1      RTF_PROTO1       Protocol specific routing flag #1
 2      RTF_PROTO2       Protocol specific routing flag #2
 3      RTF_PROTO3       Protocol specific routing flag #3
 B      RTF_BLACKHOLE    Just discard pkts (during updates)
 b      RTF_BROADCAST    The route represents a broadcast address
 D      RTF_DYNAMIC      Created dynamically (by redirect)
 G      RTF_GATEWAY      Destination requires forwarding by intermediary
 H      RTF_HOST     Host entry (net otherwise)
 L      RTF_LLINFO       Valid protocol to link address translation
 M      RTF_MODIFIED     Modified dynamically (by redirect)
 R      RTF_REJECT       Host or net unreachable
 S      RTF_STATIC       Manually added
 U      RTF_UP       Route usable
 X      RTF_XRESOLVE     External daemon translates proto to link address

You will find a discussion on their meaning here for example.

Share:
12,149

Related videos on Youtube

Manny265
Author by

Manny265

Updated on September 18, 2022

Comments

  • Manny265
    Manny265 almost 2 years

    I'm using an Ubuntu machine as a server and it has two network interfaces. One is the 10.10.10.0/ 24 range and the other is 192.168.0.0 /24 range. I was trying to bridge these network interfaces as the second one has internet. I used the Network Connections options by selecting the Share Internet option and it did not work. I undid the changes and instead used a script that enable IP forwarding and added a masquerade option in the IP tables. But now everytime the 10.10.10.0 /24 is started the 192.168.0.0 /24 interface is flagged as UH and is unusable until I run a script to remove all default gateways and readd the 192 one. What could be the cause of this and how do I get rid of it? This is the output from IP routing table

  • Manny265
    Manny265 about 8 years
    why does it only show up when the 10 network is up and then I cannot access the 192.168.0.1 host until I run those scripts removing the default gateway and readding one.
  • T_S_
    T_S_ about 8 years
    I don't really know, what is your IP forwarding script ?
  • Manny265
    Manny265 about 8 years
    this occurs as soon as the 10 interface comes up and the 192 is already connected way before I run the scripts.