[Beowulf] How to judge whether an ip address is local or not

Mark Hahn hahn at physics.mcmaster.ca
Mon Aug 15 10:48:37 PDT 2005


> > 	 I need to judge whether an ip address is local in kernel state.
> > 	 Can anyone help me?
> > 	 Great appreciation to any apply.
> 
> What do you mean by "local"?  There are all sorts of ways to learn all
> sorts of pieces of information about ip addresses and network

I thought the query was really "how can I tell if an IP is local,
xor if it requires going through a router".  I have no idea what 
the reference to "kernel state" means - obviously the kernel uses 
the same sequence of increasingly specific routes to determine how 
to handle a packet.  the routes are not privileged (/sbin/ip route show 
works fine as a normal user)




More information about the Beowulf mailing list