Getting Network Interface details in solaris

Hi,

/sbin/ifconfig -a

when i login as guest user , output like below,

lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
eri0: flags=1004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4> mtu 1500 index 2
        inet 192.168.118.232 netmask ffffff00 broadcast 192.168.118.255

As root login, output like below,

lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
eri0: flags=1004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4> mtu 1500 index 2
        inet 192.168.118.232 netmask ffffff00 broadcast 192.168.118.255
        ether 0:3:ba:3a:27:cb

whether the ether can get only in root login or do i need to give proper command ?

what arguments i need to give in ifconfig -a to get the ether value as guest login

Please guide me.

Which solaris version you are using?

You can try to grep the information out of the output of the arp-command, like:

$ /usr/sbin/arp -an | grep 10.10.49.73
e1000g0 10.10.49.73          255.255.255.255 SPLA     00:1b:21:24:99:32

grep for the primary IP address of the interface, the MAC address is the last field in the output.

1 Like

it works for me!

Thanks for valuable reply. I can get through arp command.

Is it not possible to get the ether value through ifconfig ?

Am using three types of solaris machine.

Machine 1 : SunOS 5.10 Generic_118833-33
Machine 2 : SunOS 5.10 Generic_127127-11
Machine 3 : SunOS 5.10 Generic_137138-09

You need to be root (or have at least the required RBAC privileges) to get them through ifconfig.