Network interface configuration



Hi all,

I am trying to configure the network interface in a Solaris 10
workstation (I had skipped this step during installation). This is the
first time I'm doing this. I did read up some articles, man page and
older posts in this newsgroup, but still a little confused about the
exact steps to follow.

I understand that I have to configure the interface by the following
command line:
# ifconfig e1000g0 xx.yy.zz.ww broadcast xx.yy.zz.255 netmask
255.255.255.0 plumb up

1. To run the above command, I need the IP address xx.yy.zz.ww of the
host. I'm trying to get it through DHCP. I followed the instructions at
this webpage: http://www.rite-group.com/consulting/solaris_dhcp.html
(create the files /etc/hostname.e1000g0 and /etc/dhcp.e1000g0 manually
and reboot). After reboot, I was expecting that the IP address for this
interface will be shown. But this is what I got:
# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu
8232 index 1
inet 127.0.0.1 netmask ff000000
e1000g0: flags=1004802<BROADCAST,MULTICAST,DHCP,IPv4> mtu 1500 index 2
inet 0.0.0.0 netmask 0
ether 0:3:ba:f1:3f:fe

At this point I figured that I could have done the same as above using
ifconfig command itself, so wanted to see if it makes any difference
(that is, if it can assign the IP address). So my next command was:
# ifconfig e1000g0 auto-dhcp primary wait 120
ifconfig: e1000g0: interface currently has a pending command (try
later)

Confused, I wanted to see if the following command would work.
# ifconfig e1000g0 plumb
ifconfig: SIOCSLIFNAME for ip: e1000g0: already exists

So how do I get the IP address?

2. How do I know the name of the network interface? It took me some
time (reading older posts and checking /etc/drivers_aliases) to figure
out that it is e1000g0 in my case. Is there an easier way?

Thanks for your help.

.



Relevant Pages

  • Re: Desired behaviour of "ifconfig -alias"
    ... ifconfig bce0 -alias ... It turns out that this command eliminated the primary IP for the ... are running in automated scripts, ... an interface are equal, just like hardlinks on a file. ...
    (freebsd-stable)
  • [Summary] ifconfig & adding an IP to a live system
    ... Consensus was ifconfig on live system should work. ... interface. ... like before/after each command. ... I have a critical server that I need to add an IP to. ...
    (SunManagers)
  • Re: Adding Virtual IP Address
    ... Linux run through the ip command. ... ifconfig uses ip for relatively ... simple tasks but has not been re-written to interface with ip to ... and I don't understand all the ramifications myself -- another gotcha ...
    (comp.os.linux.networking)
  • Re: Adding Virtual IP Address
    ... down the interface using the following command as u mentioned, ... vain. ... 'ifconfig eth0:1 down' ...
    (comp.os.linux.networking)
  • Re: AIX 1.3 Failures and Fables
    ... Found this in #man ifconfig ... " The address family default is DARPA Internet. ... Configures network interface parameters. ...
    (comp.sys.ibm.ps2.hardware)