Subnet Address Mapping

Subnet Address Mapping

This service subcommand designates a public “apparent” IP Address to be shared by all computers in a private subnet. This permits an ISP (for example) to assign a single public IP Address for use by all computers at a customer site.

Command Syntax

  service [int] subnet [subnet address/bits] [app IP]
  service [int] client [subnet address/bits] [app IP]


  • “int” is the NetNAT Interface on the “public” side (i.e. en0, tr0, ppp0)
  • “subnet address/bits” is the subnet description for the client subnet
  • “app IP” is the apparent IP Address to be shared by all members of that subnet

When a client computer sends a message through the NAT to the outside world, the NAT must select an IP Address to use for that client, for this message. This command specifies that a certain IP Address will be used for everybody in the specified subnet. They may all be active at the same time, since we use port translation to permit them to share the IP Address simultaneously.

The two forms of the command are equivalent. The original name for the command was “service client” but is being changed to “service subnet” to make its meaning more clear. The subnet may be as restrictive as desired, allowing you to assign an apparent IP Address to a single computer if desired. For example:

service en0 subnet
service en0 subnet

This instructs the NAT to use for the single computer at, and use for everybody else in that subnet. At present, you may have up to 32 subnet mapping definitions in your NAT configuration.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s