With no arguments, the ipx_configure command displays the current setting of the automatic configuration flags:
# ipx_configure
Auto Primary Select is OFF
Auto Interface Create is OFF
Both the Auto Primary and Auto Interface flags are off by default. To set them and enable automatic configuration, you simply supply arguments like these:
# ipx_configure --auto_interface=on --auto_primary=on
When the --auto_primary argument is set to on, the kernel will automatically ensure that at least one active interface operates as the primary interface for the host.
When the --auto_interface argument is set to on, the kernel IPX driver will listen to all of the frames received on the active network interfaces and attempt to determine the IPX network address and frame type used.
The auto-detection mechanism works well on properly managed networks. Sometimes network administrators take shortcuts and break rules, and this can cause problems for the Linux auto-detection code. The most common example of this is when one IPX network is configured to run over the same Ethernet with multiple frame types. This is technically an invalid configuration, as an 802.2host cannot directly communicate with an Ethernet-II host and therefore they cannot be on the same IPX network. The Linux IPX network software listens on the segment to IPX datagrams transmitted on it. From these, it attempts to identify which network addresses are in use and which frame type is associated with each. If the same network address is in use with multiple frame types or on multiple interfaces, the Linux code detects this as a network address collision and is unable to determine which is the correct frame type. You will know this is occurring if you see messages in your system log that look like:
IPX: Network number collision 0x3901ab00
eth0 etherII and eth0 802.3
If you see this problem, disable the auto-detection feature and configure the interfaces manually using the ipx_interface command described in the next section.
The ipx_interface Command
The ipx_interface command is used to manually add, modify, and delete IPX capability from an existing network device. You should use ipx_interface when the automatic configuration method just described does not work for you, or if you don't want to leave your interface configuration to chance. ipx_interface allows you to specify the IPX network address, primary interface status, and IPX frame type that a network device will use. If you are creating multiple IPX interfaces, you need one ipx_interface for each.
The command syntax to add IPX to an existing device is straightforward and best explained with an example. Let's add IPX to an existing Ethernet device:
# ipx_interface add -p eth0 etherII 0x32a10103
The parameters in turn mean:
- p
This parameter specifies that this interface should be a primary interface. This parameter is optional.
eth0
This is the name of the network device to which we are adding IPX support.
etherII
This parameter is the frame type, in this case Ethernet-II. This value may also be coded as 802.2, 802.3, or SNAP.
0x32a10103
This is the IPX network address to which this interface belongs.
The following command removes IPX from an interface:
# ipx_interface del eth0 etherII
Lastly, to display the current IPX configuration of a network device, use:
# ipx_interface check eth0 etherII
The ipx_interface command is explained more fully in its manual page.
Configuring an IPX Router
You will recall from our short discussion of the protocols used in an IPX environment that IPX is a routable protocol and that the Routing Information Protocol (RIP) is used to propagate routing information. The IPX version of RIP is quite similar to the IP version. They operate in essentially the same way; routers periodically broadcast the contents of their routing tables and other routers learn of them by listening and integrating the information they receive. Hosts need only know who their local network is and be sure to send datagrams for all other destinations via their local router. The router is responsible for carrying these datagrams and forwarding them on to the next hop in the route.
In an IPX environment, a second class of information must be propagated around the network. The Service Advertisement Protocol (SAP) carries information relating to which services are available at which hosts around the network. It is the SAP protocol, for example, that allows users to obtain lists of file or print servers on the network. The SAP protocol works by having hosts that provide services periodically broadcast the list of services they offer. The IPX network routers collect this information and propagate it throughout the network alongside the network routing information. To be a compliant IPX router, you must propagate both RIP and SAP information.
Just like IP, IPX on Linux provides a routing daemon named ipxd to perform the tasks associated with managing routing. Again, just as with IP, it is actually the kernel that manages the forwarding of datagrams between IPX network interfaces, but it performs this according to a set of rules called the IPX routing table. The ipxd daemon keeps that set of rules up to date by listening on each of the active network interfaces and analyzing when a routing change is necessary. The ipxd daemon also answers requests from hosts on a directly connected network that ask for routing information.
The ipxd command is available prepackaged in some distributions, and in source form by anonymous FTP from http://metalab.unc.edu/ in the /pub/Linux/system/filesystems/ncpfs/ipxripd-x.xx.tgz file.
No configuration is necessary for the ipxd daemon. When it starts, it automatically manages routing among the IPX devices that have been configured. The key is to ensure that you have your IPX devices configured correctly using the ipx_interface command before you start ipxd. While auto-detection may work, when you're performing a routing function it's best not to take chances, so manually configure the interfaces and save yourself the pain of nasty routing problems. Every 30 seconds, ipxd rediscovers all of the locally attached IPX networks and automatically manages them. This provides a means of managing networks on interfaces that may not be active all of the time, such as PPP interfaces.
The ipxd would normally be started at boot time from an rc boot script like this:
# /usr/sbin/ipxd
No & character is necessary because ipxd will move itself into the background by default. While the ipxd daemon is most useful on machines acting as IPX routers, it is also useful to hosts on segments where there are multiple routers present. When you specify the -p argument, ipxd will act passively, listening to routing information from the segment and updating the routing tables, but it will not transmit any routing information. This way, a host can keep its routing tables up to date without having to request routes each time it wants to contact a remote host.
Static IPX Routing Using the ipx_route Command
There are occasions when we might want to hardcode an IPX route. Just as with IP, we can do this with IPX. The ipx_route command writes a route into the IPX routing table without it needing to have been learned by the ipxd routing daemon. The routing syntax is very simple (since IPX does not support subnetworking) and looks like:
# ipx_route add 203a41bc 31a10103 00002a02b102
Читать дальше