Solaris Troubleshooting : Define a Static Route using routed

In order to do this you must create entries in the /etc/gateways file.  The /etc/gateways file has the format of

net < remote-network-ip> gateway < gateway-ip> metric <hop-count> passive


net <remote-network-ip> gateway < gateway-ip> metric <hop-count> active

The keyword ‘passive’ should be used if you want the entry to be permanent. The keyword ‘active’ should be used if you want in.routed to occasionally query the gateway host, and delete the route if it becomes inactive.

An example of a gateway file follow:

# cat /etc/gateways

net gateway metric 1 passive

net gateway metric 1 passive

The first line is identical to the ‘route add’ command.  It creates a route for the network through the gateway machine 150. 101.16.1.

The second entry creates a default route through gateway machine

You can also add routes to specific hosts in the gateways file by using the keyword ‘host’ rather than ‘net’ and specifying a host address rather than a network address



I have started ( aka in 2009 as my own personal reference blog, and later sometime i have realized that my leanings might be helpful for other unixadmins if I manage my knowledge-base in more user friendly format. And the result is today's' You can connect me at -

3 Responses

  1. Ramineni Naresh says:

    Exactly What it meant by static router? How can we add static router for DMZ servers?

    • Ramdev Ramdev says:

      @Naresh, Static Route is nothing but fixed network path that we define to reach a specific host or subnet of hosts.

      Normally, DMZ servers used to provide applications to the internet/public world and they are directly exposed to internet with their public IPs. And that is the reason DMZ servers have high secured configurations compared to any normal servers in the internal network. DMZ servers normally stay behind the firewall and only few hosts from internal network allowed to access the DMZ hosts.

      If you want to afd Static route to DMZ servers the process is similar to normal hosts, but we have to make sure that firewall ports are configured to allow the traffic using the route.

  1. September 16, 2015

    […] Read – Define a Static Route using routed […]

What is in your mind, about this post ? Leave a Reply

  Our next learning article is ready, subscribe it in your email

What is your Learning Goal for Next Six Months ? Talk to us