cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
503
Views
0
Helpful
1
Replies

CSM Sticky Source IP

network_dude
Level 1
Level 1

Hello,

I need help configuring my CSM; I have a group of networks which need to be routed to a specific server based on their location.

I have a link which points to VIP:

http://1.1.1.1

If the request comes from source 2.2.2.0/24 they should be sent to http://1.1.1.2.

If the request comes from source 3.3.3.0/24 they should be sent to http://1.1.1.3.

What would be the best way to set ths up?

Thank you,

Scott

1 Reply 1

module ContentSwitchingModule 5

vlan 220 server

ip address 10.20.220.2 255.255.255.0

alias 10.20.220.1 255.255.255.0

!

vlan 221 client

ip address 10.20.221.5 255.255.255.0

gateway 10.20.221.1

alias 10.20.221.2 255.255.255.0

!

probe PING icmp

interval 2

retries 2

failed 10

receive 2

!

real SERVER1

address 10.20.220.10

inservice

real SERVER2

address 10.20.220.20

inservice

real SERVER3

address 10.20.220.30

inservice

real SERVER4

address 10.20.220.40

inservice

!

serverfarm WEBFARM

nat server

no nat client

real name SERVER1

inservice

real name SERVER2

inservice

probe PING

!

serverfarm WEBFARM2

nat server

no nat client

real name SERVER3

inservice

real name SERVER4

inservice

!

policy SOURCE-IP-50

client-group 50

serverfarm WEBFARM2

#

# A policy consists of a series of conditions, plus the

# actions to take if those conditions are matched.

# In this case, the only condition is "client-group 50"

# which requires the incoming connection to match

# the standard access-list 50

# The only action to take is to use serverfarm WEBFARM2

# to serve those requests.

#

!

vserver WEB

virtual 10.20.221.100 tcp www

serverfarm WEBFARM

persistent rebalance

slb-policy SOURCE-IP-50

#

# slb-policies associated to a vserver are always examined

# in the order in which they are configured.

#

# The defintion of the "serverfarm" under the vserver config

# is the default policy and is always used as last resort

# if no policy matches or if there are no policies

#

# In this case, incoming requests will be processed to see

# if they match the conditions of slb-policy SOURCe-IP-50

# If they do, then WEBFARM2 is used, otherwise the default

# policy is selected (i.e. WEBFARM will be used).

#

# If a default farm is not configured, then connections

# not matching any policy are dropped.

#

inservice

!

access-list 50 permit 10.20.1.100

#

# Configuration of the IOS standard access-list

# You can configure any of the 1-99 standard access-list

# or you can configure named access-lists

#

Review Cisco Networking for a $25 gift card