思科与F5对接Radius_第1页
思科与F5对接Radius_第2页
思科与F5对接Radius_第3页
思科与F5对接Radius_第4页
思科与F5对接Radius_第5页
已阅读5页,还剩18页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、简介本文描述如何配置在F5本地流量管理器(LTM)的iRules思科身份服务引擎的(ISE) Radius和HTTP负载均衡。先决条件要求Cisco 建议您了解以下主题:· 思科ISE部署、验证和授权· 在F5 LTM的基础知识· 在Radius和HTTP协议的知识使用的组件本文档中的信息基于以下软件和硬件版本:· Cisco Catalyst 交换机· F5 BIG-IP版本11.6· Cisco ISE软件版本1.3及以后配置网络图F5 LTM配置作为Radius的一loadbalancer。确保是重要的,所有验证和核算数据包同一

2、会话的重定向对同一个ISE节点。IETF属性呼叫站点Id使用持续时间配置文件。没有使用NAT。LTM路由虚拟服务器的数据包给包括两个成员的正确池。确保回来从ISE节点的流量通过LTM去是重要的。如果不是纳季将看到在答复的实际IP地址而不是虚拟。在这样方案中SNAT在LTM将必须使用-,但是那将中断大多ISE流-,因此不支持。配置ISE为了简化条款ISE配置被跳过。请参考的其他资源。在ISE的特别配置没有需要除了网络设备()的新增内容。F5 LTMLTM已经预先配置与正确VLAN/接口。两ISE节点被添加作为节点:池为两节点创建(监听是基于的icmp,可能是udp/radi

3、us) :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       

4、;  set hsize expr ( $attr_len1 - 2 ) * 2        binary scan UDP:payload $indexH$hsizecc attr_value next_attr_code2 next_attr_len2        # If it is Calling-Station-Id (31) attribute.       

5、if $attr_code1 = 31             persist uie $attr_value 30            return                set index expr $index + $att

6、r_len1          set attr_len1 $next_attr_len2              set attr_code1 $next_attr_code2       持续时间哈希基于配置文件创建。该配置文件在iRule上使用:标准的虚拟服务器创建。UDP配置文件选择:该虚拟服务器使用配置池和持续时间配置文件:验证可能使用

7、要检查流量是否正确地被平衡radius模拟程序。发送4访问请求到与特定呼叫站点Id属性的虚拟服务器(03)地址:rootarrakis:# ./radiustest.py -d 03 -u cisco -p Krakow123 -s Krakow123 -ai 21:11:11:11:11:21 -n 4 Starting sniffing daemonChoosen vmnet3 interface for sniffingSniffing traffic from udp and src 03 and port 1812Se

8、nding Radius Access-RequestsSending Radius Packet.Radius packet details: :27483 -> 03:1812Radius Code: 1 (Access-Request)Radius Id: 179AVP0 Type: 1 (User-Name) Value: ciscoAVP1 Type: 2 (User-Password) Value: *AVP2 Type: 4 (NAS-IP-Address) Value: AVP3 Type: 31 (Cal

9、ling-Station-Id) Value: 21:11:11:11:11:21Sending Radius Packet.Radius packet details: :27483 -> 03:1812Received Radius Packet.Radius packet details: 03:1812 -> :27483Radius Code: 2 (Access-Accept)Radius Id: 236AVP0 Type: 18 Value: Hello, cisco. This

10、is server1.<some output omitted.3 more packets>Waiting 5 seconds for the responsesFinishing sniffing threadResults:Radius-Request sent: 4Radius-Accept received: 4Radius-Reject received: 0Other Radius messages received: 0Finishing main thread两个ISE服务器配置返回到达根据服务器的另外的AV对。ISE-PSN1一将返回server1的Hello消

11、息, ISE-PSN2将返回server2的Hello消息(在ISE网络访问:ISE主机名使用等于条件)。确认另外服务器响应基于另外呼叫站点Id属性:rootarrakis:# ./radiustest.py -d 03 -u cisco -p Krakow123 -s Krakow123 -ai 21:11:11:11:11:21 -n 4 | grep "Hello"AVP0 Type: 18 Value: Hello, cisco. This is server1.AVP0 Type: 18 Value: Hello, cisco. This i

12、s server1.AVP0 Type: 18 Value: Hello, cisco. This is server1.AVP0 Type: 18 Value: Hello, cisco. This is server1.rootarrakis:# ./radiustest.py -d 03 -u cisco -p Krakow123 -s Krakow123 -ai 21:11:11:11:11:22 -n 4 | grep "Hello"AVP0 Type: 18 Value: Hello, cisco. This is server2AVP0

13、Type: 18 Value: Hello, cisco. This is server2AVP0 Type: 18 Value: Hello, cisco. This is server2AVP0 Type: 18 Value: Hello, cisco. This is server2rootarrakis:# ./radiustest.py -d 03 -u cisco -p Krakow123 -s Krakow123 -ai 21:11:11:11:11:23 -n 4 | grep "Hello"AVP0 Type: 18 Value: H

14、ello, cisco. This is server1.AVP0 Type: 18 Value: Hello, cisco. This is server1.AVP0 Type: 18 Value: Hello, cisco. This is server1.AVP0 Type: 18 Value: Hello, cisco. This is server1.rootarrakis:# ./radiustest.py -d 03 -u cisco -p Krakow123 -s Krakow123 -ai 21:11:11:11:11:24 -n 4 | grep &q

15、uot;Hello"AVP0 Type: 18 Value: Hello, cisco. This is server2AVP0 Type: 18 Value: Hello, cisco. This is server2AVP0 Type: 18 Value: Hello, cisco. This is server2AVP0 Type: 18 Value: Hello, cisco. This is server2在LTM池的统计信息能验证:LTM的持续时间缓存:root(f5)(cfg-sync Standalone)(Active)(/Common)(tmos)# show /

16、ltm persistence persist-recordsSys:Persistent Connectionsuniversal  32313a31313a31313a31313a31313a3234  03:any  01:any  (tmm: 1)Total records returned: 1值"32313a31313a31313a31313a31313a3234"是ascii表示"21:11:11:11:11:24"。匹配此的所有后续的流量将发送对ISE-P

17、SN2 (01)。持续时间条目创建与超时30秒(根据仍然存在in命令iRule)。在条目以后超时:root(f5)(cfg-sync Standalone)(Active)(/Common)(tmos)# show /ltm persistence persist-recordsSys:Persistent ConnectionsTotal records returned: 0同样呼叫站点Id的流量也许重定向到ISE-PSN1 (00),新建的条目将创建:root(f5)(cfg-sync Standalone)(Active)(/Common)(

18、tmos)# show /ltm persistence persist-recordsSys:Persistent Connectionsuniversal  32313a31313a31313a31313a31313a3234  03:any  00:any  (tmm: 1)Total records returned: 1然而对于以后30秒匹配此模式的所有流量将重定向对ISE-PSN1。Radius Cisco AV对审计会话idIETF呼叫站点Id属性持续时间的是最常用的。但是能也使用其他属性。与审计

19、会话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  

20、;      binary scan UDP:payload $indexH$hsizecc attr_value next_attr_code2 next_attr_len2        # If it is Vendor specific atribute.        if $attr_code1 = 26        

21、60;    #search for string audit-session-id            if $attr_value contains "61756469742d73657373696f6e2d6964"                   

22、0;        persist uie $attr_value 30               return                        

23、0;   set index expr $index + $attr_len1          set attr_len1 $next_attr_len2              set attr_code1 $next_attr_code2       radius模拟程序使用再要测试:rootarrakis:# ./ra

24、diustest.py -d 03 -u cisco -p Krakow123 -s Krakow123 -avi 9 -avt 1 -avv "audit-session-id=0A30276F00001225751086B9" -avx string -ai 21:11:11:11:11:20 -n 4 | grep HelloAVP0 Type: 18 Value: Hello, cisco. This is server1AVP0 Type: 18 Value: Hello, cisco. This is server1AVP0 Type: 1

25、8 Value: Hello, cisco. This is server1AVP0 Type: 18 Value: Hello, cisco. This is server1rootarrakis:# ./radiustest.py -d 03 -u cisco -p Krakow123 -s Krakow123 -avi 9 -avt 1 -avv "audit-session-id=0A30276F00001225751086B9" -avx string -ai 21:11:11:11:11:20 -n 4 | grep HelloAVP0 T

26、ype: 18 Value: Hello, cisco. This is server2AVP0 Type: 18 Value: Hello, cisco. This is server2AVP0 Type: 18 Value: Hello, cisco. This is server2AVP0 Type: 18 Value: Hello, cisco. This is server2结果两个持续时间条目创建:root(f5)(cfg-sync Standalone)(Active)(/Common)(tmos)# show /ltm persistence persist-recordsSy

27、s:Persistent Connectionsuniversal  00000009012b61756469742d73657373696f6e2d69643d304133303237364630303030313232353735313038364238  03:any  00:any  (tmm: 1)universal  00000009012b61756469742d73657373696f6e2d69643d30413330323736463030303031323235373531303

28、8364239  03:any  01:any  (tmm: 1)Total records returned: 2(只要那些条目存在),并且与同一个模式的所有后续的流量重定向到同一个ISE服务器。LTM版本更改请注意没有建议再使用CLIENT_DATA添加持续时间规则。从版本9.4开始应该使用CLIENT_ACCEPTED :UDP虚拟服务器的事件并且RADIUS属性的更加简单的访问允许。示例:when CLIENT_ACCEPTED   set framed_ip RADIUS:avp 8 ip4 

29、0;    set calling RADIUS:avp 31 "string"       persist add uie $framed_ip 1800    persist add uie $calling 1800文档陈述使用RADIUS配置文件是必要的,但是在版本11.6工作,即使虚拟服务器的(VS) RADIUS配置文件设置对无。HTTP负载均衡典型地没有需要装载CWA和其他访客流的平衡HTTP数据流。访客的重定向直接地对特定节点,不用需要使用loadb

30、alancer。在手工访问的相反赞助商和设备门户能容易地被平衡。请读更多在被参考的非常好文档:HowTo :思科和F5部署指南ISE负载均衡使用BIG-IP当CWA +其他访客流也许要求HTTP负载均衡,但是有方案。第三方集成是这样方案。原因是会配置与静态重定向指向同样VS (FQDN)的每纳季。访客流负载均衡是有唯一的解决方案在这样方案的高可用性。与那的挑战亲切重定向是匹配与核算的RADIUS验证与HTTP会话和确保他们同样PSN的所有地产。达到两VS创建。一HTTP的,一个Radius的(验证和核算)。而不是古典持续时间会话使用概念。请注意它是需要被平衡的HTTPS流量(卸载的SSL)并且

31、它是HTTPS流量需要到达PSN (节点)。卸载配置的SSL在下一部分被提交。· 一旦RADIUS验证(Access-Request)开始Radius VS的iRule是检查执行的会话的查找是否有该呼叫站点Id属性的持续时间。如果不新条目创建。如果旧有条目使用是。· 对于所有随后的RADIUS信息包重新使用现有项-结果我们重定向对同一个节点。· 在终端是指定的IP地址Radius后有framed-ip-address的临时核算数据包发送,条目的这次另外的会话(基于framed-ip-address)是创建的重定向对同一个节点为RADIUS流量已经选择·

32、一旦HTTP数据流接收HTTP VS的iRule是根据来源ip的执行的会话查找。上次会话(framed-ip-address)匹配和同一个节点选择Radius VS的iRule代码:# adding persistence based on Calling-Station-IDwhen LB_SELECTED     log local0. "session table entry added: <persist:RADIUS:avp 31 node LB:server addr>"    sessio

33、n add uie "persist:RADIUS:avp 31" LB:server addr# lookup and adding persistence based on Framed-IP-Addrwhen CLIENT_ACCEPTED    log local0. "session table lookup result for calling station ID of RADIUS:avp 31: session lookup uie "persist:RADIUS:avp 31"" &#

34、160;  if session lookup uie "persist:RADIUS:avp 31" ne ""        log local0. "lookup match: session lookup uie "persist:RADIUS:avp 31""       node session lookup uie "persist:RADIUS:avp 31&q

35、uot;       log local0. "session table entry added: <persist:RADIUS:avp 8 session lookup uie "persist:RADIUS:avp 31">"       session add uie "persist:RADIUS:avp 8" session lookup uie "persist:RADIUS:a

36、vp 31"     HTTP VS的iRule代码:#lookup based on client_addr expecting to match entry created based on Framed-IP-Addrwhen HTTP_REQUEST     log local0. "session table lookup result for web client of IP:client_addr: session lookup uie "persist:IP:client_addr&quo

37、t;"   if session lookup uie "persist:IP:client_addr" ne ""        node session lookup uie "persist:IP:client_addr"      验证流发送与呼叫站点Id 11:11:11:11:11:17的一测验Access-Request到Radius VS :# ./radiustest.py -d 172.

38、16.33.103 -u cisco -p Krakow123 -s cisco -ai 11:11:11:11:11:17 -n 1结果在LTM的/var/log/ltm将记录那里是该呼叫站点Id的没有条目,并且,一旦负载均衡决策做重定向对节点01的新建的条目创建。Rule /Common/radius <CLIENT_ACCEPTED>: session table lookup result for calling station ID of 11:11:11:11:11:17: Rule /Common/radius <LB_SELECTED&g

39、t;: session table entry added: <persist:11:11:11:11:11:17 node 01所有随后的RADIUS信息包重定向对该节点。在该阶段(在客户端通过DHCP得到地址)后, framed-ip-address传送:# ./radiustest.py -d 03 -u cisco -p Krakow123 -s cisco -fi -ai 11:11:11:11:11:17 -n 1LTM将记录根据正确节点选择的呼叫站点Id的那(01) -,而且个新会话条

40、目根据framed-ip-address创建()。同一个节点(01)为该条目选择。Rule /Common/radius <CLIENT_ACCEPTED>: session table lookup result for calling station ID of 11:11:11:11:11:17: 01Rule /Common/radius <CLIENT_ACCEPTED>: lookup match: 01Rule /Common/radius <CLIENT_ACC

41、EPTED>: session table entry added: <persist: 01>Rule /Common/radius <LB_SELECTED>: session table entry added: <persist:11:11:11:11:11:17 node 01>在此阶段从IP地址的任何HTTP GET请求:# curl -k 03:8443触发在LTM的以下结果(流量重定向对一个匹配的节点:172.16

42、.34.101) :Rule /Common/http <HTTP_REQUEST>: session table lookup result for web client of : 01同一个终端的这样Radius和HTTP数据流总是重定向对同一个节点。现有项每请求刷新会话条目。默认会话条目计时器是60s。如果在此阶段新建的呼叫站点Id出现一切是由临时开始。若需要并且新建的条目能改写旧有一个。从LTM的示例日志:Rule /Common/radius <CLIENT_ACCEPTED>: session table look

43、up result for calling station ID of 11:11:11:11:11:18: Rule /Common/radius <LB_SELECTED>: session table entry added: <persist:11:11:11:11:11:18 node 00>Rule /Common/radius <CLIENT_ACCEPTED>: session table lookup result for calling station ID of 11:11:11:11:11:18: 00Rule /Common/radius <CLIENT_ACCEPTED>: lookup match: 00Rule /Common/radius <CLIENT_ACCEPTED>: session table entry added: <persist: 00>Rule /Common/r

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论