I have following requirement.
(using curl) to a server such that each connection has a unique sourceQuote:>From a single linux interface I want to have multiple HTTP connections
Now using VCONFIG I can create those many virtual interfaces, assign
unique subnet IP address/MAC address to each virtual interface.
Host: eth1.101 (IP:- 10.1.1.1/24, MAC:-11:22:33:44:55:66) --- Server:
eth1.101 (IP:- 10.1.1.100/24)
Host: eth1.102 (IP:- 10.1.2.1/24, MAC:-11:22:33:44:55:67) --- Server:
eth1.102 (IP:- 10.1.2.100/24)
and so on...
so if I execute: curl http://10.1.1.1.100, it will go with MAC1
and if I execute: curl http://10.1.1.2.100, it will go with MAC2.
This approach is fine, but then I have to create those many virtual
interfaces on the server as well which I want to avoid.
So I basically want the traffic to reach the server with different MAC
addresses but only one VLAN ID, which could be anything.
Another approach that I am currently ruminating is as follows:
Put a router in between. This will give me one VLAN ID.
Put another linux host between the router and HTTP server running
EBTABLES, using which I can do MAC NATting so that I replace the
router's MAC address with the original virtual interfaces MAC address.
But I am a little skeptical about this approach as I haven't really
used EBTABLES and I don't know what all problems I may run into, for
e.g. ARP resolution and what not.
So if any of you have any ideas/solution I'll be more than glad to hear
Thanking in anticipation