Private network connection

Discussion in 'Mac OS X Server, Xserve, and Networking' started by jacekpodwysocki, Jun 7, 2015.

  1. jacekpodwysocki macrumors newbie

    Joined:
    Jun 23, 2012
    #1
    Hi!

    I'm trying to set up a local network on my mac by using the following method:
    Code:
    ifconfig en1 192.168.20.14 netmask 255.255.255.248 broadcast 192.168.20.20
    And my network becomes:
    Code:
    Network address: 192.168.20.13
    Broadcast: 192.168.20.20
    IP: 192.168.20.14
    Mask: 255.255.255.248
    
    Which works fine and I'm able to ping to my ip 192.168.20.14 as its the lo0. What I'm trying to do now is use this network to access the internet so I try to route all the packets to the router available at 192.168.0.1 I have tried everything and it does not see the router at all. As I understand I need to route the packets starting with 192.168.20 to the network that router is broadcasting:
    Code:
    route add -net 192.168.20 192.168.0.1 255.255.255.0
    Firewall is off just in case it blocks traffic.

    Any ideas? Thx in advance!
     
  2. satcomer macrumors 603

    satcomer

    Joined:
    Feb 19, 2008
    Location:
    The Finger Lakes Region
    #2
    You are using the wrong OS X command for your Mac. So just do the command:

    Code:
    man networksetup
    You then can do so many more command for OS X networking.
     
  3. jacekpodwysocki thread starter macrumors newbie

    Joined:
    Jun 23, 2012
    #3
    thanks!

    But as I can see the networksetup command for modifying routing table is same as the one I've been using before. The problem remains as even though, packets are routed to 192.168.0.1(router ip), router cannot be resolved...
     

Share This Page