1819817 Members
3101 Online
109607 Solutions
New Discussion юеВ

netstat flags

 
David Lewis_1
Advisor

netstat flags

Could anyone please advise as to what the D flag means from the output of a 'netstta -rn' command
3 REPLIES 3
Helen French
Honored Contributor

Re: netstat flags

Actually the meaning of 'D' flag was there on 10.20 but not in 11.X. The man page says "If the flag field shows a D, then the route was created dynamically by a redirect or by Path MTU Discovery'
Life is a promise, fulfill it!
Fabio Ettore
Honored Contributor

Re: netstat flags

Hi,

I think that you see that with UGH flags too.
From man netstat (documented in HP-UX 10.X only):

*******************************
The routing table display indicates the available routes and their status. Each route consists of a destination host or network, a netmask and a gateway to use in forwarding packets. The Flags field shows whether the route is up (U), whether the route is to a gateway (G), whether the route is a host or network route (with or without H), whether the route was created dynamically (D) by a redirect or by Path MTU Discovery, and whether a gateway route has been modified (M), or it has been marked doubtful (?) due to the lack of a timely ARP response.
*******************************

It is not documented anymore in HP-UX 11.X.

There is a workaround to delete them:

# netstat -rn | awk '$3=/UGHD/ {system ("route delete "$1" "$2" ")}'


I hope this helps you.

Best regards,
Ettore
WISH? IMPROVEMENT!
Sergejs Svitnevs
Honored Contributor

Re: netstat flags

route flags

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
C RTF_CLONING Generate new routes on use
c RTF_PRCLONING Protocol-specified generate new routes on use
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
W RTF_WASCLONED Route was generated as a result of cloning
X RTF_XRESOLVE External daemon translates proto to link address

Regards,
Sergejs