The NATTextFileAgent is provided as a backup if your NAT
translation device is unsupported. You can configure this agent.
Before you begin
Before running the NATTextFileAgent agent, you must do the
following tasks:
- Enable NAT translation
- Configure trap handling
About this task
The NATTextFileAgent reads a flat file called NATTranslations.txt
that contains the NAT translations present on a particular NAT gateway.
This allows the discovery an avenue to support a network containing
a currently unsupported NAT gateway. This agent does not download
its information from the NAT gateways, but reads a list of private
to public IP address mappings from a flat file.To configure and
run the agent:
Procedure
- Install the Perl API. All Perl agents require the API to
run. The API is installed by default in Network Manager.
To check whether the API is installed, check that the following
file exists:
$NCHOME/precision/bin/ncp_perl
If the file is listed, then the Perl API is installed.
- Create a NAT mapping file to be read by the agent that
contains the public to private address mappings. Your NAT mapping
file must be in a format that can be read by the agent, that is, the
values must be valid IP addresses specified in columns separated by
tabs.
By default, the agent uses the file $NCHOME/etc/precision/NATTranslations.txt.
If you want to create your own mappings, you must back up and edit
this default file. To make the agent use the non-default NAT mapping
file, edit the following line in $NCHOME/precision/disco/agents/Perlagents/NATTextFileAgent.pl:
my $natFileName = "$ENV{$NCHOME}/etc/precision/NATTranslations.txt";
- The NAT mapping file contains the following columns:
- The IP address of the NAT gateway of the NAT domain to which the
device belongs. You must specify mappings for all NAT gateways in
the same file.
- The outside global address of the device, that is, the public
address of the device.
- The inside local address of the device, that is, the private address
of the device.
The following example shows a NAT mapping file for
two gateways having IP addresses of 1.2.3.4 and 1.2.3.9 respectively.
// NATGatewayIP PublicIP PrivateIP
1.2.3.4 2.3.4.5 10.10.1.1
1.2.3.4 2.3.4.6 10.10.1.2
1.2.3.9 2.3.6.1 10.10.1.1
1.2.3.9 2.3.6.2 10.10.1.2
Note: From the perspective of the management
station, the public IP address of a particular gateway translation
is not necessarily the same as the public address that the management
stations sees. The public address is the IP address that the gateway
retrieves from one port and then translates and places on another
port. This difference is important to note when you have chained gateways,
where an IP address can be translated multiple times. The public IP
is effectively the IP address that is closer to the management domain.
- Enable the agent. There is an insert in the disco.agents
table in the DiscoAgents.cfg configuration file for every installed
discovery agent. To activate an agent, alter the insert so that the
m_Valid column for that agent is set to 1. To deactivate an agent,
ensure that m_Valid=0.
The following example
insert activates the NATTextFileAgent agent.
insert into disco.agents
(
m_AgentName, m_Valid, m_AgentClass, m_IsIndirect, m_Precedence, m_IsPerl
)
values
(
'NATTextFileAgent', 1, 8, 0, 2, 1
);
- Ensure that the NATTimer.stch stitcher has been configured
to trigger a rediscovery against the NAT gateways. By default, the
NATTimer.stch stitcher runs every hour. You can alter this interval
by locating the following line in the stitcher file and changing the
integer value:
ActOnTimedTrigger( ( m_Interval ) values ( 1 ) ; ) ;
- Run a discovery.