-
简介
本文描述如何配置在
F5
本地流量管理器
(LTM)
的
iRules
思科身份服务引擎的
(I
SE) Radius
和
HTTP
负载
均衡。
先决条件
要求
Cisco
建议您了解以下主题:
?
?
?
思科
IS
E
部署、验证和授权
在
F5
LTM
的基础知识
在
Radius
和
HTTP
协议
的知识
使用的组件
本文档中的信息基于以下软件和硬件版本:
?
?
?
Cisco Catalyst
交换机
F5 BIG-
IP
版本
11.6
Cisco IS
E
软件版本
1.3
及以后
配置
网络图
F5 LTM
配置作为
Radius<
/p>
的一
loadbalancer
。确保是
重要的,所有验证和核算数据包同一会话的重定向对同一个
ISE
节点。
IETF
属性呼叫站点
Id<
/p>
使用持续时间配置文件。
没有使用
p>
NAT
。
LTM
路
由虚拟服务器的数据包给包括两个成员的正确池。
确保回来从
ISE
节点的流量通过
LTM
去是重要的。如果不是纳季将看到在答复的实际
IP
地址而不是虚拟。在这样方案中
SNAT
在
LTM
将必须使
用
-
,但是那将中断大多
ISE
流
< br>-
,因此不支持。
配置
ISE
为了简化条款
ISE
配置被跳过。请参考的其他资源。在
p>
ISE
的特别配置没有需要除了网络设备
(
172.16.33.1)
的新增内容。
F5 LTM
LTM
已经预先配置与
正确
VLAN/
接口。
两
ISE
节点被添加作为节点:
池为两节点创建
(
监听是基于的
icmp
,可能是
< br>udp/radius)
:
iRule
创建。它寻找每属性值对查找
IETF
呼叫站点
Id
的
(31)
每
Access-
Request
并且创建根据它的持续时间规则是值:
iRule
的内容:
when CLIENT_ACCEPTED {
binary scan [UDP::payload] ccSH32cc code ident len
auth attr_code1 attr_len1
set index
22
while { $$index < $$len } {
set hsize [expr ( $$attr_len1 -
2 ) * 2]
binary scan
[UDP::payload] @$${index}H$${hsize}cc attr_value
next_attr_code2 next_attr_len2
# If it is Calling-Station-Id
(31) attribute...
if {
$$attr_code1 == 31 } {
persist uie $$attr_value 30
return
}
set
index [ expr $$index + $$attr_len1 ]
set attr_len1 $$next_attr_len2
set attr_code1 $$next_attr_code2
}
}
持续时间哈希基于配置文件创建。该配置文件在
iRule
上使用:
标准的虚拟服务器创建。
UDP
p>
配置文件选择:
该虚拟服务器使用配置池和持续时间配置文件:
验证
可能
使用要检查流量是否正确地被平衡
radius
模拟程序
。
发送
4
访问请求到与特定呼叫站点
Id
属性的虚拟服务
器
(172.16.33.103)
地址:
root@arrakis:#
./ -d
172.16.33.103 -u cisco -p Krakow123 -s Krakow123
-ai 21:11:11:11:11:21 -n 4
Starting sniffing daemon
Choosen vmnet3 interface for sniffing
Sniffing traffic from udp and src
172.16.33.103 and port 1812
Sending
Radius Access-Requests
Sending Radius
Packet.......
Radius packet details:
172.16.33.1:27483 -> 172.16.33.103:1812
Radius Code: 1 (Access-Request)
Radius Id: 179
AVP[0] Type:
1 (User-Name) Value: cisco
AVP[1] Type:
2 (User-Password) Value: *
AVP[2] Type:
4 (NAS-IP-Address) Value: 172.16.33.1
AVP[3] Type: 31 (Calling-Station-Id)
Value: 21:11:11:11:11:21
Sending Radius Packet.......
Radius packet details:
172.16.33.1:27483 -> 172.16.33.103:1812
Received Radius
Packet......
Radius packet details:
172.16.33.103:1812 -> 172.16.33.1:27483
Radius Code: 2 (Access-Accept)
Radius Id: 236
AVP[0] Type:
18 Value: Hello, cisco.
This is
server1
.
Waiting 5 seconds for the responses
Finishing sniffing thread
Results:
Radius-Request
sent: 4
Radius-Accept
received: 4
Radius-Reject
received: 0
Other Radius messages
received: 0
Finishing main thread
两个
ISE
服务器配置返回到达根据服务器的另外
的
AV
对。
ISE-PSN1
一将返回
server1
的
Hello
消息,
ISE
网络访问
:
ISE
主机名
使用
< br>等于
条件
)
。
< br>
确认另外服务器响应基于另外呼叫站点
Id
属性:
root@arrakis:# ./
-d 172.16.33.103 -u cisco -p Krakow123 -s
Krakow123 -ai
21:11:11:11:11:21
-n 4 |
grep
AVP[0] Type: 18 Value: Hello,
cisco. This is server1.
AVP[0] Type: 18
Value: Hello, cisco. This is server1.
AVP[0] Type: 18 Value: Hello, cisco.
This is server1.
AVP[0] Type: 18 Value:
Hello, cisco. This is server1.
root@arrakis:# ./ -d 172.16.33.103 -u
cisco -p Krakow123 -s Krakow123 -ai
21:11:11:11:11:22
-n 4 |
grep
AVP[0] Type: 18 Value: Hello,
cisco. This is server2
AVP[0] Type: 18
Value: Hello, cisco. This is server2
将返
回
server2
的
Hello
消息
(
在
ISE-PSN2
AVP[0] Type: 18
Value: Hello, cisco. This is server2
AVP[0] Type: 18 Value: Hello, cisco.
This is server2
root@arrakis:# ./ -d 172.16.33.103 -u
cisco -p Krakow123 -s Krakow123 -ai
21:11:11:11:11:23
-n 4 |
grep
AVP[0] Type: 18 Value: Hello,
cisco. This is server1.
AVP[0] Type: 18
Value: Hello, cisco. This is server1.
AVP[0] Type: 18 Value: Hello, cisco.
This is server1.
AVP[0] Type: 18 Value:
Hello, cisco. This is server1.
root@arrakis:# ./ -d 172.16.33.103 -u
cisco -p Krakow123 -s Krakow123 -ai
21:11:11:11:11:24
-n 4 |
grep
AVP[0] Type: 18 Value: Hello,
cisco. This is server2
AVP[0] Type: 18
Value: Hello, cisco. This is server2
AVP[0] Type: 18 Value: Hello, cisco.
This is server2
AVP[0] Type: 18 Value:
Hello, cisco. This is server2
< br>在
LTM
池的统计信息能验证:
LTM
的持续时间缓存:
root@(f5)(cfg-sync
Standalone)(Active)(/Common)(tmos)#
show /ltm persistence persist-
records
Sys::Persistent
Connections
universal
32313
a31313a31313a31313a31313a3234
172.16.33.103:any
172.16.34.101:any
(tmm: 1)
Total records returned: 1
值<
/p>
是
ascii
表
示
。匹配此的所有后续的流量将发送对
ISE-PSN2 (172.16.34.101)
。
持续时
间条目创建与超时
30
秒
(
根据
仍然存在
in
命令<
/p>
iRule)
。
在条目以后超时:
root@(f5)(cfg-sync
Standalone)(Active)(/Common)(tmos)#
show /ltm persistence persist-
records
Sys::Persistent
Connections
Total records returned: 0 <
/p>
同样呼叫站点
Id
的流量也许重定向到<
/p>
ISE-PSN1
(172.16.34.100)
,新建的条目将创建:
root@(f5)(cfg-sync
Standalone)(Active)(/Common)(tmos)# show /ltm
persistence persist-records
Sys::Persistent Connections
universal
32313a31313a31313a31313a31313a3234
172.16.33.103:any
172.16.34.100:any
(tmm: 1)
Total records returned: 1
然而
对于以后
30
秒匹配此模式的所有流量将重定向对
ISE-PSN1
。
Radius Cisco
AV
对审计会话
id
IETF
呼叫站点
Id
属性持续时间的是最常用的。但
是能也使用其他属性。与审计会话
id
iRule
示例的
Cisco
AV
对:
when
CLIENT_ACCEPTED {
binary scan
[UDP::payload] ccSH32cc code ident len auth
attr_code1 attr_len1
set index 22
while { $$index < $$len } {
set hsize [expr ( $$attr_len1 -
2 ) * 2]
binary scan
[UDP::payload] @$${index}H$${hsize}cc attr_value
next_attr_code2 next_attr_len2
# If it is Vendor specific
atribute...
if { $$attr_code1 ==
26 } {
#search for string
audit-session-id
if {
$$attr_value contains
persist uie $$attr_value 30
return
}
-
-
-
-
-
-
-
-
-
上一篇:(完整版)说说英语的音节和发音规律
下一篇:系统的架构设计