ForCES Working Group Ligang Dong Internet-Draft Zhejiang Gongshang Univ. Expires: Sept., 2007 Fengen Jia NDSC Weiming Wang Zhejiang Gongshang Univ. Mar. 2007 A LFB Library for ForCES draft-dong-forces-lfblib-00.txt Status of this Memo By submitting this Internet-Draft, each author represents that any applicable patent or other IPR claims of which he or she is aware have been or will be disclosed, and any of which he or she becomes aware will be disclosed, in accordance with Section 6 of BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt. The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. Conventions used in this document The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119]. Abstract This document defines a set of ForCES FE LFBs by use of the XML schema defined in ForCES FE model. L.Dong et al. Expires Sept., 2007 [Page 1] Internet Draft A LFB Library for ForCES Mar. 2007 Table of Contents 1. Introduction....................................................2 2. Definitions of Types............................................3 2.1. Frame Type.................................................3 2.2. Data Type..................................................4 2.3. Metadata Type.............................................25 3. LFB Definitions................................................30 3.1. Port LFBs.................................................30 3.1.1. EtherPort LFB........................................30 3.1.2. EtherEncap LFB.......................................34 3.1.3. EtherDecap LFB.......................................36 3.2. IPv4 unicast forwarding LFBs..............................37 3.2.1. IPv4Validator LFB....................................38 3.2.2. IPv4UcastLPM LFB.....................................40 3.2.3. IPv4NextHopApplicator LFB............................43 3.2.4. ARP LFB..............................................44 3.2.5. ICMPProc LFB.........................................45 3.2.6. OptionProc LFB.......................................46 3.3. IPv6 unicast forwarding LFBs..............................47 3.3.1. IPv6Validator LFB....................................47 3.3.2. IPv6UcastLPM LFB.....................................49 3.3.3. IPv6UcastNexthopApplicator LFB.......................51 3.3.4. IPv6AddrResolution LFB...............................53 3.3.5. ICMPv6Proc LFB.......................................54 3.3.6. ExtendHeaderProc LFB.................................55 3.4. Queue manager & scheduler LFBs............................56 3.4.1. Scheduler LFB........................................56 3.4.2. Queue LFB............................................57 3.5. LFBs for Multi-FE.........................................59 3.5.1. InterFECommEncap LFB.................................59 3.5.2. InterFECommDecap LFB.................................60 3.6. Common Function LFBs......................................61 3.6.1. RedirectSink LFB.....................................61 3.6.2. RedirectSource LFB...................................62 3.6.3. MetaClassifier LFB...................................63 4. Use Case.......................................................64 5. IANA Considerations............................................64 6. References.....................................................64 7. Author's Address...............................................65 Copyright Statement...............................................65 1. Introduction ForCES provides an architectural framework, in which a Network Element (NE) consists of Forwarding Elements (FEs) and Control Elements (CEs). FEs are further abstracted by a set of basic building blocks, called Logical Function Blocks (LFBs). RFC 3654 has defined L.Dong et al. Expires Sept., 2007 [Page 2] Internet Draft A LFB Library for ForCES Mar. 2007 the ForCES requirements, and RFC 3746 has defined the ForCES framework. ForCES protocol [ForCES-PL] is defining the information exchange protocol between CEs and FEs. LFBs in FEs are controlled by a CE via ForCES protocol. ForCES FE model [FE-Model] specifies a formal way to model LFBs, in which an XML schema is provided for definition of LFB attributes, capabilities, and events. This document provides a set of LFBs by use of the XML schema defined in [FE-Model]. Section 2 defines the data types used in the following LFB description. Section 3 presents the definitions of a set of LFBs according the LFB XML schema. 2. Definitions of Types This section provides a set of LFB frame, data type, and metadata definitions for use by all LFB Class definitions in this document. 2.1. Frame Type EthernetII an Ethernet II frame type Ethernet802.3 An Ethernet 802.3 frame type Ethernet802.2 An Ethernet 802.2 frame type Ethernet802.2SNAP An Ethernet 802.2 with SNAP frame IPv4 An IPv4 packet IPv6 An IPv6 packet MetadataFrame Frame only contains metadata L.Dong et al. Expires Sept., 2007 [Page 3] Internet Draft A LFB Library for ForCES Mar. 2007 Arbitrary Any kind of frame except Metadata Frame 2.2. Data Type IEEEMAC IEEE mac byte[6] LANSpeedType LAN speed values uint32 LAN_speed_10M 10M Ethernet LAN_speed_100M 100M Ethernet LAN_speed_1G 1000M Ethernet LAN_speed_10G 10G Ethernet LAN_speed_Auto LAN speed Auto L.Dong et al. Expires Sept., 2007 [Page 4] Internet Draft A LFB Library for ForCES Mar. 2007 NegotiationType Negotiation types uint32 Auto Auto negotiation Half-duplex Port negotiation half duplex Full-duplex Port negotiation full duplex PortStatsType port statistics InUcastPkts Number of unicast packets received uint64 InMulticastPkts Number of multicast packets received uint64 L.Dong et al. Expires Sept., 2007 [Page 5] Internet Draft A LFB Library for ForCES Mar. 2007 InBroadcastPkts Number of broadcast packets received uint64 InOctets number of octets received uint64 OutUcastPkts Number of unicast packets transmitted uint64 OutMulticastPkts Number of multicast packets transmitted uint64 OutBroadcastPkts Number of broadcast packets transmitted uint64 OutOcetes Number of octets transmitted uint64 InErrorPkts Number of input error packets uint64 L.Dong et al. Expires Sept., 2007 [Page 6] Internet Draft A LFB Library for ForCES Mar. 2007 OutErrorPkts Number of output error packets uint64 PortStatusValues The possible values of status. Used for both administrative and operation status uchar Disabled The port is operatively disabled. UP The port is up. Down The port is down. IPAddr IPv4 address uint32 MacFilterTableEntryType MAC filter table entry IEEEMAC L.Dong et al. Expires Sept., 2007 [Page 7] Internet Draft A LFB Library for ForCES Mar. 2007 LocalIpAddrType The device local IP address information FEID The FE on which the port ip resides uint32 IfIndex port index on the specified FE uint32 IPaddr IP address of the port IPAddr netmask Netmask of this ip address IPAddr BcastAddr The associated Broadcast address of the ip address IPAddr LocalIpv6AddrType The device local IPv6 address infomation L.Dong et al. Expires Sept., 2007 [Page 8] Internet Draft A LFB Library for ForCES Mar. 2007 FEID The FE on which the port ip resides uint32 IfIndex Port index on the specified FE uint32 IPv6addr IP address of the port IPv6Addr prefixlen Prefix length of this ip address uint32 IPv4Addr IPv4 address uint32 IPv6Addr IPv6 address byte[16] IPv4Prefix IPv4 prefix defined by an address and a prefix length address Address part L.Dong et al. Expires Sept., 2007 [Page 9] Internet Draft A LFB Library for ForCES Mar. 2007 IPv4addr prefixlen Prefix length part uchar LFBStatusValues The possible values of LFB status uchar OperDisable The LFB is removed from the FE data processing path, not process packets OperEnable The LFB is operable and on the FE data processing path IPv4NextHopInfoType IPv4 nexthop information, include nexthop ip address, output FE and interface etc. FEID Output FE ID uint32 OutputPortID output port index L.Dong et al. Expires Sept., 2007 [Page 10] Internet Draft A LFB Library for ForCES Mar. 2007 uint32 MTU The maximum transmission unit of the nexthop link. uint32 Flags Associated flags of the nexthop, such as local delivery, multicast etc. NextHopFlagsType NexthopIPaddr IP address of the nexthop IPv4Addr L2Index Index into the L2 link layer table, such as IPv4 ARP table or IPv6 NBR table. uint32 EncapNeeded The type of encapsulation needed on the packet. EncapType IPv4PrefixTableEntry IPv4 prefix table entry Prefix IPv4 address prefix IPv4Prefix L.Dong et al. Expires Sept., 2007 [Page 11] Internet Draft A LFB Library for ForCES Mar. 2007 NexthopID Index into the nexthop table uint32 IPv4UcastLPMStatisticsType Statistics of IPv4UcastLPM LFB InRcvdPkts The total number of input packets received from interfaces, including those received in error uint64 FwdPkts IPv4 packet forwarded by this LFB uint64 NoRoutePkts The number of IP datagrams discarded because no route could be found to transmit them to their destination. uint64 InDeliverPkts The total number of input datagrams successfully delivered to IP user-protocols (including ICMP). uint64 IPv4ValidatorStatisticsType IPv4 validator LFB statistics type L.Dong et al. Expires Sept., 2007 [Page 12] Internet Draft A LFB Library for ForCES Mar. 2007 badHeaderPkts The total number of input datagrams with bad ip header uint64 badTotalLengthPkts The total number of input datagrams with bad length uint64 badTTLPkts The total number of input datagrams with bad TTL uint64 badChecksum The total number of input datagrams with bad checksum uint64 IPv6Prefix IPv6 prefix IPv6addr Address part of the prefix IPv6Addr prefixlen Length of the prefix uint32 L.Dong et al. Expires Sept., 2007 [Page 13] Internet Draft A LFB Library for ForCES Mar. 2007 IPv6NextHopInfoType IPv4 nexthop information, include nexthop ip address, output FE and interface etc. FEID Output FE ID uint32 OutputPortID output port index uint32 MTU The maximum transmission unit of the nexthop link uint32 Flags Associated flags of the nexthop, such as local delivery, multicast etc NextHopFlagsType NexthopIPv6addr IP address of the nexthop IPv6Addr L2Index Index into the L2 table uint32 EncapNeeded L.Dong et al. Expires Sept., 2007 [Page 14] Internet Draft A LFB Library for ForCES Mar. 2007 The type of encapsulation needed on the packet. EncapType IPv6PrefixTableEntry IPv6 prefix table entry Prefix IPv6 address prefix IPv6Prefix NexthopID Index to the nexthop table uint32 IPv6LPMClassiferStatisticsType statistics of IPv6LPMClassifier LFB InRcvdPkts The total number of input packets received from interfaces, including those received in error. uint64 FwdPkts IPv4 packet forwarded by this LFB uint64 NoRoutePkts The number of IP datagrams discarded because no route could be found to transmit them to their destination. L.Dong et al. Expires Sept., 2007 [Page 15] Internet Draft A LFB Library for ForCES Mar. 2007 uint64 InDeliverPkts The total number of input datagrams successfully delivered to IP user-protocols (including ICMP). uint64 IPv6ValidatorStatisticsType IPv6 validator LFB statistics type badHeaderPkts The total number of input datagrams with bad ip header uint64 badTotalLengthPkts The total number of input datagrams with bad length uint64 badTTLPkts The total number of input datagrams with bad TTL uint64 badChecksum The total number of input datagrams with bad checksum uint64 NextHopFlagsType L.Dong et al. Expires Sept., 2007 [Page 16] Internet Draft A LFB Library for ForCES Mar. 2007 Flags used to define different nexthop behaviors uint32 local Packets matching the nexthop entry with this flag are delivered to the higher level protocols. drop Packets that match the nexthop entry with this flag are to be dropped. broadcast The route associated with this nexthop is a broadcast. multicast The route associated with this nexthop is multicast. WeightTableEntryType Weight table for queues QueueID Queue ID uint32 weight Weight of the queue uint32 L.Dong et al. Expires Sept., 2007 [Page 17] Internet Draft A LFB Library for ForCES Mar. 2007 NbrState IPv6 neighbor entry resolution state uchar INCOMPLETE Address resolution is being performed on the entry. Specifically, a Neighbor Solicitation has been sent to the solicited-node multicast address of the target, but the corresponding Neighbor Advertisement has not yet been received. REACHABLE Positive confirmation was received within the last ReachableTime milliseconds that the forward path to the neighbor was functioning properly. While REACHABLE, no special action takes place as packets are sent. STALE More than ReachableTime milliseconds have elapsed since the last positive confirmation was received that the forward path was functioning properly. While stale, no action takes place until a packet is sent. The STALE state is entered upon receiving an solicited Neighbor Discovery message that updates the cached link-layer address. Receipt of such a message does not confirm reachability, and entering the STALE state insures reachability is verified quickly if the entry is actually being used. However, reachability is not actually verified until the entry is actually used. DELAY More than ReachableTime milliseconds have elapsed since the last positive confirmation was received that the forward path was functioning properly, and a packet was sent within the last L.Dong et al. Expires Sept., 2007 [Page 18] Internet Draft A LFB Library for ForCES Mar. 2007 DELAY_FIRST_PROBE_TIME seconds. If no reachability confirmation is received within DELAY_FIRST_PROBE_TIME seconds of entering the DELAY state, send a Neighbor Solicitation and change the state to PROBE. PROBE A reachability confirmation is actively sought by retransmitting Neighbor Solicitations every RetransTimer milliseconds until a reachability confirmation is received. ArpTableEntryType Arp entry Index Index of the arp table uint32 NeighborIP IP address of the neighbour IPv4Addr SrcMac Source MAC IEEEMAC NeighborMac Mac of the Neighbor IEEEMAC State The state of the address resolution progress L.Dong et al. Expires Sept., 2007 [Page 19] Internet Draft A LFB Library for ForCES Mar. 2007 ArpStateType NbrTableEntryType IPv6 neighbor table entry Index Index of the arp table uint32 NeighborIPv6 IP address of the neighbor IPv6Addr SrcMac Source MAC IEEEMAC NeighborMac Mac of the Neighbor IEEEMAC State The state of the entry's resolution progress NbrState DCHostTableEntryTypev4 Directly connected arp table entry for IPv4 L.Dong et al. Expires Sept., 2007 [Page 20] Internet Draft A LFB Library for ForCES Mar. 2007 NeighbourIP IP address of the neighbor IPv4Addr SrcMac Source MAC IEEEMAC NeighborMac Mac of the Neighbor IEEEMAC DCHostTableEntryTypev6 Direct connected arp table entry for IPv4. NeighbourIPv6 IP address of the neighbor IPv4Addr SrcMac Source MAC IEEEMAC NeighborMac Mac of the Neighbor IEEEMAC L.Dong et al. Expires Sept., 2007 [Page 21] Internet Draft A LFB Library for ForCES Mar. 2007 PacketType The packet type code uchar IPv4Ucast IPv4 unicast packet IPv4Mcast IPv4 multicast packet IPv6Ucast IPv6 unicast packet IPv6Mcast IPv6 multicast packet DispatchTableType The dispatch table type PacketType The type of the packe, e.g., IPv4Uncast, IPv6Ucast, IPv4Mulcast, IPv6Mulcast, etc. PacketType index L.Dong et al. Expires Sept., 2007 [Page 22] Internet Draft A LFB Library for ForCES Mar. 2007 The index of the output group to output the packets. uint32 MetaType Metadata type definition MetadataID The ID of the metadata. The value is standarized in the corresponding LFB definition RFCs. uint32 MetadataName The name of the metadata String MetadataClassyTableType The metadata classifying table value Value of the metadata uint32 index The index of the port in the output group to use for outputing the packets uint32 L.Dong et al. Expires Sept., 2007 [Page 23] Internet Draft A LFB Library for ForCES Mar. 2007 InterFECommMsgsType Inter FE communication messageds type FEID The FEID this message format relates uint32 MessageFormat The inter FE message format MetadatasType EncapType Encapsulation type uchar Link Link layer encapsulation such as Ethernet and PPP InterFE Inter FE communication encapsulation Tunnel Tunnel encapsulation such as IP-in-IP L.Dong et al. Expires Sept., 2007 [Page 24] Internet Draft A LFB Library for ForCES Mar. 2007 IPAddress IP layer address Ipv4 IPv4 address IPv4Addr Ipv6 IPv6 address IPv6Addr ArpStateType The arp entry state uchar Manual The entry is manually set. InSolicit The peer's level 2 address is still in requesting. Vaild The address resolution has been completed successfully, it now can be used in the data packets forwarding. 2.3. Metadata Type L.Dong et al. Expires Sept., 2007 [Page 25] Internet Draft A LFB Library for ForCES Mar. 2007 NextHopID An index into a Next Hop entry in Nexthop table 1 int32 ExceptionID Exception Types 2 uint32 Options Packets with options, for IPv6 Packet with next-header set to hop- by-hop header(0) LengthMismatch The packet length reported by link layer is less than the total length field. BadTTL The packet can't be forwarded as the TTL has expired. Multicast The packet received is a multicast packet. FragRequired The MTU for outgoing interface is less than the packet size. L.Dong et al. Expires Sept., 2007 [Page 26] Internet Draft A LFB Library for ForCES Mar. 2007 Redirect The outgoing port is same as the one on which the packet is received. LocalDelivery The packet is for a local interface LimitedBroadcast The packet received as limited broadcast InputPortID At which interface the packet arrive 3 uint32 OutputPortID The interface out which the packet will be emitted 4 uint32 NextHopIP Nexthop IPv4 address 5 IP4Addr L2Type Level 2 table type, which can be a true link layer table or others 5 L.Dong et al. Expires Sept., 2007 [Page 27] Internet Draft A LFB Library for ForCES Mar. 2007 uint32 NexthopIPv6 Nexthop IPv6 address 6 IPv6Addr PacketLength The length of the packet in octets 7 uint32 PacketType Type of the packet 8 uint32 IPv4 IPv4 packet IPv6 IPv6 packet TaggedFrame Packet with metadata MetaDataFrame metadata only QueueID The queue ID 9 uint32 L.Dong et al. Expires Sept., 2007 [Page 28] Internet Draft A LFB Library for ForCES Mar. 2007 QueueOperationCmd The type of operation on the queue, there are two types defined here: enqueue and dequeue. 10 uchar Enqueue Enqueue command Dequeue Dequeue command SrcBladeID Source blade ID 11 uchar DstBladeID Destination blade ID 12 uchar NexthopIndex Nexthop index into the link layer address resolution table 13 uint EncapMethod L.Dong et al. Expires Sept., 2007 [Page 29] Internet Draft A LFB Library for ForCES Mar. 2007 What should the following LFBs do to encapsulate the packets, such as link encapsulation which means the packets need to encapsulate link layer header before sending to media; inter FE communication encapsulation which means the packets need to first encapsulate inter FE communication header before transmitting to other FEs; tunnel encapsulation which means the packet need do extra tunnel encapsulation before sending out to media. 14 EncapType 3. LFB Definitions The LFB is only logical representation of a specified FE function, it has nothing to do with how the LFB is implemented. Therefore, we should define the LFBs in vendor-neutral way. 3.1. Port LFBs This document only define LFB for Ethernet ports, other types of port LFBs will be added. 3.1.1. EtherPort LFB EtherPort LFB for Ethernet ports 1.0 PacketsFromProcessingUnit Ports for receiving packets from processing unit such as NP, which will be sent to media. EthernetII OutputPort PacketsFromMedia L.Dong et al. Expires Sept., 2007 [Page 30] Internet Draft A LFB Library for ForCES Mar. 2007 Ports for receiving packets from Ethernet media. EthernetII PacketsToProcessingUnit Ports for sending packets to processing unit such as NP for further processing EthernetII InputPort PacketsToMedia Ports for sending packets to media EthernetII IfIndex A unique value for each interface. Its value ranges between 1 and the value of total number of interfaces in the system. The value for each interface must remain constant at least from one re- initialization of the entity's network management system to the next re-initialization. uint32 L.Dong et al. Expires Sept., 2007 [Page 31] Internet Draft A LFB Library for ForCES Mar. 2007 IfName Name of this port string[16] LinkSpeed Speed of this port LANSpeedType MTU Maximum transmission unit uint32 OperaStatus Operate state of this port PortStatusValues "down" AdminStatus Administrator's state of this port PortStatusValues "down" PromiscuousMode Whether the interface is in promiscuous mode BooleanType "no" CarrierStatus Whether the port is linked with a connector BooleanType "no" NegotiationState The port negotiation state, which must be one of the following values: auto, half-duplex, full-duplex L.Dong et al. Expires Sept., 2007 [Page 32] Internet Draft A LFB Library for ForCES Mar. 2007 NegotiationType "auto" SrcMACAddr Source MAC IEEEMAC MacAliasTable A series of MACs that the port can receive frame IEEEMAC StatsEnable Whether enable the statistics in this LFB BooleanType "no" PortStats port statistics PortStatsType IpAddr IP layer Address IPAddress PortStatusChanged Port status has changed since last time reporting OperaStatus L.Dong et al. Expires Sept., 2007 [Page 33] Internet Draft A LFB Library for ForCES Mar. 2007 OperaStatus 3.1.2. EtherEncap LFB EtherEncap An LFB classifier definition for completes Ethernet encapsulation functions 1.0 EncapIn Port for receiving packets needed to build Ethernet encapsulation IPv4 IPv6 L2Index L2Type SuccessOut EthernetII ExceptionOut L.Dong et al. Expires Sept., 2007 [Page 34] Internet Draft A LFB Library for ForCES Mar. 2007 Packet can't find the associated L2 information IPv4 IPv6 ArpTable Ethernet arp table ArpTableEntryType NbrTable IPv6 neighbor table NbrTableEntryType DCHostTablev4 Direct connected host arp table for IPv4 DCHostTableEntryTypev4 DCHostTablev6 Direct connected host arp table for IPv6 DCHostTableEntryTypev6 ArpTableLimit L.Dong et al. Expires Sept., 2007 [Page 35] Internet Draft A LFB Library for ForCES Mar. 2007 Max number of arp entries in arp table uint32 NbrTableLimit Max number of neighbors in neighbor table uint32 DCHostTablev4Limit The limit on Direct connected host table for IPv4 uint32 DCHostTablev6Limit The limit on Direct connected host table for IPv6 uint32 3.1.3. EtherDecap LFB EtherDecap An LFB class for definition of Ethernet decapsulation and Ethernet filtering functions 1.0 PacketsIn Packets from other LFB EthernetII L.Dong et al. Expires Sept., 2007 [Page 36] Internet Draft A LFB Library for ForCES Mar. 2007 DecapOut Ethernet decapsulation output Arbitrary DispatchTable This table is used for selecting output in the ouput group for the incoming packet stream. DispatchTableType 3.2. IPv4 unicast forwarding LFBs The forwarding of IPv4 packets is logically composed of the following three stages: (1) Validating stage: In this stage, the IP header is checked to make sure the packet is well-formed, that is to say without any header errors, no option is included, then the packet is ready to send to the next stage for processing, error packets are sent to CE or processed by some offloading LFBs in the FE. (2) Forwarding stage: In this stage, destination IP address is extracted from the packet and used to consult the forwarding table, when it success, a block of routing information is produced such as nexthop IP address, output interface etc which will be used to send the packet to its next station to the destination. When the lookup operation fails, the packet is dropped or sent to CE for further processing. The important data in this stage is forwarding table, different implementations may have different organizations on forwarding table. In summary, there are two schemes: unified table model and discrete table model. Implementations that utilize the L.Dong et al. Expires Sept., 2007 [Page 37] Internet Draft A LFB Library for ForCES Mar. 2007 unified table model to represent IPv4 unicast forwarding information use a single data entity, which shall be subsequently referred to as a "FIB Table". This table is comprised of entries, each one consisting of a prefix and an array of next hop information. Implementations that utilize the discrete table model to represent IPv4 unicast forwarding information use two separate data entities, which shall be subsequently referred to as the "Prefix Table" and the "NextHop Table". The prefix table is comprised of entries, each one consisting of a prefix and a next hop identifier that uniquely indicates an entry in a next hop table. The next hop table is comprised of entries, each one consisting of a next hop identifier and an array of next hop information. As with the unified mode FIB table, the next hop array can contain one or more elements of next hop information. In order to forward a packet, each IP destination address specified in the prefix must have one or more next hops associated with it. In the discrete model, this association is provided by the next hop identifier, which correlates a prefix table entry to an entry in the next hop table. (3) Sending stage: the packet arrive this stage have got the correct routing information and after appending the correct level 2 headers such as Ethernet header, the packet will be sent to media. The important data in this stage is IP-Level2 address mapping table which is consulted by the packet to find the correct Level 2 address of the nexthop station. According to the above discussion on the forwarding stages of a unicast IPv4 packet, we can see that the forwarding table modeling is an important issue in the modeling of IPv4 unicast forwarding LFBs. The diverse table model provides several benefits in some system designs. For example, some classes of high-performance networking nodes (e.g. – BGP routers) require optimal FIB updates when a set of routes change. With a discrete model implementation, it may be possible to efficiently update forwarding information by altering a subset of next hop table entries. Whereas, in a unified model, it may be required that a larger set of FIB table entries be modified to accomplish the same forwarding information update. This document adopt the diverse forwarding table model in the modeling of IPv4 unicast forwarding LFBs, the following LFBs are defined: IPv4Validator LFB, IPv4UcastLPM LFB, and IPv4NexthopApplicator LFB. The prefix table is maintained in IPv4UcastLPM LFB and the nexthop table is maintained in the IPv4NexthopApplicator LFB. Besides, the auxiliary LFBs such as ICMPGenerator, OptionProc and ARP are defined to complete the whole picture. 3.2.1. IPv4Validator LFB L.Dong et al. Expires Sept., 2007 [Page 38] Internet Draft A LFB Library for ForCES Mar. 2007 IPv4Validator An LFB Class definition for validates the IPv4 packets 1.0 ValidatePktsIn Port used to receive IPv4 packet for validation IPv4 SuccessOut Out port for the packets passing the validation IPv4 ExceptionOut Output port for the packets needed to be dealt by higher level protocol stacks. The following packets are identified as exception packets: 1. Packet with header length>5; 2. Packet with destination address equal to 255.255.255.255; 3. Packet with expired TTL (checked after a forwarding decision is made); 4 Packet length error. ExceptionID L.Dong et al. Expires Sept., 2007 [Page 39] Internet Draft A LFB Library for ForCES Mar. 2007 FailOutput Output for packets failed to pass the validation IPv4 StatsEnable Whether to gather statistics in this LFB BooleanType "no" IPv4ValidatorStats Ipv4 validator LFB statistics IPv4ValidatorStatisticsType Please refer to RFC1812 and RFC2644 for detailed validation process. 3.2.2. IPv4UcastLPM LFB IPv4UcastLPM IPv4 Longest Prefix Match Lookup LFB 1.0 PktIn The port to receive IPv4 packets from other LFBs L.Dong et al. Expires Sept., 2007 [Page 40] Internet Draft A LFB Library for ForCES Mar. 2007 IPv4 SuccessOut Successful output when all is fine IPv4 NextHopID ExceptionOut Exception output IPv4 InputPortID ExceptionID FailOutput Drop output IPv4 PrefixTable IPv4 prefix table IPv4PrefixTableEntry L.Dong et al. Expires Sept., 2007 [Page 41] Internet Draft A LFB Library for ForCES Mar. 2007 IPv4PrefixTableEntry.prefix LocalIpAddrTable The table of interfaces' ip address information on the local device LocalIpAddrType StatsEnable Whether enable the statistics in this LFB BooleanType IPv4Stats The IPv4 associated statistics IPv4UcastLPMStatisticsType PrefixTableLimit Maximum number of prefix supported by this LFB uint32 LocalIpAddrTableLimit Maximum number of IP address entries supported by this LFB uint32 This LFB represents the IPv4 longest prefix match lookup operation. L.Dong et al. Expires Sept., 2007 [Page 42] Internet Draft A LFB Library for ForCES Mar. 2007 3.2.3. IPv4NextHopApplicator LFB IPv4NextHopApplicator An LFB definition for applying next hop action to IPv4 packets 1.0 PktIn Port used to receive IPv4 packets from other LFBs IPv4 NextHopID SuccessOut Output port for packet successfully fulfill the nexthop application IPv4 FEID OutputPortID L2Index NextHopIP EncapMethod ExceptionOut Output for packets need deep dealt by higher level protocol stacks L.Dong et al. Expires Sept., 2007 [Page 43] Internet Draft A LFB Library for ForCES Mar. 2007 IPv4 InputPortID ExceptionID FailOutput Output for packets failed the nexthop application operation IPv4 NextHopTable Nexthop table IPv4NextHopInfoType NextHopTableLimit Maximum number of nexthops this LFB supports uint32 3.2.4. ARP LFB ARP This LFB class provides the function of address resolution. 1.0 L.Dong et al. Expires Sept., 2007 [Page 44] Internet Draft A LFB Library for ForCES Mar. 2007 AddrResDataPktIn The IPv4 data packet that need to do the address resolution IPv4 ArpPktIn The neighbor discovery packet related to address resolution IPv4 AddrResDataPktOut The IPv4 packet that have been encapsulated with the correct ethernet L2 info and need to be sent out to link EthernetII ArpOut The arp packet out EthernetII 3.2.5. ICMPProc LFB L.Dong et al. Expires Sept., 2007 [Page 45] Internet Draft A LFB Library for ForCES Mar. 2007 ICMPGenerator This LFB class provide some basic ICMP function,it only generate the following ICMP messages:ICMP destination unreachable and time excceeded. 1.0 PktIn The IPv4 packet that need icmp processing IPv4 ExceptionID ICMPPktOut The output for the ICMP packets generated according to the input packet and the ExceptionID. IPv6 3.2.6. OptionProc LFB OptionProc This LFB class process the IPv4 packet with options,it can process on the following options:Router-alert option. 1.0 L.Dong et al. Expires Sept., 2007 [Page 46] Internet Draft A LFB Library for ForCES Mar. 2007 PktIn The IPv4 packet with options in IPv4 PktOut According to the Option type the packet may have different next proccesing LFB.Now by default we send all the packet with extended header to CE. IPv6 3.3. IPv6 unicast forwarding LFBs The ideas behind modeling of IPv6 unicast forwarding LFBs is totally the same as IPv4 unicast forwarding LFBs. 3.3.1. IPv6Validator LFB IPv6Validator A LFB class definition for validating correctness of IPv6 packets 1.0 ValidateIn Input port for packets to be validated IPv6 L.Dong et al. Expires Sept., 2007 [Page 47] Internet Draft A LFB Library for ForCES Mar. 2007 SuccessOut Output port for packets passing the validation IPv6 ExceptionOut Output port for exception packet.The following packets are identified as Exception packet: 1 Packet with next header set to Hop-by-Hop. 2 The packet length reported by link layer is less than the total length field. 3 Packet with a link local destination address. 4 The packet received as limited broadcast. 5 Packet with multicast destination address (the MSB of the destination address is 0xFF). IPv6 ExceptionID FailOut Output port for packet failing the validation IPv6 L.Dong et al. Expires Sept., 2007 [Page 48] Internet Draft A LFB Library for ForCES Mar. 2007 StatsEnable Whether to gather statistics in this LFB BooleanType "no" IPv6ValidatorStats IPv6 validator LFB statistics IPv6ValidatorStatisticsType Detailed validation process could refer to RFC2460 and RFC2373. 3.3.2. IPv6UcastLPM LFB IPv6UcastLPM An LFB class definition for IPv6 longest prefix lookup function 1.0 PktIn The port to receive IPv6 packets needed to do IPv4 LPM IPv6 SuccessOut Output for packets that have find the correct route L.Dong et al. Expires Sept., 2007 [Page 49] Internet Draft A LFB Library for ForCES Mar. 2007 IPv6 NextHopID FailOutput LPM failed IPv6 PrefixTable IPv6 prefix table IPv6PrefixTableEntry IPv6PrefixTableEntry.prefix LocalIpv6AddrTable The table of interfaces's ip address infomation on the local device LocalIpv6AddrType StatsEnable Whether enable the statistics in this LFB BooleanType IPv6Stats L.Dong et al. Expires Sept., 2007 [Page 50] Internet Draft A LFB Library for ForCES Mar. 2007 The IPv6 associated statistics IPv6LPMClassiferStatisticsType PrefixTableLimit Maxium number of prefix supported by this LFB uint32 LocalIpv6AddrTableLimit Maxium number of IPv6 address entrys supported by this LFB uint32 3.3.3. IPv6UcastNexthopApplicator LFB IPv6UcastNexthopApplicator An LFB for applicating next hop action to IPv6 packets 1.0 PktIn Input port for packets to be applicate nexthop IPv6 NextHopID L.Dong et al. Expires Sept., 2007 [Page 51] Internet Draft A LFB Library for ForCES Mar. 2007 SuccessOut Output port for packet successfully fulfill the nexthop application IPv6 FEID OutputPortID L2Index NextHopIP EncapMethod ExceptionOut Output port for exception packet.The following packets are identified as Exception packet: 1 Packet with Hop Limit zero. 2 The MTU for outgoing interface is less than the packet size. 3 The outgoing port is same as the one on which the packet is received. 4 The packet is for a local interface. IPv6 InputPortID ExceptionID FailOutput Output for packets failed the nexthop application operation IPv6 L.Dong et al. Expires Sept., 2007 [Page 52] Internet Draft A LFB Library for ForCES Mar. 2007 NextHopTable Nexthop table IPv6NextHopInfoType NextHopTableLimit Maxium number of nexthops this LFB supports uint32 3.3.4. IPv6AddrResolution LFB IPv6AddrResolution This LFB class provides the function of IPv6 address resolution part of neighbor discovery protocol.It provides an offload of ND protocol processing to FE. It process the following ND messages:neighbour solicitation and neighbour advertisement. 1.0 AddrResDataPktIn The IPv6 data packet that need to do the address resolution IPv6 AddrResProtoPktIn L.Dong et al. Expires Sept., 2007 [Page 53] Internet Draft A LFB Library for ForCES Mar. 2007 The neighbour discovery packet related to addresolution IPv6 AddrResDataPktOut The IPv6 packet that have encapsulated with the correct ethernet L2 info and need to be sent out to link EthernetII AddrResProtoPktOut The IPv6 neighbour discovey packet wich has been encapsulation with the correct ethernet L2 info EthernetII Nbrtable This table is an alias to the IPv6 neighbour table in the EtherEncap LFB. NbrTable 3.3.5. ICMPv6Proc LFB L.Dong et al. Expires Sept., 2007 [Page 54] Internet Draft A LFB Library for ForCES Mar. 2007 ICMPv6Generator This LFB class provide some basic ICMPv6 function,it only generate the following ICMP messages for the packets that need some basic icmp processing:destination not reachable and time excceeded. 1.0 PktIn The IPv6 packet that need icmp processing IPv6 ExceptionID ICMPv6PktOut The output for the ICMPv6 packets generated according to the input IPv6 packet and the ExceptionID IPv6 3.3.6. ExtendHeaderProc LFB ExtendHeaderProc This LFB class process the IPv6 packet with extended header,For the moment,the packets to this LFB are redirect to RedirectSink LFB by default. L.Dong et al. Expires Sept., 2007 [Page 55] Internet Draft A LFB Library for ForCES Mar. 2007 1.0 PktIn The IPv6 packet with extended header in IPv6 PktOut According to the Extended header type the packet may have different next processing LFB. Now by default we send all the packet with extended header to CE. IPv6 3.4. Queue manager & scheduler LFBs A basic queue and scheduler LFBs is defined here. 3.4.1. Scheduler LFB Scheduler Base scheduler LFB 1.0 Watcher Input for watching the queues to be scheduled. Queues to be scheduled can transmit packet enqueue and dequeue infomation to scheduler through these ports. L.Dong et al. Expires Sept., 2007 [Page 56] Internet Draft A LFB Library for ForCES Mar. 2007 MetadataFrame QueueID PacketLength QueueOperationCmd OutControl Control output, this output is used by scheduler to communicate commands to controlled queues such as dequeue a packet. MetadataFrame QueueOperationCmd QueueScheduledLimit Max number of queues that can be scheduled by this scheduler uint32 3.4.2. Queue LFB Queue Queue LFB 1.0 L.Dong et al. Expires Sept., 2007 [Page 57] Internet Draft A LFB Library for ForCES Mar. 2007 InControl Input from scheduler QueueOperationCmd InData Input port for data packet Arbitrary PacketLength OutToController Output to queue controller MetadataFrame QueueID PacketLength QueueOperationCmd OutData Data packet output Arbitrary CurrentLen L.Dong et al. Expires Sept., 2007 [Page 58] Internet Draft A LFB Library for ForCES Mar. 2007 Current length of the queue in number of packets uint32 QueueLenLimit Maximum length of the queue in number of packets uint32 3.5. LFBs for Multi-FE 3.5.1. InterFECommEncap LFB InterFECommEncap This LFB class is used for encapsulating traffic that needs to be sent over switch fabric to other FEs. 1.0 EncapIn Packets needed to be sent to other FE through switch fabric. IPv4 IPv6 SrcBladeID InputPort FrameType DstBladeID OutputPortID NexthopIndex NexthopIP NexthopIPv6 L.Dong et al. Expires Sept., 2007 [Page 59] Internet Draft A LFB Library for ForCES Mar. 2007 EncapOut Packets that have been added the inter-FE communication header TaggedFrame InterFECommMsgs Inter FE communication messages config table. There maybe multiple message types exchanged between every pair of FEs. Now, only one message type can be set between two communicating FEs. InterFECommMsgsType 3.5.2. InterFECommDecap LFB InterFECommDecap This LFB class is used for decapsulating traffic that comes from switch fabric to this FE. 1.0 DecapIn Packets come from switch fabric and need to strip the inter FE communication header for further processing. TaggedFrame L.Dong et al. Expires Sept., 2007 [Page 60] Internet Draft A LFB Library for ForCES Mar. 2007 DecapOut Packets that have been stripped the inter FE communication header IPv4 IPv6 InterFECommMsgs Inter FE communication messages config table. There maybe multiple message types exchanged between every pair of FEs. Now, only one message type is supported between two communicating FEs. InterFECommMsgsType 3.6. Common Function LFBs 3.6.1. RedirectSink LFB RedirectSink This class definition provides the function of sinking data packets that needed to be sent to CE. 1.0 InFromOtherLFBs Packets input from other LFBs and needed to sent to CE. L.Dong et al. Expires Sept., 2007 [Page 61] Internet Draft A LFB Library for ForCES Mar. 2007 TaggedFrame InputPortID PacketLength PacketType 3.6.2. RedirectSource LFB RedirectSource This class provides the function of sinking data packets that comes from CE and needed to be sent out by this FE. 1.0 PktIn Packet from CE PacketType OutputPortID PacketLength OutputToOtherLFBs Packets input received from CE TaggedFrame PacketType OutputPortID PacketLength L.Dong et al. Expires Sept., 2007 [Page 62] Internet Draft A LFB Library for ForCES Mar. 2007 DispatchTable The table to dispatch the packets to different LFB./ DispatchTableType OutGroupNumOfPorts The number of ports in output group uint32 3.6.3. MetaClassifier LFB MetaClassifier This LFB class provides the function of classifying packets according to the metadata. Now it only works on one metadata. 1.0 PktIn Packets need to do the classification Arbitrary Arbitrary ClassifiedOut The output group for the classified packets L.Dong et al. Expires Sept., 2007 [Page 63] Internet Draft A LFB Library for ForCES Mar. 2007 Arbitrary MetaDataID The metadata ID that this classifier works on uint32 MetaDataName The name of the metadata that this classifier works on string MetadataClassifyTable The metadata classifying table MetadataClassyTableType OutNumOfPorts The number of ports in the output group uint32 4. Use Case (TBD) 5. IANA Considerations The Following Assigned Numbers are considered: 6. References L.Dong et al. Expires Sept., 2007 [Page 64] Internet Draft A LFB Library for ForCES Mar. 2007 [RFC3654] H. Khosravi, et al., Requirements for Separation of IP Control and Forwarding, RFC 3654, November 2003. [RFC3746] L. Yang, et al., Forwarding and Control Element Separation (ForCES) Framework, RFC 3746, April 2004. [ForCES-PL] A. Doria, et al., ForCES protocol specifications, draft- ietf-forces-protocol-09.txt, work-in-progress, Mar. 2007. [FE-Model] J. Halpern, E. Deleganes, ForCES Forwarding Element Model, draft-ietf-forces-model-07.txt. work-in-progress, Oct. 2006. 7. Author's Address Ligang Dong Zhejiang Gongshang University 149 Jiaogong Road Hangzhou 310035 P.R.China Phone: +86-571-28877751 EMail: donglg@mail.zjgsu.edu.cn Fengen Jia National Digital Switching System Engineering & Technological R&D Center(NDSC) Jianxue Road Zhengzhou 452000 P.R.China Phone: +86-571-28877751 EMail: jfg@mail.ndsc.com.cn,fgjia@mail.zjgsu.edu.cn Weiming Wang Zhejiang Gongshang University 149 Jiaogong Road Hangzhou 310035 P.R.China Phone: +86-571-28877721 EMail: wmwang@mail.zjgsu.edu.cn Copyright Statement Copyright (C) The IETF Trust (2007). This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights. L.Dong et al. Expires Sept., 2007 [Page 65] Internet Draft A LFB Library for ForCES Mar. 2007 This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. L.Dong et al. Expires Sept., 2007 [Page 66]