Configuration considerations, Configuration procedure – H3C Technologies H3C S12500 Series Switches User Manual

Page 37

Advertising
background image

24

Configuration considerations

To meet the requirements, you can configure IP subnet-based VLANs.

Create VLAN 10 and VLAN 20.

Assign users on subnet 1.1.1.0/24 to VLAN 10, and users on 2.1.1.0/24 to VLAN 20.

Configuration procedure

1.

Configure Switch:
# Create VLAN-interface 10 and VLAN-interface 20. (Details not shown.)
# Configure port GigabitEthernet 3/0/1 as a hybrid port to permit packets from VLANs 1, 10,

and 20 to pass through untagged, and configure the PVID of the port as 1.

[Switch] interface GigabitEthernet 3/0/1

[Switch-GigabitEthernet3/0/1] port link-type hybrid

[Switch-GigabitEthernet3/0/1] port hybrid vlan 10 20 1 untagged

Please wait... Done.

[Switch-GigabitEthernet3/0/1] port hybrid pvid vlan 1

# Configure ACL 3000 to permit packets from subnet 1.1.1.0/24 to pass through, and ACL 3001

to permit packets from subnet 2.1.1.0/24 to pass through.

[Switch] acl number 3000

[Switch-acl-adv-3000] rule 0 permit ip source 1.1.1.0 0.0.0.255

[Switch-acl-adv-3000] quit

[Switch] acl number 3001

[Switch-acl-adv-3001] rule 0 permit ip source 2.1.1.0 0.0.0.255

[Switch-acl-adv-3001] quit

# Configure a QoS policy named test to transmit ARP and IPv4 packets from subnet 1.1.1.0/24

through VLAN 10 and transmit ARP and IPv4 packets from subnet 2.1.1.0/24 through VLAN 20.

[Switch] traffic classifier 1

[Switch-classifier-1] if-match acl 3000

[Switch-classifier-1] quit

[Switch] traffic classifier 2

[Switch-classifier-2] if-match acl 3000

[Switch-classifier-2] if-match protocol arp

[Switch-classifier-2] quit

[Switch] traffic classifier 3

[Switch-classifier-3] if-match acl 3001

[Switch-classifier-3] quit

[Switch] traffic classifier 4

[Switch-classifier-4] if-match acl 3001

[Switch-classifier-4] if-match protocol arp

[Switch-classifier-4] quit

[Switch] traffic behavior 1

[Switch-behavior-1] remark service-vlan-id 10

[Switch-behavior-1] quit

[Switch] traffic behavior 2

[Switch-behavior-2] remark service-vlan-id 20

[Switch-behavior-2] quit

[Switch] qos policy test

[Switch-qospolicy-test] classifier 1 behavior 1

Advertising
This manual is related to the following products: