0

I'm trying to create multiple subnets on a Wheezy server, where I can run multiple virtual machines off of each subnet. Initially, I'd like to create 2 and I've gotten one of the subnets working, but can't seem to get the second one going.

My /etc/network/interfaces includes:

iface eth0 inet manual
up ip link set $IFACE up promisc on
down ip link set $IFACE down promisc off

auto dummy0
iface dummy0 inet static
address 10.1.1.1
netmask 255.255.255.0

auto dummy1
iface dummy1 inet static
address 10.1.2.1
netmask 255.255.255.0

#VirtualMachineDummy0
auto dummy0:245
allow-hotplug dummy0:245
iface dummy0:245 inet static
address 10.1.1.245
netmask 255.255.255.0

#SubNet2
auto dummy1:111
allow-hotplug dummy1:111
iface dummy1:1 inet static
address 10.1.2.111
netmask 255.255.255.0

I can ping 10.1.1.245 and the virtual machine has connectivity, but I cannot ping 10.1.2.1 or 10.1.2.111.

FYI: along the way, I have tried disabling ipv6 and adding:
touch /etc/modprobe.d/local
echo "options dummy numdummies=2" > /etc/modprobe.d/local

Any suggestions as to how to fix this? Thanks!

  • what virtualization layer are you using (ex: vmware, xen...)? what's the result of ifconfig ? it seems you are defining aliases for 4 ip addresses (ifconfig binds an ip to an interface, not a network), you may want to define eth0 (regular/'real' ip), and different eth0:x aliases for each host – LinuxDevOps Mar 24 '14 at 15:20
  • Thanks LinuxDevOps - am using "Linux Vserver"... if config too long to post (character limit...)...is there another way to post it? – Senrabdet Mar 24 '14 at 16:15
  • you can create an anonymous post at pastebin.com and get its link – LinuxDevOps Mar 24 '14 at 16:20
  • OK thanks again- pastebin.com/3wy0hUdu. May be silly, but have used "xxx.xxx.xxx.xxx" for some of addresses. Can explore the "eth0:, "eth0:1" concept... – Senrabdet Mar 24 '14 at 16:31
  • From your output dummy1 is not created, you may need to enable multiple (2 in this case) dummy interfaces with modprobe dummy numdummies=2 – LinuxDevOps Mar 24 '14 at 16:42
0

You seem to be stuttering. You only need one of these, or in your case none of these.

auto dummy1:111
allow-hotplug dummy1:111

I would adjust your configuration like this. This skips the unneeded and deprecated 'alias' style syntax, and the auto device is only applied to physical devices.

iface eth0 inet manual
  up ip link set $IFACE up promisc on
  down ip link set $IFACE down promisc off

auto dummy0
iface dummy0 inet static
  address 10.1.1.1
  netmask 255.255.255.0

iface dummy0 inet static
  address 10.1.1.245
  netmask 255.255.255.0

auto dummy1
iface dummy1 inet static
  address 10.1.2.1
  netmask 255.255.255.0

iface dummy1:1 inet static
  address 10.1.2.111
  netmask 255.255.255.0

You might also be running into a limitation on the number of dummy interfaces. Depending on the kernel in use this may be limited to a relatively small number. The dummy module supports the numdummies=N option.

  • Thanks Zoredache - will test; per suggestion from LinuxDevOps, may also look at using "Eth0" and "Eth0:1" paradym... – Senrabdet Mar 24 '14 at 16:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.