1 Introduction

Wireless ad hoc networks enable the transmission between ends without infrastructure [18]. Users could transmit messages in the scenario which has no infrastructure such as battlefield, universe and areas destroyed by flood or earthquake [9, 10]. Vehicular ad hoc networks (VANETs) is an important branch of ad hoc networks [1116]. In VANET, vehicles with wireless communication equipment form a mobile ad hoc network. VANETs can offer safety and traffic information for drivers. In vehicular network, drivers need to know which road has no congestion. Managers need to know traffic information to make some adjustments. They can collect the data without backbones, thus it makes transportation system more safety and efficient [17]. The connection between vehicles can also avoid traffic accident [18]. If all the information were transmitted by infrastructure, it will cost many public resources. It is also very expensive to build special hot spot for vehicular networks. There are many works use infrastructure to transmit packets and conspicuously improve the performance of network. However the deployment of infrastructure is very expensive and has high cost of maintenance. To transmit messages in vehicular networks, ad hoc network is a good choice. In vehicular networks, good protocols could improve the performance and make traffic system more safety and efficient.

In the classic epidemic protocol [19], every node transmits all the packets to each node it meet. Therefore, messages can be transmitted from source node to every node include the destination node in the network very soon. To satisfy the demand of network, every node in the network should accept all the messages even it does not need it. Thus, much energy will cost by the additional transmission and most buffers are occupied by overhead messages [20]. For small scale networks, the epidemic protocol could deploy successfully. However, for the crowded urban area, the large amount redundancy could not afford by most nodes.

Without the limitation of buffer size and redundancy, the classic epidemic routing protocol could ensure high successful transmission rate with less delay. Message can be transmitted to every user in the network very soon. However, in the real scenario of vehicular networks, we cannot neglect the limitation of buffer size and the redundancy of networks. Meanwhile, less buffer size can decrease the transmission successful ratio and increase the delay greatly [21]. Furthermore, the redundancy generated by epidemic protocol cannot afford by VANETs because of the great number of vehicles. To solve these problems, we should take advantage of some characters of real scenario of vehicular networks. For the purpose of achieving taking advantage of some characters of real scenario of vehicular networks, we should analysis the moving data of vehicles of urban area on working days [2224]. Fortunately, there are plenty data were collected by other researchers that save a lot of time for us.

In the process of analysis, we found out that the number of intersections far less than the number of vehicles and each moving vehicle will cross an intersection almost every five minutes [23]. This gives us a new thought. If we let messages distributed to every intersection by the epidemic method, the destination vehicles will get messages when they cross any intersection. Meanwhile, the epidemic process only occurs between intersections that will decrease the demands of buffer size. To achieve that thought, the most tough task is that how to hold the messages at intersections without infrastructure. Finally, we find out the solution. The vehicle which is stop at the intersection waiting for the traffic light could be the virtual-port for the intersection. When it leaves this intersection, the next vehicle which will stop at this intersection can replace the former one to be the virtual port. This method can be work if we can ensure there is always at least one vehicle will stop at an intersection waiting for the traffic light. By using the classic theory Poisson’s Distribution in Probability Theory and collected data, we analyze that if the assumption that there is always at least one vehicle will stop at an intersection waiting for the traffic light is right. The answer is that the assumption that there is always at least one vehicle will stop at an intersection waiting for the traffic light is valid at daytime. Therefore, we can use vehicles as virtual infrastructure in VANETs.

Our Contributions:

  • We proposed a new method to build virtual infrastructure by using vehicles which is stop at the intersection waiting for the traffic light for VANETs.

  • By using the build virtual infrastructure, we introduce the new routing protocol to increase successful delivery ratio, decrease the delay, and decrease the redundancy.

The rest of this paper is organized as follows: In Sect. 2, we introduce the network structure. We describe the character of urban area and shows how the Intersection-based Forward Protocol works. In Sect. 3, we prove the condition that used in this paper. In Sect. 4, the performance evaluation shows that compare with epidemic and H + 1 hop forwarding scheme, our proposed solution has the better performance. Finally, in Sect. 5, we make the conclusion for our Intersection-based Forwarding Protocol.

Fig. 1
figure 1

Different vehicle density in urban area

2 Network structure

2.1 The characters of urban area

In urban area, vehicles have social-proximity movement [25, 26]. From the analysis of data, different area of urban has different vehicle density like the Fig. 1. We also found out that in the urban area, vehicles move in a localized region centered at a fixed home-point because of social activities [27]. Therefore, the character of trajectory of moving vehicles can be characterized in a statistical sense. It is unnecessary to model the trajectory of every vehicle because spatial stationary distribution of vehicles decays as a power law of exponent with the distance from its home or work place. Through the analysis of characters of urban areas, we can know that vehicle density is inhomogeneous. Its difficult to calculate the density of each intersection. However, if we can prove that the sparsest area can satisfy the condition that there is always at least one vehicle will stop at an intersection waiting for the traffic light, the whole urban areas can also satisfy the condition. Therefore, we only need to calculate the density of vehicles at the sparsest intersection. By using the classic theory Poisson’s distribution in probability theory, we can derive the threshold value of intensity of Poisson process to satisfy the intensity of Poisson process. Contrast to the collected data by [28], the collected data completely satisfy the demand of threshold value. The calculation process is in Sect. 3. Because the assumption that there is always at least one vehicle will stop at an intersection waiting for the traffic light is valid, we can deploy our routing protocol as following subsection.

2.2 Routing protocol

To forward packets in VANETs, we set Virtual Port (VP) at each intersection. The Virtual Port is served by stopping vehicle which is waiting for the traffic light in front of the intersection. The route protocol includes four parts: VP selection, packets collection, VP transition, last-hop transmission and packets self-destruction.

VP selection: VP is served by ordinary vehicle which is waiting for the traffic light in front of the intersection. All the stopping vehicles in front of the intersectionare candidates. If one vehicle used to be a VP of other intersection, it will preferentially be selected as VP at this intersection due to the enormous amount of packets in its buffer. If more than one vehicle used to be a VP of other intersection, the vehicle which has more packets than others will be selected. If there is no vehicle used to be a VP of other intersection, the nearest vehicle from intersection will be chosen. Because the VP which in dominant position can cover more vehicles in the section. That will benefit for collecting packets from passing by vehicles.

Packets collection: VP will gather all the packets that need to be forward from all passing by vehicles. If a VP leaves its intersection and no longer a VP at next intersection, all its packets will transmit to the VP of current intersection.

VP transition: When VP leaves this intersection, it will transmit all the copies of packets to the next VP which is stopped or going to stop in front of this intersection. We proved that each intersection in urban area always can find a suitable vehicle as the VP in the next subsection.

Last-hop transmission: VP will check the ID of all the passing by vehicles and send the packets to its destination vehicles. In the unicast scenario, if packets are transmitted successfully, the packets will be deleted in VP. If VP finds that the destination already has the packets, it will also delete the packets from its buffer.

Packets self-destruction: Each packet has a timer which is calculated due to the state of source vehicle. When the packet is copied, the timer is copied also. If the timer of a packet counts down to the end, the packet will be deleted from the buffer of current vehicle. In the unicast scenario, if packets are transmitted successfully, the packets will be deleted in VP. If VP finds that the destination already has the packets, it will also delete the packets from its buffer.

Fig. 2
figure 2

Example of forwarding at intersection

If a vehicle is selected as a VP according to the protocol of VP selection, it will first collect packets from vehicles that located at the transmission range of it. Then, VP will check if there is a vehicle in its transmission range is destination vehicle. The VP will implements Last-hop transmission and transmits packets to destination vehicles if there is any vehicle is a destination vehicle. If the VP is leaving this intersection, the VP will implements VP transition. Thus every intersection could keep a VP to construct the network.

As Fig. 2, vehicle \(a\) is the VP of intersection \(I_1\), it will gather packets from \(b, c, d\) and e. Meanwhile, it sends packets to destination vehicles \(d\) and \(e\). When \(a\) is leaving this section, it will transmit all the copies to the stopping vehicle \(b\). Then, \(b\) is the VP of intersection \(I_1\). When \(a\) arriving at intersection \(I_2\), it will transmit all the copies to the VP \(f\) of intersection \(I_2\). If \(f\) is leaving when \(a\) arrives at this intersection. Vehicle \(a\) has priority to be the new VP.

Fig. 3
figure 3

Status of one routing process

3 Calculation of threshold value

3.1 Satisfied condition

Figure 3 shows the status of one routing process at an intersection. This moment, the traffic light of lengthways road is red and the traffic light of horizontal road is green. There is a vehicle \(A\) stop in front of the stop line at this intersection. In this status, as the VP of this intersection, vehicle \(A\) collect all the packets that need to be forwarded from all the passing by vehicles. Furthermore, vehicle \(A\) need forward all its packets to the next VP. The next VP is the vehicle which will stop in front of this intersection.

When the traffic light of lengthways road turns green, and the traffic light of horizontal road turns red, vehicle \(A\) will leave this intersection. Before vehicle \(A\) leaves this intersection, there must be at least one vehicle stop in front of this intersection or at least one vehicle which is in the transmission range of vehicle \(A\) is running forward to the intersection. This is ensure the VP vehicle \(A\) could forward all its packets to the other vehicles before it leaving.

However, there is an extreme case. In Fig. 3, when the traffic light of lengthways road turns green and the traffic light of horizontal road turns red, VP vehicle \(A\) will leave this intersection, the two vehicles that driving in opposite direction \(B\) and \(C\) in horizontal road just cross the stop line and will not stop at this intersection. If there is no vehicle run into the transmission range of vehicle \(A\), packets cannot be hold on this intersection. Therefore, to ensure the condition that before vehicle \(A\) leave this intersection there must be at least one vehicle stop in front of this intersection or at least one vehicle which is in the transmission range of vehicle \(A\) is running forward to the intersection, all the traffic stream of four direction must satisfy the following condition.

Condition 1

For traffic flow of each direction, before the nearest vehicle from intersection cross the stop line, there must be at least one vehicle run into the transmission range of the vehicle at intersection.

Through the analysis of characters of urban areas, we can know that vehicle density is inhomogeneous. Its difficult to calculate the density of each intersection. However, if we can prove that the sparsest area can satisfy the condition that there is always at least one vehicle will stop at an intersection waiting for the traffic light, the whole urban areas can also satisfy the condition. Therefore, we only need to calculate the density of vehicles at the sparsest intersection.

Condition 2

For traffic flow of each direction, every time \(\frac{r}{v}\), there must be at least one vehicle run into the transmission range of the vehicle at intersection, where \(v\) denotes the average rate of vehicle.

If the Condition 2 can be satisfied the Condition 1 can also be satisfied. Therefore, to ensure each intersection can choose a vehicle to be VP, The Condition 2 must be satisfied.

3.2 Calculation of threshold value

We assume \(N(t),t\ge 0\) denotes the number of vehicles that arriving at the intersection in time interval \((0,t]\). Furthermore, \(N(t)-N({{t}_{0}})=N({{t}_{0}},t)\) denotes the number of vehicles that arriving at the intersection in time interval \(({{t}_{0}},t]\) and the probability of \(N({{t}_{0}},t)\) is given by:

$$\begin{aligned} {{P}_{k}}({{t}_{0}},t)=P\{N({{t}_{0}},t)=k\},k=0,\,\, 1,\,\,\ldots \end{aligned}$$
(1)

According to the condition of the Poisson process [29], \(N(t),t\ge 0\) is a Poisson process. Therefore, \({{P}_{k}}({{t}_{0}},t)\) can be proved as:

$$\begin{aligned} {{P}_{k}}({{t}_{0}},t)=\frac{{[\lambda (t-{{t}_{0}})]^{k}}}{k!}{{e}^{-\lambda (t-{{t}_{0}})}},t>{{t}_{0}},\,\,k=0,\,\,1, \,\,\ldots \end{aligned}$$
(2)

Where \(\lambda \) denotes the intensity of Poisson process. Here, \(\lambda \) denotes the density of traffic stream of single direction. To satisfy the Condition 2, we have to calculate the appropriate value of \(\lambda \) according to Eq. (1). However, there is no direct connection between Eq. (1) and Condition 2. To calculate the appropriate value of \(\lambda \), we have to derive a new Equation that has direct connection with Condition 2 based on Eq. (1).

We assume the arriving time sequence of vehicles at the intersection \({{t}_{1}},\text { }{{t}_{2}},\text { }\ldots \text {, }{{t}_{n}},\text { }\ldots \) is a Poisson flow with intensity \(\lambda \) and \(N(t),t\ge 0\) is the corresponding Poisson process. We define random variable \(W_n\) as the arriving time of the \(n\)th vehicle. Thus, we have the sequence of \({{W}_{0}},\text { }{{W}_{1}},\text { }\ldots ,\text { }{{W}_{i}},\text { }\ldots \), where \(t_i\) denotes the time from the beginning until the \(n\)th vehicle arriving at the intersection. Therefore, the distribution function of \(W_n\) can be derived by Eq. (1).

$$\begin{aligned} \begin{aligned} {{F}_{Wn}}(t)&=P\{{{W}_{n}}\le t\}=1-P\{{{W}_{n}}>t\} \\&=1-P\{N(t)<n\}=P\{N(t)>n\} \\&=\sum \limits _{k=n}^{\infty }{{{e}^{-\lambda t}}}\frac{{{(\lambda t)}^{k}}}{k!},\text { }t\ge 0, \\ {{F}_{Wn}}(t)&=0,\text { }t<0. \end{aligned} \end{aligned}$$
(3)

Thus, the probability density function of \(W_n\) is

$$\begin{aligned} {{f}_{Wn}}(t)=\frac{\text {d}{{F}_{Wn}}(t)}{\text {d}t}=\left\{ \begin{array}{ll} \frac{\lambda {{(\lambda t)}^{n-1}}}{(n-1)!}{{e}^{-\lambda t}},&{} t>0, \\ 0,&{}\text {otherwise.} \\ \end{array} \right. \end{aligned}$$
(4)

Specially, the waiting time probability density of first vehicle \(W_1\) satisfy the exponential distribution

$$\begin{aligned} {{f}_{{{W}_{1}}}}(t)=\left\{ \begin{matrix} \lambda {{e}^{-\lambda t}},&{} t>0, \\ 0,&{}\text {otherwise.} \\ \end{matrix} \right. \end{aligned}$$
(5)

Let \({{T}_{i}}={{W}_{i}}-{{W}_{i-1}},\text { }i=1,2,\ldots \) denotes the time interval of the two adjacent vehicles. According to the above function (5), we derive the conditional distribution function of \(T_i\),

$$\begin{aligned} {{F}_{{{T}_{i}}|{{t}_{i-1}}}}({{t}_{i}}|{{t}_{i-1}})= & {} P\{{{T}_{i}}\le t|{{t}_{i-1}}={{t}_{i-1}}\} \nonumber \\= & {} P\{N({{t}_{i-1}}+t)-N({{t}_{i-1}})\nonumber \\\ge & {} \text {1 }|\text { }N({{t}_{i-1}})=i-1\} \nonumber \\= & {} P\{N({{t}_{i-1}}+t)-N({{t}_{i-1}})\ge \text {1}\}\\= & {} 1-P\{N({{t}_{i-1}}+t)-N({{t}_{i-1}})=0\} \nonumber \\= & {} 1-P\{N(t)=0\}=1-{{e}^{-\lambda t}},t>0, \nonumber \\ {{F}_{{{T}_{i}}|{{t}_{i-1}}}}({{t}_{i}}|{{t}_{i-1}})= & {} 0,t\le 0.\nonumber \end{aligned}$$
(6)

Therefore, the corresponding conditional probability density is

$$\begin{aligned} {{f}_{{{T}_{i-1}}|{{t}_{i-1}}}}(t|{{t}_{i-1}})=\left\{ \begin{array}{ll} \lambda {{e}^{-\lambda t}}, &{} t>0, \\ 0, &{}t \le 0. \\ \end{array} \right. \end{aligned}$$
(7)

Thus, the probability density of \(T_i\) (i = 2, 3, )is

$$\begin{aligned} {{f}_{{{T}_{i}}}}(t)= & {} \int _{0}^{\infty }{\lambda {{e}^{-\lambda t}}}{{f}_{{{t}_{i-1}}}}({{t}_{i-1}})\text {d}{{t}_{i-1}} \nonumber \\= & {} \lambda {{e}^{-\lambda t}},\text { }t>0, \\ {{f}_{{{T}_{i}}}}(t)= & {} 0,\quad t=0.\nonumber \end{aligned}$$
(8)

Obviously, the derived functions present that the time interval sequence \({T_i}\) obey the identical exponential distribution. Because Eq. (8) has direct connection with Condition 2, according to Eq. (7), we can derive the appropriate Poisson process intensity \(\lambda \) to let the probability that every time \(\frac{r}{v}\) there must be at least one vehicle run into the transmission range of the vehicle at intersection approaches to 1. Or let the event that every time \(\frac{r}{v}\) there is no vehicle run into the transmission range of the vehicle at intersection satisfy the condition of small probability event.Footnote 1 Therefore, to satisfy the condition that for traffic flow of each direction every time \(\frac{r}{v}\), there must be at least one vehicle run into the transmission range of the vehicle at intersection. The probability that in time interval \(r/v\) at least one vehicle arrived at intersection has to larger than 0.95.

Due to the probability of time interval \(t={{t}_{r}}=\frac{r}{v}\) is

$$\begin{aligned} P\{t ={{t}_{r}}\}= & {} \int _{0}^{{{t}_{r}}}{\lambda {{e}^{-\lambda {{t}_{r}}}}}\text {d}{{t}_{r}} \nonumber \\= & {} 1-{{e}^{-\lambda {{t}_{r}}}}, \end{aligned}$$
(9)

\(\lambda {{t}_{r}}\) has to equal to or larger than 3 to satisfy the condition that the probability \(P\{t<{{t}_{r}}\}<0.5\). Thus, the probability that both the two opposite traffic streams have no vehicles run into the transmission range of the vehicle at intersection less than 0.05. Furthermore, to satisfy the condition that \(\lambda {{t}_{r}}\) is larger than 3. The Poisson intensity \(\lambda \) has to equal to or larger than \(\frac{4}{{{t}_{r}}}\). This means that in order to satisfy the condition 2, the traffic stream of each direction has average three vehicles arriving at the intersection in each time interval \(t_r\). Let \(t_l\) denotes the length of red light time. Substitute \(\lambda \) and \(t_l\) into equation

$$\begin{aligned} {{F}_{Wn}}({{t}_{l}})= & {} 1-P\{N({{t}_{l}})<n\} \nonumber \\= & {} \text {1}-\sum \limits _{k=1}^{n}{{{e}^{-\lambda {{t}_{l}}}}\frac{{{(\lambda t)}^{k}}}{k!}} \end{aligned}$$
(10)

We assume \(t_l=30\) s, v = 10 m/s, r = 300 m. According to Eq. (10), the probability of the event that there are more than 15 vehicles at a same intersection is less than 0.05. This means that the event that there are more than 15 vehicles at a same intersection is small probability event which seldom occurs in the real scenario. Therefore, the intersection which has more than 15 vehicles satisfies Condition 2 definitely.

Natasa Sarafijanovic-Djukicet. al. derived that in an urban area of 60 \(\times \) 48 [km], the expected number of vehicles in the cells with size 480 \(\times \) 480 m is larger than 15 [30]. Their work based on real mobility trace. Therefore, in the urban area, the traffic flow density of each road intersection is larger than the calculated traffic flow density which satisfying the Condition 2. As a result, we can always select a suitable vehicle in an intersection as the leader.

3.3 Set TTL

To decrease the redundancy of the network, decrease the demand of buffer size and decrease the probability of network congestion, we must restrict the TTL of packets on the premise of high successful delivery ratio. Each packet has a timer, when the packet was duplicated, the timer also be duplicated. When the TTL of a packet runs out, it and all its copy will be wipe out. To achieve the purpose of decreasing the redundancy of the network and demand of buffer size on the premise of high successful delivery ratio, the TTL must be precisely. In this paper, we put our main focus on the VP selection issue. As for the message spreading stop point, we adopt the similar way with our previous work [21].

4 Performance evaluation for intersection-based forwarding protocol

4.1 The opportunistic network environment simulator

Opportunistic networking environment (ONE) simulator is a Java based tool offering a broad set of DTN protocol simulation capabilities in a single framework [31]. The ONE simulator can offer extensible simulation frameworks, such as supporting mobility and event generation, message exchange, DTN routing and application protocols, a basic notion of energy consumption, visualization and analysis, interfaces for importing and exporting mobility traces, events, and entire messages. By using this framework, we can implement an extensive set of ready-to-use modules. We can also import the real moving data of vehicles by using this framework. To evaluate the proposed protocol, the most ideal simulate scenario is the real urban area. However, simulate a new protocol in real scenario is not worth. By using ONE simulator, we can use the real mobility trace of vehicles as the moving trajectory of node in the simulation. The real communication data of people can also be imported in the ONE simulator as the connection data for nodes. Therefore, the condition of ONE simulator is similar to the real scenario of urban area. Furthermore, the simulation result is also approach to the result get under the real scenario of urban area. As a result, the performance get by the ONE simulator is more reliable.

4.2 Simulation setting

Because we use the real mobility trace, the speed of vehicles is decided by the real data. We do not need set speed for vehicles. Similarly, the communication data is also imported from real data. Therefore, we do not have to set the number of packets and packets generate interval. The number of the vehicles is also determined by the communication data. All of the above settings are similar to the real value. For the buffer size of vehicles, we set different value to see the changing of successful delivery ratio, delay and overhead as the changing of buffer size. At last, we also change the number of vehicles to evaluate the influence from the number of vehicles. According to physical layer of wireless transmission, we set the transmission range of vehicles is 200 m. In the simulation, we choose the epidemic protocol [19] and H + 1 hop epidemic protocol [21] as contrast.

Epidemic protocol is a classic protocol. It let all the node transmits all its packets to each node it meet. By using of epidemic protocol, packets could be spread to any corner of network. However, it generate too many copied of packets. H + 1 hop protocol is advanced epidemic protocol. It calculate the ideal number of copies according to Markov chain. Thus, H + 1 hop can quickly transmit packets with less copies.

Fig. 4
figure 4

Packet delivery ratio versus buffer size

4.3 Performance analysis

For the first group of simulation, we illustrate the performance of packets delivery ratio. We change the buffer size from 20 to 200 to see how the packets delivery ratio changing as the changing of buffer size. As for the Fig. 4, we can see that the packets delivery ratio of IBFP is obviously higher than the other two protocols in every condition of buffer size. This means that the introduced protocol is more efficient than the other two protocols. We can also see that the delivery ratio approach to 1 when the buffer size is 120. This means that 120 units buffer size of vehicles can satisfy the demand of the introduced protocol IBFP. This is very easy to achieve. From Fig. 4 we can know that the delivery ratio of epidemic protocol and H + 1 hop protocol increasing as the increasing of buffer size. They need more than 200 units to achieve their best performance. They need much more buffer size than IBFP. This also state the proposed protocol IBFP is better than the other two protocols clearly.

Fig. 5
figure 5

Average delay versus buffer size

The purpose of second group simulation is evaluating the average delay of packets as the increasing of buffer size. From Fig. 5, we could ask the question that why the proposed protocol IBFP has more delay time than the epidemic protocol and H + 1 hop protocol. From the analysis of Fig. 4, we know the proposed protocol IBFP is better than the other two protocols. IBFP seems should have less delay than the other two protocols. This is because in the one, the calculation of average delay only includes the delay time of packets which successfully delivered. The packets which did not successfully delivered could not be counted. For epidemic protocol and H + 1 hop protocol, only the packets which can be delivered easily could be successfully delivered. The packets which is hard to delivery are missed because the expiration of TTL. Thus, the protocol which has high delivery ratio and has much longer delay. This explains why the proposed protocol IBFP has more delay time than the epidemic protocol and H + 1 hop protocol. This also explains why the delay increasing with the increasing of buffer size. In Fig. 5 we can see the delay of IBFP is about 2250 s when the buffer size is large than 100 units. This means for the best performance of delivery ratio, the delay IBFP is no more than 2300. This performance is excellent for the large scale urban area and large scale of amount of vehicles.

Fig. 6
figure 6

Over head versus buffer size

The redundancy is an important standard for VANETs. The third group simulation is evaluation the overhead of the three protocols. From Fig. 6, we can see that epidemic protocol has the largest overhead. This is because that in epidemic protocol each vehicle need to forward all its packets to every vehicle it meet. This will generate much redundancy and cost many buffer. The H + 1 hop protocol is the improvement of epidemic protocol. It calculates the stopping time of epidemic process to control the waste of buffer and restrict the redundancy. Therefore, the overhead of H + 1 hop protocol is less than epidemic. However, it also has epidemic process. The superiority of the proposed protocol IBFP is obviously shows in Fig. 6. The overhead of IBFP is far less than the other two protocols. This is because the epidemic process only happens among intersections. This will save more buffer for vehicles and decrease the redundancy of the network. Thus, the proposed protocol IBFP is an ideal protocol for VANETs.

Fig. 7
figure 7

Packet delivery ratio versus number of vehicles

To evaluate the performance of three protocols, we change the number of vehicles to see the difference between the three protocols. Cities have different scales. Thus, we decrease the number of vehicles to see the changing of delivery ratio as the changing of number of vehicles when the buffer size is 100 units. From Fig. 7, we can know that for little scale of city, the introduced protocol IBFP can always have ideal performance. For the other two protocols, their delivery ratio decreases obviously when the number of vehicles more than 600. This means that the epidemic protocol and H + 1 hop protocol do not suit for large scale VANETs. Above all, the introduced protocol IBFP has very good performance in very standard. It is a ideal protocol for VANETs, especially large scale urban area.

According to all the above analysis, it is easy to conclude that the proposed protocol is much better than the two contrast protocols. This is mainly because epidemic protocol and H + 1 hop protocol generate much more redundancy than the intersection-based protocol. Limited by the buffer size, redundancy will decrease the delivery ratio and increase the delay. Therefore, the contrast protocols have worse performance than the proposed protocol.

5 Conclusion

For large scale VANETs in urban area, how to increase the delivery ratio and decrease the redundancy are the most important issues. In this paper, we use vehicles as virtual port. The VP is set at every intersection. The epidemic process only occurs between VPs that will decrease the demands of buffer size. The decreasing demands of buffer size can increase the delivery ratio. We proposed a new method to build virtual infrastructure by using vehicles which is stop at the intersection waiting for the traffic light for VANETs. By using the build virtual infrastructure, we introduce the new routing protocol to increase successful delivery ratio, decrease the delay, and decrease the redundancy. We compare our IBFP with epidemic and H + 1 hop protocol and the results shows that IBFP is the better protocol. However, the performance could improve if we further decrease the demand of buffer size and control the epidemic process precisely. These work will be achieved in our future works.