Interface Commands
Interface commands attach drivers and configure interfaces between
the NAT and the physical networks. These commands are some of the
most complex, and must be completed before the NAT can communicate
on its network interfaces.
Interface Naming Conventions
While this is not a major issue, we encourage the use of predictable
interface names for particular interface types. Recommended names
are:
- en0, en1, en2, en3 for Ethernet Interfaces (the number available
depends on your NAT model)
- tr0, tr1 for Token Ring Interfaces (the number available
depends on your NAT model)
- ppp0, ppp1 for PPP Interfaces (depending on your model)
Attaching Drivers to an Interface
The hardware drivers constitute the glue between the hardware
interface and the NAT processes. Before the NAT can use the
hardware driver, it must be "attached" to the NAT's logical
interface. The attach command actually creates the logical interface.
Command Syntax for Network Drivers
attach packet [int #] [int name] [# bufs] [buf size]
Where:
- "Int #" is the software interrupt vector assigned to the hardware
driver when it was started.
- "Int name" is the name of the NAT's logical interface as mentioned
above.
- "# bufs" is the number of memory buffers to allocate for the low-level
driver software to use.
- "Buf size" is the physical size in bytes of the data portion of the
low-level memory buffers.
Example values for the attachment of a first (or only) driver to NAT
interface "en0" are shown here:
attach packet 0x60 en0 5 1500
This attaches a packet driver on software interrupt vector 0x60 (96 decimal)
to interface "en0" and allocates five 1500-byte buffers.
Possible responses are:
- "Interface xxx already exists" when the interface specified already
has a driver attached.
- "No packet driver loaded at int 0xnn" when no hardware driver is
installed on the specified software interrupt number.
- No response if the command was successful.
Command Syntax for Async Drivers
attach asy [i/o] [irq] ppp [name] [window] [buf] [speed] [opt]
Where:
- "i/o" is the comm port I/O Address (i.e., 0x3f8 for com1, 0x2f8 for com2)
- "irq" is the comm port IRQ (i.e., 4 for com1)
- "name" is the name of the NAT's logical interface as mentioned
above (typically pp0).
- "window" is 8092
- "buf" is 1500
- "opt" is optional, and is 5 for 16550A, 6 for 16650, and 7 for 16750 UART.
Example values for the attachment of a first (or only) ASYNC driver to NAT
interface "pp0" at 230,400bps using a 16650 are shown here:
attach asy 0x3f8 4 ppp pp0 8092 1500 230400 6
This attaches a PPP driver
to interface "pp0" using a StarTech/Exar 16650 on COM1.
Possible responses are:
- "Interface xxx already exists" when the interface specified already
has a driver attached.
- No response if the command was successful.
Configuring the NAT Logical Interface
The ifconfig command sets the interface parameters for the
logical interface created by the attach command
shown previously. These parameters include:
- The primary IP Address for the Interface when talking on a network.
- The Netmask for the network to which
the NAT is connected.
- The Broadcast Address for the network.
- The Private or Public designation for the network.
Command Syntax
Set the IP Address of the Interface
This sets the primary IP Address, which is the one that the NAT will
use:
- When it originates a message itself
- When it is being used as a gateway
- When it is performing dynamic service proxy duties
ifconfig [int name] ipaddress [ip address]
Where:
- "Int name" is the name of the NAT logical interface (e.g. en0).
- "IP Address" is the primary IP Address for this interface in
dotted-decimal notation.
Response will be "Interface xxx unknown" if the specified interface
has not been created with an attach command.
There will be no response if the command was successful.
Set the Broadcast IP Address of the Interface
This sets the broadcast IP Address, which is the one that all devices
on the attached network listen to, including the NAT.
ifconfig [int name] broadcast [ip address]
Where:
- "Int name" is the name of the NAT logical interface (e.g. en0).
- "IP Address" is the broadcast IP Address for this interface in
dotted-decimal notation.
Response will be "Interface xxx unknown" if the specified interface
has not been created with an attach command.
There will be no response if the command was successful.
Set the Netmask of the Interface
The Netmask is a 32-bit mask used by all workstations, hosts and
routers to determine whether two IP Addresses are in the same
logical network. It should be set to the same value for all devices
on a given network segment. The NAT does not support "comb" style
netmasks. All one-bits in the netmask must be contiguous.
ifconfig [int name] netmask [hex netmask]
Where:
- "Int name" is the name of the NAT logical interface (e.g. en0).
- "Hex netmask" is the hexadecimal representation of the 32-bit
netmask. For a non-segmented Class C network, the likely mask would
be 0xffffff00.
Response will be "Interface xxx unknown" if the specified interface
has not been created with an attach command.
There will be no response if the command was successful.
Designate the Interface as Public or Private
A "public" network uses IP Addresses that the rest of the world,
or the rest of an Enterprise may know about. A "private" network
may use any addresses, preferably the never-to-be-issued addresses
from RFC 1597. The NAT hides the addresses on the private network
by translating them to public addresses on the public side. We
call the public version of the address an "apparent address," and
the private version the "actual address."
Two directly-attached private networks may communicate through the
NAT without any address translation, if desired.
ifconfig [int name] private [0|1|2]
Where:
- "Int name" is the name of the NAT logical interface (e.g. en0).
- "0|1|2" indicates the three possible values for the "private"
parameter. These values correspond to:
- 0 - The network is a public network.
- 1 - The network is a private network. It will be concealed from
any public network, but may communicate directly with another private
network without address translation.
- 2 - The network is a really private network. It will be
concealed from both public and other private networks through address
translation.
Response will be "Interface xxx unknown" if the specified interface
has not been created with an attach command.
There will be no response if the command was successful.
Display Status Of
The NAT Logical Interface
Use of the ifconfig command with no arguments will display
summary status and counts of all defined interfaces. Use of the
ifconfig command with the name of an interface as the lone
parameter will display the current status and counts of the specified
interface.
This page was last modified on 1 October, 1995.
This information is proprietary to Network Safety Corporation. Network
Safety, WebElite, DialNAT and NetNAT are trademarks of Network Safety
Corporation. For information on our products and services,
please contact our sales department.
This page was prepared using WebElite, our professional editor for the Web.