- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how do you figure out the IP index # on the same l...
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
Forums
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
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
тАО03-28-2003 02:02 PM
тАО03-28-2003 02:02 PM
for example, I have two IP address assigned to the same lan card using ifconfig, now programing wise how do I know what is the remainning IP index I can use to add another IP adddress to the same lan card?
Thanks in advance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2003 02:16 PM
тАО03-28-2003 02:16 PM
SolutionYou could do the following
netstat -in | grep lanX | awk '{print $1}'
where X = lan instance
This will give all the lan assignments on it in use.
Should get something like
lan0
lan0:1
lan0:2
Therefore the next available is lan0:3
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2003 02:22 PM
тАО03-28-2003 02:22 PM
Re: how do you figure out the IP index # on the same lan?
netstat -rn
What's in /etc/rc.config.d/netconf? Here's an example:
INTERFACE_NAME[0]=lan0:0
IP_ADDRESS[0]=X.X.X.X
INTERFACE_NAME[1]=lan0:1
IP_ADDRESS[1]=X.X.X.X
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2003 02:22 PM
тАО03-28-2003 02:22 PM
Re: how do you figure out the IP index # on the same lan?
That is exactly what I want. You got the points.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2003 02:23 PM
тАО03-28-2003 02:23 PM
Re: how do you figure out the IP index # on the same lan?
The following shell may help you.
#!/usr/bin/ksh
for lan in $(netstat -in |grep -v ":"|grep -v "\*" |awk '/lan/ {print $1}')
do
LAST=$(netstat -in |grep ${lan}: |sort|tail -1 |awk '{print $1}'|awk '{FS=":";pr
int $2}')
if [ $LAST ]
then
(( NEXT= $LAST + 1 ))
echo "${lan}:${NEXT} is next for $lan"
else
echo "${lan}:0 is next for $lan"
fi
done
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2003 02:30 PM
тАО03-28-2003 02:30 PM
Re: how do you figure out the IP index # on the same lan?
Thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2003 02:34 PM
тАО03-28-2003 02:34 PM
Re: how do you figure out the IP index # on the same lan?
At the top of all reply posts you'll see a drop-down box.
You drop it down and select the value.
Then click the Submit button at the bottom & it should assign them.
Lately though, some have reported that they have to do this twice. So just check it after you submit to see if it shows points.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2003 02:35 PM
тАО03-28-2003 02:35 PM
Re: how do you figure out the IP index # on the same lan?
To assign points, click on the down arrow next to the date/time of the reply and select the # of points you want to give each reply (between 0 & 10 for each reply) then click on the SUBMIT button at the bottom left of the last reply.
You should be done. If you notice that points haven't been assigned after you click submit and go back to the message, you may have to do it again. If you are one of us that uses Opera 7.0X, then there is a problem with Opera and you have to open a differnet browser to get it to work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2003 02:38 PM
тАО03-28-2003 02:38 PM
Re: how do you figure out the IP index # on the same lan?
-Sri