CRL Distribution in VANETs using ns-3 Michael E. Nowatkowski Workshop on ns-3 Malaga, Spain 15 March 2010
Agenda VANET Overview Physical Layer MAC Layer Network Layer Application Layer CRL Distribution Methods Most Pieces Broadcast Generation per Channel Mobility Traces Michael Nowatkowski <nowatkom@gatech.edu> Network Security and Architecture Laboratory, Georgia Institute of Technology 2
Background Not a programmer Using ns-3-dev, somewhere between 3.6 and 3.7 changeset: 5834:8481618b577f date: Thu Dec 03 10:54:05 2009 +0300 Working on distributing files in a VANET environment Michael Nowatkowski <nowatkom@gatech.edu> Network Security and Architecture Laboratory, Georgia Institute of Technology 3
Vehicular Ad Hoc Network Overview Network-enabled vehicles and infrastructure IEEE Trial-use Standard 1609 (4 parts) Increased safety and convenience On-Board Unit (OBU) Roadside Unit (RSU) Vehicle to Vehicle Communication (V2V) Vehicle to Infrastructure Communication (V2I) Michael Nowatkowski <nowatkom@gatech.edu> Network Security and Architecture Laboratory, Georgia Institute of Technology 4
Increased Safety and Convenience Safety Emergency electronic brake light Pre-crash sensing Cooperative forward collision warning Traffic signal violation warning Curve speed warning Lane-change warning Left turn assistant Stop sign movement assistant Transportation efficiency Traffic re-routing Enhanced guidance and navigation Lane merging assistant Information and entertainment Mobile Internet Point of interest (POI) notification Fuel consumption management Vehicle diagnostics Source: Vehicle Safety Communications Consortium, 2006 Michael Nowatkowski <nowatkom@gatech.edu> Network Security and Architecture Laboratory, Georgia Institute of Technology 5
Physical Layer IEEE 802.11p is the physical-layer protocol Seven 10 MHz channels in the 5.9 GHz range Data rates of 3 to 27 megabits per second One control channel (CCH) beacons and safety messages Six service channels (SCH) data exchange SCH CCH SCH Michael Nowatkowski <nowatkom@gatech.edu> Network Security and Architecture Laboratory, Georgia Institute of Technology 6
Physical Layer IEEE 802.11p is the physical-layer protocol Seven 10 MHz channels in the 5.9 GHz range Data rates of 3 to 27 megabits per second One control channel(cch) Six service channels(sch) Nodes monitor the CCH periodically(every 100 ms) Sync Interval (100 milliseconds) CCH Interval SCH Interval CCH Interval SCH Interval Time Guard Interval (4 milliseconds) Michael Nowatkowski <nowatkom@gatech.edu> Network Security and Architecture Laboratory, Georgia Institute of Technology 7
Node Creation Helpers: WifiHelper wifihelper = WifiHelper::Default (); QosWifiMacHelper machelper = QosWifiMacHelper::Default (); machelper.settype ("ns3::qadhocwifimac"); YansWifiPhyHelper phyhelper = YansWifiPhyHelper::Default (); YansWifiChannelHelper chhelper = YansWifiChannelHelper::Default (); Find dev for channel switching: Ptr<WifiNetDevice> dev = DynamicCast<WifiNetDevice>((*nc_RSU.Get(i)).GetDevice(0)); Ptr<WifiPhy> phy = dev->getphy(); (ChannelNumber(uint16_t) is now an attribute of YansWifiPhy) Michael Nowatkowski <nowatkom@gatech.edu> Network Security and Architecture Laboratory, Georgia Institute of Technology 8
Physical Layer Set up Wifi parameters for 300 meter range phyhelper.set("energydetectionthreshold", DoubleValue(-96.0)); phyhelper.set("ccamode1threshold", DoubleValue(-99.0)); phyhelper.set("rxnoisefigure", DoubleValue(4)); Set up Control Channel and Service Channel intervals Simulator::Schedule(Seconds(0.0), &SwitchChannel, phy, 178, cchrsu); // Control Channel Simulator::Schedule(Seconds(syncInterval/2), &SwitchChannel, phy, 174, schrsu); // Service Channel Void SwitchChannel Simulator::Schedule(Seconds(syncInterval), &SwitchChannel, phy, channelnumber, p_sch); Michael Nowatkowski <nowatkom@gatech.edu> Network Security and Architecture Laboratory, Georgia Institute of Technology 9
MAC Layer 802.11p uses User Priority, similar to 802.11e CCH and SCH parameters are slightly different wifihelper.setstandard(wifi_phy_standard_80211p_sch); wifihelper.setstandard(wifi_phy_standard_80211p_cch); 3 CCH Parameters 3 SCH Parameters Access Class 2 0 1 2 0 1 0 5 10 15 20 25 0 5 10 15 20 25 Time slots, 16 microseconds each AIFS CW Broadcast used for beacons and CRL pieces Michael Nowatkowski <nowatkom@gatech.edu> Network Security and Architecture Laboratory, Georgia Institute of Technology 10
Network Layer 802.11p supports WSMP and IPv6 WSMP allowed on both Control Channel and Service Channels IPv6 allowed on Service Channels WSMP does not use MAC address or IP address Reduces size of header (22 bytes required) Enhances privacy WSMP encompasses Transport Layer (TCP, UDP) Michael Nowatkowski <nowatkom@gatech.edu> Network Security and Architecture Laboratory, Georgia Institute of Technology 11
CRL Distribution in VANETs CA 1 C 2 R L 3 4 1. CA generates CRL 2. CRL divided into N pieces using coding method 3. Coded pieces distributed to RSUs 4. V2I and V2V used to distribute CRL to all vehicles Michael Nowatkowski <nowatkom@gatech.edu> Network Security and Architecture Laboratory, Georgia Institute of Technology 12
V2I/V2V Distribution 3 2 1 4 1. OBU in range of RSU 2. OBU uses V2I to download file pieces 3. OBU in range of other OBU 4. OBUs use V2V to download file pieces 5. Pieces downloaded 5 Michael Nowatkowski <nowatkom@gatech.edu> Network Security and Architecture Laboratory, Georgia Institute of Technology 13
Application Layer Modified OnOffApplication and PacketSink to send and receive CRL pieces. Add CRL piece information to packet Use QosTag to set user priority of packets Use PeekData() in sink to find CRL piece information Keep track of Piece IDs and piece count with bitset Michael Nowatkowski <nowatkom@gatech.edu> Network Security and Architecture Laboratory, Georgia Institute of Technology 14
Application Layer OnOffApplication parameters: Config::SetDefault ("ns3::onoffapplication::ontime", RandomVariableValue (ConstantVariable (syncinterval/2- guardinterval))); // application active Config::SetDefault ("ns3::onoffapplication::offtime", RandomVariableValue (ConstantVariable (syncinterval/2+guardinterval))); // application paused Install Control Channel application: Ptr<Node> apprsu = nc_rsu.get(i); Ptr<OnOffApplication> cchrsu = CreateObject<OnOffApplication>(); apprsu->addapplication(cchrsu); cchrsu->setpacketsize(beaconsize); cchrsu->setmaxbytes(beaconsize);// only send one beacon per control channel interval Install Service Channel application: Ptr<OnOffApplication> schrsu = CreateObject<OnOffApplication>(); apprsu->addapplication(schrsu); schrsu->setpacketsize(packetsize); schrsu->setmaxbytes(0); // continue sending data packets Michael Nowatkowski <nowatkom@gatech.edu> Network Security and Architecture Laboratory, Georgia Institute of Technology 15
Most Pieces Broadcast Reduces the channel contention by limiting the number of nodes (OBUs, RSUs) that broadcast in a radio footprint Adds information to the control channel (CCH) beacon to advertise the count of CRL pieces Only the node with the most pieces broadcasts during SCH Interval Beacons CRL Pieces Beacons CRL Pieces CCH Interval SCH Interval CCH Interval SCH Interval 50 ms 50 ms 50 ms 50 ms Michael Nowatkowski <nowatkom@gatech.edu> Network Security and Architecture Laboratory, Georgia Institute of Technology 16
Generation per Channel Takes advantage of multiple service channels Using Network Coding, different file generations are distributed on different service channels Nodes visit different service channels to get the entire file All nodes contend for channel during SCH Interval Split the 1 MB CRL into N pieces Generation #1 SCH 1 #2 SCH 2 Michael Nowatkowski <nowatkom@gatech.edu> Network Security and Architecture Laboratory, Georgia Institute of Technology 17
Results for 520 OBUs 450 400 350 MPB GPC6 6 5 300 4 250 200 150 100 50 GPC1 RSU Only 3 2 1 Rx Tx 0 0 100 200 300 Time, seconds 0 RSU MPB GPC1 GPC6 Number of OBUs completing CRL download Number of pieces during CRL download, in millions Michael Nowatkowski <nowatkom@gatech.edu> Network Security and Architecture Laboratory, Georgia Institute of Technology 18
Mobility Traces Traces from Naumov, Baumann, and Gross (2006), at ETH Zurich, Switzerland. Developed from Multi-agent Microscopic Traffic Simulator. Original trace file for 259,978 vehicles in a 354 kilometer by 263 kilometer area for over 21 hours. Traces divided into 300 second intervals for different settings (highway, city, mixed) and densities (low, medium, high). Michael Nowatkowski <nowatkom@gatech.edu> Network Security and Architecture Laboratory, Georgia Institute of Technology 19
Mobility Traces Format of traces is: x-destination, y-destination, velocity. Format of ns-3 reader is: x-velocity, y-velocity, z-velocity. Adapted reader from Francesco Malandrino Accept switch ON and switch OFF commands. Simulator::Schedule (Seconds(pr->dvals[2]),&Ipv4::SetUp, (NodeList::GetNode(pr->ivals[3]+m_nRSU))->GetObject<Ipv4> (),1); Correct rounding/timing from trace file. Michael Nowatkowski <nowatkom@gatech.edu> Network Security and Architecture Laboratory, Georgia Institute of Technology 20
Output from Updated Trace Reader Position trace of 520 OBUs using CourseChangeCallback Original reader Updated reader Position trace of single OBU at 1 second intervals Michael Nowatkowski <nowatkom@gatech.edu> Network Security and Architecture Laboratory, Georgia Institute of Technology 21
Enge-Oberstrass Michael Nowatkowski <nowatkom@gatech.edu> Network Security and Architecture Laboratory, Georgia Institute of Technology 22
Questions?
CRL Distribution in VANETs using ns-3 Michael E. Nowatkowski Workshop on ns-3 Malaga, Spain 15 March 2010