Creating a match rule

Creating a match rule that references an LB class

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter LB class view.

loadbalance class class-name

N/A

3. Create a match rule that references an LB class.

match [ match-id ] class class-name

By default, an LB class does not have any match rules.

Creating a source IP address match rule

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter LB class view.

loadbalance class class-name

N/A

3. Create a source IP address match rule.

match [ match-id ] source { ip address ipv4-address [ mask-length | mask ] | ipv6 address ipv6-address [ prefix-length ] }

By default, an LB class does not have any match rules.

Creating a destination IP address match rule

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter LB class view.

loadbalance class class-name

N/A

3. Create a destination IP address match rule.

match [ match-id ] destination { ip address ipv4-address [ mask-length | mask ] | ipv6 address ipv6-address [ prefix-length ] }

By default, an LB class does not have any match rules.

Creating an ACL match rule

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter LB class view.

loadbalance class class-name

N/A

3. Create an ACL match rule.

match [ match-id ] acl [ ipv6 ] { acl-number | name acl-name }

By default, an LB class does not have any match rules.

Creating an ISP match rule

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter LB class view.

loadbalance class class-name

N/A

3. Create an ISP match rule.

match [ match-id ] isp isp-name

By default, an LB class does not have any match rules.

Creating an application group match rule

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter LB class view.

loadbalance class class-name

N/A

3. Create an application group match rule.

match [ match-id ] app-group group-name

By default, an LB class does not have any match rules.

Creating a domain name match rule

The LB device stores mappings between domain names and IP addresses in the DNS cache. If the destination IP address of an incoming packet matches an IP address in the DNS cache, the LB device queries the domain name for the IP address. If the queried domain name matches the domain name configured in a match rule, the LB device takes the LB action on the packet.

To create a domain name match rule:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter LB class view.

loadbalance class class-name

N/A

3. Create a domain name match rule.

match [ match-id ] destination domain-name domain-name

By default, an LB class does not have any match rules.