linux based diffserv. router

37
06/18/22 1 Cairo University Faculty of Engineering Electronics &Communication dpt. 4th year Linux-based Implementation Of a Router (B.Sc Graduation project) 2002 Supervisor: Prof. Dr. Khaled Foad El-Sayed. Submitted by: Ashraf Kamal Rahoma Hazem Mohamed Sobhi Hassanein Hossam El-Sayed Abd Allah Tarek Amr Abdallah Zein El-Abidin Mohamed WALI

Upload: tarek-amr

Post on 10-May-2015

1.389 views

Category:

Technology


10 download

DESCRIPTION

My graduation project in BSc. Electronics & Communications in 2002. Linux Based DiffServ. Router, a software to classify the network traffic, DSCP Mark, Shape and Prioritize it according to those classes.

TRANSCRIPT

Page 1: Linux Based DiffServ. Router

04/11/23 1

Cairo University

Faculty of Engineering

Electronics &Communication dpt.

4th year

Linux-based Implementation Of a

Router

(B.Sc Graduation project)2002

Supervisor:

Prof. Dr. Khaled Foad El-Sayed.

Submitted by:Ashraf Kamal Rahoma

Hazem Mohamed Sobhi Hassanein

Hossam El-Sayed Abd Allah

Tarek Amr Abdallah

Zein El-Abidin Mohamed WALI

Page 2: Linux Based DiffServ. Router

04/11/23 2

Introduction to QoS:

Motivation:

QoS Terminology and Parameters:

Internet Protocol (IP).was designed to provide best-effort service.• VoIP• FTP

QOS: Quality of Service (QoS) implies the ability to differentiate traffic streams and to define a level of performance for those traffic streams across a network. When heavily utilized networks are carrying various types of traffic for different users, QoS is a mean of offering better service

Page 3: Linux Based DiffServ. Router

04/11/23 3

Parameters

1. Latencythe delay a flow experiences when passing through a device

2. Jitter the latency variations

3. loss probabilitybandwidth distribution and availability (throughput or goodput)

Page 4: Linux Based DiffServ. Router

04/11/23 4

IntServ vs. DiffServ IntServ overview

Data path: Per-flow

classification Per-flow

buffer management.

Per-flow scheduling

Control path: Install and

maintain per-flow state for data and control planes.

Page 5: Linux Based DiffServ. Router

04/11/23 5

RSVP Protocol

Page 6: Linux Based DiffServ. Router

04/11/23 6

RSVP Protocol

Page 7: Linux Based DiffServ. Router

04/11/23 7

RSVP Protocol

Page 8: Linux Based DiffServ. Router

04/11/23 8

RSVP Protocol

Page 9: Linux Based DiffServ. Router

04/11/23 9

IntServ vs. DiffServ

Each has its won points of strengthAnd weakness

Page 10: Linux Based DiffServ. Router

04/11/23 10

DiffServ Architecture

DiffServ Architectural Model

Differentiated Services Domain

DS Boundary Nodes and Interior Nodes:DS Ingress Node and Egress Node:Differentiated Services Region:Traffic Classification and Conditioning:

Classifiers:Traffic Profiles:Traffic Conditioners:

Page 11: Linux Based DiffServ. Router

04/11/23 11

Meters:Markers:Shapers:Droppers:

Location of Traffic Conditioners and MF Classifiers:Within the Source Domain:At the Boundary of a DS Domain:In non-DS-Capable Domains:In Interior DS Nodes:

Page 12: Linux Based DiffServ. Router

04/11/23 12

ToS VS DSCP

Introduction

Type of service byte definition

Page 13: Linux Based DiffServ. Router

04/11/23 13

Type of service byte definition

Page 14: Linux Based DiffServ. Router

04/11/23 14

Table 2.1: IP precedence bits

Bits (0-2) IP-precedence definition 111 Network control 110 Internetwork control 101 CRITIC/ECP 100 Flash override 011 Flash 101 Immediate 001 Priority 000 routine

Table 2.2: ToS field values

Bits (3-6) ToS field definition

1000 Minimize delay 0100 Maximize throughput 0010 Maximize reliability 0001 Minimize monetary cost 0000 Normal service

Page 15: Linux Based DiffServ. Router

04/11/23 15

Disadvantages of ToS •The IP-precedence scheme allows only specification of relative priority of a packet. it has no provisions to specify different drop precedence for packets of a certain priority.

•The 3 bits restrict the number of possible priority classes to 8

•The ToS mechanism is not powerful enough to allow an application to quantify the level of service it desires.

Page 16: Linux Based DiffServ. Router

04/11/23 16

Differentiated services field definition

Page 17: Linux Based DiffServ. Router

04/11/23 17

Per Hop Behavior PHB

A per-hop behavior (PHB) is a description of the externally observable forwarding behavior of a DS node applied to a particular DS behavior aggregate (BA).

Different PHB’s

Currently there are 4 standard different per hop behaviors PHB’s:

Default PHBClass-Selector PHB.Assured Forwarding (AFny) PHB.Expedited Forwarding (EF) PHB.

Page 18: Linux Based DiffServ. Router

04/11/23 18

Name DSCP (Hex) Description

Default PHB 000000 0x0h Best Effort (BE)

111000 0x38h Network Control

110000 0x30h Inter-netwrok Control

101000 0x28h CRITIC/ECP

100000 0x20h Flash override

011000 0x18h Flash

101000 0x28h Immediate

Class-selector PHBs ’xxx000’

001000 0x8h Priority

Expedited Forwarding EF

101110 0xB8h Low-loss, low-latency, low-jitter and assured bandwidth

010 0x28h Low dP

100 0x30h medium dP AF1y 001 110 0x38h high dP

010 0x48h low dP

100 0x50h medium dP AF2y 010

110 0x58h high dP

010 0x68h low dP

100 0x70h medium dP AF3y 011

110 0x78h high dP

010 0x88h low dP

100 0x90h medium dP

Assured Forwarding AF

AF4y 100

110 0x98h high dP

Page 19: Linux Based DiffServ. Router

04/11/23 19

DiffServ Support under Linux

Linux Traffic Control Overview

Page 20: Linux Based DiffServ. Router

04/11/23 20

Linux Traffic ControllerSyntax:

tc [OPTIONS] OBJECT {COMMAND | help}

Where OBJECT: = {qdisc | class | filter}

OPTIONS: = {-s [tatistics] | -d [etails] | -r [aw]}

Queueing disciplines 1. DSMARK 2. CBQ 3. TBF 4. p/bFIFO 5. PRIO 6. RED 7. GRED 8. Ingress

Classes 1. DSMARK 2. CBQ

filters (or classifier) 1. U32 2. TCINDEX 3. ROUTE 4. FIREWALL

Police

Page 21: Linux Based DiffServ. Router

04/11/23 21

Implementation and Code

TC Implementation

Page 22: Linux Based DiffServ. Router

04/11/23 22

Note: In this drawing only one AF class is shown for the simplicity of the drawing, the other ones are just the same. DSMARK CBQ pFIFO:

Low queuing delay (latency). Well defined minimum departure rate, i.e. independent of the other traffic at the node. No burst. (policing).

4 CBQ: Four AF classes with different fractions of the bandwidth allocated for each. In each one we have three dropping precedence’s (RED)Bandwidth assurance,RED:

No bandwidth guarantee. No quality of service: No policing filters, no shaping.

Page 23: Linux Based DiffServ. Router

04/11/23 23

Traffic Classes

Variables:

Setting Functions:

Constructor.DestructorSet DeviceSet NetworkSet RatesSet PHB’sSet Police Set ToS

Page 24: Linux Based DiffServ. Router

04/11/23 24

Infra-structure Functions: t_start( ) t_reset( )

Make_phb( )

make_EF( )

make_AF( )

make_BE( )

make_Subfilter ( )

make_marker ( )

Filtering Functions:

Make FilterGet Command

Page 25: Linux Based DiffServ. Router

04/11/23 25

Software implementation

Architecture Overview.

Graphical User Interface (GUI).

System programming.

Page 26: Linux Based DiffServ. Router

04/11/23 26

using C++ Classes

Architecture Overview

To ensure encapsulation & independence

To control the communication & error tracing

To give the ability to change or update any specific parts.

Page 27: Linux Based DiffServ. Router

04/11/23 27

using C++ Classes

Architecture Overview

DiffServ Configuration tool

System Programming GUI

DiffServ.h Traffic.h

Traffic.cpp DiffServ.cpp

Interface.ui

Interface.h

Interface.cpp

Page 28: Linux Based DiffServ. Router

04/11/23 28

Detailed view DiffServ Configuration

tool

System Programming GUI

DiffServ.h Traffic.h

Traffic.cpp DiffServ.cpp

Interface.ui

Interface.h

Interface.cpp

Setting Fn’s

Set_device()

Set_network()

Set_rates()

Set_phb()

Set_policing()

GUI manipulation

System interface

Apply_PHB()

Apply_advanced()

Apply_Filter()

Private Fn’s

Filtering

Make_Filter()

Page 29: Linux Based DiffServ. Router

04/11/23 29

Communication between Classes

T r a f f i c

C l a s s

A p p l y _ p h b ( ) S e t _ d e v i c e ( ) S e t _ n e t w o r k ( ) S e t _ R a t e s ( )

A p p l y _ a d v a n c e d ( ) S e t _ p h b ( ) S e t _ p o l i c i n g ( ) S e t _ t o s ( )

A p p l y _ f i l t e r ( ) m a k e _ f i l t e r ( )

D i f f S e r v

C l a s s

Page 30: Linux Based DiffServ. Router

04/11/23 30

GUI tabs PHB configuration tab

Page 31: Linux Based DiffServ. Router

04/11/23 31

Advanced PHB

Page 32: Linux Based DiffServ. Router

04/11/23 32

Filter Setup Tab

Page 33: Linux Based DiffServ. Router

04/11/23 33

Summary view Tab

Page 34: Linux Based DiffServ. Router

04/11/23 34

TC Experts Tab

Page 35: Linux Based DiffServ. Router

04/11/23 35

4.4 Testing:

Description PC1 DiffServ Router PC2

Platform Linux Linux Windows XP Speed PIII –1000 MHZ PIII – 850 MHZ PIII –600 MHZ Running s/w Traffic Generator

( TG) DiffServ S/W

Traffic Monitoring (CommView)

eth0 Ethernet cards eth0

eth1 eth0

Page 36: Linux Based DiffServ. Router

04/11/23 36

4.5 Testing procedure

We have performed testing on 3 basic levels:1. Marking: Testing if packets were marked

according to specified classification.

2. ToS: Testing if the classification according to ToS and monitoring packets flow were mapped to the required PHB

3. PHB’s Implementation: Monitoring different rates assigned to each class

Page 37: Linux Based DiffServ. Router

04/11/23 37

Than You !