< Home

Example for Configuring MPAC

Networking Requirements

An attacker with a known IP address is detected on an enterprise campus network shown in Figure 1. The attacker sends various TCP/IP packets to attack SwitchA, which may cause SwitchA to break down. To prevent the packets from the attacker from being sent to the CPU, configure an MPAC policy on SwitchA.

Figure 1 MPAC network diagram

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure the IPv4 MPAC policy test on SwitchA.

  2. Apply the IPv4 MPAC policy test to SwitchA globally.

  3. Apply the IPv4 MPAC policy test to GE0/0/2.

Procedure

  1. Configure the IPv4 MPAC policy test on SwitchA.

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchA
    [SwitchA] service-security policy ipv4 test
    [SwitchA-service-sec-test] rule 10 deny protocol ip source-ip 10.10.1.1 0
    [SwitchA-service-sec-test] step 10
    [SwitchA-service-sec-test] description rule 10 is deny ip packet which from 10.10.1.1
    [SwitchA-service-sec-test] quit

  2. Apply the IPv4 MPAC policy test to SwitchA globally.

    [SwitchA] service-security global-binding ipv4 test

  3. Apply the IPv4 MPAC policy test to GE0/0/2 of SwitchA.

    [SwitchA] interface GigabitEthernet 0/0/2
    [SwitchA-GigabitEthernet0/0/2] undo portswitch
    [SwitchA-GigabitEthernet0/0/2] service-security binding ipv4 test
    [SwitchA-GigabitEthernet0/0/2] quit

  4. Verify the configuration.

    Run the display service-security statistics command to check MPAC information and how many times the IPv4 MPAC rules are matched.

    [SwitchA] display service-security statistics ipv4 test
    Policy Name : test
    Description : rule 10 is deny ip packet which from 10.10.1.1
    Step        : 10
     rule 10 deny protocol ip source-ip 10.10.1.1 0 (10 times matched)  

Configuration Files

SwitchA configuration file

#
sysname SwitchA
#
service-security global-binding ipv4 test
#
service-security policy ipv4 test
 description rule 10 is deny ip packet which from 10.10.1.1
 step 10
 rule 10 deny protocol ip source-ip 10.10.1.1 0
#
interface GigabitEthernet0/0/2
 undo portswitch
 service-security binding ipv4 test
#
return
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic