4

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.

2
  • 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, 2012 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, 2012 at 22:45

1 Answer 1

4

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.

1
  • Nice. Where did you get the address 65.39.205.54?
    – Bruno Wego
    Dec 12, 2019 at 10:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .