AOA Forums AOA Forums AOA Forums Folding For Team 45 AOA Files Home Front Page Become an AOA Subscriber! UserCP Calendar Memberlist FAQ Search Forum Home


Go Back   AOA Forums > Hardware > Mobile Devices and Networking


Reply
 
LinkBack Thread Tools Rate Thread
  #1 (permalink)  
Old 5th January, 2012, 10:41 PM
booman's Avatar
AOA Staff
 
Join Date: December 2005
Location: Mesa AZ
Posts: 4,030

Unique Problem with two NIC cards

This is really for a MAC OSX 10 but I was hoping your linux guru's may be able to point me in the right directions.

I have a MAC at work that needs to access the internal network (LAN) on en0 and then external (WAN) on en1.

I am trying to use a switch for the LAN and a Cox cable with a router for the WAN connection.

My work has a different setup so it may conflict, but if someone can think of a way for me to get started that would help.
__________________
Booman
Mint 17.3 64-bit
Wine 2.0
PlayOnLinux 4.2.10
Linux Guides: PC Games Linux Beginners Tips Linux Games List
Mack Truck Dungeon Of Fire Spray Booth Tutorial
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 6th January, 2012, 10:25 AM
Chief Systems Administrator
 
Join Date: September 2001
Location: Europe
Posts: 13,075

The first thing I'd ask is why do you need a separate WAN connection for the Mac?

Be aware that your machine could become an entry route for the LAN via the WAN. Cutting to the chase, your Mac could be used to bypass the work firewall/security devices. In many organisations, this is a total no-no! Thus, ensure the risk of this is understood and agreed upon by management before doing this - that way any problems that could arise in the future become someone else's problem.

Right, some generalisations here, as I know TCP/IP, but not necessarily OSX. When you have two network cards, there needs to be some way in which the host (your Mac) knows which network card to send the packets out of to get to the correct destination. Something known as the routing table holds that information. When a packet is send, the routing table is examined to find out where to send it from. There is also a special entry, which is the "default gateway" - this is simply where packets get sent if there's no entry in the routing table.

If your internal network is more complex than a single subnet, you'll need to add suitable entries to the routing table yourself. Most of what I've found on the internet suggests using the /etc/rc.local file to add the IP configuration and routing entry. There's some useful information here: Adding static routes to a network - Mac OS X Hints

Note that if you use DHCP on either network interface, it may well overwrite the updates you make to the routing table, so you'd be best off using static IP addresses on the two interfaces on your machine and disabling DHCP. Also be aware that you're in full control of where packets go when you're messing around with routing tables - you can break your network connectivity easily. Don't panic, but do ensure you keep a note of any changes you make so you can undo them if things break!
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 6th January, 2012, 02:32 PM
booman's Avatar
AOA Staff
 
Join Date: December 2005
Location: Mesa AZ
Posts: 4,030

Very interesting. It turns out you are right!
My boss did some tests with "route add" and subnet masking to see if we could force certain IP addresses to use the cox connection and it worked.
So you are saying to use the routing table with static IP addresses and the MAC will apply these new settings every time it boots right?

My boss decided to route only FTP IP addresses to the servers our employees access.... which is the current problem we are having. Only a few employees are uploading large graphical files to FTP and its extremely slow through our current gateway which is shared between several Domain Controller throughout the valley. Way too slow!

Thanks for the information, I'll send that link to my boss.
__________________
Booman
Mint 17.3 64-bit
Wine 2.0
PlayOnLinux 4.2.10
Linux Guides: PC Games Linux Beginners Tips Linux Games List
Mack Truck Dungeon Of Fire Spray Booth Tutorial
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 6th January, 2012, 05:59 PM
Chief Systems Administrator
 
Join Date: September 2001
Location: Europe
Posts: 13,075

You have the right idea, yup!

You'll find that the basics of TCP/IP are the same regardless of the underlying platform (fortunately!). Of course, you do have to figure out what commands are needed, but with a bit of knowledge you can configure anything from Windows to OS X to whatever weird and wacky things you can find.

It might be worth investigating why things are so slow on the gateway though.
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 6th January, 2012, 06:45 PM
booman's Avatar
AOA Staff
 
Join Date: December 2005
Location: Mesa AZ
Posts: 4,030

I don't have all the "techie" network terms, but the original gateway is sharing between several locations in the city instead of using the local Cox Coaxial connections for internet. We have a Synchronous 10Mbps so its kinda slow when you consider 200 employees using it. Specially the web developers.
So one location wants to try using both gateways at the same time, but OSX refuses to use the Cox gateway for internet. That was our problem.
So we are subnet masking to force FTP connections to use the Cox connection and everything else will stay on the original 10Mbps gateway.

This is all new to me but very interesting and informational. I never really studied subnets and masking because I didn't have a real application for it.
__________________
Booman
Mint 17.3 64-bit
Wine 2.0
PlayOnLinux 4.2.10
Linux Guides: PC Games Linux Beginners Tips Linux Games List
Mack Truck Dungeon Of Fire Spray Booth Tutorial
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 9th January, 2012, 11:07 AM
Chief Systems Administrator
 
Join Date: September 2001
Location: Europe
Posts: 13,075

That makes me wonder if it's worth you guys re-evaluating your network connectivity, and how it's used. If you do, make sure you know what people are actually using the network for!

It should be possible to set up a firewall/gateway on each site that provides internet access, but retain the internal network so that sites can talk to each other. This could be achieved a couple of different ways:
  • Each site retains it's connection to the existing network, and has a new internet connection. You'd need router/firewall/av/whatever for each site. This would also reduce the amount of traffic on the inter-site links, as you're not having to forward the web browsing traffic internally. If you included VPN connectivity, it could provide backup connectivity between sites if the main link went down.
  • Each site gets a new internet connection, but switches across to a VPN connection so that the existing links don't have to be retained. Potentially, heavy web browsing could impact the VPN performance though.
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 9th January, 2012, 03:26 PM
booman's Avatar
AOA Staff
 
Join Date: December 2005
Location: Mesa AZ
Posts: 4,030

You are exactly right! We are already talking about doing something like a gateway to share LAN/WAN connections over multiple sites. We will probably have to because the company is planning to expand.
We do have a few VPN connections too, but you are right... using internet through the VPN kills it.
I'll keep you updated on the subnet masks tests
Thanks for the tips
__________________
Booman
Mint 17.3 64-bit
Wine 2.0
PlayOnLinux 4.2.10
Linux Guides: PC Games Linux Beginners Tips Linux Games List
Mack Truck Dungeon Of Fire Spray Booth Tutorial
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 1st February, 2012, 12:50 AM
booman's Avatar
AOA Staff
 
Join Date: December 2005
Location: Mesa AZ
Posts: 4,030

We figured it out.
Using bash scripting and a LoginHook

create a script file without an extension in the root directory
Code:
#!/bash/bin
route add <IP of FTP server> <IP of COX gateway>
type the command for LoginHook
Code:
sudo defaults write com.apple.loginwindow LoginHook /script
Reboot and then use traceroute to see if it routes though the cox gateway instead of the original gateway.
__________________
Booman
Mint 17.3 64-bit
Wine 2.0
PlayOnLinux 4.2.10
Linux Guides: PC Games Linux Beginners Tips Linux Games List
Mack Truck Dungeon Of Fire Spray Booth Tutorial
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 24th February, 2012, 12:32 AM
booman's Avatar
AOA Staff
 
Join Date: December 2005
Location: Mesa AZ
Posts: 4,030

ironically, I got it working on 3 computers that were in a test environment, but when I apply it to the actual computers it was written for... they script doesn't work
How lame is that?
__________________
Booman
Mint 17.3 64-bit
Wine 2.0
PlayOnLinux 4.2.10
Linux Guides: PC Games Linux Beginners Tips Linux Games List
Mack Truck Dungeon Of Fire Spray Booth Tutorial
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 24th February, 2012, 10:59 AM
Chief Systems Administrator
 
Join Date: September 2001
Location: Europe
Posts: 13,075

Sounds about right!
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 24th February, 2012, 04:04 PM
booman's Avatar
AOA Staff
 
Join Date: December 2005
Location: Mesa AZ
Posts: 4,030

yeah, but these are MAC computers... shouldn't everything work perfectly as all MAC users proclaim?
__________________
Booman
Mint 17.3 64-bit
Wine 2.0
PlayOnLinux 4.2.10
Linux Guides: PC Games Linux Beginners Tips Linux Games List
Mack Truck Dungeon Of Fire Spray Booth Tutorial
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 28th February, 2012, 11:16 PM
cloasters's Avatar
Asst. BBS Administrator
 
Join Date: September 2001
Location: Location, Location
Posts: 21,956

The Perfect Mac World, but does anyone really live there?
__________________
When the world will be better.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 29th February, 2012, 03:34 PM
booman's Avatar
AOA Staff
 
Join Date: December 2005
Location: Mesa AZ
Posts: 4,030

Quote:
Originally Posted by cloasters View Post
The Perfect Mac World, but does anyone really live there?
Those are the testimonies I hear
Guess if you just use email, internet, itunes and play video... the world is perfect.

I however, crashed InDesign several times and have networking issues with multiple gateways and Windows shared drives.
__________________
Booman
Mint 17.3 64-bit
Wine 2.0
PlayOnLinux 4.2.10
Linux Guides: PC Games Linux Beginners Tips Linux Games List
Mack Truck Dungeon Of Fire Spray Booth Tutorial
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Rate This Thread
Rate This Thread:

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unique Approach: Far Cry meets Shakespeare: The SturmMOD! projektariel GAMES! OH YEAH! 0 20th August, 2008 01:31 PM
Four Unique ATX Cases Compared Samuknow Case Modifications 5 20th June, 2007 12:56 AM
E-mail Images pose a unique threat... No real solution in sight! Daniel ~ Data Security 0 8th January, 2007 03:57 PM
pci x1 cards? sasrob General Hardware Discussion 19 12th May, 2005 12:03 PM


All times are GMT +1. The time now is 05:43 AM.


Copyright ©2001 - 2010, AOA Forums
Don't Click Here Don't Click Here Either

Search Engine Friendly URLs by vBSEO 3.3.0