We have a setup of two computers. S is the server with internet access and C is the client that is connected to the server via the network. This works just fine, but a third computer, C2, should be connected to C.

The problem is that C and C2 must connect via and C2 must not see S. Thus, we want to add a virtual network between S and C that uses

I.e., we have:

S <-- -- C <---- X ---- C2

And we want:

S <-- -- C <-- -- C2

We add the following to /etc/network/interfaces in S (previously connected to C via eth0), and executes "ifup eth0.1":

auto eth0.1
iface eth0.1 inet static

And in C, after "ifdown eth0", remove the old if and type:

auto eth0
iface eth0 inet static

Then, "ifup eth0".

And it doesn't work! Ping just says:

$ ping
PING ( 56(84) bytes of data.
From icmp_seq=1 Destination Host Unreachable
From icmp_seq=2 Destination Host Unreachable

When we change back everything works and we can even ping eth0.1 from the client. How do you change network from the client side?


the problem is that you used a VLAN 802.1q interface, it's not an alias interface, so you have 2 different VLAN,and you need a typical router-on-sitck configuration to do this or you need to create a dummy interface with dummy module (may be it's more easy) in this way:

#! /bin/bash
modprobe dummy
ip link set name ethvirt dev dummy0
ifconfig ethvirt hw ether 00:22:22:03:02:74
ifconfig ethvirt netmask up

Hope it helps!

  • Thank you! Should I write this on the client (C) side? – Skaarjasaurus Nov 13 '15 at 11:05
  • No this configuration it's ok if you have one server with just one interface, I suppose that's the problem. Otherwise you need to perform a VLAN configuration on your switch or remove eth0.1 in eth0 – Francesco P Nov 13 '15 at 11:14

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.