Operating System - HP-UX
1822147 Members
4107 Online
109640 Solutions
New Discussion юеВ

How to remove the virtual IP from the LAN ?

 
SOLVED
Go to solution
Kennethyap
Frequent Advisor

How to remove the virtual IP from the LAN ?

Dear Experts,
I have used "#ifconfig lan1:1 10.1.1.14" added a virtual IP to the LAN. I activated the virtual IP then working OK.
How to remove the virtual IP from the LAN by command ?
I have try "#route delete 10.1.1.14" but can't remove its.
5 REPLIES 5
bhavin asokan
Honored Contributor
Solution

Re: How to remove the virtual IP from the LAN ?

hi,

not sure.just try
ifconfig lan1:1 0.0.0.0

regds,
Thierry Poels_1
Honored Contributor

Re: How to remove the virtual IP from the LAN ?

hi,

reboot? ;-)
or "ifconfig lan1:1 down" will at least disable it.

regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Stf
Esteemed Contributor

Re: How to remove the virtual IP from the LAN ?

Hello,

edit /etc/rc.config.d/netconf

Remove or comment all the lines that correspond to
INTERFACE_NAME[X]="lan1"

Do a :
# /sbin/init.d/net stop
# /sbin/init.d/net start

Stf ;-)
Kennethyap
Frequent Advisor

Re: How to remove the virtual IP from the LAN ?

The server cannot reboot b'cos on production.
I used ifconfig to add-in the IP bind it to lan1.
Bharat Katkar
Honored Contributor

Re: How to remove the virtual IP from the LAN ?

Hi,
man ifconfig in it's unplumb option says:

" Tear down the Streams plumbing for
a primary interface name. (See
the Interface Naming subsection
given below.) Secondary interface
does not require "plumbing". A
secondary IPv4 interface can be
removed by assigning an IP address
of 0.0.0.0 to it. Remove a
secondary IPv6 interface by
assigning an IP address of :: to
it. "

And in the next para:

"To disable communication through a specific IP address on an
autoconfigured secondary interface, that secondary interface should be
marked down, not removed or overwritten with a different IP address.
If that interface is removed or overwritten, the host will reconfigure
another secondary interface with the same IP address when it receives
the next router advertisement. Alternatively, the router can be
configured to stop advertising the prefix that corresponds to the
offending IP address."

So the two possible ways of doing it is:

#ifconfig lan0:2 down
OR
#ifconfig lan0:2 0.0.0.0

Hope that clarifies.
Regards,
You need to know a lot to actually know how little you know