[Previous] [Contents] [Next]

netmap

Load the Network Manager's logical-to-physical node ID mapping table (QNX)

Syntax:

netmap [-b] [-F mapfile | -f] [-m map_entry] [-n node]

netmap [-b] [-n node]

Options:

-b
Display brouting nodes (nodes through which you have access to other LANs with which you are not directly connected).
-f
Set the network node mapping table from the default mapfile /etc/config/netmap. (root only)
-F mapfile
Set the network node mapping table from the specified mapfile. (root only.) If you specify -F -, the network node mapping table will be read from standard input.
-m map_entry
Set a nodemap entry in the network node mapping table to the specified entry. (root only)
-n node
Read/set the network node mapping table of the specified node (default is the node netmap is executed on).

Description:

The netmap utility is used to specify node mappings to the network manager (Net), as well as display, change, or delete mappings that Net is already aware of.

When the Network Manager (Net) starts up, it knows of no mappings between logical and physical nodes other than those specified by its -m option. In order for Net to be informed of the node mappings it will need, the netmap utility is normally executed in the sysinit file. This is done whether you're booting from a local hard disk or from across the network.

You can specify node mapping information to netmap via files (-f or -F options) or via the command line (-m option). When run without -F, -f, or -m, netmap displays the current network mapping information of the node it is run on (or of the specified node, if -n is used). The output will be in the same format used for the network mapping files, hence you can redirect the output to a netmap file or pipe it directly into a netmap -F -.

When -m is specified along with -F or -f, the entry given to -m will behave as if it preceded the first entry in the mapfile specified to -F. This mapfile is the same file netboot uses to map a physical node ID to a logical node ID.

Specifying a map_entry

There are two forms of map_entry:

The first form, one-to-one, is a special case that treats every node as having a logical node ID that's the same as the node's physical node ID. This form is useful only for a single Arcnet network where the logical node IDs are the same as the physical node IDs. In most cases, this form of map_entry is placed as a single line in the mapping file rather than specified at the command line.

When specifying a map_entry at the command line, you must enclose the entry in quotes.

The mapping_info used in the second form is as follows:

This tells the Network Manager how the specified logical node may be reached via the specified logical network as a particular physical node ID. The logical node ID will be rejected by Net if it does not lie within the valid range according to the number of nodes the system is licensed for (the range is 1...num_licenses). The command sin info will show the number of nodes the system is licensed for. Likewise, the logical network ID must be one for which a driver is running (the command netmap -l will display the drivers currently running). Network configuration is discussed extensively in the QNX Installation & Configuration manual.

The mapping_info can be preceded by an optional keyword to mask, unmask, or even delete a logical node completely, or to affect access to that logical node via a particular logical network driver.

When a keyword is present, the mapping_info is always interpreted before the keyword. For example, the following command would create a mapping for logical node 1 via logical network 2 and with 5 as the physical node ID. Having done this, netmap would then mask off any access to logical node 1 via logical network 2:

    netmap -m "mask 1 2 t5"

Similarly, the following would allow access to logical node 1 via logical network 2 using a physical node ID of 5. The unmask keyword is technically unnecessary here, since setting a mapping always unmasks any previous masking of the logical node for the specified logical network:

    netmap -m "unmask 1 2 t5"

Note: Then the delete, mask or unmask keyword is specified, the logical_net_ID and physical_node_ID fields may be omitted. When the logical_net_ID is omitted, the keyword will apply to all entries for that logical_node_ID.

Deleting vs masking

Deleting a mapping allows the map_entry to be reused, while masking an entry ties up the entry, preventing its reuse.


Note: If a packet is received and the transmitting node isn't in the Network Manager's in-memory mapping table, a mapping will automatically be added to the in-memory table only. You can prevent this automatic addition of a node's mapping by creating a masked map_entry for that particular node. (This automatic mapping isn't related to the -a and -A options to netboot, which add to the /etc/config/netmap file.)

Also note that netmap may fail to add a map_entry if the mapping table is full (-n option to Net) or if the total number of network drivers has been exceeded (-d option to Net).


More examples

Consider the following configuration where node 1 is connected to three networks (network 1 is Arcnet, networks 2 and 3 are Ethernet), and node 2 is connected to two of those networks (network 1 and network 2):

Since we have mixed networks, the one-to-one map entry can't be used. The following is a mapping file you could use for the above network:

    1 1 t1
    1 2 0000c0 0d9e40
    1 3 0000c0 7b7113
    2 1 t2
    2 2 0000c0 4a9330

These mappings specify three logical networks that may be used to communicate with node 1, and two logical networks that may used to communicate with node 2.

You could do any of the following from node 2:

Examples:

Display mapping information on this node:

    netmap

Display mapping information for logical node 2:

    netmap -n 2

Load the local Network Manager with the node ID mappings contained in the file /etc/config/netmap:

   netmap -f

Load the Network Manager on logical node 2 with the node ID mappings contained in the file /etc/testmap:

    netmap -n 2 -F /etc/testmap

Map all logical node IDs to physical node IDs on a single Arcnet network:

    netmap -m "one-to-one"

Load node mappings to match those on logical server node 1:

    netmap -n1 | netmap -F -

Exit status:

0
Successful
>0
An error occurred.

See also:

buildqnx, Net, netboot

System Architecture

Installation & Configuration


[Previous] [Contents] [Next]