Книга: Linux Network Administrator Guide, Second Edition
Static IPX Routing Using the ipx_route Command
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
The command shown would add a route to the remote IPX network 203a41bc via the router on our local network 31a10103 with node address 00002a02b102.
You can find the node address of a router by making judicious use of the tcpdump command with the -e argument to display link level headers and look for traffic from the router. If the router is a Linux machine, you can more simply use the ifconfig command to display it.
You can delete a route using the ipx_route command:
#
ipx_route del 203a41bc
You can list the routes that are active in the kernel by looking at the /proc/net/ipx_route file. Our routing table so far looks like this:
# cat ipx_route
Network Router_Net Router_Node
203A41BC 31A10103 00002a02b102
31A10103 Directly Connected
The route to the 31A10103 network was automatically created when we configured the IPX interface. Each of our local networks will be represented by an /proc/net/ipx_route entry like this one. Naturally, if our machine is to act as a router, it will need at least one other interface.
- 4.4.4 The Dispatcher
- About the author
- Chapter 7. The state machine
- Appendix A. Detailed explanations of special commands
- Appendix E. Other resources and links
- Caveats using NAT
- Example NAT machine in theory
- Using Double Quotes to Resolve Variables in Strings with Embedded Spaces
- The final stage of our NAT machine
- Compiling the user-land applications
- The conntrack entries
- Untracked connections and the raw table