xmlclient.py — remote configuration client for aftr
xmlclient.py
aftr-addr
[command
]
user-ipv6
protocol
src-ipv4
src-port
nat-ipv4
nat-port
This requests the aftr to create a port mapping.
user-ipv6
nat-ipv4
This requests the aftr to create a tunnel entry,
using nat-ipv4
as the natted
IPv4 address for all future port mappings on this tunnel
(dynamic as well as static).
user-ipv6
protocol
src-ipv4
src-port
nat-ipv4
nat-port
user-ipv6
protocol
src-ipv4
src-port
protocol
nat-ipv4
nat-port
These three forms of the delete
command all request the aftr to delete a port mapping.
The mapping can be fully specified (first form), but a
mapping can also be uniquely identifed by either internal
parameters (second form) or external parameters (third
form).
user-ipv6
This requests the aftr to delete all port mappings (dynamic as well as static) and other state associated with the given tunnel address. This is often done prior to moving the customer to a new natted IPv4 address.
This requests the aftr to remove all static port mappings and configured tunnel entries. Note that this is a very drastic action, and should only be undertaken if (for example) the aftr configuration is seriously out of sync with the provisioning system.
user-ipv6
This requests the aftr to report all static port mappings associated with the given tunnel address.
This requests the aftr to report all static port mappings, and all configured tunnels without static port mappings.
If no commands are given on the command line, xmlclient.py will read commands from stdin. This allows the provisioning system to accumulate changes for a given AFTR, and send them all at once.
In general, it is probably easier for the provisioning system to send requests immediately, and get replies immediately. However, some operators may prefer to batch up requests, and this method sends multiple requests over an open connection, without having to establish a connection for each request.
Example:
xmlclient.py 2001::500 <script
where script
contains:
create 2001::525a:8c5a:30d4:e36e tcp 192.168.0.88 6265 198.18.200.174 5005
create 2001::835c:1eff:8d66:22fc tcp 192.168.1.138 3877 198.18.200.121 5572
create 2001::e3:9a2f:8abf:40de:2d87 udp 192.168.0.92 7356 198.18.200.149 5547