Thursday, November 21, 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 10.1.1.12 with a class C subnet mask (255.255.255.0, 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=10.1.1.12/24
zonecfg:testzone:net>end
. . .

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.
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

LATEST REVIEWS

Recent Comments

error: Content is protected !!