MANET (short for Mobile Ad-Hoc Network)
P/S model of SBR Protocol

MANET (short for Mobile Ad-Hoc Network) consists of a set of mobile network nodes, network configuration changes very fast. Each node will act as a router to maintain network operation. There is no central node for controlling entire network. So routing in MANET is very important.
In content based routing, data is transferred from source node to requested nodes is not based on destination’s addresses. Therefore it is very flexible and reliable, because source node does not need to know destination nodes. As some standard content based routing protocols, when a node publishes it’s content, It will broadcast data to network. The published content will be cached at all routes on the network. So when a node publish a request to get some content, it will prepare a subscription message then broadcast it to network. When any node on network received that subscription, it matches subscription’s content with published content that have been cached on it. If found then matched content will be transferred to requested node. There is another routing model when nodes have content requests, they broadcast subscription messages to network. When nodes receive subscriptions, they cache these messages. When a node publish its content by broadcast protocol, any node receivesthat content, it will match received content with subscriptions cached on it to find all nodes have requested that content, then forwarding that content to these nodes.
Service Oriented Routing is inherited from the model of content based routing (CBR) [3, 4], combined with several advanced techniques such as Multicast, Genetic algorithm increase the data rate [6], and data encryption to ensure information security.
This article presents some techniques to support multicast packet forwarding from one network node to a set of nodes with guaranteed quality of service. By using these techniques can decrease network load, congestion, use network resources efficiently.

Keywords. Ad hoc network, MANET, QOS, bandwidth guarantee, time slot assignment, routing, service, content.
1. Introduction
Publish/Subscription Model (abbreviated by P/S) is the interaction model is performed asynchronously in the content based routing systems [3].
MANET (short for Mobile Ad-Hoc Network)
Fig. 1. Service based routing model
Each network node must undertake the following roles: service provider, content receiver, router. To perform these tasks efficiently at each node of the network We have to install a specific routing protocol. Currently there are many routing protocols developed for MANET such as OLSR, CBR, DSR, DSDV, AODV,ODMRP, … in which there are some content based protocols. In the article We will make use of the advantages of these routing protocols and customize some important characteristics to construct novel routing protocol that is oriented service and guarantees quality of service, for example bandwidth and latency, failover, etc.
Service oriented architecture allows flexible communication, the ability to provide location transparency for the transmission of information between applications. Position transparency is defined as the connection to avoid the point – to – point because the application is separated with the data transmission services below, will undertake the implementation when the applications require communicating with each other.
Service-based network infrastructure is a new network interface in which the flow of messages is controlled by class of service that generated it. Next is its content, improved shipping address specified by the sender and attached to the message. Networks based on services complement for networks based on traditional unicast and multicast addresses, which provides support for communication patterns based on the service class of large-scale applications, loose connections, multiple partitions and scattered like auctions, information sharing, combined, distributed, sensor networks, distributed according to personal information, service discovery, multi-player game.
In the SBR routing, the sender does not indicate message receiver by the unicast or multicast use. Instead it simply pushes messages to the network. It defines the routing based on the messages it cares. It determines the appropriate message class based on message content based on its key-value pairs or regular expressions. Therefore, in SBR routing the receiver determines the transmission of messages, not the sender. Communication based on content services increases the independence, flexibility in the distributed architecture.
2. Organization of types of messages in SBR network
2.1.Introduction of message types [3,4,6]
In order to perform service based routing, We have to organize data into messages, there are some message types will been constructed. That are:
Subcription/unsubcription message: to register/unregister node’s requested content.
Content message: to publish node’s content.
Advertisement message: to advertise node’s content, to direct subcriptions from subscribers to matchedpublishers, avoid to flood subcriptions all overnetworks.When a node need to advertise it’s content:i) Make an adverisement message; ii) It will broadcast this content advertisement message to network. iii) It’s content advertisement will be cached on nodes of network. When a subscription message happen on a node:a) Firstly It checkthat if subscription is matched with it’s published content. If it is true matched content will be sent to requested node immediately. b) Secondly,it will be matched with content advertisements on that node. Then this subscription will be transmitted to a set of matched advertisement nodes.So that We have tobuild multicast tree from requested node to the set of matched advertisement nodes to decrease latency and bandwidth required.
Update request and reply sender message pair:in order to update routing table of content based routing protocol. By using minimum spanning tree (established by PRIM algorithm) to forward data from source node to a set of destination nodes in service based routing. To maintain this multicast tree, the source nodeperiodicallyhas to send an update request message to destination nodes. When destination node receive this request, it will reply with a reply sender message.
Route request and route reply message pair: in order to detect routes (network topology), We use a pair of messages: route request and route reply messge. When We want to forward data from one source node to a set of destination nodes in case of transmittingmatched content to subscribers. We have to build a multicast tree with root is current node, leaf nodes are destination nodes. We have to make update request message, broadcast this message to network. When this message reaches destination nodes or forwarding nodes that have up-to-dateroute information, a reply message is created to send to source node. After specified time-out the source node have received enough route information fromdestination nodes to source node. We use these received routes to build multiple multicast trees.
2.2. The request/cancel request (subscription/unsubscription) [3, 4] messages:
Subscription (registration) / unsubscription (unregistration) message is emitted from the application service classes to subscribe/ unsubscribe content requests. The message is structured with: the address of the subscriber and binding on the list of services and content requirements (constraints). In particular, each constraint is a set of 3 components, has the form: {key,operator,value}. For example, the contents of the registration message: [service_class=”Network monitor” ∧ alert-type =”instrusion” ∧severity> 2] or [service_class = “Network monitor” ∧ class = “alert” ∧ device-type = “web-server”], these are 2 request messages of Network monitor service class.
a) Structure of subscription/ unsubscription messages
+ Subscriber address
+ Predicate

Of which:
Subscriber address is the address of required node.
The service and content searching predicate: is a set of constraints.The first constraint is service binding, followed by the content constraints.
1) Each constraint consists of 3 components: key, operator, value.
2) In which key is a string, the operator is subject to value.
3) If the value is the number then operators are: =, <, >, <=, >=, in.
4) If the value is a string then operators are : =, <, >, <=, >=, substring (sb), prefix (pf), postfix (ps).
5) If operator is sb, need to declare 2 parameters: start index và stop index specify start position and stop position fora string is extracted from value of a property to compare with value of constraint.
6) If operator is pf, need to declare number of beginning characters are extract from value of property to compare with value of constraint.
7) If operator is ps, need to declare number of endingcharacters are extracted from value of property to compare with value of constraint.
2.3. The content [3, 4] message
Content messages are transmitted from the host service provider. These messages will be transmitted to the network, it will be transmitted to the nodes based on the subscription request messages received from thosenodes.
a) Content message structure
+ Source node address
+ Attribute1
Attribute2

Of which:
Source node address is the address of the node that generate message.
The next attribute1, attribute2, …, attributen are the attributes of the message. The first attribute1 is the service information, the remaining attributes define the content of the message.
b) Components of a content message
Content Message includes node’s address that generated message and a set of attributes (properties), each attribute is a pair of name and value that are separated by a sign “=”.
The name attribute is a string.
Possible type of values is string or numeric.
For example, a message content:
{Node_a, [service_class = “Network monitor”, class = “alert”, severity = 6, device-type = “web-server”, alert-type = “Hardware failure”]}.
2.4. The advertisement message [3, 4]
Advertisement message is the message advertises the basic content that applications for certain services provided. i) To direct the subscription requests to the right offer places. ii) Prevents spread of the subscription messages throughout the network. Naturally, subscription messages are partitioning to some smaller areas. So that We can acquire: i) decrease time to find subscription matched a content message and ii) lower cost to maintain routing table.
The advertising message is passed under the minimum spanning tree fromthe sourcenode.
Advertisement message is also structured similar content message, including a set of attributes. So this kind of message is to expand the content of advertising messages. Generally use advertising message to advertise the most common content.
Advertisement message is transmitted from the service delivery system.
2.5. Update request and reply sender message pair [3, 4]
a) Update request message
+ Sender Address
+ Request Number
+ Timeout

b) Reply sender message
+ Sender Address
+ Request Number
+ Predicate

.
.
.
.
Sender request: request from the router, the structure including 3 fields. Two fields: sender address and request number determine the uniqueness of ansender request message. Timeout determines the longest time the sender wait for an answer. This message is transmitted by the Minimum Spanning Tree (established by PRIM algorithm) starting from the source router to the other routers in the network.
When the leaf router nodes of MST tree receive this sender request message, it will respond with a reply update (UR) message. The UR message consists of three fields, two fields from the sender request, the field no.3 contains its all content based addresses (content based routing table). The UR message spreads back the sender router.
On the way to the sender router, the intermediate routers will incorporate their content based address routing table and of the message then push it to the sender router.
When the sender router receives UR message, it updates its routing table. End of the implementation process.
2.6. Route request and route reply message pair [6]
a) Route request message
+ Source Address
+ Request number
+ Type
+ Time to live
+ Timeout
+ Route
+ Free time slots
+ Destination List

b) Route reply message
+ Source Address
+ Request number
+ Type
+ Time to live
+ Timeout
+ Route
+ Free time slots

This pair of messages is used to detect routes on the network to a set of destination addresses from a source node for building multicast trees with root is source node and leaf nodes are this set of destination nodes.
Route request message:use to make a request from the source router, the message structure consists of eight fields. Two fields:1) Source Address and 2) Request Number determine the uniqueness of the message. 3) The Type field identifies of the kind of message, is set to 1; 4) the Timeout field determines the longest time the sender node waits for a response. 5) The Time To Live (TTL) field determines the maximum number of HOPs of the route that message is passed on. 6) The Route field records addresses of the hops on the route the message passes through. 7) The Free Time Slots field records free bandwidth at the nodes of the route that message is transmitted on. 8) The Destination List field saves address list that contains addresses of the set of destination nodes that are the leaf nodes of multicast trees that we need to build. The message is transmitted by broadcast protocol to other routers in the MANET. The message transmission process is indicated as following:
1) This message is transmitted from source node to any node on the network. 2) At any node (N) that message has been received: i) if Timeout is less than current time then drop this message, ii) otherwise the node will update the 3 fields of the message: Route (Route=Route ∪ AddressN), Free TimeSlots (〖TS〗_Free= 〖TS〗_Free ∪ 〖TS〗_(N_p N)), Time To Live (TTL=TTL-1), assume previous node is Np, TS denote Time Slot. 3) If TTL=0: drop this message. 4) If number of free common Time Slots between current node and last hop – sender is equal to 0 then this node cannot be in route from source to any destination node: drop this message. 5) Otherwise: i) if the node firstly receives message then: a) if the nodeis not a destination node, node will forward this message to network; b) if node address is in destination list, create reply message to transmit to the source node. ii) If node have received this message, it will immediately make route reply message (RREP) to transmit to the source node.
The RREP message contains almost information from RREQ message, besides the type field is set to 2 and doesn’t have destination list field. RREP message is sent back to the source router.

SBR long long Tổng hợp
MANET (short for Mobile Ad-Hoc Network) consists of a set of mobile network nodes, network configuration changes very fast. Each node will act as a router to maintain network operation. There is no central node for controlling entire network. So routing in MANET is very important. In content based routing,...
<strong>MANET (short for Mobile Ad-Hoc Network) consists of a set of mobile network nodes, network configuration changes very fast. Each node will act as a router to maintain network operation. There is no central node for controlling entire network. So routing in MANET is very important. In content based routing, data is transferred from source node to requested nodes is not based on destination’s addresses. Therefore it is very flexible and reliable, because source node does not need to know destination nodes. As some standard content based routing protocols, when a node publishes it’s content, It will broadcast data to network. The published content will be cached at all routes on the network. So when a node publish a request to get some content, it will prepare a subscription message then broadcast it to network. When any node on network received that subscription, it matches subscription’s content with published content that have been cached on it. If found then matched content will be transferred to requested node. There is another routing model when nodes have content requests, they broadcast subscription messages to network. When nodes receive subscriptions, they cache these messages. When a node publish its content by broadcast protocol, any node receivesthat content, it will match received content with subscriptions cached on it to find all nodes have requested that content, then forwarding that content to these nodes. Service Oriented Routing is inherited from the model of content based routing (CBR) [3, 4], combined with several advanced techniques such as Multicast, Genetic algorithm increase the data rate [6], and data encryption to ensure information security. This article presents some techniques to support multicast packet forwarding from one network node to a set of nodes with guaranteed quality of service. By using these techniques can decrease network load, congestion, use network resources efficiently. </strong> <strong>Keywords.</strong> Ad hoc network, MANET, QOS, bandwidth guarantee, time slot assignment, routing, service, content. <strong>1. Introduction</strong> Publish/Subscription Model (abbreviated by P/S) is the interaction model is performed asynchronously in the content based routing systems [3]. <a href="http://adsmicro.net/wp-content/uploads/2013/07/new19132.jpg"><img class="size-medium wp-image-98" alt="MANET (short for Mobile Ad-Hoc Network)" src="http://adsmicro.net/wp-content/uploads/2013/07/new19132-300x83.jpg" width="300" height="83" /></a> Fig. 1. Service based routing model Each network node must undertake the following roles: service provider, content receiver, router. To perform these tasks efficiently at each node of the network We have to install a specific routing protocol. Currently there are many routing protocols developed for MANET such as OLSR, CBR, DSR, DSDV, AODV,ODMRP, … in which there are some content based protocols. In the article We will make use of the advantages of these routing protocols and customize some important characteristics to construct novel routing protocol that is oriented service and guarantees quality of service, for example bandwidth and latency, failover, etc. Service oriented architecture allows flexible communication, the ability to provide location transparency for the transmission of information between applications. Position transparency is defined as the connection to avoid the point - to - point because the application is separated with the data transmission services below, will undertake the implementation when the applications require communicating with each other. Service-based network infrastructure is a new network interface in which the flow of messages is controlled by class of service that generated it. Next is its content, improved shipping address specified by the sender and attached to the message. Networks based on services complement for networks based on traditional unicast and multicast addresses, which provides support for communication patterns based on the service class of large-scale applications, loose connections, multiple partitions and scattered like auctions, information sharing, combined, distributed, sensor networks, distributed according to personal information, service discovery, multi-player game. In the SBR routing, the sender does not indicate message receiver by the unicast or multicast use. Instead it simply pushes messages to the network. It defines the routing based on the messages it cares. It determines the appropriate message class based on message content based on its key-value pairs or regular expressions. Therefore, in SBR routing the receiver determines the transmission of messages, not the sender. Communication based on content services increases the independence, flexibility in the distributed architecture. <strong>2. Organization of types of messages in SBR network</strong> <strong>2.1.Introduction of message types [3,4,6]</strong> In order to perform service based routing, We have to organize data into messages, there are some message types will been constructed. That are: Subcription/unsubcription message: to register/unregister node’s requested content. Content message: to publish node’s content. Advertisement message: to advertise node’s content, to direct subcriptions from subscribers to matchedpublishers, avoid to flood subcriptions all overnetworks.When a node need to advertise it’s content:i) Make an adverisement message; ii) It will broadcast this content advertisement message to network. iii) It’s content advertisement will be cached on nodes of network. When a subscription message happen on a node:a) Firstly It checkthat if subscription is matched with it’s published content. If it is true matched content will be sent to requested node immediately. b) Secondly,it will be matched with content advertisements on that node. Then this subscription will be transmitted to a set of matched advertisement nodes.So that We have tobuild multicast tree from requested node to the set of matched advertisement nodes to decrease latency and bandwidth required. Update request and reply sender message pair:in order to update routing table of content based routing protocol. By using minimum spanning tree (established by PRIM algorithm) to forward data from source node to a set of destination nodes in service based routing. To maintain this multicast tree, the source nodeperiodicallyhas to send an update request message to destination nodes. When destination node receive this request, it will reply with a reply sender message. Route request and route reply message pair: in order to detect routes (network topology), We use a pair of messages: route request and route reply messge. When We want to forward data from one source node to a set of destination nodes in case of transmittingmatched content to subscribers. We have to build a multicast tree with root is current node, leaf nodes are destination nodes. We have to make update request message, broadcast this message to network. When this message reaches destination nodes or forwarding nodes that have up-to-dateroute information, a reply message is created to send to source node. After specified time-out the source node have received enough route information fromdestination nodes to source node. We use these received routes to build multiple multicast trees. <strong>2.2. The request/cancel request (subscription/unsubscription) [3, 4] messages:</strong> Subscription (registration) / unsubscription (unregistration) message is emitted from the application service classes to subscribe/ unsubscribe content requests. The message is structured with: the address of the subscriber and binding on the list of services and content requirements (constraints). In particular, each constraint is a set of 3 components, has the form: {key,operator,value}. For example, the contents of the registration message: [service_class=”Network monitor” ∧ alert-type ="instrusion" ∧severity> 2] or [service_class = "Network monitor" ∧ class = "alert" ∧ device-type = "web-server"], these are 2 request messages of Network monitor service class. <em>a) Structure of subscription/ unsubscription messages</em> <em>+ Subscriber address + Predicate</em> Of which: Subscriber address is the address of required node. The service and content searching predicate: is a set of constraints.The first constraint is service binding, followed by the content constraints. 1) Each constraint consists of 3 components: key, operator, value. 2) In which key is a string, the operator is subject to value. 3) If the value is the number then operators are: =, <, >, <=, >=, in. 4) If the value is a string then operators are : =, <, >, <=, >=, substring (sb), prefix (pf), postfix (ps). 5) If operator is sb, need to declare 2 parameters: start index và stop index specify start position and stop position fora string is extracted from value of a property to compare with value of constraint. 6) If operator is pf, need to declare number of beginning characters are extract from value of property to compare with value of constraint. 7) If operator is ps, need to declare number of endingcharacters are extracted from value of property to compare with value of constraint. <strong>2.3. The content [3, 4] message</strong> Content messages are transmitted from the host service provider. These messages will be transmitted to the network, it will be transmitted to the nodes based on the subscription request messages received from thosenodes. <strong>a) Content message structure</strong> <em>+ Source node address + Attribute1 Attribute2 …</em> Of which: Source node address is the address of the node that generate message. The next attribute1, attribute2, ..., attributen are the attributes of the message. The first attribute1 is the service information, the remaining attributes define the content of the message. b) Components of a content message Content Message includes node’s address that generated message and a set of attributes (properties), each attribute is a pair of name and value that are separated by a sign "=". The name attribute is a string. Possible type of values is string or numeric. For example, a message content: {Node_a, [service_class = "Network monitor", class = "alert", severity = 6, device-type = "web-server", alert-type = "Hardware failure"]}. <strong>2.4. The advertisement message [3, 4]</strong> Advertisement message is the message advertises the basic content that applications for certain services provided. i) To direct the subscription requests to the right offer places. ii) Prevents spread of the subscription messages throughout the network. Naturally, subscription messages are partitioning to some smaller areas. So that We can acquire: i) decrease time to find subscription matched a content message and ii) lower cost to maintain routing table. The advertising message is passed under the minimum spanning tree fromthe sourcenode. Advertisement message is also structured similar content message, including a set of attributes. So this kind of message is to expand the content of advertising messages. Generally use advertising message to advertise the most common content. Advertisement message is transmitted from the service delivery system. <strong>2.5. Update request and reply sender message pair [3, 4]</strong> a) Update request message <em>+ Sender Address + Request Number + Timeout</em> b) Reply sender message <em>+ Sender Address + Request Number + Predicate</em> . . . . Sender request: request from the router, the structure including 3 fields. Two fields: sender address and request number determine the uniqueness of ansender request message. Timeout determines the longest time the sender wait for an answer. This message is transmitted by the Minimum Spanning Tree (established by PRIM algorithm) starting from the source router to the other routers in the network. When the leaf router nodes of MST tree receive this sender request message, it will respond with a reply update (UR) message. The UR message consists of three fields, two fields from the sender request, the field no.3 contains its all content based addresses (content based routing table). The UR message spreads back the sender router. On the way to the sender router, the intermediate routers will incorporate their content based address routing table and of the message then push it to the sender router. When the sender router receives UR message, it updates its routing table. End of the implementation process. <strong>2.6. Route request and route reply message pair [6]</strong> <strong>a) Route request message</strong> <em>+ Source Address + Request number + Type + Time to live + Timeout + Route + Free time slots + Destination List </em> <strong>b) Route reply message</strong> <em>+ Source Address + Request number + Type + Time to live + Timeout + Route + Free time slots </em> This pair of messages is used to detect routes on the network to a set of destination addresses from a source node for building multicast trees with root is source node and leaf nodes are this set of destination nodes. Route request message:use to make a request from the source router, the message structure consists of eight fields. Two fields:1) Source Address and 2) Request Number determine the uniqueness of the message. 3) The Type field identifies of the kind of message, is set to 1; 4) the Timeout field determines the longest time the sender node waits for a response. 5) The Time To Live (TTL) field determines the maximum number of HOPs of the route that message is passed on. 6) The Route field records addresses of the hops on the route the message passes through. 7) The Free Time Slots field records free bandwidth at the nodes of the route that message is transmitted on. 8) The Destination List field saves address list that contains addresses of the set of destination nodes that are the leaf nodes of multicast trees that we need to build. The message is transmitted by broadcast protocol to other routers in the MANET. The message transmission process is indicated as following: 1) This message is transmitted from source node to any node on the network. 2) At any node (N) that message has been received: i) if Timeout is less than current time then drop this message, ii) otherwise the node will update the 3 fields of the message: Route (Route=Route ∪ AddressN), Free TimeSlots (〖TS〗_Free= 〖TS〗_Free ∪ 〖TS〗_(N_p N)), Time To Live (TTL=TTL-1), assume previous node is Np, TS denote Time Slot. 3) If TTL=0: drop this message. 4) If number of free common Time Slots between current node and last hop - sender is equal to 0 then this node cannot be in route from source to any destination node: drop this message. 5) Otherwise: i) if the node firstly receives message then: a) if the nodeis not a destination node, node will forward this message to network; b) if node address is in destination list, create reply message to transmit to the source node. ii) If node have received this message, it will immediately make route reply message (RREP) to transmit to the source node. The RREP message contains almost information from RREQ message, besides the type field is set to 2 and doesn’t have destination list field. RREP message is sent back to the source router.