Operating System - HP-UX
1820390 Members
3548 Online
109623 Solutions
New Discussion юеВ

Reset network interface from the command line?

 
Pierre Nguyen
Occasional Contributor

Reset network interface from the command line?

Hi,

Is there a way I can reset the lan1 interface (PPA 1) from the command line?

I can reset it through the landiag menu but there are unresolved problems that HP is still working on that requires me to reset reset the nmetwork interface as a workaround so I need to set it up as a cron job until I have a resolution.

Thank you,
Pierre
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: Reset network interface from the command line?

lanadmin -X 0 100FD

This will even if your current setings are 100 BaseT Full Duplex do a soft reset of the interface.

It will interupt all traffic on the card for up to 11 seconds.

The only other way thats safe would be to bring down networking and bring it back up again.

Thats never worked for me and the next step would be init 1 followed by init 3 which is almost a reboot anyway.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
TOMAS BERNABEU
Frequent Advisor

Re: Reset network interface from the command line?

Hi Pierre !

you know landiag? He is simple to use.

Tom
TOMAS BERNABEU
Frequent Advisor

Re: Reset network interface from the command line?


ifconfig with " down " option.
Carlo Montanari
Advisor

Re: Reset network interface from the command line?

echo "lan\nnmid 1\nreset\ny\n" | lanadmin

bye
rick jones
Honored Contributor

Re: Reset network interface from the command line?

The idea of setting the speed and duplex is rather clever - I'd probably script it though so it retrieves the current setting - it would be a shame to make a FD link HD or whatnot.

I'm not certain it will follow a full reset path though.

Ifconfig down will not cause a driver/NIC reset, it will simply unbind the IP and ARP SAPs from the driver.

The other way is as pointed-out to echo all the right things to an lanadmin command.

If you have a chance, have the HP folks with whom you are working submit an enhancement/defect against lanadmin to allow for device reset from the command line.
there is no rest for the wicked yet the virtuous have no pillows