2

Trying to add a static route on my MBP (en0 is wifi, en4 is thunderbolt ethernet).

ablair@hayate:~$ sudo route add -host 1.1.1.1 192.168.0.1 
add host 1.1.1.1: gateway 192.168.0.1
ablair@hayate:~$ netstat -rn
Routing tables

Internet:
Destination        Gateway            Flags        Refs      Use   Netif Expire
default            192.168.64.1       UGSc           39        5     en0
default            192.168.0.1        UGScI           0        0     en4
10/10              10.224.50.29       UGSc            0        0   utun0
10.222/16          10.224.50.29       UGSc            4     3839   utun0
10.223/16          10.224.50.29       UGSc            0        0   utun0
10.224/16          10.224.50.29       UGSc            0        0   utun0
10.224.50.29/32    127.0.0.1          UGSc            5        0     lo0
10.255/16          10.224.50.29       UGSc            0        0   utun0
58.87.3.86/32      192.168.64.1       UGSc            1        0     en0
127                127.0.0.1          UCS             0        0     lo0
127.0.0.1          127.0.0.1          UH            105   325280     lo0
169.254            link#5             UCS             0        0     en0
169.254            link#13            UCSI            0        0     en4
192.168.0          link#13            UCS             0        0     en4
192.168.0.1/32     link#13            UCS             1        0     en4
192.168.0.1        link#13            UHLWIir         1        0     en4
192.168.0.20/32    link#13            UCS             1        0     en4
192.168.64         link#5             UCS             3        0     en0
192.168.64.1       0:18:a:46:81:fe    UHLS            0        0     en0
192.168.64.1       0:18:a:46:81:fe    UHLWIir        41       67     en0   1200
192.168.64.243/32  link#5             UCS             0        0     en0
192.168.64.250     30:a8:db:93:d9:ad  UHLWIi          1      233     en0    952
192.168.180        link#11            UCS             1        0  vmnet1
192.168.208        link#12            UC              1        0  vmnet8
192.168.208.131    0:c:29:16:93:e7    UHLWIi          1        0  vmnet8   1108

I don't get any errors, and I also don't get my route added. I'm new to OS X, so it may just be that my syntax is wrong, but I've tried numerous examples from across the internet and I'm still getting the same results.

It also acts similarly if I try to add a network.

ablair@hayate:~$ sudo route add -net 1.1.1.0/30 192.168.0.1  
add net 1.1.1.0: gateway 192.168.0.1
ablair@hayate:~$ netstat -rn
Routing tables

Internet:
Destination        Gateway            Flags        Refs      Use   Netif Expire
default            192.168.64.1       UGSc           30        5     en0
default            192.168.0.1        UGScI           0        0     en4
10/10              10.224.50.29       UGSc            0        0   utun0
10.222/16          10.224.50.29       UGSc            2     3857   utun0
10.223/16          10.224.50.29       UGSc            0        0   utun0
10.224/16          10.224.50.29       UGSc            0        0   utun0
10.224.50.29/32    127.0.0.1          UGSc            5        0     lo0
10.255/16          10.224.50.29       UGSc            0        0   utun0
58.87.3.86/32      192.168.64.1       UGSc            1        0     en0
127                127.0.0.1          UCS             0        0     lo0
127.0.0.1          127.0.0.1          UH            107   326592     lo0
169.254            link#5             UCS             0        0     en0
169.254            link#13            UCSI            0        0     en4
192.168.0          link#13            UCS             0        0     en4
192.168.0.1/32     link#13            UCS             1        0     en4
192.168.0.1        link#13            UHLWIir         1        0     en4
192.168.0.20/32    link#13            UCS             1        0     en4
192.168.64         link#5             UCS             3        0     en0
192.168.64.1       0:18:a:46:81:fe    UHLS            0        0     en0
192.168.64.1       0:18:a:46:81:fe    UHLWIir        32       67     en0   1187
192.168.64.243/32  link#5             UCS             0        0     en0
192.168.64.250     30:a8:db:93:d9:ad  UHLWIi          2      241     en0   1159
192.168.180        link#11            UCS             1        0  vmnet1
192.168.208        link#12            UC              1        0  vmnet8
192.168.208.131    0:c:29:16:93:e7    UHLWIi          1        0  vmnet8   1124

Thank you, Aaron

2

Ahh, how silly of me!

See those routes pointing out utun0? Those are routes injected by the Cisco AnyConnect SSL VPN client. My experience on Windows is that it freezes the routing table while it has a tunnel established.

Upon disconnecting this VPN, all of the routes I had attempted to add showed up in the routing table.

I guess a bonus question is then, whether anybody knows how I could add these routes even though I'm connected with an AnyConnect VPN?

1

Regarding your question about adding routes when connected to Cisco SSL VPN, the answer is no. The Anyconnect software requires the routing table to be frozen for security purposes (for example if split-tunneling is disabled, all traffic MUST traverse the tunnel.)

It's a security requirement implemented by your network administrator. Hope that helps.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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