Bluetooth and Mobile IP
Bluetooth and Mobile IP
Bluetooth
Consortium: Ericsson, Intel, IBM, Nokia, Toshiba Scenarios:
o connection of peripheral devices
loudspeaker, joystick, headset
o bridging of networks
e.g., GSM via mobile phone - Bluetooth - laptop
Simple, cheap, replacement of IrDA, low range, lower data rates, low-power
o Worldwide operation: 2.4 GHz o Resistance to jamming and selective frequency fading:
FHSS over 79 channels (of 1MHz each), 1600hops/s
o o o o
Coexistence of multiple piconets: like CDMA Links: synchronous connections and asynchronous connectionless Interoperability: protocol stack supporting TCP/IP, OBEX, SDP Range: 10 meters, can be extended to 100 meters
Wireless Networks Spring 2005
Cable replacement
o Eliminates need for numerous cable attachments for connection
Protocol Architecture
Bluetooth is a layered protocol architecture
o Core protocols o Cable replacement and telephony control protocols o Adopted protocols
Core protocols
o o o o o Radio Baseband Link manager protocol (LMP) Logical link control and adaptation protocol (L2CAP) Service discovery protocol (SDP)
Protocol Architecture
Cable replacement protocol
o RFCOMM
Adopted protocols
o o o o PPP TCP/UDP/IP OBEX WAE/WAP
Protocol Architecture
BT Radio (2.4 GHZ Freq. Band): Modulation: Gaussian Frequency Shift Keying Baseband: FH-SS (79 carriers), CDMA (hopping sequence from the node MAC address) Audio: interfaces directly with the baseband. Each voice connection is over a 64Kbps SCO link. The voice coding scheme is the Continuous Variable Slope Delta (CVSD) Link Manager Protocol (LMP): link setup and control, authentication and encryption Host Controller Interface: provides a uniform method of access to the baseband, control registers, etc through USB, PCI, or UART HCI Logical Link Control and Adaptation Layer (L2CAP): Audio higher protocols multiplexing, packet segmentation/reassembly, QoS Service Discover Protocol (SDP): protocol of locating services provided by a Bluetooth device Telephony Control Specification (TCS): defines the call control signaling for the establishment of speech and data calls between Bluetooth devices RFCOMM: provides emulation of serial links OBEX: (RS232). Upto 60 connections
AT Commands
OBEX
RFCOMM L2CAP
TCS
SDP
Usage Models
File transfer Internet bridge LAN access Synchronization Three-in-one phone Headset
Scatternet
o Device in one piconet may exist as master or slave in another piconet o Allows many devices to share same area o Makes efficient use of bandwidth
Network Topology
Piconet 1 Piconet 2
Slave Master
Master Scatternet
Scatternet = set of piconet Master-Slaves can switch roles A node can only be master of one piconet. Why?
Scatternets
Each piconet has one master and up to 7 slaves Master determines hopping sequence, slaves have to synchronize Participation in a piconet = synchronization to hopping sequence Communication between piconets = devices jumping back and forth between the piconets
piconets
Wireless Networks Spring 2005
Radio Specification
Classes of transmitters
o Class 1: Outputs 100 mW for maximum range
Power control mandatory Provides greatest distance
Frequency Hopping
Total bandwidth divided into 1MHz physical channels FH occurs by jumping from one channel to another in pseudorandom sequence Hopping sequence shared with all devices on piconet Piconet access:
o Bluetooth devices use time division duplex (TDD) o Access technique is TDMA o FH-TDD-TDMA
Frequency Hopping
Physical Links
Synchronous connection oriented (SCO)
o Allocates fixed bandwidth between point-to-point connection of master and slave o Master maintains link using reserved slots o Master can support three simultaneous links
Types of connections:
Synchronous Connection-Oriented link (SCO) (symmetrical, circuit switched, point-to-point) Asynchronous Connectionless Link (ACL): (packet switched, point-to-multipoint, masterpolls)
Packet Format:
o o Access code: synchronization, when piconet active derived from master Packet header (for ACL): 1/3-FEC, MAC address (1 master, 7 slaves), link type, alternating bit ARQ/SEQ, checksum
72
54
bits bits
8 HEC
Flow 1-bit flow control ARQN 1-bit acknowledgment SEQN 1-bit sequential numbering schemes Header error control (HEC) 8-bit error detection code
Wireless Networks Spring 2005
Payload Format
Payload header
o L_CH field identifies logical channel o Flow field used to control flow at L2CAP level o Length field number of bytes of data
ARQ
o Used with DM and DH packets
Types of packets
SCO packets: Do not have a CRC (except for the data part of DV) and are never retransmitted. Intended for High-quality Voice (HV). Type Payload FEC CRC max-rate kbps
HV1 HV2 HV3 DV (bytes) 10 20 30 10+(1-10)D 1/3 2/3 No 2/3D No No No Yes D 64 64 64 64+57.6D
Channel Control
Major states
o Standby default state o Connection device connected
Inquiry Procedure
Potential master identifies devices in range that wish to participate
o Transmits ID packet with inquiry access code (IAC) o Occurs in Inquiry state
To be discovered node:
o Enters an inquiry_scan mode o When hearing the inquiry_message (and after a backoff procedure) enter an inquiry_response mode: send a Frequency Hop Sync (FHS) packet (BD_ADDR, native clock)
After discovering the neighbors and collecting information on their address and clock, the inquiring node can start a page routine to setup a piconet
Wireless Networks Spring 2005
Page Procedure
Master uses devices address to calculate a page frequency-hopping sequence Master pages with ID packet and device access code (DAC) of specific slave Slave responds with DAC ID packet Master responds with its FHS packet Slave confirms receipt with DAC ID Slaves moves to Connection state
Sniff only listens on specified slots Hold does not support ACL packets
o Reduced power status o May still participate in SCO exchanges
BT device addressing: PARK HOLD SNIFF low power BD_ADDR (48 bits) AM_ADDR ( 3bits): ACTIVE, HOLD, or SNIFF PM_ADDR (8 bits): PARK Mode address (exchanged with the AM_ADDR when entering PARK mode) AR_ADDR (8 bits): not unique used to come back from PARK to ACTIVE state
Wireless Networks Spring 2005
Bluetooth Audio
Voice encoding schemes:
o Pulse code modulation (PCM) o Continuously variable slope delta (CVSD) modulation
Link Management
Manages master-slave radio link Security Service: authentication, encryption, and key distribution Clock synchronization Exchange station capability information Mode management:
o switch master/slave role o change hold, sniff, park modes o QoS
L2CAP
Provides a link-layer protocol between entities with a number of services Relies on lower layer for flow and error control Makes use of ACL links, does not support SCO links Provides two alternative services to upper-layer protocols
o Connectionless service o Connection-oriented service: A QoS flow specification is assigned in each direction
Mobile IP
Mobile IP Requirements
Transparency
o mobile end-systems keep their IP address o continuation of communication after interruption of link possible o point of connection to the fixed network can be changed
Compatibility
o support of the same layer 2 protocols as IP o no changes to current end-systems and routers required o mobile end-systems can communicate with fixed systems
Security
o authentication of all registration messages
Terminology
Mobile Node (MN)
o system (node) that can change the point of connection to the network without changing its IP address
Example network
HA MN
router home network (physical home network for the MN) router (current physical network for the MN) Internet mobile end-system
FA
foreign network
CN
end-system router
Wireless Networks Spring 2005
MN
3
FA
CN
sender
1. Sender sends to the IP address of MN, HA intercepts packet (proxy ARP) 2. HA tunnels packet to COA, here FA, by encapsulation 3. FA forwards the packet to the MN
Wireless Networks Spring 2005
MN
sender
FA
foreign network
CN
receiver
1. Sender sends to the IP address of the receiver as usual, FA works as default router
Overview
home network router HA Internet
CN
router
home network
router HA
2.
router FA
3. MN 4. foreign network
Internet
1. CN router
Network integration
Agent Advertisement
o HA and FA periodically send advertisement messages into their physical subnets o MN listens to these messages and detects, if it is in the home or a foreign network (standard case for home network) o MN reads a COA from the FA advertisement messages
Advertisement
o HA advertises the IP address of the MN (as for fixed systems), i.e. standard routing information o routers adjust their entries, these are stable for a longer time (HA responsible for a MN over a longer period of time) o packets to the MN are sent to the HA, o independent of changes in COA/FA
Wireless Networks Spring 2005
Agent advertisement
0 7 8 15 16 type #addresses code addr. size router address 1 preference level 1 router address 2 preference level 2 ... type length registration lifetime sequence number R B H F M G V reserved COA 1 COA 2 ... ICMP-Type = 0; Code = 0/16; Extension Type = 16 TTL = 1 Dest-Adr = 224.0.0.1 (multicast on link) or 255.255.255.255 (broadcast) 23 24 checksum lifetime 31 R: registration required B: busy H: home agent F: foreign agent M: minimal encapsulation G: generic encapsulation V: header compression
Registration
MN re FA gist requ ration es
t regi s requ tration es t tion istra reg y repl
HA
t Goal: inform the home agent of current location of MN (COA-FA or co-located COA) Registration expires automatically (lifetime) Uses UDP port 434
Encapsulation
original IP header original data
Encapsulation I
Encapsulation of one packet into another as payload
o e.g. IPv6 in IPv4 (6Bone), Multicast in Unicast (Mbone) o here: e.g. IP-in-IP-encapsulation, minimal encapsulation or GRE (Generic Record Encapsulation)
ver.
IHL TOS length IP identification flags fragment offset TTL IP-in-IP IP checksum IP address of HA Care-of address COA ver. IHL TOS length IP identification flags fragment offset TTL lay. 4 prot. IP checksum IP address of CN IP address of MN TCP/UDP/ ... payload
Wireless Networks Spring 2005
Encapsulation II
Minimal encapsulation (optional) [RFC2004]
o avoids repetition of identical fields o e.g. TTL, IHL, version, TOS o only applicable for unfragmented packets, no space left for fragment identification
IHL TOS length IP identification flags fragment offset TTL min. encap. IP checksum IP address of HA care-of address COA lay. 4 protoc. S reserved IP checksum IP address of MN original sender IP address (if S=1) TCP/UDP/ ... payload ver.
Solutions
o o o o sender learns the current location of MN direct tunneling to this location HA informs a sender about the location of MN big security problems!
Change of FA
o packets on-the-fly during the change can be lost o new FA informs old FA to avoid packet loss, old FA now forwards remaining packets to new FA o this information also enables the old FA to release resources for the MN
Wireless Networks Spring 2005
HA
FAold
FAnew
MN
MN changes location
registration
data
data
MN
1
FA
sender
foreign network
CN
receiver
1. MN sends to FA 2. FA tunnels packets to HA by encapsulation 3. HA forwards the packet to the receiver (standard case)
Firewalls
o typically mobile IP cannot be used together with firewalls, special set-ups are needed (such as reverse tunneling)
QoS
o many new reservations in case of RSVP o tunneling makes it hard to give a flow of packets a special treatment needed for the QoS
Security, firewalls, QoS etc. are topics of current research and discussions!