To specify cross-port routing costs, you must generate a cross-port costs file. All devices in the topology which do not have cost assignments will have no cost added to their intra-device port transfer. Costs may be assigned to devices by either device type or by device instance name. Only port names that end with a unique integer value may be assigned costs. When assigning costs by device type, all devices of that type will assume those costs. When assigning costs by device instance name, the full hierarchical name including the leading '/' must be given. Refer to the netinfo file for the correct device name assignments. Port-to-port transfers that have no assignments will be defaulted to a cost of 0. Assignment of costs must be given in each direction of transfer when they are to assume a cost other than 0.
The cost file has the following format:
<DEFINE_XPORT_COSTS> <TYPE> device_type from-port to-port cost from-port to-port cost ... from-port to-port cost </TYPE> ... <TYPE> device_type from-port to-port cost from-port to-port cost ... from-port to-port cost </TYPE> <INSTANCE> device_instance from-port to-port cost from-port to-port cost ... from-port to-port cost </INSTANCE> ... <INSTANCE> device_instance from-port to-port cost from-port to-port cost ... from-port to-port cost </INSTANCE> </DEFINE_XPORT_COSTS>Where:
Assignments of device types and instances are done in the order that they appear. Therefore, overlapping assignments will assume the values assigned last. In general, INSTANCE assignments will follow TYPE assignments. Otherwise, TYPE assignments may override the values of previously assigned INSTANCE assignments.
Comments may be used almost anywhere in the file except within the <TYPE> </TYPE> and <INSTANCE> </INSTANCE> blocks. The comments do not have any delimiters and they may not contain the keywords: <DEFINE_XPORT_COSTS>, </DEFINE_XPORT_COSTS>, <TYPE>, </TYPE>, <INSTANCE> and </INSTANCE>.