LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-08-2009, 08:51 PM   #1
arfal
Member
 
Registered: Aug 2009
Posts: 30

Rep: Reputation: 0
How to add multiple IP address on linux machine different IP range?


Hi All,

Is that possible if I want to assign different IP address on one network card with the different IP range?
e.g:
eth0 ==> 192.168.1.1
eth0:1 ==> 192.168.2.2

Regards,
Arfal
 
Old 12-08-2009, 09:39 PM   #2
paul_hap
LQ Newbie
 
Registered: Dec 2009
Posts: 3

Rep: Reputation: 0
Yes, it's possible

just create another ifcfg file,
for example your ethernet card is on eth0
and the configuration file is on ifcfg-eth0
create another file named ifcfg-eth-0:0

with content:
IPADDR=192.168.2.2
NETMASK=255.255.255.0

and restart your network service.
 
Old 12-08-2009, 09:47 PM   #3
arfal
Member
 
Registered: Aug 2009
Posts: 30

Original Poster
Rep: Reputation: 0
I'm using SLES 10 and I don't think it is work on SuSE environment.
I have 2 vlan
vlan 1 is 192.168.1.xx
vlan 2 is 192.168.2.xx
 
Old 12-08-2009, 09:52 PM   #4
paul_hap
LQ Newbie
 
Registered: Dec 2009
Posts: 3

Rep: Reputation: 0
Quote:
Originally Posted by arfal View Post
I'm using SLES 10 and I don't think it is work on SuSE environment.
I have 2 vlan
vlan 1 is 192.168.1.xx
vlan 2 is 192.168.2.xx
works fine on my Suse 10.2
 
Old 12-08-2009, 10:26 PM   #5
arfal
Member
 
Registered: Aug 2009
Posts: 30

Original Poster
Rep: Reputation: 0
ok, I'm successfully add virtual IP address to my machine named eth0:1
The problem is, I want to assign it to the different vlan ID using vconfig, how to add eth0:1 to vlan ID 2? it's said error argument when I tried to add it.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add multiple ip address to an interface rasanth Linux - Networking 1 03-07-2007 04:10 PM
How to add Linux machine in to Domain ? sco1984 Linux - Enterprise 3 02-05-2007 04:27 AM
Linux machine won't release ip address JockVSJock Linux - Wireless Networking 6 11-23-2006 07:13 AM
How to get linux machine IP address value thru PHP? green_njk Linux - Software 5 12-25-2005 04:06 AM
how to get ip address, broadcast address, mac address of a machine sumeshstar Programming 2 03-12-2005 04:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration