- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- how to assign 2 ip address in a single lan card.
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
01-09-2007 05:20 PM
01-09-2007 05:20 PM
I want to assign two ipaddress in a single lan card. in Linux.
I tried by using
ifconfig eth0:0 xxx.xxx.xxx.xxx. netmask 255.255.0.0
Its assining the ip address, But when i am trying to down and up the interface its givning error as "SIOCSIFFLAGS: Cannot assign requested address"
Can any one tell me the procedure..
Thanks & Regards,
Guna
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2007 06:07 PM
01-09-2007 06:07 PM
Re: how to assign 2 ip address in a single lan card.
It works for me without error. Do you see any errors in syslog/dmesg?
which distro/kernel do you use?
It may be kernel bug, see for example http://www.uwsg.iu.edu/hypermail/linux/net/0211.0/0035.html about 2.4.18 kernel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2007 07:48 PM
01-09-2007 07:48 PM
SolutionYou configged the extra IP address on the command line with ifconfig.
If you down and up the interface using ifdown/ifup or init scripts, your system will use /etc/network/interfaces to find configuration data.
Assign the 2nd IP to the interface in /etc/network/interfaces as well and you shouldn't get the error anymore.
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2007 07:54 PM
01-09-2007 07:54 PM
Re: how to assign 2 ip address in a single lan card.
iface eth0 inet static
address 192.168.0.1
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
iface eth0:0 inet static
address 192.168.0.2
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2007 08:54 PM
01-10-2007 08:54 PM
Re: how to assign 2 ip address in a single lan card.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2007 08:59 PM
01-10-2007 08:59 PM
Re: how to assign 2 ip address in a single lan card.
Cheers