Solaris zones default gateway

Assume the following setup: A Solaris 10 box with a zone Zone1.

The global zone is connected on 10.0.0.0/24 thru NIC bge0. The default gateway is 10.0.0.1.

Zone1 is part of a DMZ (192.168.0.0/24) and has a dedicated NIC bge1. The DMZ default gateway is 192.168.0.1.

Solaris-zones

A Solaris zone cannot interact on the TCP/IP stack. Everything is configured at the global zone level. It this configuration, Zone1 won’t have a default gateway!

To fix this problem, add a second gateway (/etc/defaultrouter(4)) in the global zone. Based on the zone IP address, Solaris will use the correct default gateway.

global# cat /etc/defaultrouter
# Globalzone default  gateway
10.0.0.1
# Zone1 default gateway
192.168.0.1
global#

2 comments

  1. I have seen some sketchy results trying to implement this. It seems that multiple default routes are used for fault tolerance. Looks like solaris picks one randomly, so sometimes you get the one you want sometimes you don’t.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.