Operating System - HP-UX
1834149 Members
2384 Online
110064 Solutions
New Discussion

Re: enabling ethernet card through command line

 
Asya
Regular Advisor

enabling ethernet card through command line

Hi,

After installing drivers for the gigabit card, and not yet enabling it, i went into sam and disabled the original card, which obviously killed by SAM GUI (going through xserver through the console).
Now when i go to SAM, it hangs, but eventually gets somewhere. I was wondering if there is any way i could enable the card through the command prompt through ifconfig? If it's even possible to avoid SAM..?

Thanks!
Asya
10 REPLIES 10
Ashwani Kashyap
Honored Contributor

Re: enabling ethernet card through command line

#ifconfig interface up

will enable the card

eg.
#ifconfig lan0 up
Asya
Regular Advisor

Re: enabling ethernet card through command line

Thanks for your prompt response.
But how do i know which interface it is?
lan0 was its original interface..so it will probably just re-enable it?

Thanks,
Asya
Jeff Schussele
Honored Contributor

Re: enabling ethernet card through command line

Hi Asya,

Sure use the following:

ifconfig lanX 111.222.111.222 up

use the appropriate lan instance # & IP of course. And if needed you can set a subnet mask using

netmask 255.255.248.0

or whatever mask is required. Put it after the IP & before the up.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Asya
Regular Advisor

Re: enabling ethernet card through command line

Jeff,

but how do i know which lanx to use?
i mean..how will it know which card to enable..? Sorry if i'm not making any sense.

Thank you,
Asya
Ashwani Kashyap
Honored Contributor

Re: enabling ethernet card through command line

do a
#lanscan

and if you knoe the H/W path or the slot you installed the card in , use the lan number against it .
Jeff Schussele
Honored Contributor

Re: enabling ethernet card through command line

Hi,

You'll have to use ioscan as follows

ioscan -kfnC lan

And match the card's HW path to the instance.
Or use lanscan as pointed out.
If you don't know the HW path, tell us what model of system you have & what slot number it's in.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Tom Maloy
Respected Contributor

Re: enabling ethernet card through command line

You can always use sam's TUI.

DISPLAY=

sam

Should bring up the TUI, lan cards will be presented in the same order as the GUI, might be easier to remember which one it was.
Carpe diem!
Kyri Pilavakis
Frequent Advisor

Re: enabling ethernet card through command line

I am sure a combination of ioscan, lanscan commands already given and the /etc/ifconfig lan0 or lan1 etc should get u what u need..
Bosses don't undestand..HP does
Dan Martin_1
Frequent Advisor

Re: enabling ethernet card through command line

Asya,

Find the card number using lanscan, but then you may need to plumb the interface before configuring it.

ifconfig lan? plumb
ifconfig lan?
netmask broadcast

Then set it up permanently:

cd /etc/rc.config.d
edit either hpgelanconf or hpigelanconf
edit netconf

Both of these files keep the information in a shell array and are self-explanatory. The *gelanconf files allow the card to be plumbed, and the netconf holds tcp/ip address information.
Victor Fridyev
Honored Contributor

Re: enabling ethernet card through command line

Hi,

It seems to me, you can find which of lans was disabled in /etc/rc.config.d/netconf file. Description of the disabled card is commented out.

HTH
Entities are not to be multiplied beyond necessity - RTFM