Relay Affiliation

Hello ,

How to create the affiliation fixlets(advertisement and seek list) based on the IP range/Subnet address.

Thanks

For affiliation seek, you can do something like this:

// Location A
if {(exists ip interface whose (address of it as string contains “10.x.y.”) of network)}
setting “_BESClient_Register_Affiliation_SeekList”=“LocationA;centralrelay;failover;*” on “{now}” for client

// Location B
elseif {(exists ip interface whose (address of it as string contains “10.x.z.”) of network)}
setting “_BESClient_Register_Affiliation_SeekList”=“LocationB;centralrelay;failover;*” on “{now}” for client

// Add more locations …
endif

Add relevance something like:
((exists ip interface whose (address of it as string contains “10.x.y.”) of network) AND (exists setting “_BESClient_Register_Affiliation_SeekList” whose (value of it does not contain ((“LocationA”) as string)) of client)) etc, etc, for all locations

Put that into policy action on your clients allowing it to re-apply when relevant. Then as a laptop changes subnets/locations, it will automatically change relays.

On your relays, set the “_BESRelay_Register_Affiliation_AdvertisementList” to include the location name such as ‘LocationA’ in my example. This could be done manually on a few relays or be its own task for a larger environment.

setting “_BESRelay_Register_Affiliation_AdvertisementList”=“LocationA;*” on “{now}” for client

Optionally, set up central or top level relays and/or failover relays at your main location.

1 Like

Hello There ,

Thank you for the response ,

Earlier we are using the Hostname for affiliation criteria and now i wanted to use IP address range.

Do you mind writing a relevance and action script just for an example to make the things clear to me.

Lets say Ip range is 10.x.x-- 10.x.y so in that case what would be the relevance and action script for advertisement and what would be for seek.

Appreciate your help!

Here’s a relevance statement that looks at the first 3 octets of the client’s IP addresses that can help get you started. You can get more Network relevance sample details on the developer site.

/* ----- Network A ----- /
if (exists address whose(it as string starts with “10.10.1” or it as string starts with “192.168.1”) of ip interfaces whose (loopback of it = false) of network) then “NetworkA”
/
----- Network B ----- /
else (if (exists address whose(it as string starts with “10.10.2” or it as string starts with “192.168.2”) of ip interfaces whose (loopback of it = false) of network) then “NetworkB”
/
----- Network C ----- /
else (if (exists address whose(it as string starts with “10.10.3” or it as string starts with “192.168.3”) of ip interfaces whose (loopback of it = false) of network) then “NetworkC”
/
----- Network D ----- /
else (if (exists address whose(it as string starts with “10.10.4” or it as string starts with “192.168.4”) of ip interfaces whose (loopback of it = false) of network) then “NetworkD”
/
----- Undefined ----- */
else “Undefined”))))))

You can leverage substitution relevance within ActionScript in order to set the AdvertismentList and SeekList on your relays and clients respectively.

1 Like