Fortinet Document Library

Version:

Version:

Version:

Version:

Version:

Version:

Version:

Version:


Table of Contents

Appendix: FortiSwitch QoS template

The following is a template for setting up QoS on a FortiSwitch unit:

config switch qos dot1p-map
	edit "voice-dot1p"
		set priority-0 queue-4
		set priority-1 queue-4
		set priority-2 queue-3
		set priority-3 queue-2
		set priority-4 queue-3
		set priority-5 queue-1
		set priority-6 queue-2
		set priority-7 queue-2
	next
end

config switch qos ip-dscp-map
	edit "voice-dscp"
		config map
			edit "1"
				set cos-queue 1
				set value 46
			next
			edit "2"
				set cos-queue 2
				set value 24,26,48,56
			next
			edit "5"
				set cos-queue 3
				set value 34
			next
		end
	next
end

config switch qos qos-policy
	edit "default" // you can ignore this portion, this is default policy
		config cos-queue
			edit "queue-0"
			next
			edit "queue-1"
			next
			edit "queue-2"
			next
			edit "queue-3"
			next
			edit "queue-4"
			next
			edit "queue-5"
			next
			edit "queue-6"
			next
			edit "queue-7"
			next
		end
	set schedule round-robin
	next
	edit "voice_egr_policy"
		config cos-queue
			edit "queue-0"
			next
			edit "queue-1"
				set weight 0
			next
			edit "queue-2"
				set weight 6
			next
			edit "queue-3"
				set weight 37
			next
			edit "queue-4"
				set weight 12
			next
			edit "queue-5"
			next
			edit "queue-6"
			next
			edit "queue-7"
			next
		end
	set schedule weighted
	next
end

	edit "port5"
		...
		set trust-dot1p-map " voice-dot1p "
		set trust-ip-dscp-map " voice-dscp "
	next
	edit "port6"
		...
		set trust-dot1p-map " voice-dot1p "
		set trust-ip-dscp-map " voice-dscp "
	next
	edit "port7"
		...
		set trust-dot1p-map " voice-dot1p "
		set trust-ip-dscp-map " voice-dscp "
	next
end

	edit "port14"
		...
		set qos-policy "voice_egr_policy"
	end

Appendix: FortiSwitch QoS template

The following is a template for setting up QoS on a FortiSwitch unit:

config switch qos dot1p-map
	edit "voice-dot1p"
		set priority-0 queue-4
		set priority-1 queue-4
		set priority-2 queue-3
		set priority-3 queue-2
		set priority-4 queue-3
		set priority-5 queue-1
		set priority-6 queue-2
		set priority-7 queue-2
	next
end

config switch qos ip-dscp-map
	edit "voice-dscp"
		config map
			edit "1"
				set cos-queue 1
				set value 46
			next
			edit "2"
				set cos-queue 2
				set value 24,26,48,56
			next
			edit "5"
				set cos-queue 3
				set value 34
			next
		end
	next
end

config switch qos qos-policy
	edit "default" // you can ignore this portion, this is default policy
		config cos-queue
			edit "queue-0"
			next
			edit "queue-1"
			next
			edit "queue-2"
			next
			edit "queue-3"
			next
			edit "queue-4"
			next
			edit "queue-5"
			next
			edit "queue-6"
			next
			edit "queue-7"
			next
		end
	set schedule round-robin
	next
	edit "voice_egr_policy"
		config cos-queue
			edit "queue-0"
			next
			edit "queue-1"
				set weight 0
			next
			edit "queue-2"
				set weight 6
			next
			edit "queue-3"
				set weight 37
			next
			edit "queue-4"
				set weight 12
			next
			edit "queue-5"
			next
			edit "queue-6"
			next
			edit "queue-7"
			next
		end
	set schedule weighted
	next
end

	edit "port5"
		...
		set trust-dot1p-map " voice-dot1p "
		set trust-ip-dscp-map " voice-dscp "
	next
	edit "port6"
		...
		set trust-dot1p-map " voice-dot1p "
		set trust-ip-dscp-map " voice-dscp "
	next
	edit "port7"
		...
		set trust-dot1p-map " voice-dot1p "
		set trust-ip-dscp-map " voice-dscp "
	next
end

	edit "port14"
		...
		set qos-policy "voice_egr_policy"
	end