本文檔提供運行7.x版本的思科自適應安全裝置(ASA)和/或PIX安全裝置上的組播配置示例。在本示例中,組播傳送方位於安全裝置外部,內部的主機正在嘗試接收組播流量。主機傳送IGMP報告以報告組成員身份,防火牆使用協定無關組播(PIM)稀疏模式作為到上游路由器的動態組播路由協定,該上游路由器後面是流源。
注意:FWSM/ASA不支援232.x.x.x/8子網作為組號,因為它保留用於ASA SSM。因此,FWSM/ASA不允許使用或遍歷此子網,並且不會建立mroute。但是,如果您在GRE通道中封裝此多點傳播流量,則仍可以通過ASA/FWSM傳遞它。
運行軟體版本7.0、7.1或7.2的Cisco PIX或ASA安全裝置。
本文檔中的資訊基於運行版本7.x的Cisco PIX或Cisco ASA防火牆。
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路正在作用,請確保您已瞭解任何指令可能造成的影響。
PIX/ASA 7.x引入了完整的PIM稀疏模式和雙向支援,用於通過防火牆的動態組播路由。不支援PIM密集模式。7.x軟體仍支援傳統組播「存根模式」,其中防火牆只是介面之間的IGMP代理,如PIX版本6.x所支援的。
以下陳述適用於透過防火牆的多點傳播流量:
如果存取清單套用到接收多點傳播流量的介面,則存取控制清單(ACL)必須明確允許流量。如果沒有將存取清單套用到介面,則不需要允許多點傳播流量的顯式ACL專案。
無論介面上是否配置了reverse-path forward check命令,組播資料包始終會受到防火牆的反向路徑轉發檢查。因此,如果在接收該封包的介面上沒有通往該多點傳送封包來源的路由,該封包會被捨棄。
如果介面上沒有返回到組播資料包源的路由,請使用mroute命令指示防火牆不要丟棄資料包。
本節提供用於設定本文件中所述功能的資訊。
註:使用Command Lookup Tool(僅供已註冊客戶使用)可獲取本節中使用的命令的詳細資訊。
本檔案會使用此網路設定。
組播流量源自192.168.1.2,在埠1234上使用發往組224.1.2.3的UDP資料包。
本檔案會使用以下設定:
運行7.x版的Cisco PIX或ASA防火牆 |
---|
maui-soho-01#show running-config SA Version 7.1(2) ! hostname ciscoasa enable password 8Ry2YjIyt7RRXU24 encrypted !--- The multicast-routing command enables IGMP and PIM !--- on all interfaces of the firewall. multicast-routing names ! interface Ethernet0/0 nameif outside security-level 0 ip address 172.16.1.1 255.255.255.0 ! interface Ethernet0/1 nameif inside security-level 100 ip address 10.0.0.1 255.255.255.0 ! interface Ethernet0/2 no nameif no security-level no ip address ! interface Ethernet0/3 shutdown no nameif no security-level no ip address ! interface Management0/0 shutdown no nameif no security-level no ip address ! passwd 2KFQnbNIdI.2KYOU encrypted !--- The rendezvous point address must be defined in the !--- configuration in order for PIM to function correctly. pim rp-address 172.16.1.2 boot system disk0:/asa712-k8.bin ftp mode passive !--- It is necessary to permit the multicast traffic with an !--- access-list entry. access-list outside_access_inbound extended permit ip any host 224.1.2.3 pager lines 24 logging enable logging buffered debugging mtu outside 1500 mtu inside 1500 no failover !--- The access-list that permits the multicast traffic is applied !--- inbound on the outside interface. access-group outside_access_inbound in interface outside !--- This mroute entry specifies that the multicast sender !--- 192.168.1.2 is off the outside interface. In this example !--- the mroute entry is necessary since the firewall has no route to !--- the 192.168.1.2 host on the outside interface. Otherwise, this !--- entry is not necessary. mroute 192.168.1.2 255.255.255.255 outside icmp permit any outside asdm image disk0:/asdm521.bin no asdm history enable arp timeout 14400 timeout xlate 3:00:00 timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02 timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 timeout mgcp-pat 0:05:00 sip 0:30:00 sip_media 0:02:00 timeout uauth 0:05:00 absolute no snmp-server location no snmp-server contact snmp-server enable traps snmp authentication linkup linkdown coldstart telnet timeout 5 ssh timeout 5 console timeout 0 ! class-map inspection_default match default-inspection-traffic ! ! policy-map global_policy class inspection_default inspect ftp inspect h323 h225 inspect h323 ras inspect rsh inspect rtsp inspect esmtp inspect sqlnet inspect skinny inspect sunrpc inspect xdmcp inspect sip inspect netbios inspect tftp ! service-policy global_policy global ! end |
使用本節內容,確認您的組態是否正常運作。
輸出直譯器工具(僅供已註冊客戶使用)(OIT)支援某些show命令。使用OIT檢視show命令輸出的分析。
show mroute — 顯示IPv4多點傳送路由表。
ciscoasa#show mroute Multicast Routing Table Flags: D - Dense, S - Sparse, B - Bidir Group, s - SSM Group, C - Connected, L - Local, I - Received Source Specific Host Report, P - Pruned, R - RP-bit set, F - Register flag, T - SPT-bit set, J - Join SPT Timers: Uptime/Expires Interface state: Interface, State !--- Here you see the mroute entry for the shared tree. Notice that the !--- incoming interface specifies outside and that the outgoing interface !--- list specifies inside. (*, 224.1.2.3), 00:00:12/never, RP 172.16.1.2, flags: SCJ Incoming interface: outside RPF nbr: 172.16.1.2 Outgoing interface list: inside, Forward, 00:00:12/never !--- Here is the source specific tree for the mroute entry. (192.168.1.2, 224.1.2.3), 00:00:12/00:03:17, flags: SJ Incoming interface: outside RPF nbr: 0.0.0.0 Immediate Outgoing interface list: Null
show conn — 顯示指定連線型別的連線狀態。
!--- A connection is built through the firewall for the multicast stream. !--- In this case the stream is sourced from the sender IP and destined !--- to the multicast group. ciscoasa#show conn 10 in use, 12 most used UDP out 192.168.1.2:51882 in 224.1.2.3:1234 idle 0:00:00 flags - ciscoasa#
show pim neighbor — 顯示PIM鄰居表中的條目。
!--- When you use PIM, the neighbor devices should be seen with the !--- show pim neighbor command. ciscoasa#show pim neighbor Neighbor Address Interface Uptime Expires DR pri Bidir 172.16.1.2 outside 04:06:37 00:01:27 1 (DR)
本節提供的資訊可用於對組態進行疑難排解。
請依照以下說明進行操作,對組態進行疑難排解。
輸出直譯器工具(僅供已註冊客戶使用)(OIT)支援某些show命令。使用OIT檢視show命令輸出的分析。
附註:使用 debug 指令之前,請先參閱有關 Debug 指令的重要資訊。
如果組播接收器直接連線到防火牆內部,則它們傳送IGMP報告以接收組播流。使用show igmp traffic命令以驗證您是否從內部接收IGMP報告。
ciscoasa#show igmp traffic IGMP Traffic Counters Elapsed time since counters cleared: 04:11:08 Received Sent Valid IGMP Packets 413 244 Queries 128 244 Reports 159 0 Leaves 0 0 Mtrace packets 0 0 DVMRP packets 0 0 PIM packets 126 0 Errors: Malformed Packets 0 Martian source 0 Bad Checksums 0 ciscoasa#
防火牆可以使用debug igmp命令顯示有關IGMP資料的更多詳細資訊。
在這種情況下,將啟用調試,主機10.0.0.2將傳送組224.1.2.3的IGMP報告。
!--- Enable IGMP debugging. ciscoasa#debug igmp IGMP debugging is on ciscoasa# IGMP: Received v2 Report on inside from 10.0.0.2 for 224.1.2.3 IGMP: group_db: add new group 224.1.2.3 on inside IGMP: MRIB updated (*,224.1.2.3) : Success IGMP: Switching to EXCLUDE mode for 224.1.2.3 on inside IGMP: Updating EXCLUDE group timer for 224.1.2.3 ciscoasa# !--- Disable IGMP debugging ciscoasa#un all
驗證防火牆是否具有有效的PIM鄰居,以及防火牆是否傳送和接收加入/修剪資訊。
ciscoasa#show pim neigh Neighbor Address Interface Uptime Expires DR pri Bidir 172.16.1.2 outside 04:26:58 00:01:20 1 (DR) ciscoasa#show pim traffic PIM Traffic Counters Elapsed time since counters cleared: 04:27:11 Received Sent Valid PIM Packets 543 1144 Hello 543 1079 Join-Prune 0 65 Register 0 0 Register Stop 0 0 Assert 0 0 Bidir DF Election 0 0 Errors: Malformed Packets 0 Bad Checksums 0 Send Errors 0 Packet Sent on Loopback Errors 0 Packets Received on PIM-disabled Interface 0 Packets Received with Unknown PIM Version 0 Packets Received with Incorrect Addressing 0 ciscoasa#
使用capture命令驗證外部介面是否收到該組的組播資料包。
ciscoasa#configure terminal !--- Create an access-list that is only used !--- to flag the packets to capture. ciscoasa(config)#access-list captureacl permit ip any host 224.1.2.3 !--- Define the capture named capout, bind it to the outside interface, and !--- specify to only capture packets that match the access-list captureacl. ciscoasa(config)#capture capout interface outside access-list captureacl !--- Repeat for the inside interface. ciscoasa(config)#capture capin interface inside access-list captureacl !--- View the contents of the capture on the outside. This verifies that the !--- packets are seen on the outside interface ciscoasa(config)#show capture capout 138 packets captured 1: 02:38:07.639798 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 2: 02:38:07.696024 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 3: 02:38:07.752295 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 4: 02:38:07.808582 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 5: 02:38:07.864823 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 6: 02:38:07.921110 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 7: 02:38:07.977366 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 8: 02:38:08.033689 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 9: 02:38:08.089961 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 10: 02:38:08.146247 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 11: 02:38:08.202504 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 12: 02:38:08.258760 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 13: 02:38:08.315047 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 14: 02:38:08.371303 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 15: 02:38:08.427574 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 16: 02:38:08.483846 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 17: 02:38:08.540117 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 18: 02:38:08.596374 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 19: 02:38:08.652691 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 20: 02:38:08.708932 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 21: 02:38:08.765188 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 22: 02:38:08.821460 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 23: 02:38:08.877746 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 24: 02:38:08.934018 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 !--- Here you see the packets forwarded out the inside !--- interface towards the clients. ciscoasa(config)#show capture capin 89 packets captured 1: 02:38:12.873123 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 2: 02:38:12.929380 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 3: 02:38:12.985621 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 4: 02:38:13.041898 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 5: 02:38:13.098169 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 6: 02:38:13.154471 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 7: 02:38:13.210743 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 8: 02:38:13.266999 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 9: 02:38:13.323255 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 10: 02:38:13.379542 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 11: 02:38:13.435768 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 12: 02:38:13.492070 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 13: 02:38:13.548342 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 14: 02:38:13.604598 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 15: 02:38:13.660900 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 16: 02:38:13.717141 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 17: 02:38:13.773489 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 18: 02:38:13.829699 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 19: 02:38:13.885986 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 20: 02:38:13.942227 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 21: 02:38:13.998483 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 22: 02:38:14.054852 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 23: 02:38:14.111108 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 24: 02:38:14.167365 192.168.1.2.52292 > 224.1.2.3.1234: udp 1316 ciscoasa(config)# !--- Remove the capture from the memory of the firewall. ciscoasa(config)#no capture capout
思科漏洞ID CSCse81633(僅供註冊客戶使用)— ASA 4GE-SSM Gig埠靜默丟棄IGMP加入。
症狀 — 將4GE-SSM模組安裝到ASA中並在介面上配置組播路由以及IGMP時,4GE-SSM模組的介面上會丟棄IGMP加入。
條件 — 在ASA的板載Gig介面上不會丟棄IGMP連線。
解決方法 — 對於組播路由,請使用板載Gig介面埠。
已在版本中修復 — 7.0(6)、7.1(2)18、7.2(1)11
修訂 | 發佈日期 | 意見 |
---|---|---|
1.0 |
26-Sep-2008 |
初始版本 |