Routing WIFI and LAN for specific traffic

Posted by jakebird451 on Super User See other posts from Super User or by jakebird451
Published on 2012-06-15T20:03:13Z Indexed on 2012/06/15 21:19 UTC
Read the original article Hit count: 208

Filed under:
|

I have two network devices aboard my macbook pro:

  1. WIFI (en1): Used for general traffic. Connects to an ip of 192.168.19.* via DHCP
  2. LAN (en0): Used for specific traffic. Connects to an ip of 192.168.2.10 as a static IP. Does not connect to a router, only a switch for direct routing connection.

I have 4 IP addresses I need to access on the LAN:

  1. 192.168.2.1
  2. 192.168.2.21
  3. 192.168.2.20
  4. 192.168.2.30

The rest of the traffic needs to go to WIFI. I have tried setting up a routing table for the specific ip addresses, but I only managed to mess up my network. I do not venture out into the world of networking too often, but this was the latest command I have been trying:

sudo route add -host 192.168.2.30 -interface en0

This command killed my ability to use ping. It told me that ping could not allocate memory (is that even possible)? It also killed my wifi access. Logging out and back in fixed the issue. I really do not mind to make this solution permanent, so I am fine with a temporary routing.

© Super User or respective owner

Related posts about osx

Related posts about routing