Solaris routing basics

0 comments

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
Example
          #route add net 5.23.1.0 1.9..9.1


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

  • Delete a route
    #route delete net network default-gateway
Example
          #route delete net 5.23.1.0 1.9.9.1

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

  • 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 192.168.68.0 128.50.1.250 1 -netmask 255.255.255.192

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.100.0.0       1.7.16.1     1
/usr/sbin/route add net         17.48.30.0      1.7.0.48     1
/usr/sbin/route add net         17.48.30.0      1.7.48.1     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
  • Archive

    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