New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
Internet, Networking, and Wireless Discussion of networking, internet, and wireless including Apple's Airport products.

Two network interfaces, how separate them?


Post Reply New Thread Subscribe

 
Thread Tools
thiagoaos

 
Member Since: Sep 11, 2009
Posts: 2
thiagoaos is on a distinguished road

thiagoaos is offline
Hi,

I have two network interfaces in one location, both has internet access.

One is throuth airport and another is throuth iPhone tethering.

With airport interface i connect in my work lan, but the internet access provide by my company is very slow and so many websites is blocked.

Then i want to use the airport interface only to access only 10.* address (intranet) and the iPhone tethering to access internet.

How can i do this?

* If i change order in interface list, putting first iPhone interface and later airpot, i can connect in internet but i can't connect in database, email smtp ..., services the is in my local network.

* If i change order in interface list, putting first airpot and later iPhone interface, i can connect in internet by the company interface access using proxy and access all intranet services, but i can't use iPhone internet access.

* My company use authentication proxy to internet access
QUOTE Thanks
thiagoaos

 
Member Since: Sep 11, 2009
Posts: 2
thiagoaos is on a distinguished road

thiagoaos is offline
Hi, can i help me?

I still don't fix this.
QUOTE Thanks
Tex-Twil

 
Member Since: Apr 07, 2008
Posts: 187
Tex-Twil has a spectacular aura about

Tex-Twil is offline
Hi,
interesting question.

I think there must be some routing configuration done. Si that all the 10.0.0.0/8 traffic goes through the en1 interface, the rest through the tethered iface.

Wait, what is the network mask of your company's network ?

You could try:
Code:
route add -net 10.0.0.0/8 -interface en1 
route add default -interface name_tether_iface
I haven't tried it though and I will have a closer look at this when I'm home.

Tex
QUOTE Thanks
Tex-Twil

 
Member Since: Apr 07, 2008
Posts: 187
Tex-Twil has a spectacular aura about

Tex-Twil is offline
Hi,
again. So here is what I did so that my iPhone is the "default" interface and my airport is used only for the networks 192.168.100.0/24 and 10.0.1.0/24

I had my airport configured by DHCP and internet working.
The I plugged the iPhone and enabled tethering.
Open a root Terminal and display the configured routes

Code:
~ root# netstat -rn -f inet
Routing tables

Internet:
Destination        Gateway            Flags        Refs      Use   Netif Expire
default            10.0.1.1           UGSc            3        0     en1
default            192.168.20.1       UGScI           1        0     en2
Here we can see that we have two default routes which is not good.
The en1 interface is the Airport
The en2 is the iphone.
Note the default gateway of the iphone which is here 192.168.20.1

Now let's delete both routes (I'm not sure if the flush command is really necessary):

Code:
~ root# route delete  default 192.168.20.1
~ root# route delete  default 10.0.1.1
~ root# route flush
And add again the default route through the iPhone

Code:
~ root# route add default 192.168.20.1
Now you should have a working internet connection.

Let's add the route to the 192.168.100.0/24 and 10.0.1.0/24 networks:


Code:
~ root# route add -net 192.168.100.1/24 10.0.1.1
~ root# route add -net 10.0.1/24 -interface en1
I think the last command is not necessary because the en1 interface has an IP in the 10.0.1/24 network so it should find the way there. Note that for the 192... network, I also specify the gateway 10.0.1.1, which is the router needed to reach that network through the en1 interface.

Hope it helps.

Tex
QUOTE Thanks
Collin Bl

 
Collin Bl's Avatar
 
Member Since: Apr 07, 2009
Location: Napier NZ
Posts: 3,281
Collin Bl is a jewel in the roughCollin Bl is a jewel in the roughCollin Bl is a jewel in the rough
Mac Specs: 27 iMac i5, MBP 13 & iMac 20, 2TB dual TC, AppleTV, iPh4S

Collin Bl is offline
Hi Tex, have been reading thru your post and is there a digit missing in one of the addresses above? In last para should it be 10.0.1.1/24?
QUOTE Thanks
Tex-Twil

 
Member Since: Apr 07, 2008
Posts: 187
Tex-Twil has a spectacular aura about

Tex-Twil is offline
Quote:
Originally Posted by Collin Bl View Post
Hi Tex, have been reading thru your post and is there a digit missing in one of the addresses above? In last para should it be 10.0.1.1/24?
Hi,
since there is a 24-bit net mask, the last "digit" (8 bits) does not matter when you write the network address. But you're right, is is more clear to write the entire address 10.0.1.0/24 but in this case I prefer to write a 0

Tex
QUOTE Thanks
Collin Bl

 
Collin Bl's Avatar
 
Member Since: Apr 07, 2009
Location: Napier NZ
Posts: 3,281
Collin Bl is a jewel in the roughCollin Bl is a jewel in the roughCollin Bl is a jewel in the rough
Mac Specs: 27 iMac i5, MBP 13 & iMac 20, 2TB dual TC, AppleTV, iPh4S

Collin Bl is offline
Thanks Tex - not an area i know much about, but your reply helps.
QUOTE Thanks

Post Reply New Thread Subscribe


« How to use two networks at the same time | Which Router To Get »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Made the switch! Need help finding network Izzy Switcher Hangout 8 01-19-2008 11:55 PM
Network Printing Difficulties with MacBook with Leopard korashschiff OS X - Operating System 0 01-02-2008 12:37 AM
Cannot connect to wireless network PunkRockTuba Internet, Networking, and Wireless 5 10-10-2005 11:02 PM
Network Browser has stopped working. lil Internet, Networking, and Wireless 3 09-23-2005 01:30 PM
Looooong startup! JoelD Apple Desktops 6 01-21-2005 12:14 PM

All times are GMT -4. The time now is 06:23 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?