0

I'm on a Mac and I want to use internet with ethernet and wifi interface at same time.

For example, I want to achieve something like what Virtualbox does: if I set my virtual machine for using wifi interface, and my host machine (Mac) priority to use ethernet interface, I get what I want: two different ips, one for host and one for guest, and they are on two different networks.

Is there any way to get this in a C/Python program? (More in general, something that's like "send this http request over ethernet interface", "send that http request over wifi interface").

Thanks!

pippo
  • 774
  • 6
  • 10
  • If you talk TCP/IP then the system will use its routing tables regardless of what you bind to. – Ignacio Vazquez-Abrams May 15 '18 at 11:53
  • So how can Virtualbox do this with routing tables? – pippo May 15 '18 at 12:00
  • 1
    @pippo because Virtual Box doesn't forward TCP, but MAC frames. If you write a c program to implement the Ethernet layer, you can achieve the same (although your kernel might not let you). – Ajay Brahmakshatriya May 15 '18 at 12:07
  • I doubt that this is a programming issue; but rather a system configuration issue. Disregard the fact that one is WiFi and one Ethernet; the important thing is that you want to access separate networks via separate network interfaces on a single computer. That can be done, discussed here:http://www.mac-forums.com/internet-networking-and-wireless/157146-networks-time.html (although perhaps no clear instruction). Ether way it is a Super User or Server Fault exchange question. – Clifford May 15 '18 at 12:26
  • Do you looking for this? https://stackoverflow.com/questions/48996494/send-http-request-through-specific-network-interface – tsohr May 15 '18 at 13:16
  • @tsohr thanks, exactly that! Asap I'll test that code, and I return here. – pippo May 15 '18 at 22:03
  • @Ajay can you explain how MAC frames can be used to direct internet traffic? – pippo May 15 '18 at 22:06
  • @tsohr Thank you very much for your link! I wrote a similar program to achieve what I needed, althought I'm still not aware of what a MAC frame is and how I can use it – pippo Jun 01 '18 at 21:54

0 Answers0