<menu id="guoca"></menu>
<nav id="guoca"></nav><xmp id="guoca">
  • <xmp id="guoca">
  • <nav id="guoca"><code id="guoca"></code></nav>
  • <nav id="guoca"><code id="guoca"></code></nav>

    Cisco 交換機上怎么抓包


    發現錯別字 2年前 提問
    回答
    1
    瀏覽
    861
    請勿發布不友善或者負能量的內容。與人為善,比聰明更重要!
    回答數量: 1
    CISP-PTE CISM-WSE

    Cisco nexus 抓包使用ethanalyze命令。在用戶視圖下執行。

    注:該命令只能捕獲去交換機自身和自身發出去的流量。

    不能捕獲:捕獲在硬件中轉發的數據平面流量。不支持特定于接口的捕獲

    如果需要抓取CPU的流量,需要將端口流量鏡像到CPU,然后使用ethanalyze抓取。

    在抓端口鏡像(轉發層面的)包時,設備不能配置sflow。

    ERROR: SFLOW is configured. Please delete all SFLOW data sources before configuring SPANs

    https://www.cisco.com/c/en/us/support/docs/switches/nexus-9000-series-switches/215329-nexus-9000-cloud-scale-asic-nx-os-span-t.html?dtid=osscdc000283

    https://www.cisco.com/c/en/us/support/docs/switches/nexus-7000-series-switches/116136-trouble-ethanalyzer-nexus7000-00.html

     ethanalyzer local  interface inband ?
     <CR>          
     >            Redirect it to a file
     >>           Redirect it to a file in append mode
     autostop        Capture autostop condition
     capture-filter     Filter on ethanalyzer capture
     capture-ring-buffer   Capture ring buffer option
     decode-internal     Include internal system header decoding
     detail         Display detailed protocol information 
     display-filter     Display filter on frames captured
     limit-captured-frames  Maximum number of frames to be captured (default is 10)
     limit-frame-size    Capture only a subset of a frame
     mirror         Filter mirrored packets
     raw           Hex/Ascii dump the packet with possibly one line summary
     write          Filename to save capture to
     |            Pipe command output to filter
    # 配置SPAN到CPU的監視器會話
    N9K# **configure terminal** 
    Enter configuration commands, one per line. End with CNTL/Z.
    N9K-1(config)# **monitor session 1** N9K-1(config-monitor)# **source interface Ethernet1/10 rx**N9K-1(config-monitor)# **destination interface sup-eth0** N9K-1(config-monitor)# **no shut**
    N9K-1(config-monitor)# **end**
    # 確認SPAN到CPU監視器會話已啟動
    N9K# **show running-config monitor**  
    N9K# **show monitor**
    # 在控制平面中查看復制的數據包
    # ethanalyze 可以用來復制到思科Nexus 9000設備的控制平面視圖流量。Ethanalyzer命令中的**mirror**關鍵字可以過濾流量,以便僅顯示SPAN到CPU監視器會話復制的流量。Ethanalyzer捕獲和顯示過濾器可用于進一步限制顯示的流量。
    9K# **ethanalyzer** **local** **interface inband mirror display-filter** **"icmp && ip.addr==192.168.10.10"** **limit-captured-frames 0** 
    # 使用Control-C組合鍵可以退出Ethanalyzer控制平面數據包捕獲實用程序。
    # 通過在Ethanalyzer命令中包含**detail**關鍵字,可以查看有關此流量的詳細信息。下面顯示了單個ICMP Echo Request數據包的示例。
    N9K# **ethanalyzer** **local** **interface inband mirror display-filter** **"icmp && ip.addr==192.168.10.10"** **limit-captured-frames 0 detail** 
    # 以管理方式關閉SPAN到CPU監視器會話
     # 在SPAN到CPU監視器會話的上下文中使用**shutdown** configuration命令可以正常關閉SPAN到CPU監視器會話,并停止將流量復制到Cisco Nexus 9000設備的控制平面。
    N9K# **configure terminal**
    Enter configuration commands, one per line. End with CNTL/Z.
    N9K-1(config)# **monitor session 1** N9K-1(config-monitor)# **shut**
    N9K-1(config-monitor)# **end**
    N9K#

    回答所涉及的環境:聯想天逸510S、Windows 10。

    2年前 / 評論
    亚洲 欧美 自拍 唯美 另类