1833772 Members
2121 Online
110063 Solutions
New Discussion

Re: Disabling NIC card

 
SOLVED
Go to solution
Girish_17
Regular Advisor

Disabling NIC card

HI Colleagues,
Can anyone tell me the easiest way of disabling the NIC card (putting it down) of remote machine. I can access the machine with root privileges. Also i should be able to enable it after sometime ( Putting it UP and back in the system).
I know plumbing and unplumbing which is not my objective.
Thanks for your support and replies.
Regards,
16 REPLIES 16
Vishwas Pai
Regular Advisor

Re: Disabling NIC card


I am not giving you a direct answer, but the
following might help if your goal is
different.

1. Write a script and run it in nohup mode.

# cat script

ifconfig lan0 down
sleep 10 / OR some other local logic
ifconfig lan0 up

# nohup ./script

You cannot use this if you want the `up`
action to be externally triggered.

2. If your goal is not to allow any of the
internet-services. Say, ex: telnet.
Then you can disable that service, rather
than disabling the NIC.

You might receive more help if you let the
forum know about your goal.

HTH -vishwas
Stf
Esteemed Contributor

Re: Disabling NIC card

There is different ways to do that

-> # ifconfig lanX down
but on next reboot lanX will be up...

-> in sam go to network and communications->interface cards and select your card then Actions->disable

Stf ;-)
Ralph Grothe
Honored Contributor

Re: Disabling NIC card

Since you know how to plumb and unplumb the NIC, and as you would cut off your remote access as soon as you ifconfig-downed a NIC, I guess this is not viable for you.
Then I would rather have the host receive its NIC settings from a DHCP server on which you can specify the duration of the validity of settings.
Maybe you would want to have a look at the docs

http://docs.hp.com/hpux/onlinedocs/5991-0720/5991-0720.html
Madness, thy name is system administration
Girish_17
Regular Advisor

Re: Disabling NIC card

Thanks for your quick replies but soory i was not able to make my question more clear.

Well, I want to make NIC card physically disabled as if it is down for any hardware problem. And this i wanted to do without physically removing the card.
Then making it physically UP and reusing it.
Unplumbing/"ifconfig lanx down" will remove the IP from the card but then card remains still active.

Hope that clarifies the question and waiting for your further valuable comments.
Regards,
Girish.
Girish_17
Regular Advisor

Re: Disabling NIC card

You can try the lan console (Remote console ,MP login). You can enable or disable the NIC card without loosing the connectivity to the server.
H T H ...
Stf
Esteemed Contributor

Re: Disabling NIC card

Did you try sam method?

Stf
Girish_17
Regular Advisor

Re: Disabling NIC card

please ignore earlier post of mine:
" You can try the lan console (Remote console ,MP login). You can enable or disable the NIC card without loosing the connectivity to the server.
H T H ... "

Any way how do i use SAM in this regards...
Stf
Esteemed Contributor

Re: Disabling NIC card

sam method:

# sam
choose Network and communication->Network interface cards
then with the space bar select the NIC you want to disable
with TAB hgo to Actions->disable
Now you can exit sam

Stf ;-)
Sean OB_1
Honored Contributor

Re: Disabling NIC card

Girish,

I'm not sure I fully understand what you are looking for.

But if I do, unplumb/plumb are likely your best bets.

I know of no way to physically "powerdown" the card so the system doesn't see it.

I suppose you could remove the device files for it, then the system would't be able to communicate with it.

Out of curiousity, can I ask why you want to do this?

Jim Keeble
Trusted Contributor

Re: Disabling NIC card

Hello Girish,

I'm going to make an assumption that you are trying to simulate some sort of electrical link failure for the card. You have correctly observed that "downing" the IP interface is not the same status as the "operational status" as seen by "lanadmin -g
Unfortunately, I don't think there is a way to "fake" this via the hp-ux software. The driver strives to remain up and running if the electrical requirements are met, meaning it is plugged in to a working link partner (switch or hub port) with a good cable.

With HP Procurve switches, I have been able to simulate "link failure" by logging in to the management interface of the switch, and disabling the port that the lan interface is connected to. This effectively turns the port off electrically, and is seen as a cable disconnect or switch power failure by HP-UX.

Hope this helps.

Jim
Todd Whitcher
Esteemed Contributor
Solution

Re: Disabling NIC card


What type of operating system, server and lan/driver are you trying this with? You may have OLAR(online add and replace) available. IF so you can disable the NIC card via SAM.

If you want to simulate a lan card failure w/ out pulling the lan cards cable OLAR would work for you. If you have OLAR available you can down the interface with out a kernel rebuild. OLAR will suspend the driver and disable the power to that slot, then you can re-add it.

Other than that I think Jim has addressed your other questions.

Hope that helps,

Todd
Girish_17
Regular Advisor

Re: Disabling NIC card

Hi Todd.
I am using 11.23update2 version on Itanium servers rx2600.
Is OLAR (is that bundled product?) available on it and if yes can you brief the activity please.
I am not able to login to to server right now otherwise it would been more clear.
Well you guys, todd and Jim got it correctly and thanks to you and all of those who replied.

Waiting for your further response.
Regards,
Girish.
Todd Whitcher
Esteemed Contributor

Re: Disabling NIC card

You can do this in SAM, what OLAR is going to do is suspend the driver and shut off the power to the slot the NIC card is in. I think this will accomplish what you need. I'm guessing your testing some software to see what happens when the interface goes down..Serviceguard or Something else?

Let me know what driver you are testing so I can double check if OLAR is supported for it, most should be at 11.23.

# ioscan -kfnC lan

Todd Whitcher
Esteemed Contributor

Re: Disabling NIC card

Here are the general steps via SAM:

Steps within SAM :
-Start SAM.
-Select Peripheral Devices.
-Select Cards.
-Locate the interface that you wish to replace and highlight it.
-Goto Actions and select Replace.
-SAM will then check the card for "Critical Resource Analysis". I would review the log.
Then select OK.
-You will then get a message from Sam that the attention LED was turned on and that it was safe to replace the card.
-Replace the interface card.
-Once the card is replaced, then select OK.
-SAM will then power the slot and and release the driver to the new card.
Exit Sam.

For your needs you just select o.k. to power it back on. This "may" work for what your trying to accomplish.

Todd
Jim Keeble
Trusted Contributor

Re: Disabling NIC card

Hi Girish,

Todd's idea about OLAR is a good one, but you may run into some stumbling blocks.

1) I'm pretty sure OLAR isn't supported by your rx2600. I think you have to pull the whole card cage out to get at the cards anyway in that box.

2) Even on hardware that supports it, I'm afraid that the status that the OS will report will be some kind of "card not found" or "resource unavailable" error rather than the down operational status you are trying to test.

Anyway, I hope it works out for you !

Jim
Todd Whitcher
Esteemed Contributor

Re: Disabling NIC card

Girish,

I reviewed some of the hardware manuals for the rx2600 and its not clear if it supports OLAR for that PCI card, check sam to see if the otion is available..if so it supports it.

Heres a link to the hardware manuals

http://docs.hp.com/en/hw.html

I'll keep an eye out for your replies.

Todd