How to add multiple IP address on linux machine different IP range?
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.