#configure terminal | Enter configure mode. |
(config)#qos enable | Enable QoS globally. |
(config)#qos statistics | Enable QoS statistics. |
(config)#commit | Committing the configuration |
(config)#policy-map type queuing default P1 | Configure policy-map of type queuing as default with name P1, and enter into policy-map mode |
(config-pmap-que)#class type queuing default q2 | Configure class-map of type queuing as default for q0 and enter into class-map mode |
(config-pmap-c-que)#bandwidth percent 70 | Configure minimum bandwidth as 70 percent of total bandwidth available on interface |
(config-pmap-c-que)#exit | Exit out of policy-class mode |
(config-pmap-que)#class type queuing default cq2 | Attach class cq2 to Policy-map P1 |
(config-pmap-c-que)#bandwidth percent 30 | Configure minimum bandwidth as 30 percent of remaining bandwidth available on interface after all allocations are done. |
(config-pmap-c-que)#exit | Exit out of policy-class mode |
(config-pmap-que)#exit | Exit out of Policy-map mode |
(config)#class-map type qos c1 | Enter Class-map mode |
(config-cmap-qos)#match dscp 10 | Configure match criteria as dscp 10 |
(config-cmap-qos)#match cos 3 | Configure match criteria as cos 3 |
(config-cmap-qos)#exit | Exit out of class-map mode |
(config)#class-map type qos c2 | Enter Class-map mode |
(config-cmap-qos)#match dscp 22 | Configure match criteria as dscp 22 |
(config-cmap-qos)#match cos 4 | Configure match criteria as cos 4 |
(config-cmap-qos)#exit | Exit out of class-map mode |
(config)#policy-map type qos pmap1 | Configure policy-map with name pmap1 and enter policy-map mode |
(config-pmap-qos)#class type qos c1 | Assign Class c1 to Policy-map pmap1 |
(config-pmap-c-qos)#set precedence 2 | Set precedence to value 2 |
(config-pmap-c-qos)#exit | Exit out of pmap-c mode |
(config-pmap-qos)#class type qos c2 | Assign Class c2 to Policy-map pmap1 |
(config-pmap-c-qos)#set cos 2 | Set cos to value 2 |
(config-pmap-c-qos)#exit | Exit out of pmap-c mode |
(config)#commit | Committing the configured line |
(config)#interface xe3 | Enter interface mode |
(config-if)#service-policy type queuing output P1 | Attach service-policy P1 of type queuing on out direction |
(config-if)#exit | Exit out of interface mode |
(config)#interface xe2 | Enter interface mode |
(config-if)#service-policy type qos input pmap1 | Attach service-policy pmap1 of type qos on in direction |
(config-if)#exit | Exit out of interface mode |
(config)#bridge 1 protocol rstp vlan-bridge | Specify VLAN for bridge 1. |
(config)#vlan database | Enter the VLAN configuration mode. |
(config-vlan)#vlan 2-3 bridge 1 state enable | Enable VLAN (2-3) on bridge 1. Specifying the enable state. |
(config-vlan)#exit | Exit the VLAN configuration mode. |
(config)#interface vlan1.2 | Enter interface mode. |
(config-if)# ip address 10.1.1.2/24 | Configure the IP address. |
(config-if)#exit | Exit the interface mode. |
(config)#interface vlan1.3 | Enter interface mode. |
(config-if)# ip address 20.1.1.1/24 | Configure the IP address. |
(config-if)#exit | Exit the interface mode. |
(config)#interface xe2 | Enter interface mode. |
(config-if)#switchport | Configure xe2 as a Layer 2 port. |
(config-if)#bridge-group 1 | Associate the interface with bridge group 1. |
(config-if)#switchport mode trunk | Configure port as a trunk. |
(config-if)#switchport trunk allowed vlan all | Allow all the VLANs on the xe3 interface. |
(config-if)#exit | Exit the interface mode. |
(config)#interface xe3 | Enter interface mode. |
(config-if)#switchport | Configure xe3 as a Layer 2 port. |
(config-if)#bridge-group 1 | Associate the interface with bridge group 1. |
(config-if)#switchport mode trunk | Configure port as a trunk. |
(config-if)#switchport trunk allowed vlan all | Allow all the VLANs on the xe3 interface. |
(config-if)#exit | Exit the interface mode. |
(config)#commit | Committing the configuration |