Part2: SDNs
Last time? MPLS Multi Protocol Label Switching Layer 2.5 protocol Label distribution protocols LDP RSVP
Per router control plane Individual routing algorithm components in each and every router interact with each other in control plane to compute forwarding tables Routing Algorithm Local forwarding table header 0100 0110 0111 1001 output 3 2 2 1 control plane data plane Slide 3
Logically centralized control plane A distinct (typically remote) controller interacts with local control agents (CAs) in routers to compute forwarding tables Remote Controller CA CA CA CA CA control plane data plane Slide 4
Software defined networking (SDN) 4. programmable control applications routing access control load balance 3. control plane functions external to data-plane switches Remote Controller CA CA CA CA CA control plane data plane 2. control, data plane separation 1: generalized flowbased forwarding (e.g., OpenFlow)
SDN perspective: data plane switches Data plane switches fast, simple, commodity switches implementing generalized data-plane forwarding (Section 4.4) in hardware switch flow table computed, installed by controller API for table-based switch control (e.g., OpenFlow) defines what is controllable and what is not protocol for communicating with controller (e.g., OpenFlow) routing network-control applications access control load balance northbound API SDN Controller (network operating system) southbound API SDN-controlled switches Slide 6 control plane data plane
SDN perspective: SDN controller SDN controller (network OS): maintain network state information interacts with network control applications above via northbound API interacts with network switches below via southbound API implemented as distributed system for performance, scalability, faulttolerance, robustness routing network-control applications access control load balance northbound API SDN Controller (network operating system) southbound API control plane data plane SDN-controlled switches Slide 7
SDN perspective: control applications network-control apps: brains of control: implement control functions using lower-level services, API provided by SND controller unbundled: can be provided by 3 rd party: distinct from routing vendor, or SDN controller routing network-control applications access control load balance northbound API control plane SDN Controller (network operating system) southbound API data plane SDN-controlled switches Slide 8
Generalized Forwarding Each router contains a flow table that is computed and distributed by a logically centralized routing controller and SDN logically-centralized routing controller control plane data plane local flow table headers counters actions 0100 1101 3 2 1 values in arriving packet s header Slide 9
OpenFlow protocol OpenFlow Controller operates between controller, switch TCP used to exchange messages optional encryption OpenFlow messages: controller-to-switch Slide 10 asynchronous
OpenFlow: controller-to-switch messages OpenFlow Controller Key controller-to-switch messages features: controller queries switch features, switch replies configure: controller queries/sets switch configuration parameters modify-state: add, delete, modify flow entries in the OpenFlow tables packet-out: controller can send this packet out of specific switch port Slide 11
OpenFlow: switch-to-controller messages OpenFlow Controller Key switch-to-controller messages packet-in: transfer packet (and its control) to controller. See packet-out message from controller flow-removed: flow table entry deleted at switch port status: inform controller of a change on a port. Slide 12
OpenFlow data plane flow: defined by header fields abstraction generalized forwarding: simple packet-handling rules Pattern: match values in packet header fields Actions: for matched packet: drop, forward, modify, matched packet or send matched packet to controller Priority: disambiguate overlapping patterns Counters: #bytes and #packets Flow table in a router (computed and distributed by controller) define router s match+action rules Slide 13
OpenFlow data plane flow: defined by header fields abstraction generalized forwarding: simple packet-handling rules Pattern: match values in packet header fields Actions: for matched packet: drop, forward, modify, matched packet or send matched packet to controller Priority: disambiguate overlapping patterns Counters: #bytes and #packets * : wildcard 1. src=1.2.*.*, dest=3.4.5.* à drop 2. src = *.*.*.*, dest=3.4.*.* à forward(2) 3. src=10.1.2.3, dest=*.*.*.* à send to controller Slide 14
OpenFlow: Flow Table Entries Rule Action Stats Packet + byte counters 1. Forward packet to port(s) 2. Encapsulate and forward to controller 3. Drop packet 4. Send to normal processing pipeline 5. Modify Fields Switch Port VLAN ID MAC src MAC dst Eth type IP Src IP Dst IP Prot TCP sport TCP dport Link layer Network layer Transport layer Slide 15
Examples Firewall: Switch MAC Port src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Forward * * * * * * * * * 22 drop do not forward (block) all datagrams destined to TCP port 22 Switch MAC Port src * MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Forward 128.119.1. * * * * 1 * * * * drop do not forward (block) all datagrams sent by host 128.119.1.1 Slide 16
Destination-based forwarding: Switch MAC Port src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * 51.6.0.8 * * * port6 IP datagrams destined to IP address 51.6.0.8 should be forwarded to router output port 6 Destination-based layer 2 (switch) forwarding: Switch MAC Port src * 22:A7:23: 11:E1:02 MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * port3 layer 2 frames from MAC address 22:A7:23:11:E1:02 should be forwarded to output port 6 Slide 17
OpenFlow abstraction match+action: unifies different kinds of devices Router match: longest destination IP prefix action: forward out a link Switch match: destination MAC address action: forward or flood Firewall match: IP addresses and TCP/UDP port numbers action: permit or deny NAT match: IP address and port action: rewrite address and port Slide 18
OpenFlow example match IP Src = 10.3.*.* IP Dst = 10.2.*.* action forward(3) Host h5 10.3.0.5 2 3 1 s3 4 Host h6 10.3.0.6 Example: datagrams from hosts h5 and h6 should be sent to h3 or h4, via s1 and from there to s2 controller match ingress port = 1 IP Src = 10.3.*.* IP Dst = 10.2.*.* 2 4 Host h1 3 10.1.0.1 Host h2 10.1.0.2 action forward(4) 1 s1 s2 1 2 Host h3 10.2.0.3 3 4 match ingress port = 2 IP Dst = 10.2.0.3 ingress port = 2 IP Dst = 10.2.0.4 Slide 19 Host h4 10.2.0.4 action forward(3) forward(4)
Part 3 Wireless and mobile networks: 1. Wireless technologies 2. Mobility 3. SURFnet visit on Tuesday 20
Block 3: Lecture 1 Part 3: Wireless networks Wireless networks
Optical transmission range
Optical Spectrum UV Visible IR 125 GHz/nm λ Light 850 nm Ultraviolet (UV) 980 nm 1310 nm Visible Infrared (IR) Communication wavelengths 850, 1310, 1550 nm 1480 nm 1550 nm 1625 nm Low-loss wavelengths Specialty wavelengths 980, 1480, 1625 nm
Radio range
Basic of transmission Antenna radiates em wave Antenna pick up em wave A radio antenna and a tuner, ie a resonator tuned on a particular frequency or frequency band Directional antennas Omnidirectional antennas
Wave propagation Reflection Polarization Diffraction Absorption Refraction Attenuation: Reduces power level with distance Dispersion and Nonlinearities: Erodes clarity with distance and speed
Wireless links
Noise Unwanted signal Man made Naturally occurring White noise Signal to noise ratio (SNR)
Interference Signals generated by communications devices operating at roughly the same frequencies may interfere with one another Signal to interference and noise ratio (SINR) is another metric used in assessment of channel quality
Fading Strength of the signal decreases with distance between transmitter and receiver: path loss Slow fading (shadowing) is caused by large obstructions between transmitter and receiver Fast fading is caused by scatterers in the vicinity of the transmitter
Wireless spectrum
Wireless Spectrum (1) Broadcast TV VHF: 54 to 88 MHz, 174 to 216 MHz UHF: 470 to 806 MHz 30 MHz 300 MHz 3 GHz 30 GHz FM Radio 88 to 108 MHz Digital TV 54 to 88 MHz, 174 to 216 MHz, 470 to 806 MHz
Wireless Spectrum (2) 3G Broadband Wireless 746-794 MHz, 1.7-1.85 GHz, 2.5-2.7 GHz 30 MHz 300 MHz 3 GHz 30 GHz Cellular Phone 800-900 MHz Personal Communication Service (PCS) 1.85-1.99 GHz
Wireless Spectrum (3) Wireless LAN (IEEE 802.11b/g) 2.4 GHz Wireless LAN (IEEE 802.11a) 5 GHz 30 MHz 300 MHz 3 GHz 30 GHz Bluetooth 2.45 GHz Local Multipoint Distribution Services (LMDS) 27.5-31.3 GHz
Characteristics of wireless link standards 200 802.11n Data rate (Mbps) 54 5-11 4 1.384 802.15 802.11a,g 802.11b 802.11a,g point-to-point 802.16 (WiMAX) UMTS/WCDMA-HSPDA, CDMA2000-1xEVDO UMTS/WCDMA, CDMA2000 3G data 3G cellular enhanced.056 IS-95, CDMA, GSM 2G Indoor 10-30m Outdoor 50-200m Mid-range outdoor 200m 4 Km Long-range outdoor 5Km 20 Km
Wireless networks
Wireless networks Three types related to range of radio coverage: Wireless personal area network (WPAN) Range of ~10meters. Master device communicates with (up to) 7slave devices. Wireless LANs (WLANs) Range of 100meters. All stations communicate via an access point (AP). Cellular radio networks Large coverage, i.e. entire countries. Network is divided in smaller areas (cell) using different frequency subbands.
Technology space Complexity/power/cost 802.11a CC1000 802.15.4 Zigbee Bluetooth 38.4 Kbps 802.11b 250 Kbps 720 Kbps 11Mbps 802.11g 54Mbps Data rate
Elements of a wireless network network infrastructure
Wireless hosts network infrastructure laptop, smartphone run applications may be stationary (nonmobile) or mobile wireless does not always mean mobility
Base stations network infrastructure typically connected to wired network relay - responsible for sending packets between wired network and wireless host(s) in its area e.g., cell towers, 802.11 access points
BSS Basic Service Set (BSS): wireless hosts that can communicate to each other access point (AP): base station The BSS has an identification (ID) called the BSSID, which is: the MAC address of the access point servicing the infrastructure BSS. It is generated in an IBSS AP BSS 1
Ad hoc mode (IBSS) Also called Indendepent BSS. no base stations nodes can only transmit to other nodes within link coverage nodes organize themselves into a network: route among themselves
Infrastructure mode network infrastructure base station connects mobiles into wired network handoff: mobile changes base station providing connection into wired network
Bluetooth
Bluetooth characteristics Operates in the 2.4 GHz range, using FHSS Short range Up to 10 m Around 700 kbps No need for infra-structure (ad hoc) Low power consumption
Piconets
802.15: pan less than 10 m diameter replacement for cables (mouse, keyboard, headphones) ad hoc: no infrastructure master/slaves: slaves request permission to send (to master) master grants requests 802.15: evolved from Bluetooth specification 2.4-2.5 GHz radio band up to 721 kbps S M S P S P M P S P Master device Slave device radius of coverage P Parked device (inactive)
Pause
WiFi
Wireless LANs When used? As extension/complementary to the wired LAN, for cost effectiveness. Cross building interconnects Nomadic access
IEEE 802.11 Wireless LAN 802.11b 2.4unlicensed spectrum up to 11 Mbps 802.11a 5GHz range up to 54 Mbps 802.11g 2.4GHz range up to 54 Mbps 802.11n: multiple antennae 2.4 or 5 GHz range up to 600 Mbps
802.11 channels In the 2.4 GHz range: 14 channels spaced 5 MHz apart. Protocols requires 25 MHz of channel separation to function. The AP admin chooses frequency for AP Interference possible: channel can be same as that chosen by neighboring AP
Channel selection: 1,6,11 in the Us 1,5,9,13 in the rest of the world
Association A wireless host must associate with an AP. This establishes the identity and the address of host The host: scans channels, listening for beacon frames containing AP s name (SSID) and MAC address selects AP to associate with may perform authentication will typically run DHCP to get IP address in AP s subnet
Scanning Passive scanning 1. Beacon frames sent from APs (10beacons/sec); 2. Host listens on each channel periodically 3. Association Request frame sent: H1 to selected AP 4. Association Response frame sent: H1 to selected AP Active scanning 1. Probe Request frame broadcast from H1 2. Probes response frame sent from APs 3. Association Request frame sent 4. Association Response frame sent BBS 1 BBS 2 BBS 1 BBS 2 AP 1 1 2 1 3 AP 2 AP 1 2 1 2 3 4 AP 2 H1 H1
Media access
Motivation Can we apply media access methods from fixed networks? Example CSMA/CD Carrier Sense Multiple Access with Collision Detection send as soon as the medium is free, listen into the medium if a collision occurs (original method in IEEE 802.3) Problems in wireless networks signal strength decreases proportional to the square of the distance the sender would apply CS and CD, but the collisions happen at the receiver it might be the case that a sender cannot hear the collision, i.e., CD does not work furthermore, CS might not work if, e.g., a terminal is hidden
Contention for the Medium packets C A B If A and B simultaneously transmit to C over the same channel, how can C correctly decode received information? Need for medium access control mechanisms
Motivation - hidden and exposed terminals Hidden terminals A sends to B, C cannot receive A C wants to send to B, C senses a free medium (CS fails) collision at B, A cannot receive the collision (CD fails) A is hidden for C Exposed terminals A B C B sends to A, C wants to send to another terminal (not A or B) C has to wait, CS signals a medium in use but A is outside the radio range of C, therefore waiting is not necessary C is exposed to B
Motivation - near and far terminals Terminals A and B send, C receives signal strength decreases proportional to the square of the distance the signal of terminal B therefore drowns out A s signal C cannot receive A A B C
Collision avoidance
Multiple access CSMA/CA Carrier sense multiple access / Collision avoidance (Different from the CSMA/CD - collision detection - used in shared Ethernet media) Two main ideas: 1. Sense/listen before transmitting 2. don t collide with ongoing transmission by other node A C Hidden terminal problem B
DCF
Distributed Coordinated Function Supported by all wireless stations. Basic Time Parameters sender receiver Slot Time: basic unit of backoff algorithm = Time required for station to sense end of frame, start transmitting, and beginning of frame to propagate to others SIFS: Short Inter-Frame Space DIFS data = Time required for station to sense end of frame and start transmitting DIFS: DCF Inter-Frame Space = Time to wait before starting backoff interval ("contending ) = SIFS + 2 slot times ACK SIFS
Back-off If medium is free for DIFS transmit else back off: Wait for medium to be free for DIFS Choose a random r in [0,CW] where CW contention window While r > 0: sense medium for one slot time if medium free throughout slot r := r 1 transmit frame r=6 DIFS Busy DIFS Frame 6 5 4 3 2 1
A backoff illustration
Avoiding collisions idea: allow sender to reserve channel rather than random access of data frames: avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but they re short) BS broadcasts clear-to-send CTS in response to RTS CTS heard by all nodes sender transmits data frame other stations defer transmissions avoid data frame collisions completely using small reservation packets
Collision Avoidance: RTS-CTS exchange A AP B RTS(A) RTS(A) reservation collision RTS(B) CTS(A) CTS(A) DATA (A) defer time ACK(A) ACK(A)
sender receiver ACK idle RxBusy time-out NAK; RTS wait for ACK packet ready to send; RTS wait for the right to send CTS; data time-out; RTS data; ACK time-out data; NAK idle wait for data RTS; CTS ACK: positive acknowledgement NAK: negative acknowledgement RTS; RxBusy RxBusy: receiver busy
DCF scheme
802.11 frames
802.11 frame: addressing frame control 2 2 6 6 6 2 6 0-2312 4 duration address 1 address 2 address 3 seq control address 4 payload CRC Address 1,2,3 and 4: different meaning depending on use case: a frame sent from/to Aps or end stations General rule of thumb: address 1 receiver address 2 sender address 3 for filtering by the receiver
802.11 address fields
Addressing within subnet H2 H1 H2 MAC addr AP MAC addr H1 MAC addr address 1 address 2 address 3 AP MAC addr H1 MAC addr H2 MAC addr 802.11 frame address 1 address 2 address 3 802.11 frame
H1 R1 router Internet AP 802.3 frame AP MAC addr H1 MAC addr R1 MAC addr address 1 address 2 address 3 R1 MAC addr H1 MAC addr dest. address source address 802.11 frame
Mobility within same subnet H1 remains in same IP subnet: IP address can remain same switch: which AP is associated with H1? self-learning switch will see frame from H1 and remember which switch port can be used to reach H1 BBS 1 H1 BBS 2
Frame control duration of reserved transmission time (RTS/CTS) frame control 2 2 6 6 6 2 6 0-2312 4 duration address 1 address 2 address 3 seq control address 4 payload CRC Protocol version 2 2 4 1 1 1 1 1 1 Type Subtype To AP From AP More frag 1 1 Power Retry mgt More data WEP Rsvd frame type (RTS, CTS, ACK, data) Type of encryption used
Tested home reading View the video: Location Identifier Separation Protocol: https://www.youtube.com/watch? v=ecdadddslja (Time for fun? The GIST of LISP: https://www.youtube.com/watch? v=lkrv1qb8uqa)
Literature Few slides were adapted from: Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009 Chapter 10 - Cellular Wireless Networks Chapter 13. Wireless LAN Technology. Chapter 14. IEEE 802.11 Wireless LAN Standard. Chapter 15. Bluetooth. Chapter 6 - Wireless and mobile networks Chapter 4 - Telecommunication systems
Not tested reading The BSD Packet Filter: A New Architecture for User-level Packet Capture By Mc Canne and Van Jacobsen In: http://www.tcpdump.org/papers/bpf-usenix93.pdf