Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I would like my IRC client to only use a WiFi connection and all other programs to use WiFi or wired connections. This is because every time I plug in my Ethernet cable my IRC client automatically reconnects over wired, and then when I disconnect the cable it reconnects me on wireless.

So now I have multiple users logged into IRC.

Can I force an app to use a certain connection over the others? I like having the wired connection as the primary connection over wireless, because I do a lot of uploading and downloading and the NIC card gets hot sometimes. I guess I should of stated I'm using a MacBook Pro.

share|improve this question
    
The NIC does get hot? How did you determine (this is a problem)? Can that information be edited out or is that part of your question? –  Gerry Aug 5 '12 at 18:57
    
it's not a problem. it's just the laptop get a little warm when maxing out wireless data transfer to my server for an hour or two (video editing.) that is why i use a wired connection for the transfer. but when i plug in the laptop IRC disconnects and then reconnects –  Throdne Aug 5 '12 at 22:45
add comment

1 Answer

up vote 1 down vote accepted

Add a static route for your irc server. For example I have 2 interfaces: wired (en0) and WiFi (en1) of which the wired one is the default. So if I get a route to a server, it will go through the default interface (see interface line in output) :

MacMini:~ root# netstat -rn | grep -i default
default            10.0.0.1           UGSc          198       10     en0
default            172.20.10.1        UGScI           0        0     en1

MacMini:~ root# route get tyr.be
   route to: squarespace.com
destination: squarespace.com
    gateway: 10.0.0.1
  interface: en0
      flags: <UP,GATEWAY,HOST,DONE,WASCLONED,IFSCOPE,IFREF>
 recvpipe  sendpipe  ssthresh  rtt,msec    rttvar  hopcount      mtu     expire
       0         0         0         0         0         0      1500         0

But if I add a static route through the WiFi interface en1 however :

MacMini:~ root# route add 65.39.205.54/32 172.20.10.1
add net 65.39.205.54: gateway 172.20.10.1

MacMini:~ root# netstat -rn | grep -i 65.39.205.54
65.39.205.54/32    172.20.10.1        UGSc            1        0     en1

MacMini:~ root# route get tyr.be
   route to: squarespace.com
destination: squarespace.com
  interface: en1
      flags: <UP,HOST,DONE,LLINFO,STATIC>
 recvpipe  sendpipe  ssthresh  rtt,msec    rttvar  hopcount      mtu     expire
       0         0         0         0         0         0      1500         0

The route will disappear every time you reboot. To make it permanent you would have to create a script launched as a startup item or a custom launchd script.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.