![]() |
![]() |
The sub-system examines the L2 and L3 (LUT1) information (see netlayers) in packets based on internal table location. When function Pa_addMac and Pa_addIp are executed and the resulting packet forwarded to the sub-system, the sub-system places the new entries at the highest free table location. When incoming packets are examined, the table is searched from lowest entry location to highest entry location until the first matching entry is found. That entry is used to route the packet.
Because of this it is required that entries into the table be made in order from the most general to the most specific. For example, when adding a mac address it is common to want to route the following:
To get the desired routing the Pa_addMac commands must be executed and the command packets forwarded to the sub-system in the order shown above. If they are entered in the reverse order then every packet which has the value dest MAC will be forwarded to the host since it matches the first entry in the list.
The order dependency applies to calls to Pa_addMac and Pa_addIp, but not to calls between these functions. So all MAC entries can be made followed by all IP entries, or in the reverse order (provided the IP entries do not reference the MAC entries) without changing the operation of the sub-system.