Method and system for service switching using service tags
View Patent ↗The disclosure herein describes a system, which provides service switching in a datacenter environment. The system can include a service switching gateway, which can identify a service tag associated with a received packet. During operation, the service switching gateway determines a source client, a requested service, or both for the packet based on the service tag, identifies a corresponding service portal based on the service tag, and forwards the packet toward the service portal. The service switching gateway can optionally maintain a mapping between the service tag and one or more of: a source client, a required service, the service portal, and a tunnel encapsulation. The service switching gateway can encapsulate the packet based on an encapsulation mechanism supported by the service portal and forward the packet based on the mapping.
1. A computer-implemented method for service switching in a datacenter environment, comprising:
identifying a source client and a requested service associated with a packet;
generating a service tag indicating the source client and the requested service;
selecting an encapsulation mechanism based on an encapsulation policy that is specific to the source client, wherein a first encapsulation policy of a first client and a second encapsulation policy of a second, different client specify a same encapsulation mechanism;
using the selected encapsulation mechanism to encapsulate the packet, wherein the generated service tag is incorporated in the encapsulated packet; and
forwarding the encapsulated packet toward a service switching gateway, thereby allowing the service switching gateway to switch the packet based on the service tag.
2. The computer-implemented method of claim 1 , wherein the service tag is incorporated in the encapsulation of the packet.
3. The computer-implemented method of claim 1 , wherein the selected encapsulation mechanism is based on one or more of:
Generic Routing Encapsulation (GRE) tunneling;
Internet Protocol Security (IPsec) tunneling;
Virtual Local Area Network (VLAN) encapsulation; and
Internet Protocol (IP) encapsulation.
4. The computer-implemented method of claim 1 , wherein the service tag is one or more of: a GRE key, an IPSec Security Parameter Index (SPI), a VLAN tag, and IP header options.
5. A computer-implemented method for service switching in a datacenter environment, the method comprising:
receiving, at a service switching gateway, an encapsulated packet comprising a service tag for identifying a source client and a requested service, the packet encapsulated by a particular encapsulation mechanism according to an encapsulation policy specific to the source client, wherein a first encapsulation policy of a first client and a second encapsulation policy of a second, different client specify a same encapsulation mechanism; and
forwarding the packet toward a service portal that is identified based on the service tag.
6. The computer-implemented method of claim 5 , wherein forwarding the packet toward the service portal comprises encapsulating the packet based on an encapsulation mechanism supported by the service portal.
7. The computer-implemented method of claim 5 , further comprising maintaining a mapping between the service tag and one or more of
a source client;
a requested service;
the service portal; and
a tunnel encapsulation.
8. The computer-implemented method of claim 5 , wherein the received packet is a first received packet, the method further comprising:
receiving a second packet from the service portal; and
reconstructing the service tag for the second packet.
9. The computer-implemented method of claim 8 , wherein the second received packet is encapsulated; and
wherein the encapsulation specifies the service switching gateway as the destination address of the second packet.
10. A non-transitory computer readable storage medium storing instructions which when executed by a computer cause the computer to perform a method, the method comprising:
identifying a source client and a requested service associated with a packet;
generating a service tag indicating the source client and the requested service;
selecting an encapsulation mechanism based on an encapsulation policy that is specific to the source client, wherein a first encapsulation policy of a first client and a second encapsulation policy of a second, different client specify a same encapsulation mechanism; and
using the selected encapsulation mechanism to encapsulate the packet, wherein the generated service tag is incorporated in the encapsulated packet;
forwarding the encapsulated packet toward a service switching gateway, thereby allowing the service switching gateway to switch the packet based on the service tag.
11. The non-transitory computer readable storage medium of claim 10 , wherein the service tag is incorporated in the encapsulation of the packet.
12. The non-transitory computer readable storage medium of claim 10 , wherein the encapsulation mechanism is based on one or more of:
Generic Routing Encapsulation (GRE) tunneling;
Internet Protocol Security (IPsec) tunneling;
Virtual Local Area Network (VLAN) encapsulation; and
Internet Protocol (IP) encapsulation.
13. The non-transitory computer readable storage medium of claim 10 , wherein the service tag is one or more of: a GRE key, an IPSec Security Parameter Index (SPI), a VLAN tag, and IP header options.
14. A non-transitory computer readable storage medium storing instructions which when executed by a computer cause the computer to perform a method, the method comprising:
receiving, at a service switching gateway, an encapsulated packet comprising a service tag for identifying a source client and a requested service, the packet encapsulated by a particular encapsulation mechanism according to an encapsulation policy specific to the source client, wherein a first encapsulation policy of a first client and a second encapsulation policy of a second, different client specify a same encapsulation mechanism; and
forwarding the packet toward a service portal that is identified based on the service tag.
15. The non-transitory computer readable storage medium of claim 14 , wherein forwarding the packet toward the service portal comprises encapsulating the packet based on an encapsulation mechanism supported by the service portal.
16. The non-transitory computer readable storage medium of claim 14 , wherein the method further comprises maintaining a mapping between the service tag and one or more of
a source client;
a requested service;
the service portal; and
a tunnel encapsulation.
17. The non-transitory computer readable storage medium of claim 14 , wherein the received packet is a first received packet, wherein the method further comprises:
receiving a second packet from the service portal; and
reconstructing the service tag for the second packet.
18. The non-transitory computer readable storage medium of claim 17 , wherein the second received packet is encapsulated; and
wherein the encapsulation specifies the service switching gateway as the destination address of the second packet.