1833777 Members
2126 Online
110063 Solutions
New Discussion

Re: Is it Logical IP?

 
SOLVED
Go to solution
maria paschali
Frequent Advisor

Is it Logical IP?

Hi,

I need help. I am not sure how to bind an additional IP address to my box running HPUX 11.0.

We are undergoing network changes and I need to add an additional IP/Gateway/DNS address to the interface. (Only have one interface).

I was thinking of using the ifconfig command but I am not sure if this is the correct way to do it.

If anyone can help me I would appreciate it.

I hope this makes sense.

Maria
11 REPLIES 11
Sridhar Bhaskarla
Honored Contributor
Solution

Re: Is it Logical IP?

Hi Maria,

Did you try like this?.

ifconfig lan0:1 IP_address

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
maria paschali
Frequent Advisor

Re: Is it Logical IP?

Hi,

no i haven't tried anything yet. I was too scared to. (LOL) as this is my first time doing it and thought to get some advice first.

Question. This will not stop packets from going to the existing IP address? When the change over occurs will the new IP address accept packets? How do I check/test to see if it is working ok?

Can you tell i haven't done this before?

Maria
James R. Ferguson
Acclaimed Contributor

Re: Is it Logical IP?

Hi Maria:

I believe that Sri has pointed you in one possible direction. Have a look at the man pages for 'ifconfig' for (a little) more information.

In addition, you may want to consider "Auto-Port Aggregation" [APA] software. It permits load-balancing as well as high-availablity and the use of a single IP address:

http://www.hp.com/products1/unixserverconnectivity/software/info_library.html

Regards!

...JRF...
Michael Tully
Honored Contributor

Re: Is it Logical IP?

Hi Maria,

This should work.

ifconfig lan0:1 netmask

Examples:
if config lan0:1 172.16.12.61 netmask 255.255.255.0

Cheers
-Michael
Anyone for a Mutiny ?
Sridhar Bhaskarla
Honored Contributor

Re: Is it Logical IP?

Maria,

It's official and should work. It is not going to stop packets coming to the existing IP. Also you will need to add entries to your netconf file to make it permanent like

INTERFACE_NAME[1]="lan0:1"
IP_ADDRESS[1]=10.10.10.1
SUBNET_MASK[1]=255.255.255.0

Ping to this IP from other machine. You can also use ifconfig command to look at the status. If you have a test system, you can do that on it to make yourself comfortable.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
maria paschali
Frequent Advisor

Re: Is it Logical IP?

Hi again,

Thanks for all your responses. I appreciate them.

However, How do you tell it to use a different gateway and a DNS? I can't seam to do that with ifconfig.

for example: say my currnt ip address is 192.*.*.* g/w 192.*.*.1 DNS 220.*.*.*

andi want to change the ip address to 10.*.*.* the gateway to 10.*.*.1 and the DNS to 34.*.*.*

ifconfig lan0:1 10.*.*.* works however I am not sure How I would go about adding the new gateway and dns.

or have i totally confused myself?

thanks again
Michael Tully
Honored Contributor

Re: Is it Logical IP?

Hi Maria,

You can't set the DNS from the ifconfig command
as far as I know. You would need to change it
in your /etc/resolv.conf file. Make sure that
your using a 10.x.x.x address that you
change your subnet mask to 255.255.0.0 as this
has now become a 'B' class address.

ifconfig lan0:1 10.x.x.x netmask 255.255.0.0
As far as the routing table is concerned you will need to use the 'route' command to not only create a new default route but delete the old one.

# route add default 10.x.x.x
# route delete default 192.x.x.x

HTH
-Michael
Anyone for a Mutiny ?

Re: Is it Logical IP?

Maria,

You can specify an additional default gateway, but it won't ever actually get used until the first gateway dies (i.e. doesn't respond to ICMP echo requests). SO if you are intending to have a transition period where some traffic bound for other subnets goes out on the old subnet, and some on the new then you will either need to configure static routes to manage this, or alternatively look to use gated in a passive mode where it listens for and updates routing information, but does not broadcast/advertise routes itself (this can be complex to set up as you will quickly find if you look at the gated.conf man page).

With regards to DNS, theres nothing to stop you adding a second DNS nameserver entry in /etc/resolv.conf, but again it won't be used unless the first DNS server is not responding (or it can't resolve the hostname/ip address passed).

When I've gone through similar exercises, I have always put the onus on the network guys to manage all routing changes until you can completely switch over to the new gateway/subnet/DNS config (after all that is what they are paid to do!)

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Sridhar Bhaskarla
Honored Contributor

Re: Is it Logical IP?

Hi Maria,

There will be only one default gateway defined on the system. If you need to specify a different route, then it's going to be a static route on the system and you should be using "route add" command.

add destination [netmask mask] gateway [metric]

The show stopper here is the destination.

There cannot be two DNS servers on the system resolving two different networks at the same time. Your primary DNS server should be able to take care of it.

-Sri

You may be disappointed if you fail, but you are doomed if you don't try
Steve Edmunds
Occasional Advisor

Re: Is it Logical IP?

In other words, what you are talking about is
to add an IP alias that is in another network.

All the answers previous are correct, you cannot have more than one default route (which
one would then be default? ;->) you will need to add a static route for the new psuedo-
interface as already described, or it can be
learned via RIP/RIPv2 etc. assuming updates
are coming from someone on the network.
Also a sensible netmask(probably the same as
the other one) and broadcast addr.
As for DNS, like someone already said, the server already defined should be okay you can
add more servers if you wish as backup, but that is system-wide not I/F specific.
Same also goes for NIS, so long as you can
bind to a NIS server somewhere (either I/F)
you should be fine.

The reasons why you'd normally need to be on
2 networks (via same piece of wire) could be
many, I suspect you are not doing it to make
this box a router for the other logical
network, so it must be related to your
topology requirements, you don't say.


Hope this makes it all a little clearer :)

Steve
Anil C. Sedha
Trusted Contributor

Re: Is it Logical IP?

Maria,

Sridhar has pointed out right. Add the entry in your netconf file under the existing route details. make sure that if the previous entries are for interface "0" then you put the new interface address as 1 or something else.

Then do a route add command like

route add netmask <255.*.*.*> gateway <*.*.*.*> 0


regards,
anil
If you need to learn, now is the best opportunity