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: 206
I have two network devices aboard my macbook pro:
- WIFI (en1): Used for general traffic. Connects to an ip of 192.168.19.* via DHCP
- 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
routingconnection.
I have 4 IP addresses I need to access on the LAN:
- 192.168.2.1
- 192.168.2.21
- 192.168.2.20
- 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