Solaris routing basics

This my first post on Solaris on my LinuxNIX(NIX is nothing but UNIX all flavors).

Creating routes in Solaris:
Basic Sun Solaris  routing

  • Add a route to a network
    #route add net network default-gateway
          #route add net 1.9..9.1

  • Add a default route.
    #route add default  default-gateway
          #route add default

  • Delete a route
    #route delete net network default-gateway
          #route delete net

  • Look-up and display the route for a destination network:
    # route get destination-network
          #route get

  • Get routing reports continuously
    # route monitor

  • Flushing the route table:
    # route flush

  • Seeing routing table in sun box
  • #netstat -nr
  • Use the "route add net" command with the -netmask option to make the route command to take the netmask specified on the command line

    # route add net 1 -netmask

Permanently assigning a routes in sun box

/etc/rc2.d/S69inet file can be used for routes to exits permanently

Example entries in S69inet file

/usr/sbin/route add net     1
/usr/sbin/route add net     1
/usr/sbin/route add net     1
save the file and exit so from next time on words no need to execute the route commands every time after reboot

  • Like the post? Please Subscribe to free RSS feed to get updates
  • Related Posts by Categories



    Translate this page


    The Linux Juggernaut | Copyright 2006-2009 Surendra Kumar Anne | Surendra's Home Page | Give us feedback how we are doing, Click here