Add static route on Mac OSX and Windows

Add static route on windows is very easy. Run command prompt as Administrator.

route -p add mask

Add static route on OS x, need the following steps

  1. Find the network service which can access gateway
    mac-mini:~ ladmin$ networksetup -listallnetworkservices
    An asterisk (*) denotes that a network service is disabled.
    Bluetooth DUN
    *Bluetooth PAN 2
    mac-mini:~ ladmin$ networksetup -getinfo LAN
    Manual Configuration
    IP address:
    Subnet mask:
    IPv6: Automatic
    IPv6 IP address: none
    IPv6 Router: none
    Ethernet Address: 00:1f:5b:33:1d:75
  2. set additional gateway on the network service
    mac-mini:~ ladmin$ sudo networksetup -setadditionalroutes LAN
    mac-mini:~ ladmin$ networksetup -getadditionalroutes LAN
  3. Check the route list

    mac-mini:~ ladmin$ netstat -rn
    Routing tables
    Destination        Gateway            Flags        Refs      Use   Netif Expire
    default      UGSc           18        0   vlan0
    default       UGScI           0        0     en0
    default       UGScI           0        0     en1
    default       UGScI           0        0     en2
    10/24         UGSc            0        0     en1
    127                UCS             0        0     lo0          UH             75  2330825     lo0
    169.254            link#8             UCS             1        0   vlan0
    169.254            link#4             UCSI            0        0     en0
    169.254            link#5             UCSI            0        0     en1

    Add more routing paths:

    iso@isoAir:/dev$ sudo networksetup -setadditionalroutes “Ethernet Pantalla Trabajo”
    iso@isoAir:/dev$ sudo networksetup -getadditionalroutes “Ethernet Pantalla Trabajo”


Mac OSX “Hold for authentication” when trying to print

Fix steps:

  1. Print any document and the job is hold in queue with message “Hold for authentication”
  2. Open a terminal window and run the following commands
    $ lpstat -s

    Output likes the following:
    device for <printer name>: smb://<server>/<shared name>

    device for Canon_iR_ADV_4245: smb://my-windows-printer-server/Canon_iR_ADV_4245
    $ sudo lpadmin -p <printer name> -o auth-info-required=<Your username>,<Your password>