- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- netconf file - "[#]" fields
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-11-2002 08:10 AM
тАО11-11-2002 08:10 AM
For example: wouldn't the following line be for lan0
ROUTE_GATEWAY[0]=10.210.32.1 and the line
ROUTE_GATEWAY[1]=10.236.145.71
be for lan1 etc?
I'm being told that the values are for "indexes" and not interfaces. Is this true and what is the difference?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-11-2002 08:16 AM
тАО11-11-2002 08:16 AM
SolutionThe values in [#] are array indexes. The netconf file is really part of a shell script that runs and starts up the interfaces, so your indexes start with zero and go up one at a time from there. If your lan interfaces start with lan0 and are numbered sequentially, you can have subscript 0 be the settings for lan0, subscript 1 be the settings for lan1, and so on. The trick is that the netconf file can get reconfigured by other programs and scripts (sam, 'set_parms', etc.), so I wouldn't bank too much on things staying exactly like you start out with. On the other hand, there is a whole camp of thinking here on the forum that you should just edit netconf by hand and stay away from the automated stuff.
Either way, the numbers you are seeing are array subscripts and aren't tied to the lan numbers.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-11-2002 08:32 AM
тАО11-11-2002 08:32 AM
Re: netconf file - "[#]" fields
John's right. The [index] is just used to tie groups of parms together. I always use [0] for lan0 stuff, [1] for lan1 stuff, etc. However, there's nothing preventing you from using some arbitrary choice like [123] for lan0 as long as all lan0 parms have the index [123].
And count me as one of those who advocates manual editing of config files. Save all that automated junk for the girlie-man Winblows admins.
Cheers,
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-11-2002 10:49 AM
тАО11-11-2002 10:49 AM
Re: netconf file - "[#]" fields
Still confused here....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-11-2002 10:53 AM
тАО11-11-2002 10:53 AM
Re: netconf file - "[#]" fields
INTERFACE_NAME[0]="lan1"
ROUTE_GATEWAY[0]=w.x.y.z
IP_ADDRESS[0]=
SUBNET_MASK[0]=
INTERFACE_NAME[1]="lan2"
....
....
So you tie interface name with index# by defining "INTERFACE_NAME[x]" variable
HTH
...Manjeet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-11-2002 10:57 AM
тАО11-11-2002 10:57 AM
Re: netconf file - "[#]" fields
For example, on one of my boxes I have this:
INTERFACE_NAME[0]=lan0
INTERFACE_NAME[1]=lan2
while on another box I have this:
INTERFACE_NAME[0]=lan6
INTERFACE_NAME[1]=lan3
Does that help?
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-11-2002 12:00 PM
тАО11-11-2002 12:00 PM
Re: netconf file - "[#]" fields
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-11-2002 12:10 PM
тАО11-11-2002 12:10 PM
Re: netconf file - "[#]" fields
Do you know the IP addresses, netmasks, etc. for each of the three lan cards? If so, why don't you post them and we'll have a go at what your netconf file might actually look like.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-11-2002 12:11 PM
тАО11-11-2002 12:11 PM
Re: netconf file - "[#]" fields
IP_ADDRESS[0]=132.xxx.xxx.xx
SUBNET_MASK[0]=255.255.0.0
INTERFACE_NAME[0]=lan0
BROADCAST_ADDRESS[0]=132.145.255.255
INTERFACE_STATE[0]=down
IP_ADDRESS[1]=10.236.xxx.xxx
SUBNET_MASK[1]=255.255.240.0
INTERFACE_NAME[1]=lan1
BROADCAST_ADDRESS[1]=10.236.xxx.xxx
INTERFACE_STATE[1]=up
DHCP_ENABLE[1]=0
SO AGAIN - DOESN'T THE "[0]" VALUES MATCH THE LAN INTERFACE NUMBERS?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-11-2002 12:12 PM
тАО11-11-2002 12:12 PM
Re: netconf file - "[#]" fields
INTERFACE_NAME[0]="lan1"
INTERFACE_NAME[1]="lan0"
(with other entries correctly populated)
and it would 'still work'.
...Manjeet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-11-2002 12:19 PM
тАО11-11-2002 12:19 PM
Re: netconf file - "[#]" fields
All you are doing in netconf is to populate a set of shell array variables with data. A set of variables with the same subscript relate to the same card.
The order that you specify the Lan cards doesn't matter provided you start with subscript 0 and increment by 1 each time, you mustn't leave any gaps because the code thinks that an empty variable is the end of the list.
Thus as an example, you could have:
INTERFACE_NAME[0]=lan1
ROUTE_GATEWAY[0]=?.?.?.?
.....
INTERFACE_NAME[1]=lan4
ROUTE_GATEWAY[1]=?.?.?.?
.....
etc.
Changing the order to:
INTERFACE_NAME[0]=lan4
ROUTE_GATEWAY[0]=?.?.?.?
.....
INTERFACE_NAME[1]=lan1
ROUTE_GATEWAY[1]=?.?.?.?
.....
etc.
has exactly the same effect (other than the startup script configures the cards in the order specified) so you end up with the same result.
You happen to be in a situation where your Lan cards are numbered in order 0 to 3, this is by no means typical. Often you get gaps and sometimes they don't start at 0.
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-11-2002 12:24 PM
тАО11-11-2002 12:24 PM
Re: netconf file - "[#]" fields
As long as you start with [0], and go up sequentially from there ([1], [2], [3]) you should be fine.
What is the best way to test it? Setup the netconf file like you think it should be and reboot the system. If the lan cards all come up with the correct IP addresses and netmasks, you've got it licked.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-11-2002 02:07 PM
тАО11-11-2002 02:07 PM
Re: netconf file - "[#]" fields
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-12-2002 01:11 AM
тАО11-12-2002 01:11 AM
Re: netconf file - "[#]" fields
Just remember after running sam(in its infinite wisdom) or some auther auto script you might find those index numbers changed.
The important thing is that the are arbitrary. As long as they stay constant for a specific port / lan interface.
If you use virtual interfaces aka multiplexing you will find that lan0:1 has one index and lan0:2 has another index and so forth.
As a side note lan0:0 is equivalent to lan0.
So to sum it up every logical network interface(Not physical even though they might match) aught to have its own index number in this file.
Regards
Gerhard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-12-2002 06:29 AM
тАО11-12-2002 06:29 AM
Re: netconf file - "[#]" fields
SAM also has a nasty tendency to put parms at the bottom of the netconf file. So if you look in the regular place that is interleaved with the comments, that might not be all. Always scroll down to the bottom of the netconf file to make sure SAM's not screwing you over.
The last settings win, so when rc sources the netconf file, dupe settings at the end will negate whatever you have set earlier in the file.
Cheers,
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-12-2002 06:35 AM
тАО11-12-2002 06:35 AM
Re: netconf file - "[#]" fields
INTERFACE_NAME[0]=lan0
INTERFACE_NAME[1]=lan1
INTERFACE_NAME[2]=lan2
INTERFACE_NAME[3]=lan3
INTERFACE_NAME[4]=lan4
Again, if lan0 is disabled the interface #s do indeed match the index number. Only lan1, lan2 and lan3 are plugged in and active.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-12-2002 06:51 AM
тАО11-12-2002 06:51 AM
Re: netconf file - "[#]" fields
You could even include a lan0 for instance even if you didn't have one, provided you are prepared to ignore the error messages produced by the net startup script.
In your case I'd just have:
INTERFACE_NAME[0]=lan1
...
INTERFACE_NAME[1]=lan2
...
INTERFACE_NAME[2]=lan3
...
INTERFACE_NAME[3]=lan4
...
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-12-2002 07:05 AM
тАО11-12-2002 07:05 AM
Re: netconf file - "[#]" fields
I think you're making too much out of this. It simply just doesn't matter that the indexes and interface numbers don't match. It's not worth the effort. It may change if you add hardware later or rebuild the system.
The indexes are simply used to group ifconfig arguments for an interface together. Let the first one be [0], the next [1], and so forth, regardless of the interface number.
Life is too short to get hung up on the small stuff.
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-12-2002 07:14 AM
тАО11-12-2002 07:14 AM
Re: netconf file - "[#]" fields
INTERFACE parameters (including stuff like SUBNET_MASK, IP_ADDRESS, etc) are arguments for the ifconfig command. They are loaded into one array.
ROUTE parameters are arguments for the route command. They are loaded into a different array.
The point is that the indexes for INTERFACE parameters and ROUTE parameters are independent of each other. These lines often get intermingled in netconf but ROUTE...[0] has nothing to do with INTERFACE_NAME[0].
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-12-2002 10:53 AM
тАО11-12-2002 10:53 AM
Re: netconf file - "[#]" fields
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-12-2002 11:04 AM
тАО11-12-2002 11:04 AM
Re: netconf file - "[#]" fields
Simple moto with things like that. If it aint broke dont fix it. You wont gain functionality by reindixing them. Just maybe more sense to you.
Guess what I am trying to say is really think before changing them.
Regards
Gerhard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-12-2002 12:35 PM
тАО11-12-2002 12:35 PM
Re: netconf file - "[#]" fields
Guys I can't begin to thank you for all of your help in this