Operating System - HP-UX
1834936 Members
2157 Online
110071 Solutions
New Discussion

Same lan segment; two different ip subnets

 
Edmund_2
Advisor

Same lan segment; two different ip subnets

Hi all,

My server (running 10.2) has one lan card lan0 with ip 123.1.1.1/24. Other PCs on the same lan (without router) are 10.0.0.xxx. They need to add an entry in network config to be able to telnet to the server.

Now I need to add a network printer with ip 10.0.0.100. When I ping this address from the server, it shows 'unreachable'. I try to add static route with this cmd but it still fails:

'route add host 10.0.0.100 123.1.1.1'

# netstat -nr
Routing tables
Destination Gateway Flags Refs Use Interface Pmtu PmtuTime
10.0.0.100 123.1.1.1 UH 0 5 lan0 1500
123.1.1.1 127.0.0.1 UH 11 3179567 lo0 4608
127.0.0.1 127.0.0.1 UH 0 290 lo0 4608
default 123.1.1.1 U 2414259309 lan0 1500
123.1.1.0 123.1.1.1 U 3016112700 lan0 1500

The ip address for the server may be wrongly configured by some ex-staff but this cannot be changed in this site now. How can I config the server to connect to this printer?

Any suggestion is appreciated.

Edmund
8 REPLIES 8
Thayanidhi
Honored Contributor

Re: Same lan segment; two different ip subnets

Hi,

Logically you should have same subnet if it's only one network card.
Now, You can change all the Pc/Printer's IP address to match this
subnet or. you can add "IP Logical Interface" in SAM.
I am not sure whether you can do this in 10.20
It's possible in 11.x But, also be aware some applications
doesn't allow multiple Logical IP to same physical interface.

TT
Attitude (not aptitude) determines altitude.
Sunil Sharma_1
Honored Contributor

Re: Same lan segment; two different ip subnets

Hi,

There is 2 way one change IP address of all client or Assign second IP address to LAN card.
In 10.20 you required apecific patch for getting this functionality.
Try to apply latest GL patch bundle.
Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
Edmund_2
Advisor

Re: Same lan segment; two different ip subnets

Hi Sunil,

What is the patch# for this function? Can I get it from HP web site?

Thanks

Edmund
Steven E. Protter
Exalted Contributor

Re: Same lan segment; two different ip subnets

Its always best to have the last major patch bundle on a 10.20 machine.

That would be the General Release December 2001 for this OS, which is no longer supported by HP.

Patch bundles are available from http://software.hp.com

I'd give you a direct link but the site is non-responsive right now with a networking issue.

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
Edmund_2
Advisor

Re: Same lan segment; two different ip subnets

Hi,

My patch is Jun 2001:

XSW800GR1020 B.10.20.53.2 General Release Patches for HP-UX
10.20 Servers (June 2001)
XSW800HWCR1020 B.10.20.53.2 Hardware Enablement and Critical
Patches for HP-UX 10.20 Servers (June 2001)

I will get the Dec 2001 and try it.

Thanks
Elmar P. Kolkman
Honored Contributor

Re: Same lan segment; two different ip subnets

The problem you have is with your routing table. You need a gateway that knows both subnets. Right now you try to use your Unix server itself as gateway for 10.0.0.100, but it doesn't know how to reach that subnet.

Before installing the patch, you could try to add the IP address by doing:
ifconfig lan0:1 10.0.0.101 netmask 255.255.255.0
(replace the 101 by a free address in your 10.0.0 segment).
and delete the route to 10.0.0.100 you added, because it won't work anyway. Now your unix server can access everything in the 10.0.0.xxx segment.

Another way would be to add a correct route table entry. You nee a gateway between the two subnets for that, but then it would be:
route add host 10.0.0.100 123.1.1.xxx 1
Replace the xxx for the real gateway. This gives a security advantage: your unix machine is now only capable of reaching the printer, nothing else.But, not only does the unix server need to be able to reach the printer in that case, the printer needs to be able to reach the unix server as well. It has the same problem and needs a good default gateway for this solution. So if security isn't a real issue, I would go for the extra IP address on the lan card.
Every problem has at least one solution. Only some solutions are harder to find.
Edmund_2
Advisor

Re: Same lan segment; two different ip subnets

Hi,

Yes, you are right. I need a gateway that knows both subnets. But version 10.20 (with patch Jun 01) doesn't support logical ip address so 'one lan card one ip address'.

I think applying (Dec 01) patch can solve my problem if it supports logical ip addresses binding to one lan card.

Thanks.
Sunil Sharma_1
Honored Contributor

Re: Same lan segment; two different ip subnets

Hi,
You have to install patch number PHNE 12492,
it will install an ifalias command which you can use to assign multiple IP to one interface.
it has some dependencies also, you can visit this link

http://forums1.itrc.hp.com/service/forums/parseCurl.do?CURL=%2Fcm%2FQuestionAnswer%2F1%2C%2C0x1ed191ccb36bd611abdb0090277a778c%2C00.html&admit=716493758+1068025043541+28353475


Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***