Thursday, June 20, 2024
HomeSolarisSolaris networkingSolaris 10: Set Subnet Mask in Zone

Solaris 10: Set Subnet Mask in Zone

A netmask setting is not available when creating a zone, and the /etc/netmasks file is not consulted when plumbing up zone interfaces. This tech-recipe describes how to force a netmask when creating a zone.

To configure an IP address of with a class C subnet mask (, a 24 bit mask) on physical interface bge0, use these commands when running zonecfg to create the zone. (Substitute your IP address, netmask length, and physical interface as appropriate.):

zonecfg:testzone>add net
zonecfg:testzone:net>set physical=bge0
zonecfg:testzone:net>set address=
. . .

This configuration is only necessary when using a non-standard netmask.

Quinn McHenry
Quinn McHenry
Quinn was one of the original co-founders of Tech-Recipes. He is currently crafting iOS applications as a senior developer at Small Planet Digital in Brooklyn, New York.


Please enter your comment!
Please enter your name here

Most Popular


Recent Comments

error: Content is protected !!