Operating System - HP-UX
1824983 Members
3740 Online
109678 Solutions
New Discussion юеВ

setting/changing netmask HP-UX 7.03 A

 
Michael Bluemm
Frequent Advisor

setting/changing netmask HP-UX 7.03 A

Hi, old specialists,
I have to change the netmask from 255.255.0.0 to 255.255.255.0 . In which file can I change the netmask permanently? (HP-UX 7 is quite different to 10.20 or 11)
Thanks, Michael
... still trying ...
12 REPLIES 12
Paul Sperry
Honored Contributor

Re: setting/changing netmask HP-UX 7.03 A

Does 7.X have the set_parms addl_netwrk
command?
Robert-Jan Goossens
Honored Contributor

Re: setting/changing netmask HP-UX 7.03 A

Hi Michael,

How about

# cd /etc
# find . -name netconf
edit the file if there is one and reboot.

Hope it helps.

Robert-Jan.
Pete Randall
Outstanding Contributor

Re: setting/changing netmask HP-UX 7.03 A

Michael,

I believe there's a startup script called /etc/rc which starts up networking daemons, among other things. Check there.

Pete

Pete
Vicente Sanchez_3
Respected Contributor

Re: setting/changing netmask HP-UX 7.03 A

Hi Michael,

Probably SAM was already in that version. Try to do it with it.

HTH, Vicente.
Pete Randall
Outstanding Contributor

Re: setting/changing netmask HP-UX 7.03 A

Michael,

If it's not in /etc/rc, try to find a script called localrc - /etc/rc calls it when it's done, I think.

Pete

Pete
Michael Bluemm
Frequent Advisor

Re: setting/changing netmask HP-UX 7.03 A

I've got nether netconf nor SAM, but I can send you /etc/rc and /etc/netlinkrc.
something helpful in it?
Michael
... still trying ...
Michael Bluemm
Frequent Advisor

Re: setting/changing netmask HP-UX 7.03 A

... and /etc/rc
... still trying ...
Pete Randall
Outstanding Contributor

Re: setting/changing netmask HP-UX 7.03 A

Michael,

Be warned - I'm guessing here, I havent touched one of these pre-10.x systems in years.

The netmask would be specified in the ifconfig command, which is showing up in your /etc/netlinkrc

case $NODENAME in
*) /etc/ifconfig lan0 `hostname` up
;;
esac

The netmask would be added after `hostname` up (see man ifconfig).

That's my best shot at it Michael, hope it helps.

Pete

Pete
Robert-Jan Goossens
Honored Contributor

Re: setting/changing netmask HP-UX 7.03 A

Hi Michael,

It is a bit the same as Pete suggested, HPUX 9.X

Set the appropriate netmask for the subnet that this system is on by editing /etc/netlinkrc. In this example, the netmask is 255.255.255.0. If there is no ifconfig line in the file, or if the line has been commented out, add the following line to the file:
/etc/ifconfig lan0 inet `hostname` netmask 255.255.255.0 up

If there already is an ifconfig line and only the configuration is being changed, copy that version, modify it appropriately, and comment out the original version.

At a shell prompt, execute the new ifconfig command:

hpux# /etc/ifconfig lan0 inet `hostname` netmask 255.255.255.0 up

Verify the netmask:

hpux# /etc/ifconfig lan0
lan0: flags=63
inet 15.2.72.150 netmask ffffff00 broadcast 15.2.72.255


Hope it helps,

Robert-Jan.
Stefan Schulz
Honored Contributor

Re: setting/changing netmask HP-UX 7.03 A

Hi Michael,

some months ago i had my fingers on such an old monster. I found that the system settings are stored in /etc/rc and /etc/netlinkrc which you allready figured out.

But i couldnt find something like /etc/rc.config.d/netconf to set all the networking parameters like netmask and ip-adress.

So i did use ifconfig (wich is available on nearly every Unix favour).

I have been able to set netmask, ip-adress and bring the interface up with no problems.

Have a look at ifconfig. This should solve your problem.

Hope this helps

Regards Stefan
No Mouse found. System halted. Press Mousebutton to continue.
rick jones
Honored Contributor

Re: setting/changing netmask HP-UX 7.03 A

Keep in mind that if HP-UX 7 does indeed do subnetting, it will only do subnetting based on the original RFCs, which means that the "subnet" portion of the host IP address can be neither all zeros or all ones.

Also, if your system is connected to a network with routers that support proxy ARP, you may not really _need_ to make the subnetmask more restrictive, the HP-UX 7 system will simply think the other boxes are "local" and will (man this is really stretching the memory DIMMs) ARP for their IP to MAC mappings, which the proxy-ARP supporting router will happily provide.
there is no rest for the wicked yet the virtuous have no pillows
Michael Bluemm
Frequent Advisor

Re: setting/changing netmask HP-UX 7.03 A

Hi guys,
sorry, didn't have to test it, cause server was finally discarded (thanx god). So you get all 5 points. Finally I won't have more "old" questions.
Michael
... still trying ...