Using Static Routes with Services
Static Routes for Service Instances
Static routes can be configured in a virtual network to direct traffic to a service virtual machine.
The following figure shows a virtual network with subnet 10.1.1.0/24. All of the traffic from a virtual machine that is directed to subnet 11.1.1.0/24 can be configured to be routed by means of a service machine, by using the static route 11.1.1.252 configured on the service virtual machine interface.
Configuring Static Routes on a Service Instance
To configure static routes on a service instance, first enable the static route option in the service template to be used for the service instance.
To enable the static route option in a service template:
Configuring Static Routes on Service Instance Interfaces
To configure static routes on a service instance interface:
The following figure shows a configuration to apply a service instance between VN1 (10.1.1.0/24) and VN2 (11.1.1.0/24). The left interface of the service instance is configured with VN1 and the right interface is configured to be VN2 (11.1.1.0/24). The static route 11.1.1.0/24 is configured on the left interface, so that all traffic from VN1 that is destined to VN2 reaches the left interface of the service instance.
The following figure shows static route 10.1.1.0/24 configured on the right interface, so that all traffic from VN2 that is destined to VN1 reaches the right interface of the service virtual machine.
When the static routes are configured for both the left and the right interfaces, all inter-virtual network traffic is forwarded through the service instance.
Configuring Static Routes as Host Routes
You can also use static routes for host routes for a virtual machine, by using the classless static routes option in the DHCP server response that is sent to the virtual machine.
The routes to be sent in the DHCP response to the virtual machine can be configured for each virtual network as it is created.
To configure static routes as host routes: