OpenNSL API Guide and Reference Manual
|
The Layer 3 APIs allow application developers to manage the L3 switch features, including the L3 fast switching host table, L3 routing table, L3 interface table, and L3 tunneling tables (terminator and initiator) When Layer 3 switching is enabled, the switch acts like a router, switching packets across VLAN boundaries, in addition to behaving as an L2 switch for traffic switched within the same VLAN. L3 packets are routed either based on subnet match, or fast-switched based on a full IP address match. These capabilities are managed in the route table and host table, respectively.
Fundamental to L3 operation is the concept of the L3 interface. The L3 interface is a virtual interface corresponding to a particular routed VLAN and has an associated IP address and MAC address. In the L3 API, an L3 interface is identified by a numeric value.
IP fast switching is based on full IP address match in the L3 table. When the destination IP address in the packet matches the IP address in an L3 host entry, the packet is modified according to the L3 host entry and switched out of the outgoing interface if the STP state allows.
L3 routing is based on subnet match. All packets with destination IP addresses belonging to the same subnet are routed to the same outgoing interface. When there is only one outgoing path, it is called a single path route.
Equal Cost Multi-Path (ECMP) routing is a technique for routing packets along multiple paths of equal cost. If multiple equal-cost routes exist to the same destination, ECMP can be used to provide load balancing among all the ECMP paths. The forwarding engine identifies paths by next hop, and when forwarding packets, chooses which next hop to use.