## 2 Materials and Methods
### Neighbor RSU Discovery
After the starting RSU \(sr\) and ending RSU \(dr\) are determined, the source vehicle node \(sv\) constructs a routing request (RREQ) packet with the control fields \(sr\) and \(dr\), then sends the RREQ to the SDN server, which has global information of the streets' connectivity. Then, SDN server calculates the shortest anchor path \(sp\) from \(sr\) to \(dr\) by [PERSON]'s algorithm based on (7). The \(sp\) consists of a sequence of RSU from the starting RSU to the ending RSU. The SDN encapsulates the \(sp\) in the routing reply (RREP) packet and returns it to the source vehicle \(sv\). After receiving the RREP, the source vehicle \(sv\) reads the \(sp\) in the RREP, encapsulates it in the header of the packet, and sent it to target vehicle \(dv\). The packet will be forwarded along the \(sp\) until the target vehicle \(dv\). When transmitting data packets between two adjacent RSUs, the greedy forwarding algorithm between vehicles is used. The vehicle to vehicle/RSU packet forwarding strategy is shown in Algorithm 4, and the RSU to vehicle packet forwarding strategy is shown in Algorithm 5. ```
1:\(nextHop\leftarrow\) empty;
2:if\(sv\) and \(dv\) are on the same street then
3:if\(dv\) is in the neighbor table of \(sv\)then
4:\(nextHop\gets dv\);
5:else
6: choose \(nextHop\) with the greedy forwarding to \(dv\);
7:endif
8:else
9:\(nextRSU\leftarrow\) get next RSU from the \(sp\);
10:if\(nextRSU\) is in the neighbor table of \(sv\)then
11:\(nextHop\gets nextRSU\);
12:else
13: choose \(nextHop\) with the greedy forwarding to \(nextRSU\);
14:endif
15:endif
16:if\(nextHop==\)empty then
17: store the packet to buffer queue of this node;
18:endif
```
**Algorithm 4** Vehicle to vehicle/RSU packet forwarding. ```
1:\(nextHop\leftarrow\) empty;
2:if this RSU is the ending RSU then
3:if\(dv\) is in the neighbor table of this RSU then
4:\(nextHop\gets dv\);
5:else
6: choose \(nextHop\) with the greedy forwarding to \(dv\);
7:endif
8:else
9:\(nextRSU\leftarrow\) get next RSU from this RSU;
10:\(street1D\leftarrow\) ID of street between this RSU and \(nextRSU\);
11:\(nextHop\leftarrow\) the node closest to the \(nextRSU\) on the street \(street1D\);
12:endif
13:if\(nextHop==\)empty then
14: store the packet to buffer queue of this RSU;
15:endif
```

**Algorithm 5** RSU to vehicle packet forwarding. ## 3 Results and Discussion

We carried out extensive simulations in Veins (Vehicles in Network Simulations), which is an open source simulation platform for running vehicular network simulations. Veins integrates two well-established simulators: OMNeT++ and SUMO, where OMNeT++ is an object-oriented event-based simulation library and framework for building network simulators, and SUMO is a microscopic traffic simulation package. Veins provides the connection to SUMO by Traffic Control Interface (TraCI). The simulation scenario is a grid area covering 3600 m \(\times\) 3000 m, where the distance between two adjacent intersection is set to 600 m. There are 38 street segments and 24 intersections in total. Approximately 50 meters away from each intersection, there exits an RSU. Each street segment is two-way, with one lane in each direction. The simulation time is 1200 s, and the warm-up period is set to 160 s. The simulation parameters are summarized in Table 1.

In order to evaluate the performance of the routing protocols, we focus on two metric properties: the packet delivery ratio (PDR) and average end-to-end delay (EED), where PDR is calculated as following: PDR =number of packets received/total number of packets sent, and EED is defined as the average delay of packets transmission from the source node to destination node. These two metric properties of our proposed scheme are evaluated within the confidence interval of 95%. The confidence interval is computed out of 10 simulation runs for each different random number seed. We compare the proposed scheme with GPSR and GSR, and analyze the simulation results. Figure 8 shows the general upward trend of the packet delivery ratio as the signal transmission radius increases.