No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

CX11x, CX31x, CX710 (Earlier Than V6.03), and CX91x Series Switch Modules V100R001C10 Configuration Guide 12

The documents describe the configuration of various services supported by the CX11x&CX31x&CX91x series switch modules The description covers configuration examples and function configurations.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Configuration Examples

Configuration Examples

This section provides several configuration examples of packet mirroring, including network requirements, configuration roadmap, and configuration procedures.

Example for Configuring Local Port Mirroring

Networking Requirements

As shown in Figure 14-45, HostA is connected to 10GE1/17/1 on SwitchA, and Server is directly connected to 10GE1/17/2 on SwitchA.

Users want to use the monitoring device (Server) to monitor packets sent from HostA.

Figure 14-45 Networking diagram of local port mirroring
Configuration Roadmap
The configuration roadmap is as follows:
  1. Configure 10GE1/17/2 on SwitchA as the local observing port so that Server can receive mirrored packets.
  2. Configure 10GE1/17/1 on SwitchA as the mirrored port to monitor packets passing through the mirrored port.

Procedure

  1. Configure an observing port.

    # Configure 10GE1/17/2 on SwitchA as the local observing port.

    <HUAWEI> system-view
    [~HUAWEI] sysname SwitchA
    [*HUAWEI] commit
    [~SwitchA] observe-port 1 interface 10ge 1/17/2
    [*SwitchA] commit
    

  2. Configure a mirrored port.

    # Configure 10GE1/17/1 on SwitchA as the mirrored port to monitor packets sent from HostA.

    [~SwitchA] interface 10ge 1/17/1
    [~SwitchA-10GE1/17/1] port-mirroring observe-port 1 inbound
    [*SwitchA-10GE1/17/1] commit
    [~SwitchA-10GE1/17/1] return
    

  3. Verify the configurations.

    # Check the observing port configuration.

    <SwitchA> display observe-port
      ----------------------------------------------------------------------
      Index    : 1
      Interface: 10GE1/17/2
      ----------------------------------------------------------------------        

    # Check the mirrored port configuration.

    <SwitchA> display port-mirroring
      Observe port mirroring:
      -----------------------------------------------------------------------------
      MirroringPort         Direction        ObservePort : Interface
      -----------------------------------------------------------------------------
      10GE1/17/1             Inbound                    1 : 10GE1/17/2
      -----------------------------------------------------------------------------
    

Configuration Files
  • Configuration file of SwitchA

    #
    sysname SwitchA
    #
    observe-port 1 interface 10GE1/17/2
    #
    interface 10GE1/17/1
     port-mirroring observe-port 1 inbound
    #
    return
    

Example for Configuring Layer 2 Remote Port Mirroring

Networking Requirements

As shown in Figure 14-46, HostA is connected to 10GE1/17/2 on SwitchA, and Server is connected to 10GE1/17/1 on SwitchC. SwitchA and SwitchC are connected over a Layer 2 network.

Users want to use the monitoring device (Server) to remotely monitor packets sent from HostA.

Figure 14-46 Networking diagram of Layer 2 remote port mirroring
Configuration Roadmap
The configuration roadmap is as follows:
  1. Configure ports so that devices can communicate on Layer 2.
  2. Configure 10GE1/17/1 on SwitchA as the remote observing port so that mirrored packets can be forwarded to Server over the Layer 2 network.
  3. Configure 10GE1/17/2 on SwitchA as the mirrored port to monitor packets passing through the mirrored port.

Procedure

  1. Configure ports so that devices can communicate on Layer 2.

    # Configure SwitchA.

    <HUAWEI> system-view
    [~HUAWEI] sysname SwitchA
    [*HUAWEI] commit
    [~SwitchA] vlan batch 3
    [*SwitchA] interface 10ge 1/17/2
    [*SwitchA-10GE1/17/2] port default vlan 3
    [*SwitchA-10GE1/17/2] quit
    [*SwitchA] commit
    

    # Configure SwitchB.

    <HUAWEI> system-view
    [~HUAWEI] sysname SwitchB
    [*HUAWEI] commit
    [~SwitchB] vlan 2
    [*SwitchB-vlan2] quit
    [*SwitchB] interface 10ge 1/17/1
    [*SwitchB-10GE1/17/1] port link-type trunk
    [*SwitchB-10GE1/17/1] port trunk allow-pass vlan 2
    [*SwitchB-10GE1/17/1] quit
    [*SwitchB] interface 10ge 1/17/2
    [*SwitchB-10GE1/17/2] port link-type trunk
    [*SwitchB-10GE1/17/2] port trunk allow-pass vlan 2
    [*SwitchB-10GE1/17/2] quit
    [*SwitchB] commit
    

    # Configure SwitchC.

    <HUAWEI> system-view
    [~HUAWEI] sysname SwitchC
    [*HUAWEI] commit
    [~SwitchC] vlan 2
    [*SwitchC-vlan2] quit
    [*SwitchC] interface 10ge 1/17/1
    [*SwitchC-10GE1/17/1] port default vlan 2
    [*SwitchC-10GE1/17/1] quit
    [*SwitchC] interface 10ge 1/17/2
    [*SwitchC-10GE1/17/2] port link-type trunk
    [*SwitchC-10GE1/17/2] port trunk allow-pass vlan 2
    [*SwitchC-10GE1/17/2] quit
    [*SwitchC] commit
    

  2. Configure a remote observing port.

    # Configure 10GE1/17/1 on SwitchA as the remote observing port.

    [~SwitchA] observe-port 1 interface 10ge 1/17/1 vlan 2
    [*SwitchA] commit
    

  3. Configure a mirrored port.

    # Configure 10GE1/17/2 on SwitchA as the mirrored port.

    [~SwitchA] interface 10ge 1/17/2
    [~SwitchA-10GE1/17/2] port-mirroring observe-port 1 inbound
    [*SwitchA-10GE1/17/2] quit
    [*SwitchA] commit
    [~SwitchA] quit
    

  4. Verify the configurations.

    # Check the observing port configuration.

    <SwitchA> display observe-port
      ----------------------------------------------------------------------
      Index    : 1
      Interface: 10GE1/17/1
      Vlan     : 2
      ----------------------------------------------------------------------
    

    # Check the mirrored port configuration.

    <SwitchA> display port-mirroring
      Observe port mirroring:
      -----------------------------------------------------------------------------
      MirroringPort         Direction        ObservePort : Interface
      -----------------------------------------------------------------------------
      10GE1/17/2             Inbound                    1 : 10GE1/17/1
      -----------------------------------------------------------------------------
    

Configuration Files
  • Configuration file of SwitchA

    #
    sysname SwitchA
    #
    vlan batch 3
    #
    observe-port 1 interface 10GE1/17/1 vlan 2
    #
    interface 10GE1/17/2
     port default vlan 3
     port-mirroring observe-port 1 inbound
    #
    return
    
  • Configuration file of SwitchB

    #
    sysname SwitchB
    #
    vlan batch 2
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 2
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 2
    #
    return
    
  • Configuration file of SwitchC

    #
    sysname SwitchC
    #
    vlan batch 2
    #
    interface 10GE1/17/1
     port default vlan 2
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 2
    #
    return
    

Example for Configuring Layer 3 Remote Port Mirroring

Networking Requirements

As shown in Figure 14-47, HostA is connected to 10GE1/17/2 on SwitchA, and Server is connected to 10GE1/17/2 on SwitchB. HostA can Server are connected over a Layer 2 network, and routes between them are reachable.

Users want to use the monitoring device (Server) to remotely monitor packets sent from HostA.

Figure 14-47 Networking diagram of Layer 3 remote port mirroring
Configuration Roadmap
The configuration roadmap is as follows:
  1. Configure 10GE1/17/1 on SwitchA as the remote observing port so that mirrored packets can be forwarded to Server over the Layer 3 network.
  2. Configure 10GE1/17/2 on SwitchA as the mirrored port to monitor packets sent from HostA.

Procedure

  1. Configure a remote observing port.

    # Configure 10GE1/17/1 on SwitchA as the Layer 3 remote observing port and set the destination IP address to the Server IP address.

    <HUAWEI> system-view
    [~HUAWEI] sysname SwitchA
    [*HUAWEI] commit
    [~SwitchA] observe-port interface 10ge 1/17/1 destination-ip 10.2.1.1 source-ip 10.1.1.1
    [*SwitchA] commit

  2. Configure a mirrored port.

    # Configure 10GE1/17/2 on SwitchA as the mirrored port.

    [~SwitchA] interface 10ge 1/17/2
    [~SwitchA-10GE1/17/2] port-mirroring observe-port 1 inbound
    [*SwitchA-10GE1/17/2] quit
    [*SwitchA] commit
    [~SwitchA] quit
    

  3. Verify the configurations.

    # Check the observing port configuration.

    <SwitchA> display observe-port
      ----------------------------------------------------------------------
      Index    : 1
      Interface: 10GE1/17/1
      Vlan     : 0
      Dscp     : 0
      Src-Ip   : 10.1.1.1
      Dst-Ip   : 10.2.1.1
      Src-Mac  : 00-25-9e-37-ee-a5
      Dst-Mac  : ff-ff-ff-ff-ff-ff
      ----------------------------------------------------------------------
    

    # Check the mirrored port configuration.

    <SwitchA> display port-mirroring
      Observe port mirroring:
      -----------------------------------------------------------------------------
      MirroringPort         Direction        ObservePort : Interface
      -----------------------------------------------------------------------------
      10GE1/17/2             Inbound                    1 : 10GE1/17/1
      -----------------------------------------------------------------------------
    

Configuration Files
  • Configuration file of SwitchA

    #
    sysname SwitchA
    #
    observe-port 1 interface 10GE1/17/1 destination-ip 10.2.1.1 source-ip 10.1.1.1
    #
    interface 10GE1/17/2
     port-mirroring observe-port 1 inbound
    #
    return
    

Example for Configuring Local Traffic Mirroring

Networking Requirements

As shown in Figure 14-48, HostA is connected to 10GE1/17/1 on SwitchA, and Server is directly connected to 10GE1/17/2 on SwitchA.

Users want to use the monitoring device (Server) to monitor packets with the 802.1p priority of 6 sent from HostA.

Figure 14-48 Networking diagram of local traffic mirroring
Configuration Roadmap
The configuration roadmap is as follows:
  1. Configure 10GE1/17/2 on SwitchA as the local observing port so that Server can receive mirrored packets.
  2. Configure a traffic classifier to match packets with the 802.1p priority of 6, and configure a traffic behavior to mirror packets to the observing port.
  3. Configure a traffic policy, bind the traffic classifier and traffic behavior to the traffic policy, and apply the traffic policy to the inbound direction of 10GE1/17/1.

Procedure

  1. Configure an observing port.

    # Configure 10GE1/17/2 on SwitchA as the observing port.

    <HUAWEI> system-view
    [~HUAWEI] sysname SwitchA
    [*HUAWEI] commit
    [~SwitchA] observe-port 1 interface 10ge 1/17/2
    [*SwitchA] commit
    

  2. Configure a traffic classifier.

    # Create a traffic classifier named c1 on SwitchA and set the traffic classification rule that only packets with the 802.1p priority of 6 can be matched.

    [~SwitchA] traffic classifier c1
    [*SwitchA-classifier-c1] if-match 8021p 6
    [*SwitchA-classifier-c1] commit
    [~SwitchA-classifier-c1] quit
    

  3. Configure a traffic behavior.

    # Create a traffic behavior named b1 on SwitchA and configure it.

    [~SwitchA] traffic behavior b1
    [*SwitchA-behavior-b1] mirroring observe-port 1
    [*SwitchA-behavior-b1] commit
    [~SwitchA-behavior-b1] quit
    

  4. Configure a traffic policy and apply the traffic policy to the interface.

    # Create a traffic policy named p1 on SwitchA, bind the traffic classifier and traffic behavior to the traffic policy, and apply the traffic policy to the inbound direction of 10GE1/17/1 to monitor packets with the 802.1p priority of 6 sent from HostA.

    [~SwitchA] traffic policy p1
    [*SwitchA-trafficpolicy-p1] classifier c1 behavior b1
    [*SwitchA-trafficpolicy-p1] commit
    [~SwitchA-trafficpolicy-p1] quit
    [~SwitchA] interface 10ge 1/17/1
    [~SwitchA-10GE1/17/1] traffic-policy p1 inbound
    [*SwitchA-10GE1/17/1] commit
    [~SwitchA-10GE1/17/1] quit
    [~SwitchA] quit
    

  5. Verify the configurations.

    # View the traffic classifier configuration.

    <SwitchA> display traffic classifier c1
      Traffic Classifier Information:                                               
        Classifier: c1                                                              
          Type: OR                                                              
          Rule(s):                                                                  
            if-match 8021p 6                                           
    

    # View the traffic policy configuration.

    <SwitchA> display traffic policy p1
      Traffic Policy Information:
        Policy: p1
          Classifier: c1
            Type: OR
          Behavior: b1
            Mirroring observe-port 1
    

Configuration Files
  • Configuration file of SwitchA

    #
    sysname SwitchA
    #
    observe-port 1 interface 10GE1/17/2
    #
    traffic classifier c1 type or
     if-match 8021p 6
    #
    traffic behavior b1
     mirroring observe-port 1
    #
    traffic policy p1
     classifier c1 behavior b1 precedence 5
    #
    interface 10GE1/17/1
     traffic-policy p1 inbound
    #
    return
    
Translation
Download
Updated: 2019-08-09

Document ID: EDOC1000041694

Views: 59416

Downloads: 3623

Average rating:
This Document Applies to these Products
Related Version
Related Documents
Share
Previous Next