Operating System - HP-UX
1834403 Members
2754 Online
110067 Solutions
New Discussion

Re: Invoke new network setup

 
Ron Levy
Advisor

Invoke new network setup

I had an A-500 with IP address 172.31.1.33, netmask 255.255.255.0, and broadcast address 172.31.1.255. Then we changed offices and the machine went into storage for six months. Now in our new office it is designated with a static ip of 172.31.1.33, and a new netmask of 255.255.252.0 and a broadcast address of 172.31.3.255. I made the necessary changes in the /etc/rc.config.d/netconf file, but it doesn't work. (I have verified the connection to the wall with linkloop.) I even tried set_parms in a variety of ways, but it still doesn't work.

I have found the formatting of this file to be finicky in the past, and often there are problems with not updating critical-but-inobvious files. Once I had this problem and HP gave me a set of instructions as to how to wipe every important file and replace it with files from /etc/newconfig, then do set_parms initial and it worked. Does anyone happen to have that complete procedure?

Thanks,
Ron Levy

10 REPLIES 10
Mel Burslan
Honored Contributor

Re: Invoke new network setup

Actually there is nothing magical about modifying the netconf file manually and/or set_parms. I personally prefer the manual method.

In your case, your lan0 (or whatever interface you are using, should have settings like this:

INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]=172.31.1.33
SUBNET_MASK[0]=255.255.252.0
BROADCAST_ADDRESS[0]=172.31.3.255
INTERFACE_STATE[0]=up
DHCP_ENABLE[0]=0

and your problem may be originating from the route definitions on this file

make sure at least your default route is defined and it is pointing to the right gateway.

Something like :

ROUTE_DESTINATION[0]=default
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]=172.31.1.254
ROUTE_COUNT[0]=1
ROUTE_ARGS[0]=""

The gateway address above is a total assumption. COnatct your network admins at this site to find out the IP address of the router for this network segment and put it on this line.

After this is complete

/sbin/init.d/net stop
/sbin/init.d/net start

if it is still not working, make sure your network admin provisioned your switch port inot the correct VLAN and there is no disablement or anything like that in effect.

if you run

ifconfig lan0

you should see this as the first line of output:

lan0: flags=843


if you see number 842 instead of 843, it means the interface is not up.
________________________________
UNIX because I majored in cryptology...
Patrick Wallek
Honored Contributor

Re: Invoke new network setup

What errors are you having? What is not working? Is your default router correct?

A little more information on the errors you are seeing would be helpful.
Ron Levy
Advisor

Re: Invoke new network setup

When I do an ifconfig lan0 I get:
ifconfig: no such interface

As opposed to anything else. I did notice that my Interface_State wasn't set to anything so I set it to 'up' as was mentioned.

I have done the /sbin/init.d/net stop and then start, and when I do so I get errors about setting the default route when I don't have an interface.
Andrew Rutter
Honored Contributor

Re: Invoke new network setup

hi,

what does #lanscan show the device as?

The lan isnt by any chance lan1 is it? instead of the lan0

Also is the interface picked up corectly in ioscan?

Just worth checking before modifying the files.

Andy

Bill Hassell
Honored Contributor

Re: Invoke new network setup

Start by identifying all your lan cards:

/usr/sbin/ioscan -knfClan

Then see what lanscan says:

lanscan

lan0 is the first interface card found at install time, not necessarily the one you want to use. The netconf file is easy: the zero entry is the primary LAN card and is connected to the IP address/subnet mask, etc with the device file name (ie, lan0 lan1, lan2...). You can swap IP addresses onto different I/O cards by just changing the devicefile name.

Then check that you can ping yourself. And finally, make sure that the network you are plugged into is really the 172.31.1 network. Note that arp cache values can mess up an immediate response. Check with arp -a on your PC or another HP-UX box.


Bill Hassell, sysadmin
Ron Levy
Advisor

Re: Invoke new network setup

Ioscan tells me that this A-500 has:
lan0 at 0/0/0/0, btlan3, claimed
lan1 at 0/2/0/0, btlan5, claimed

lanscan tells me that:
0/0/0/0 is at an address, and is up as lan0
0/2/0/0 is at an address, and is up as lan1

linkloop gives me a positive response for whichever network card I have plugged into the wall.

My network people have confirmed that my network port is on the correct vlan.

I have my /etc/rc.config.d/netconf file set up in the fashion given, but the interface still doesn't come up. What other files also need to be checked?
Patrick Wallek
Honored Contributor

Re: Invoke new network setup

You have covered your bases with the netconf file. I think you just need to verify which lan card you are actually plugged into on the machine.

Are you sure you are hooked into lan0 and not into lan1?

What happens if you do an 'ifconfig lan1'? What happens if you change lan0 to lan1 in /etc/rc.config.d/netconf and then do 'net stop' and 'net start' again?

Mel Burslan
Honored Contributor

Re: Invoke new network setup

then lets try configuring the lan0 or lan 1 (whichever you wish) on the fly:

ifconfig lan0 inet 172.31.1.33 netmask 255.255.252.0 up

at this point if you run

ifconfig lan0

you should see the interface with the assigned ip address, netmask and so on.

is it like that or you are still having problems ?
________________________________
UNIX because I majored in cryptology...
Ron Levy
Advisor

Re: Invoke new network setup

When I did ifconfig lan0 inet 172.31.1.33 netmask 255.255.252.0 it failed with an odd error.
And that got me thinking about the netmask, and I remembered that on HPUX 11.00, which this machine is, it does not allow you to use any netmask that is not exactly class a, class b, or class c. This is turned off with an NDD setting. Once I used the command:

ndd -set /dev/ip ip_check_subnet_addr 0

to turn off the checking function, the interface came up and worked fine. Thanks very much, and time to go assign points. :)
Mel Burslan
Honored Contributor

Re: Invoke new network setup

it may be a good idea to store this ndd setting in /etc/rc.config.d/nddconf file, if you have not done it already.
________________________________
UNIX because I majored in cryptology...