What is the UH flag in routing table

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

1 Answer

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.

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like