m. tech. project presentationsri/students/janak-slides.pdf · m. tech. project presentation janak...

34
 Implementation of WiFiRe MAC M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay Supervisor: Prof. Sridhar Iyer Co-supervisor: Prof. Anirudha Sahoo

Upload: others

Post on 03-Jul-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

Implementation of WiFiRe MAC

M. Tech. Project Presentation

Janak ChandaranaRoll Number: 05329R04

CSE, IIT BombaySupervisor: Prof. Sridhar Iyer

Co­supervisor: Prof. Anirudha Sahoo

Page 2: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

Outline● Wireless testbed, PHY integration (7)● Encapsulation, fragmentation of packets (4)● GPSS mode, memory management, packet 

filters (4)● Results, conclusions, future work (1­2)● Implementation issues (1)

Page 3: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

Replacing 802.11 MAC● Reconfigure 802.11 MAC 

approach– Atheros HAL with madwifi drivers– Related work: softMAC– Direct control of framing– Fine time granularities         

(micro Sec)– Kernel/Driver level 

implementation

IP layer

Reconf. MAC

PHY (NIC)

Page 4: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

Replacing 802.11 MAC (cont.)● Overlay approach

– MAC at layer 2.5– Schedules Tx in pre­decided time­slot– Related work: Overlay MAC Layer (UC, 

Berkeley)– Loosely coupled with PHY– Relatively large slot time (large enough to ignore 

clock syn error)– Periodic SYN with BS clock

3 ­ IP layer

2 ­ 802.11 MAC

1­ PHY (NIC)

2.5 ­ OML 

Page 5: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

Ethernet

WiFiRe wireless link● Using PF_SOCK and madwifi drivers● Overlay approach● Madwifi driver, D­link wireless cards● Advantages – scheduled Tx 

(10mSec), better than CSMA/CA● Disadvantages – not scalable, short 

range● Packet header should be correct

BS

ST

Proxy

C­1 C­2

AP

Wireless Link

Page 6: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

BS

ST ST

Client Client

AP

L2  switch

Client802.11 wireless

802.11 Clients● Can be connected via 

AP or ad­hoc mode● Interference issues● No change on BS or ST● Supports CS layer 

mentioned in draft● DHCP issue

Page 7: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

Integration with IITM­PHY board

WiFiRe MAC

Ethernet MAC Ethernet Cable

NIC

System ‘S’Switch

NIC

NIC

NIC

NIC

NIC

NIC

A1

A2

A3

A4

A5

A6

Ethernet Cable

To TCP/IP Layer

Page 8: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

WiFiRe PHY integration● MAC and PHY are separate 

entities● MAC to be delivered on Ethernet● PHY to be developed 

independently by IITM● WiFiRe MAC for BS and ST

WiFiRe MAC

WiFiRe PHY controller802.11b PHY

Antenna 

EthernetSwitch

control +         data frame

data frame

NIC

System(S)

Page 9: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

Assumption from IIT­M PHY board Give feedback to MAC about PHY characteristic  (like 

modulation, bandwidth, timeslot, sync issue etc. )

Able to send / receive packet on given time slot (for example: send 1000 bytes at t=50)

Synchronisation among sectors (6 PHY issue)

Understand Ethernet packets

Buffer for bigger packets

Page 10: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

Meta Frame Construction PLCP issue

DL­TB's, B1

DL­TB: WiFiRe Data Packet

Control packet

Ethernet Header

Ethernet Packet

DL­TB's, B3 DL­TB's, B5 DL­TB's, B

Slots in UL­Frame Slots in DL­Frame

UL­FrameGroup B1 Group B3 Group B5 Beacon

BS­MAC SwitchEthernet Packets

BS2

BS4

BS6

BS1 

BS3

BS5

BS­PHY's

Page 11: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

Encapsulation and Fragmentation

ST will receive packets from client, keep them in buffer

Encapsulate multiple MAC packets and make packet of 1450 bytes

Fragment packet (if doesn't fit in frame) 

Takes care of Ethernet MTU

Keep client Eth MAC header as it is

Diagram ­ next slide

Page 12: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

Encapsulation and Fragmentation (cont.)

1Client­1 

Client­2 

Client­3 

ST BS Proxy

= 802.3 Ethernet MAC header = 14 byte

= 802.3 Ethernet PDU (1500 Byte MAX)

Uplink frame

1

2

3

11123 MAP

Page 13: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

Encapsulation (cont.)New 

client?

Packet from client­1 arrives at ST

Register clientusing MAC address

Put packet in nextuplink frame buffer queue

Enough free space?

Tx frame 

in using Eth

Try to accommodatefragmented  packet

Store remaining part for next uplink frame

Prepare MAP 

Append to uplink frame

Start

YES

No

YES

No

Page 14: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

Encapsulation and Fragmentation (cont.)

ST collects packet and send them in single frame to BS

Packet is divided 73 + 25 =98

Page 15: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

GPSS mode Grant per Subscriber station model 

followed (adapted from WiMAX)

BS allocates slots (per ST basis)

ST handles client level fairness, QoS

SSID, CID on ST level 

Can be extended to support GPC, GPSF

ST­ID Client MAC

1 AA­AA­AA­AA­AA­AA

2 BB­BB­BB­BB­BB­BB

1 CC­CC­CC­CC­CC­CC

1 DD­DD­DD­DD­DD­DD

2 EE­EE­EE­EE­EE­EE

Page 16: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

MAC filter at BSpacket coming 

from Netmon (Internet)

Read dest. MAC address

match with client MAC 

in ST_TABLE

match found?

Find respective ST

append packet to  ST queue

NOYES

Drop packet

● Block illegal packets coming from Internet

● Broadcast packets at BS

Page 17: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

MAC filter at ST

Frame coming from BS

Read DL­MAP

Any packet for ST?

Read packet with offset

NO

Drop frame Dest. MAC

is Client?Send packet 

to Client

NO

YESYES

Dest. MACis FF?

Source is my client?YES

NO

Drop packet

YES

Start

Page 18: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

ProxyWiFiRe

frame

ST­1ST­2

ST­n

BS queues for different STs

DL framing for GPSS

read dest. MAC  decide ST

● FIFO scheme, supports scheduler● Memory management unit 

Page 19: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

Results● Delay within prescribed limit

– Client to Proxy delay (avg. 15 ms)– Client to Client delay (avg. 30 ms)

● Data Rate: more than 120KBps– Depend on frame length, periodicity– Will increase with longer frame and multiple sectors

Page 20: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

Result discussion ● Voice calls 

– VoIP to VoIP (G.711 with 214 bytes of packet, 20ms) – VoIP to PSTN (GSM codecs with 87 bytes, 20ms)

● SIG_ALRM accuracy 99.997% ● 56KB web page takes 5 sec to download

Page 21: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

Future work● Explore the possibility to implement MAC as part of kernel 

module● Driver code of 802.11 and integration with WiFiRe● Adding bulk ACK support for WiFiRe frame● Performance analysis of WiFiRe testbed● Time synchronization among 3 BSs● Long range deployment and study of propagation delay● Exploiting Ethernet MTU size of 1500 (with specialized 

hardware)

Page 22: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

Implementation Issues● RTP issue● Firewall issue● TCP checksum off­loading false alarm● Multicast packet from Switch

Page 23: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

WiFiRe Proxy machine● Squid – web proxy and caching● Asterisk – VoIP PBX● Apache, maraDNS, DHCP server● VoIP­PSTN gateway to work with WiFiRe client● LAN environment (with TCP/IP) for clients ● Transparent L­2 system

Page 24: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

Future work● Explore the possibility to implement MAC as part of kernel 

module● Driver code of 802.11 and integration with WiFiRe● Adding bulk ACK support for WiFiRe frame● Performance analysis of WiFiRe testbed● Time synchronization among 3 BSs● Long range deployment and study of propagation delay● Exploiting Ethernet MTU size of 1500 (with specialized 

hardware)

Page 25: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

Backup slides

Page 26: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

Meta Frame Construction PLCP issue

DL­TB's, B1

DL­TB: WiFiRe Data Packet

Control packet

Ethernet Header

Ethernet Packet

DL­TB's, B3 DL­TB's, B5 DL­TB's, B

Slots in UL­Frame Slots in DL­Frame

UL­FrameGroup B1 Group B3 Group B5 Beacon

BS­MAC SwitchEthernet Packets

BS2

BS4

BS6

BS1 

BS3

BS5

BS­PHY's

Page 27: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

Ethernet sockets Using PF_SOCK with gcc

Byte level access, Binding with particular NIC

Send/receive data using sockets on MAC layer

Allows non­Ethernet packets (like WiFiRe frame); Eth switch broadcast those packets, Eth MAC header not mandatory

Why not in kernel module? PCAP?

PHY requirement, replacement

STclient_sock wifire_sock BS

proxy_sockwifire_sock

Page 28: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

WiFiRe architecture

S

S

BS

BS

BS

wireless medium 

ST

(E)PBX

Client

SRouter

Internet

GW

PSTN

● IP network for data and voice on wireless backbone

Page 29: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

WiFiRe LAN emulation – basic setup Single Sector, 1 BS, 

multiple STs and clients

Single proxy server to handle web and VoIP requests

All machines connected to ST using 802.3 

MAC code in user space with Ethernet Sockets

BS

ST ST

Client Client Client Client

L2  switch

Page 30: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

Motivation● Low cost broadband Internet to rural India● Applications

– Voice calls (VoIP), E­commerce, E­gov, Day­to­day web­access

● Options– GSM/CDMA, DSL, WiMAX, WiFi

Page 31: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

Fiber PoP in city

VillageCellular coverage 

~5km

Background● Fiber PoP in town and city (high 

quality backbone)● Villages without any connectivity 

(wired or wireless)● Need: low­cost, long range, less 

CAPEX● Using popular technology● Similar work: DGP, WilDNet 

15­20 km

Page 32: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

WiFiRe link as 802.11(cont.) Other options

− with PF_PACK and write(sock,..)

Too complex to handle

Not transparent from underlying PHY (like Eth)

Page 33: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

WiFiRe MAC● Replace WiFi MAC with        

TDMA ● WiMAX similar MAC with BS and ST● Sectorized system, DL / UL ● Higher throughput, QoS, long range 

beac

on

guar

d

DL frame UL frame

1/4 1/42/5 3/6 2/5 3/6

Page 34: M. Tech. Project Presentationsri/students/janak-slides.pdf · M. Tech. Project Presentation Janak Chandarana Roll Number: 05329R04 CSE, IIT Bombay ... = 802.3 Ethernet PDU (1500 Byte

   

List of STs

List of clients

Traffic DetailsDL and UL frame

WiFiRe console details