Technical Discussion
  >> Apple Issues


Register (or login) on our website and you will not see this ad.


  Print Thread
Anonymous
(Unregistered)Thu 16-Jun-11 10:55:52
Print Post

using Wired and wireless together ????


[link to this post]
 
Hi All

I am trying to route traffic on my Mac using both wired and wireless and both with different subnets.
I would like to send the internet traffic out of one and intranet traffic out the other is this even possible any input would be most welcome.

Thanks
Standard User metalhead41
(knowledge is power) Thu 16-Jun-11 14:50:23
Print Post

Re: using Wired and wireless together ????


[re: Anonymous] [link to this post]
 
To connect both the wireless and Ethernet ports to the relevant network all you need to do is set them up as you normally would.

The next step varies in what you need to do (for simplicity I would personally do this part on the router and setup routes/access control lists - but thats just me smile )
If you aren't to sure on this part or don't have the equipment to do it then you would need to look at setting up static routes on your mac using the "route add" command in a terminal window. You will also need to add these in some form of startup script in order to make the routes permanent (for when you reboot the mac).

I'm not on my mac at the moment to be able to test the commands out for you, but if you need further help with this, reply to this message or pm me with more details and I'll try to work it out with you.

----------------------------------------------------
We may be human But we're still animals

My Blog | follow me @metalhead41 | Surfin' Bird Dance
Standard User john2007
(legend) Fri 17-Jun-11 12:23:41
Print Post

Re: using Wired and wireless together ????


[re: Anonymous] [link to this post]
 
I can tell you how I do that on a Linux box.

Wireless LAN is subnet 192.168.0.0 netmask 255.255.255.0
Fixed LAN is subnet 192.168.1.0 netmask 255.255.255.0

Wireless ADSL modem with address 192.168.0.1 acts as DHCP server for 192.168.0.0

A linux box with fixed connection (eth0) address 192.168.1.1 acts as DHCP server for 192.168.1.0

This box also has a wireless connection (wlan0) address 192.168.0.4 and acts as a gateway between the subnets.

The routing table on the linux box is

Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.1 * 255.255.255.255 UH 0 0 0 wlan0
192.168.1.0 * 255.255.255.0 U 1 0 0 eth0
192.168.0.0 * 255.255.255.0 U 2 0 0 wlan0
default 192.168.0.1 0.0.0.0 UG 0 0 0 wlan0

The route command is used to manipulate the routing table, e.g.

route del default # deletes the default route
route add -net 192.168.0.1 netmask 255.255.255.255 dev wlan0
route add default gw 192.168.0.1 # adds the default route

The wireless ADSL router has a static route added

destination 192.168.1.0
mask 255.255.255.0
gateway 192.168.0.4

On my Linux box packet forwarding between subnets is disabled by default.
To enable forwarding (to allow the subnets to talk to each other) use

sysctl -w net.ipv4.ip_forward=1

You probably have to do something pretty similar on your Mac.

I'm not a network guy so have no idea if what I do is the "proper" way.

eta:typos

Edited by john2007 (Fri 17-Jun-11 15:58:43)


Register (or login) on our website and you will not see this ad.

Standard User metalhead41
(knowledge is power) Fri 17-Jun-11 13:32:02
Print Post

Re: using Wired and wireless together ????


[re: john2007] [link to this post]
 
If it's a way that works then it's ok smile
As I said originally, if hardware allowed me to I would set it up so the router done all the routing work. I might even chuck in access control lists to make sure it does what it should be doing smile

----------------------------------------------------
We may be human But we're still animals

My Blog | follow me @metalhead41 | Surfin' Bird Dance
  Print Thread

Jump to