Operating System - HP-UX
1754336 Members
2564 Online
108813 Solutions
New Discussion юеВ

netstat -rn / host ip address and network-id ??

 
centurion
Frequent Advisor

netstat -rn / host ip address and network-id ??

Why is the host-ip (192.168.0.38) and the network-id (192.168.0.0) in the "netstat -rn" visible? What is the use of this?


root@myhost [/]# netstat -rn
IPv4 Routing tables:
Destination Gateway Flags Refs Interface Pmtu
192.168.0.0 192.168.0.38 U 3 lan2 1500
default 192.168.0.1 UG 0 lan2 0
127.0.0.0 127.0.0.1 U 0 lo0 0
2 REPLIES 2
Ganesan R
Honored Contributor

Re: netstat -rn / host ip address and network-id ??

Hi,

Command is designed to produce that results as simple as that.

See the explanation from man page..

-n --> Show network addresses as numbers. Normally, netstat interprets addresses and attempts to display them symbolically.



-r -->Show the routing tables.

>>>Why is the host-ip (192.168.0.38) and the network-id (192.168.0.0) in the "netstat -rn" visible? What is the use of this?<<<

It means, system will transfer all the packets having the destination of 192.168.0.0 via the ip 192.168.0.38.

As a example, if you try to ping 192.168.x.x series ip, system will send the packet through gateway 192.168.0.38 to reach the destination.

Hope you understand now.
Best wishes,

Ganesh.
centurion
Frequent Advisor

Re: netstat -rn / host ip address and network-id ??

Thank you..