Patent ID: 7936756

Claim:
A routing system, comprising: a control element for forming a forwarding table and an exchanging table according to a routing table; a first forwarding element, coupled to the control element, for receiving a packet, obtaining a corresponding label from the forwarding table according to a destination address of the packet, and determining whether to output the packet directly from the first forwarding element to the destination address of the packet according to the label; and a second forwarding element, coupled to the control element, for receiving the packet and the label outputted from the first forwarding element and obtaining a next forwarding path from the exchanging table according to the label to forward the packet if the packet is to be outputted from the second forwarding element; wherein the routing system is connected to an external network having a plurality of subnets, the routing system is connected to the subnets through a plurality of connection ports, and the forwarding table comprises: a first subnet field for designating one of the subnets; a first label field having a symbol corresponding to the subnet designated by the first subnet field; a first interface field for recording one of the connection ports pertaining to the first forwarding element; and a first gateway field for recording a next hop from the connection port recorded in the first interface field to the subnet recorded in the first subnet field, wherein the first forwarding element obtains the label according to the first label field corresponding to the first subnet field recorded as the destination address of the packet, and forwards the packet and the label from the connection port recorded in the first interface field to the next hop recorded in the first gateway field; and wherein the exchanging table comprises: a second label field corresponding to the first label field to make the symbol of the second label field correspond to the subnet designated by the first subnet field; a second interface field for recording one of the connection ports pertaining to the second forwarding element; and a second gateway field for recording the next hop from the connection port recorded in the second interface field to the subnet corresponding to the symbol of the second label field, wherein the second forwarding element forwards the packet from the connection port correspondingly recorded in the second interface field to the next hop recorded in the second gateway field according to the second label field recorded as the label and the labels recorded in the second label field are stored sequentially according to the size of the label.