Operating System - HP-UX
1833776 Members
2184 Online
110063 Solutions
New Discussion

Re: Alias multiple IPs to one card, 11.i systems

 
Richard Pereira_1
Regular Advisor

Alias multiple IPs to one card, 11.i systems

Hi,

My customer will be changing service provider and his network addresses will change from 32.x.x.x to 10.x.x.x but in progressive steps since there are multiple sites. he would like his users be able to access the same 11.i servers with both new and old IPs until the transition is complete.

Can I use ifconfig to create a virtual device to listen to the new IP on the fly? can this also work with my serviceguard related IPs?

Thanks in adv,
Richard
12 REPLIES 12
Patrick Wallek
Honored Contributor

Re: Alias multiple IPs to one card, 11.i systems

I don't think having IP addresses in different subnets on the same card will work.

By the way, your customers internal IP addresses should never be impacted by chaning service providers. They should be using one of the IP ranges that is not in use on the Internet, and then have a firewall that does NAT for any outbound traffic.

Steven E. Protter
Exalted Contributor

Re: Alias multiple IPs to one card, 11.i systems

To support both IP ranges I think you need another NIC card.

I can't believe changing external service providers could trigger this. 10.x.x.x is one of the internal ip address ranges that can be used inside the firewall. I've never seen 32 used anywhere for anything.

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
Richard Pereira_1
Regular Advisor

Re: Alias multiple IPs to one card, 11.i systems

I understand that normally it doesnt, however my customer says this ISP has insisted they change IP address Spans from 32.x.x.x to 10.x.x.x i do not have any free cards, are there any other options?
Richard Pereira_1
Regular Advisor

Re: Alias multiple IPs to one card, 11.i systems

also i noticed this in the ifconfig manpage that seems to support it could be done

IP Index Number
Multiple IP addresses assigned to the same interface may be in
different subnets. An example of an interface name without an IP
index number is lan0. An example of an interface name with a IP index
number is lan0:1. Note: specifying lan0:0 is equivalent to lan0.

A primary interface is an interface whose IP index number is zero. A
secondary interface is an interface whose IP index number is non-zero.
Patrick Wallek
Honored Contributor

Re: Alias multiple IPs to one card, 11.i systems

It is true that you can have multiple virtual interfaces on a single card (lan0:1, lan0:2, etc.). But I have only seen it done where your virtual interfaces are in the same subnet. I don't know how well it would work with different subnets.
Pedro Cosmen
Valued Contributor

Re: Alias multiple IPs to one card, 11.i systems

Hello Richard,

Yes you can assing several ip addresses to the same card, just use the index number in the ifconfig command:

# ifconfig lan0:1 10.x.x.x


You can change lan0 for the interface you want to use. To make this changes permanent you need to edit de /etc/rc.config.d/netconf.

Regards
Richard Pereira_1
Regular Advisor

Re: Alias multiple IPs to one card, 11.i systems

thanks for confirming, Pedro.
i think im getting close. I tried the following;

ifconfig lan0:1 192.168.0.1 netmask 255.255.255.255 up
primary interface must first be configured

# lanscan
Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI
Path Address In# State NamePPA ID Type Support Mjr#
0/0/0/0 0x00306EC36161 0 UP lan0 snap0 1 ETHER Yes 119


what could i be missing? this is 11.i, has is there a kernel param or something missing?

Patrick Wallek
Honored Contributor

Re: Alias multiple IPs to one card, 11.i systems

What does 'ifconfig lan0' show? If therre is no IP address for lan0, then lan0:1 will not work.
Richard Pereira_1
Regular Advisor

Re: Alias multiple IPs to one card, 11.i systems

aaaah i see the problem, my lanscan was truncated.

# lanscan
Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI
Path Address In# State NamePPA ID Type Support Mjr#
0/0/0/0 0x00306EC36161 0 UP lan0 snap0 1 ETHER Yes 119
VLAN5001 0x00306EC36161 5001 UP lan5001 snap5001 4 ETHER Yes 119
VLAN5000 0x00306EC36161 5000 UP lan5000 snap5000 3 ETHER Yes 119

it appears this box has VLANS configured. unfortunetly i dont know much about using them, can i add further vlans on the fly?
Pedro Cosmen
Valued Contributor

Re: Alias multiple IPs to one card, 11.i systems

Hello Richard,

Like Patrick says you have to configure the lan0 (lan0:0) first, and the index number must be sequential, lan0:1, the lan0:2,...

Regards.
Prashant Zanwar_4
Respected Contributor

Re: Alias multiple IPs to one card, 11.i systems

This is similar to :
ifconfig lan0:1 plumb

this assigns the virtual interface then you can assign a IP to it.

In solaris this is used quite often.

In solaris there is provision to see all interfaces even if IP is not assigned to the card..using

ifconfig -a plumb

ifconfig -a


When you do
ifconfig lan0:1 Subnet
when you want to remove this simply do

ifconfig lan0:1 unplumb..

Hope this helps..

lanscan will show you all interfaces plumbed..including virtual ..

Thanks
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
Andrew Cowan
Honored Contributor

Re: Alias multiple IPs to one card, 11.i systems

According to:
http://www.flumps.org/ip/a/indexa.html

Network 32 belonngs to:
32 IBM Global Services, NH (NETBLK-IBMGLOBALSERV)

I'd change this pretty quickly. You don't want to mess with them (or their lawyers) :(

IP should never let you assign multiple addresses that are outside of the largest allocated network. Eg. You could have several class-c subnets aliased on the same card, or a class-c sized subnet aliased within a class B range, but never a bigger one. The problem is that the kernel has no way of working out how to do the routing, and packets can appear to be sent one interface and return via the other.