Add a persistent route. # route -p add -net network-address-gateway gateway-address –p. Creates a route that persists across system reboots. If you want the route to persist only for the current session, do not use the –p option. –net network-address. Specifies that the route goes to the network with the address that is specified in

example# route add 192.0.2.32/27 somegateway. example# route add 192.0.2.32 -netmask 255.255.255.224 somegateway. example# route add 192.0.2.32 somegateway 255.255.255.224. For IPv6, only the slash format is accepted. The following example creates an IPv6 route to the destination 33fe:: with a netmask of 16 one-bits followed by 112 zero-bits. When I try and add a static route to go out of eth0, I get the following error: servername-test:/ # route add -net 10.248.12.0 netmask 255.255.255.240 gw 192.168.36.254 dev eth0 SIOCADDRT: Network is unreachable My Default gateway is: Subject: [unixadmin-l] To add persistent route in Solaris 9 box. Hi All, I am facing following problem while administering Solaris 9 server. I add default route to server by following command #route add default 10.22.21.65 After adding the same i am able to login through my network on this server. If you wish to add or edit the Default Gateway or the Default Router in Sun Solaris, edit /etc/defaultrouter file and update the IP Address. One entry per line for one or more default gateways (very unlikely to have muktiple default gateways). This file is read at the boot time and hence the server needs to be rebooted for the changes to take

The above command line method will not work in solaris 8 and 9, also in some older patch versions of solaris 10. To overcome this we have another method. We can create a rc script in /etc/rc2.d, say with name S91routes. Add the route add command in this script :

add it to the global zone and it'll be accessible to the local zone AngelicaX via solaris-l wrote: Posted by AngelicaX on 01/03/2008 12:35:00 PM As of Solaris 10 10/09, when a zone stops, the default route is not deleted. Default routes on the same datalink and IP subnet are shared across non-global zones. If a non-global zone is on the same datalink and subnet as the global zone, default route(s) configured for one zone will apply for all other zones on that datalink and IP subnet. Mar 29, 2009 · 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 […] Mar 23, 2010 · The Solaris route command enables manual manipulation of the route table. The routing table contains a list of networks that the router knows it can send packets to, and states over which link to send the packets.

route add destination gateway eg route add default 172.16.96.9 adds a default gateway netstat -r will now show your 'new' default gateway. You should also add this command to one of the /etc/rc.n directories so that is is set up after a reboot. Mike

Apr 20, 2009 · It used to be that in order to add persistent static routes in Solaris, you had to whip up your own init script that manually ran ‘route add’. Starting back in Solaris 10 11/06, Sun finally gave us a better way to do it. From the route(1M) man page: In solaris , you can add a route whose traffic should go out a specific interface by adding -ifp [ifname] to the route command line. For instance, suppose a host has two interfaces (eri0 and hme0) on the same IP subnet (10.4.2.9/24 with gateway 10.4.2.254), and traffic for just a few hosts needs to go out the secondary hme0 interface. We have a Sunfire V240 server with Solaris 10, I need to change the subnetmask and gateway. I was able to change the subnetmask and gateway by editing the files /etc/subnetmasks and /etc/defaultrouter. Server was rebooted but the problem is that when server shutdown or rebooted, network won't come up as I have to run this command: Apr 17, 2011 · The metric can be considered a cost for using the route. If a routing table contains multiple routes to the same destination, the. cheapest route (lowest cost or metric) will be used. To add a route with a. metric of 10 to the host 192.168.1.123 through the gateway 192.168.1.10, use. the following command: route add 192.168.1.123 192.168.1.10 add it to the global zone and it'll be accessible to the local zone AngelicaX via solaris-l wrote: Posted by AngelicaX on 01/03/2008 12:35:00 PM