• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Network Alias and multiple networks on 1 NIC

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

Stratus_ss

Overclockix Snake Charming Senior, Alt OS Content
Joined
Jan 24, 2006
Location
South Dakota
So I have this laptop which is serving as my local repository. I recently wanted to spin off a network for Virtual Machines (.122.*). Running Centos 6.2 I tried putting these in /etc/sysconfig/network-scripts

ifcfg-eth0
Code:
HWADDR=00:08:74:3E:86:30
DEVICE=eth0
TYPE=Ethernet
BOOTPROTO=none
IPADDR=192.168.99.247
PREFIX=24
GATEWAY=192.168.99.253
DNS1=192.168.99.253
DOMAIN=stratus-sphere
IPV6INIT=no
ONBOOT=yes

ifcfg-eth0:1
Code:
DEVICE=eth0:1
BOOTPROTO=static
IPADDR=192.168.122.247
PREFIX=24
GATEWAY=192.168.122.233
DNS1=192.168.122.233
DOMAIN=stratus.local
ONBOOT=yes
HWADDR=00:08:74:3E:86:30

No matter what I do, it will only activate one or the other and not both. I have followed the Red Hat docs, as well as online guides and this should be all I need to do with what I have read.

Anyone have any pointers?
 
Last edited:
The virtual nic should be named ifcfg-eth0:1

Rename the config file, restart the network, and run ifconfig. The virtual interface should be listed.
 
The virtual nic should be named ifcfg-eth0:1

Rename the config file, restart the network, and run ifconfig. The virtual interface should be listed.

I tried this (though that wasn't clear in my first post). This is how it is currently set. It still only activates the one IP

Splat, Thanks for that I will give that a try!
 
The vlan suggestion worked.

I needed to append
Code:
VLAN=yes

Inside of my eth0.122 and eth0.99. Thanks!
 
Back