#configure terminal | Enter configure mode. |
(config)#qos enable | Enable QoS globally. |
(config)#qos statistics | Enable QoS statistics. |
(config)#commit | Committing the configuration |
(config)#class-map type qos match-all C1 | Configure class-map of type qos with name C1, and enter into class-map mode |
(config-cmap-qos)#match cos 1 | match cos value 1 |
(config-cmap-qos)#exit | Exit out of class map |
(config)#policy-map type qos p1 | Enter policy-map configuration mode of type qos |
(config-cmap-que)#class type qos C1 | Enter class-map configuration mode |
(config-cmap-que)# police cir 100 mbps pir 200 mbps | Configure police rate of cir 100 mbps and pir 200 mbps |
(config-pmap-c-que)#exit | Exit out of policy-class mode |
(config-pmap-qos)#exit | Exit out of policy-class mode |
(config)#policy-map type queuing default p3 | Configure policy-map of type queuing with name p3 and enter into policy-map mode |
(config-cmap-que)#class type queuing default q1 | Enter class type of type queuing default configuration mode for q1 |
(config-pmap-c-que)#shape percent 20 | Configure shaping to 20 percent of bandwidth available on interface |
(config-pmap-c-que)#exit | Exit out of policy-class mode |
(config-pmap-que)#class type queuing default q2 | Enter class type of type queuing default configuration mode for q2 |
(config-pmap-c-que)#bandwidth 25000 kbps | Configure bandwidth to 25000 kbps |
(config-pmap-c-que)#queue-limit 99 packets | Configure tail-drop to 99 packets |
(config-pmap-c-que)#exit | Exit out of policy-class mode |
(config-pmap-que)#class type queuing default q3 | Enter class type of type queuing default configuration mode for q3 |
(config-pmap-c-que)#queue-limit 101 packets | Configure tail-drop to 101 packets |
(config-pmap-c-que)#exit | Exit out of policy-class mode |
(config-pmap-que)#exit | Exit out of policy-map mode |
(config)#interface xe2 | Enter interface mode |
(config-if)#service-policy type queuing output p3 | Attach service-policy p3 of type queuing on out direction |
(config-if)#exit | Exit out of interface mode |
(config)#interface xe3 | Enter interface mode |
(config-if)#service-policy type qos input p1 | Attach service-policy p1 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 |