1
Implementing Integrated Services in Network Simulator
Author: Yaohui Li
Supervisor: Raimo Kantola
Instructor: Lic.Sc. Mika Ilvesmäki
Table of Contents• Overview of Integrated Services
• Overview of NS2(Networking Simulator version 2)
• Tasks definition
• Tools
• Modeling designing and implementation
• Testing and results
• Conclusion
Overview of IntServ (1)• Internet only offers a best effort service,
which can meet the traditional non-real-time Internet traffics.
• For real-time traffic, it needs a new scheme to make reservation for the traffic.
• IntServ(Integrated Services) can provide resource allocation to meet the requirement of real-time application.
• IntServ is per-flow service.
Overview of IntServ (2)• IntServ Implementation Framework
Input Traffic
RoutingProtocols
ReservationProtocol
AdmissionControl
ManagementAgent
Traffic ControlDatabase
Routing Table
ClassifierPacket
Scheduler
QoS Queue
Best-effort Queue
ForwardingTable
•packet classifier: maps each incoming packet into corresponding class.
•packet scheduler: implements resource allocation.
•Admission control: determines a new reservation request is allowed or denied.
Overview of IntServ (3)• IntServ Service Models
– Best efforts (BE) no any guarante
– Controlled Service(CL) (RFC2211)provides service intended to predictive or delay-adaptive
real-time class, or better than BE.
– Guaranteed Service(GS) (RFC2212)provides a deterministic bound of end-to-end delay and
bandwidth guarantee
Overview of IntServ (4)• Before a network entity
can be enable to invoke or select a specific service, it needs a set of parameter:
• Traffic Specification (TSpec)– describes the traffic characteristics
for which the service is being requested. for example: it can be a token bucket filter.
– GS and CL needs it
Overview of IntServ (5)
• RSpec (request specification)– describes the quality of service that application
wishes to request from the network.– GS needs RSpec, but as for CL: no RSpec is
requested.
Overview of IntServ (6)
• The Resource Reservation Model– RSVP is one of the protocols to implement the
purpose. – It is a signalling protocol – be responsible for install and maintain
reservation state in each router by transferring the parameters.
– Receiver oriented.– Soft state.
Overview of IntServ (7)
• RSVP Messages
R1
R2
R3
D1
S1
D3
D2
Path
Path
Path
Path
Path
Path
R1
R2
R3
D1
S1
D3
D2
Resv Resv
Resv
Resv
Resv
Resv
Other message types include reservation confirmation messages,error report messages and reservation and path teardown messages.
Overview of IntServ (8)
• RSVP object Classes• A Path message contains the following important
objects: RSVP Header, INTEGRITY, SESSION,
RSVP_HOP, TIME_VALUES, POLICY_DATA, SENDER_TEMPLATE, SENDER_TSPEC and ADSPEC.
• A Resv message contains the following objects: RSVP Header, INTEGRITY, SESSION,
RSVP_HOP, TIME_VALUES, RESV_CONFIRM, SCOPE, POLICY_DAT, STYLE, FLOWSPEC and FILTER_SPEC.
Overview of NS-2 (1)
Network simulator version 2• Simulates various networking
models, used for researches for example: simulation in TCP, routing, and multicast protocols, mobile networks, satellite networks, and so forth.
Hierarchy of NS2
•OTcl: Object-oriented support
•tclcl: C++ and otcl linkage
•Discrete event scheduler
•Data network (the Internet) components
Overview of NS2 (2)• Ns2 is writtten in two programming languages C++
and Tcl • C++: Detailed protocol simulations require systems
programming language – byte manipulation, packet processing, algorithm implementation– C++ is fast to run so that it is used in the core of ns2. – Turn around time (run simulation, find bug, fix bug, recompile, re-run)
is slower
• Tcl: Simulation of slightly varying parameters or configurations– OTcl is a scripting language as a front-end or interface in ns2. – quickly exploring a number of scenarios– iteration time (change the model and re-run) is more important
• In sum, C++ is for data, aiming at per packet action; tcl is for control, aiming at periodic or triggered action.
Overview of NS2 (3)• NS2 package stucture
Overview of NS2 (4)
• The binding of member variables from C++ to OTcl.
For example: In C++
TcpAgent::TcpAgent(){
Bind(“window_”, $wind_)
}
In Otcl : Agent/TCP set window_ 100
• The correspondence of member functions between C++ and OTcl:
• In C++ and Otcl
•OTcl to call C ++ : command(), tcl.result()
•C++ to call otcl: tcl.eval()
Thesis Task Definition
In current Ns2
• there are very few modules for IntServ
only control load service was implemented, by using simple three-way handshake algorithm for signalling and a simple priority queue with two kinds of services (BE and CL)
• The task is Adding Guaranteed Service module into NS2 by making use of RSVP as a signalling protocol
Tools used in the work
• Design language: UML
• Programming language: C++ and OTcl
• NS2 package NS-2.1b9a on the Solaris platform
• CVS
Modeling designing and implementation(1)
• Preconditions and assumptions in GS implementation– To use RSVP as the signalling protocol to set up
reservations.– We have to assume that every service element (a router,
or a subnet, etc) in the path supports GS or mimics GS. However, this requirement does not mean that GS must be deployed throughout the Internet.
– Routing protocols or other network management functions are outside the scope of this implementation.
– The network elements must ensure that the service to be implemented approximates the “Fluid Model Service”.
Modeling designing and implementation(2)
• The new architecture of IntServ implementation in ns-2
AdmissionControl
SignalingSupport(SimpleRSVP)
DelayLink
Measurementfor class 1
Estimator1
Measurementfor class 2
CL
GS
Best Effort traffic
Estimator2
SchedulerWFQ for GS
Classifier1packets
SimpleScheduler
for CL
Classifier2
Modeling designing and implementation(3) The relationship of classes to be implemented between C++ and OTcl
Agent GSSAAgent
Connector GSSAChecker
GSSAmessage
GSSAObject
FILTER_SPEC
FLOWSPEC
ERROR_SPEC
GSSA_HOP
SENDER_TEMPLATE
SENDER_TSPEC
SESSION
STYLE
TIME_VALUES
RESV_CONFIRM
SENDER_ADSPEC
Queue WFQ Queue/WFQ
TclClass PacketHeaderClass
Agent/GSSA
GSSAChecker
SALink GSSALink GSSALink
C++ OTcl
WFQClass WFQClass
Modeling designing and implementation(4)
• the class diagram of signaling part implementation
• RSB(Reservation State Block)
• TCSB (Traffic Control State Block)
• PSB (Path State Block)
SENDER_ADSPEC
ERROR_SPEC
FILTER_SPEC
FLOWSPECRESV_
CONFIRMGSSA_HOP
SENDER_TSPEC
STYLE SESSIONTIME_
VALUESSENDER_
TEMPLATE
GSSAObject GSSAmessage
TCSB RSB PSB
session
Agent
GSSAAgent RNG
Modeling designing and implementation(5)• The extended class diagram in NS2
GSSALink
Connector
ADC
MeasureModGSSAChecker
Param_ADC
Queue
WFQ
SALink
MS_ADCHB_ADCACTO_ADC
WFQClass
Hashtable
Estimator
Estimator_Timer
GSSAAgent
Modeling designing and implementation(6)
• Signalling module (GSSA GS signalling)
PacketClassifier
GSSADeamon
AdmissionControl
PacketScheduler
Senders(source)
Receivers(sink)
GSSA MessageGenerator
PATH
RESV
PATH
RESV
Control plane
Data plane
Modeling designing and implementation(7) The signalling process and the role of each participator
Sender: the initiation state of sender
• Sender: the waiting state diagramof sender
Sender_Idle
Set t;
Path_msg
Init
Wait_Ack
Wait_Ack
Resv_msg
Reset t;
A connection setup and send
data
Sender_Idle
Path_Tear Sender ends processor timeout
ResvConf
Modeling designing and implementation(8) For the intermediate router (complex)
• path message processing • Resv message processingRouter_Idle
Path_message
Exists session(dest, fid)?
exists PSB(session, sender)?
Create newsession
(dest, fid)
Update theold PSBstate andforward it
Forward tonext router
Create anew PSBstate andforward it
Router_Idle
No
Yes
No Yes
Router_Idle
Resv
Exists session(Dest, fid)?
Exists PSB(session, sender)
Resv_Err
Router_Idle
Update theold RSBstate andforward it
Exists Resv_conf
CopyResv_Confinto RSB
Create anew RSBstate andforward it
Updatetraffic_control
Router_Idle
No
Yes
No
Yes
Yes
No
LOOP
Resv_Err
Exists RSB(session, Flowspec)
No Yes
Flowspec is null?
Forward tonext router
Yes
No
Modeling designing and implementation(9)
• Path_Err message process • Resv_Err message process
Router_Idle
Path_Err
Existssession(Dest, fid)
Router_Idle
ForwardPath_Err
Makeerror_upcall
Router_Idle
No
Yes
Router_Idle
Resv_Err
Exists session(Dest, fid)
Router_Idle
ForwardResv_Err to next
router markedRSB
Makeerror_upcall
Router_Idle
No
Yes
LOOP
Filter_spec isNULL?
Marked RSB
Yes
No
Modeling designing and implementation(10)
• Path_Tear message process• Resv_Tear message process
Router_Idle
Path_Tear
Exists session(Dest, fid)
Router_Idle
Router_Idle
No
Yes
Exists PSB(session, Dest)
Remove PSB
Forward tonext router
YesNo
Router_Idle
Router_Idle
Resv_Tear
Exists session(Dest, fid)
ForwardResv_Tear
Router_Idle
No
Yes
Delete RSB
Updatetraffic_control
LOOP
Filter_specis null
Drop allRSBs
Yes
No
Rsb_listis null
Drop RSB forcorresponding
PSB
Rsb_listis null
Router_Idle
Yes
Yes
No
No
Modeling designing and implementation(11)
• Resv_Conf message process • the state diagram of receiver
Router_Idle
Resv_Conf_msg
Exists session(Dest, fid)
Forward Resv_Conf tonext router marked
RSB
Makeconfirmation_
upcall
Router_Idle
No
Yes
IP address of routerexists in Resv_Conf msg
Yes
No
Receiver_Idle
Path_msg
Receiver computing anoptimum bandwidth usinginfo from Path message
Resv
Wait_Confirmand receive data
Resv_TearReceiver endsprocess or resv
timeout
Receiver_Idle
yes
no
Modeling designing and implementation(12)data structures
• session• PSB (Path State Block)
Modeling designing and implementation(13)data structures
• RSB • TCSB
Modeling designing and implementation(14)
• Scheduling module
Σ
Admission Control
Gu
ara
nte
ed
Se
rvic
es
Flo
ws
Be
st E
ffo
rts
Flo
ws
Ne
w F
low
s
WFQ
FIFO
Modeling designing and implementation(15)
• WFQ– one of the popular scheduling algorithms – IETF adopted it for IntServ networks– an approximation of GPS (generalized
processor sharing)
Modeling designing and implementation(16)
• Admission control
making use of measurement-based algorithm
It includes four control algorithms:– Measured Sum (MS). The MS algorithm admits a new flow if the sum of
the token rate of the new flow and the estimated rate of existing flows is less than a utilization target times the link bandwidth .
– Hoeffding Bounds (HB). The HB algorithm admits a new flow if the sum of the peak rate of the new flow and the measured equivalent bandwidth is less than the link utilization.
– Tangent at Origin (TO). The TO uses a tangent to the equivalent bandwidth curve at the origin to satisfy the specific formula if a new flow is admitted
– Tangent at Peak (TP). The TP is based on the tangent at the peak of an equivalent bandwidth curve computed form the Chernoff Bounds
Testing and Results (1)• The topology of simulation test
there are eleven CBR sources nodes n(1), n(2), n(3)…n(11) over UDP connection and their corresponding sink agents sink1, sink2, sink3 …sink(11).
The bandwidth of n12 and n13 is 2.8Mbps
The bandwidth of each source node n1—n11 to n12 is 1Mbps
We will guarantee that the traffic of source n(11) can be received at the sink whenever how many sources are added (best effort or controlled services traffics).
Testing and Results (2)• Before add GS module into ns2
Testing and Results (3)• test result after adding GS module into ns2
Testing and Results (4)• The simulation test after adding GS and CL into traffic nodes (the
same prerequisite)
Conclusion (1)
• The GS implementation makes use of RSVP as the signaling protocol, and takes advantage of the part of integrated services in ns2 as the skeleton which includes admission control algorithms, estimation and measurement methods.
• On the basis of the result of the test cases, some basic function of GS can almost be implemented in the ns2.
Conclusion (2)
However, there are still a lot of work to do for improving the implementation to realize the GS strictly according to [RFC2212] [RFC2205] and [RFC2210]. For example, in the RSVP, several objects which influence less to the implementation in ns2 were ignored, such as INTEGRITY, SCOPE AND POLICY_DATA.
Conclusion (3)
• Guaranteed services provide high-quality QoS.
• IntServ/GS is not likely to be the widely implemented QoS solution because of the well known reason:
the complexity in routers and limited scalability.
Questions?
Thanks for your attention!
Top Related