default netwrok


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users default netwrok
# 1  
Old 05-11-2005
default netwrok

In a system with many NICs
how to detemine the default network

Thanks
# 2  
Old 05-11-2005
The command to find it is probably dependent on the OS you are running - which you didn't post.

Solaris: netstat -nr|grep default or cat /etc/defaultrouter should show you.
# 3  
Old 05-12-2005
Thanks RTM,

Mine is Solaris 5.8
Anyway, the 'default' row in "netstat -rn" output does not show any Interface (which is blank).
/etc/defaultrouter also shows the same.
What I really want to know is the Interface it uses as default.

Thanks!
Chaandana
# 4  
Old 05-12-2005
get the default route with "netstat -rn" and then correlate that with the output from "ifconfig -a" ... the interface showing the same subnet and the lowest device number is most likely your default interface ... (example below shows bge0 as default interface) ...
Code:
ex.   default route = 192.162.123.1
 
       bge0 = ip 192.162.123.21
       bge1 = ip 192.162.123.22
       bge2 = ip 192.162.123.23

# 5  
Old 05-12-2005
The primary interface is the interface to which the primary hostname is assigned.

You can find this by checking what ipaddress in /etc/hosts matches the output from "uname -n". Then doing an ifconfig -a and checking to see which interface is using this ip address.

Given that you do not appear to have a default route I would suggest effectively you do not have a default interface, merely different interfaces to correspond with different networks, each one will onlt communicate with the network to which it is connected, unless you have other static routing defined.
# 6  
Old 05-16-2005
Thank guys

I think now I understand the issue.
I could workout the default interface corresponding to the default hostname.

Cheers!
Chaandana
Login or Register to Ask a Question

Previous Thread | Next Thread

1 More Discussions You Might Find Interesting

1. Solaris

How to install flash archive over the netwrok

Hi Gurus I've to install the flash archive over the network. The archive is created and directory has been shared, what else all i have to do. Once i go to install option on other system and choose FTP( flash archive only) . Will appreciate if some one can help me or directed me towards some... (9 Replies)
Discussion started by: kumarmani
9 Replies
Login or Register to Ask a Question