Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing the netmask

Status
Not open for further replies.

SteveB42

IS-IT--Management
Jan 29, 2002
38
0
0
US
OS = AIX 4.1.5
Platform = R50 (PowerPC) Server
2 10Base2 and 1 10/100BaseT NIC (recently installed)

Needed to change Netmask from 255.255.255.0 to 255.255.0.0

Via SMIT was able to change it (returned 'OK'), but when checking it again, it reverts back to 255.255.255.0

Do not have this problem on other machines with similar configurations with one exception, this is my only 4.1.5 machine (cannot upgrade because of development/software) issues.

I removed the device and reinstalled it (including driver) and it still refuses to let me change the netmask! Is there anywhere else I can change it, or another method that may work (already tried chdev -l)?

Any suggestions will be greatly appreciated!!!

Thanks,

:)
 
I don't know about 4.1.5, but in 4.3.3, the last option in the smit Minimum Configuration is "Start Now". It appears the default is "no".

If there is that option in 4.1.5, go back and run smit tcpip, choose Minimum Configuration and Startup, and be sure to set "Start Now" to "yes".
 
But doesn't that just restart tcpip daemons? I don't see how that would make a difference (isn't necessary on my other machines) ... but hey, I'll give it a shot!! I'll let you know!

Thanks!

:)
 
Tried it, like I thought it just started the daemons, and since they are already running had no effect ... later today I'll kick some folks off and actually stop tcpip, change the netmask and then restart it ... and see if it works... thanks for the suggestion.

:)
 
Try running smit inet and change the netmask there. My AIX book says to use that instead of a variation of smit mktcpip, which is what I recommended in my first posting. Let us know if it works.
 
Was able to change the netmask in the database with the -P option ... and now it actually shows the mask I want, but isn't really there (certainly could cause confusion) until I cycle tcpip (or reboot)... which I can't do right now. Definetly a bug in 4.1.5 that doesn't exist in 4.3.3 (or even 3.2.5)... thanks for your help and I'll let you know if that works ... and I believe your suggestion would to, but I can't take down the tcpip daemons at the moment...

Thanks again!

:)
 
Got a chance to reboot and the netmask went back to 255.255.255.0! $#^@$^@%&@!!! Anyway, I was wondering if a dead battery (date/time resets if server is completely powered off) may have something to do with this ... or could it be permission on some obscure file not allowing a "real" change to the netmask? Any suggestions would be very appreciated!

Thanks!

:)
 

You don't have to reboot for it to change.
Just do 'ifconfig en0 netmask 255.255.0.0'

Cheers Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
Thank you Mr Morsing! But it didn't work!

tried ifconfig en1 netmask 255.255.0.0 and it acted like it worked (no error or complaint)... but went into smit tcpip and lo and behold the netmask is still 255.255.255.0!

Frustrated but having fun,

Steve

:)

 
Sounds like the ODM isn't being updated properly. If this is en0 you are trying to change then what does the following return (note change en0 to whatever interface you are trying to change):

odmget -q 'name=en0 and attribute=netmask' CuAt

If the value in the ODM is correct then maybe you have something hardcoded in one of the startup files so roundup the usual suspects (check /etc/rc.tcpip and any custom files run from inittab like /etc/rc.local).
 

Steve,

ifconfig doesn't update the ODM which is what smitty shows you. If you wanted to see if it had worked, do 'ifconfig en0' and I'm sure that the netmask would have been changed.
I was suggesting a temporary solution so you didn't have to reboot.

Cheers Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
Sector,

The odmget returns 255.255.255.0 as expected. I am searching in etc, but still haven't found anything ... IBM hardware folks are coming out to change the dead battery... but I have serious doubts that is the root cause. Even with a dead battery, I should be able to write to the ODM ...

Thanks a million,

Steve

PS do you know the odm command that would allow me to change the netmask attribute?



 
Mr Morsing,

Thank you for your suggestion as well!!

Steve

:-D
 
Did an ifconfig en1 and it returns a netmask of 0xffffff00 (e.g. 255.255.255.0) so the ifconfig en1 netmask doesn't change it permenantly... sigh.

 
Steve,

To change something directly in the ODM use the odmchange command.
Example using en1 (I assume from earlier posts that that is the one you want changing):

1) Get the stanza you want to change and put it in a temporary file:
odmget -q 'name=en1 and attribute=netmask' CuAt > /tmp/qaz

This should give you a file /tmp/qaz containing the following stanza
CuAt:
name = "en1"
attribute = "netmask"
value = "255.255.255.0"
type = "R"
generic = "DU"
rep = "s"
nls_index = 8

2) Edit this file to change the value to what you require.

3) Run odmchange to update the ODM:
odmchange -o CuAt -q 'name=en1 and attribute=netmask' /tmp/qaz

4) Run odmget to confirm that the ODM contains the changed value:
odmget -q 'name=en1 and attribute=netmask' CuAt

5) Run savebase to ensure that ODM classes are stored on ipldevice:
savebase -v

6) Reboot.

7) Check after reboot that the interface is using the correct netmask (use odmget to check the ODM, and ifconfig to check the running interface).

Further notes,
I do not think that the battery is relevant to your problem as this kind of stuff should be stored on the ipldevice and not in NVRAM.
Question - what IP address are you using for this interface, IIRC 4.1.5 had some weird stuff where if it thought you were using a class C address it would give you a class C netmask regardless of what you wanted.
 
Sector,

Thanks for the tip(s)... it appeared to work, but when I tried to change the gateway for en1 it failed stating network unreachable (because the netmask reverted to 255.255.255.0)! ARRRGHHHH!

As to your query about my ip address, it is 200.0.124.250 ... is that why the OS thinks I need a class C netmask? And if so, how do I get around this stupid bug with having to change my ip schema?

Very grateful for the help!

Steve

:)
 

Steve, you're not listening to what we're telling you!!

1) The value in the ODM has nothing to do with the actual value associated with the interface card. It's only being used when the system configures the card.

2) The actual value of the NIC config can be changed on the fly with ifconfig.

If you're changing the ODM and then want to change the gateway and it won't let you change it because of the netmask, then change it with 'ifconfig' before changing the gateway.
It *will* work.

Cheers Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
Your suspicions are true. In AIX the system overrides subnetmasks that appear not to follow the definition of Classes (i.e. Class A 255.0.0.0).
To my knowledge there is no way to override this, it is right in the AIX code.
 

Not on my boxes:

[bob6](root:/) #ifconfig -a
en0: flags=4e080863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,PSEG>
inet 10.36.130.239 netmask 0xffffff00 broadcast 10.36.130.255
en1: flags=4e080863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,PSEG>
inet 10.36.131.239 netmask 0xffffff00 broadcast 10.36.131.255
en3: flags=4e080863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,PSEG>
inet 100.2.1.18 netmask 0xffffff00 broadcast 100.2.1.255
lo0: flags=e08084b<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT>
inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255
inet6 ::1/0

Cheers Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
The limitation in subnetting is when you take a lower class of address and try and subnet it as a higher network.

Example 200.0.124 is a Class C type address and cannot be subnetted as if it were a Class B or A.

You will see that Henrik uses Class A addresses on all interfaces in this example, and is allowed to subnet them as he wishes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top