name/names


Associate a name with an IP address.

[no] name ip_address name

[no] names

clear names

show names


Syntax Description

ip_address

The IP address of the host being named.

name

The name assigned to the IP address. Allowable characters are a to z, A to Z, 0 to 9, a dash, and an underscore. The name cannot start with a number. If the name is over 16 characters long, the name command fails.


names

Identify a host by a text name. Names defined become like a host table local to the firewall. Because there is no connection to DNS or /etc/hosts on UNIX servers, use of this command is a mixed blessing: It makes configurations much more readable but introduces another level of abstraction to administer. Not only do you have to add and delete IP addresses to the configuration as you do now, but with this command, you need to ensure that the host names either match existing names or you have a map to list the differences.

The names command enables use of the name command to map text strings to IP addresses. The clear names and no names commands are the same and disable use of the name text strings. The show names command lists the name command statements in the configuration.

You must first use the names command before using the name command. Use the name command immediately after the names command and before you use the write memory command.

To disable displaying name values, use the no names command.

Only one name can be associated with an IP address.

Both the name and names command statements are saved in the configuration.

While the name command will let you assign a name to a network mask, no other firewall command requiring a mask will let you use the name as a mask value. For example, the following command is accepted.

name 255.255.255.0 class-C-mask

None of the commands in which a mask is required can process the "class-C-mask" as an accepted network mask.

Configuration mode


Examples

In the example that follows, the names command enables use of the name command. The name command substitutes pix-_inside for references to 192.168.42.3, and pix_outside for 209.165.201.3. The ip address commands use these names while assigning IP addresses to the network interfaces. The no names command disables the name command values from displaying. Subsequent use of the names command restores their display.

    names

    name 192.168.42.3 pix_inside

    name 209.165.201.3 pix_outside

     ip address inside pix_inside 255.255.255.0
     ip address  outside pix_ outside 255.255.255.224

    show ip address

    inside  ip address pix_inside mask 255.255.255.0

     outside  ip address pix_ outside mask 255.255.255.224

    no names

    show ip address

    inside  ip address 192.168.42.3 mask 255.255.255.0

     outside  ip address 209.165.201.3 mask 255.255.255.224

    names

    show ip address

    inside  ip address pix_inside mask 255.255.255.0

     outside  ip address pix_ outside mask 255.255.255.224