0

We are trying to setup a test bed for our server testing, to simulate multiple connection / msg handling, I am trying to connect to our test server from a virtual IP.

on the client machine (Debian) through "/etc/network/interfaces" created virtual IP

allow-hotplug eth0
iface eth0 inet dhcp (192.168.10.2)

auto eth0:1
allow-hotplug eth0:1
iface eth0:1 inet static
address 192.168.11.1
netmask 255.255.0.0
gateway 192.168.11.1

auto eth0:5
allow-hotplug eth0:5
iface eth0:5 inet static
address 192.168.11.5
netmask 255.255.255.0
gateway 192.168.11.1


auto eth0:6
allow-hotplug eth0:6
iface eth0:6 inet static
address 192.168.11.6
netmask 255.255.255.0
gateway 192.168.11.1

Server Ip: 192.168.10.246

With our test client we are using "eth0.6" to connect it with server and connection is getting failed.

Request guidance, am i missing any routing configuration ??

0

eth0:1 etc. is the old way of assigning multiple IP addresses to a single interface. New tools (ip addr) will just show the list of IPs. It's not a "virtual interface" in any way.

Multiple IPv4 addresses on a single interface will give you lots of headache, unless you can instruct every single application to bind only to a specific IP address (and many applications can't do that).

You didn't say what kind of protocol(s) you want to test, but a simpler way to simulate more complicated network architecture on a single machine are network namespaces. Create as many as you need, connect them up with virtual ethernet pairs, and run one (or many) clients in each of them to test whatever you want to test.

Google for tutorials how to setup network namespaces, there are quite a few. I recommend running an xterm (or several) in each namespace, that makes it simple to start programs.

0

You are missing activating IP forwarding for the machine to be able to route/forward your IP packets between networks.

Edit your /etc/sysctl.conf file and add:

net.ipv4.ip_forward=1

Then do:

sudo sysctl -p

With your setup, I am not entirely sure whether you also need in /etc/sysctl.conf

net.ipv4.conf.all.rp_filter=0

Have a look at this question too: What is kernel ip forwarding?

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.