- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- second ip address in lan0
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
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
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
09-12-2004 02:27 PM
09-12-2004 02:27 PM
How could I add a second ip address through command line from my lan0 then later on remove that second ip address?
Thanks in advance.
Adriatico
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2004 03:27 PM
09-12-2004 03:27 PM
Re: second ip address in lan0
It would be something like:
# ifconfig lan0:1 1.1.1.1 netmask 255.255.255.0
or whatever is appropriate. You would use ifconfig to remove it as well. For more details see the ifconfig man page.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2004 03:49 PM
09-12-2004 03:49 PM
Re: second ip address in lan0
You can add a new alias to your lan0 in the command line as follows:
Format:
#ifconfig lan0:1
Eg:
#ifconfig lan0:1 172.16.1.100 netmask 255.255.255.0
To disable the lan0:1, you can simply do the following:
#ifconfig lan0:1 down
Regards,
Senthil Murugan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2004 03:50 PM
09-12-2004 03:50 PM
Re: second ip address in lan0
As suggested by peter,
we have to make secondary interface to the primary interface as,
primary interface = lan0
seconday interface = lan0:1
Note: lan0:0 is same to lan0.
ifconfig man page says -->
IP Index Number
Multiple IP addresses assigned to the same interface may be in
different subnets. An example of an interface name without an IP
index number is lan0. An example of an interface name with a IP index
number is lan0:1. Note: specifying lan0:0 is equivalent to lan0.
A primary interface is an interface whose IP index number is zero. A
secondary interface is an interface whose IP index number is non-zero.
Regards
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2004 04:07 PM
09-12-2004 04:07 PM
SolutionSome tips to the above.
1.If you add the secondary address through the command line prompt. it will be available only upto the next restart of the networking services or the next reboot.
2. If you want to down the interface, you can do it by using the
#ifconfig lan0:1 down
command. but doing so will only stop the packets transmiting from that interface. If you want to disable the lan0:1 interface you can do this by using
#ifconfig lan0:1 0.0.0.0
This will NOT assign 0.0.0.0 to lan0:1 instead this will remove the lan0:1 interface.
Regards,
Senthil Murugan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2004 04:50 PM
09-12-2004 04:50 PM
Re: second ip address in lan0
Do not forget to add lan0:1 in /etc/rc.config.d/netconf file. The syntax is exactly the same as of lan0 except for the "index".
You cannot use 'unplumb' option with ifconfig to remove the IP. instead add the IP '0.0.0.0' to lan0:1.
-Sri