Cycle 7 / Lecture 14
Transcription
Cycle 7 / Lecture 14
Cycle 7 / Lecture 14: Software-Defined Networking, End-host Applications CS 498: Systems and Networking Lab Matthew Caesar April 25, 2012 1 Innovation in the network • Things service providers would like to do – – – – Mobility management Network-wide energy management New naming/addressing schemes Network access control • Problem with our network – – – – Paths are fixed (by the network) IP-only Addresses dictated by DNS, DHCP, etc No means to add our own processing 2 What routers look like today •? App App Routing, management, mobility management, access control, VPNs, … App Operating System Specialized Packet Forwarding Hardware Million of 5400 RFCs Barrier to entry lines of source code 500M gates Bloated Power Hungry 10Gbytes RAM 3 IPSec Firewall Router Software Control OSPF-TE HELLO HELLO RSVP-TE HELLO Hardware Datapath Many complex functions baked into the infrastructure OSPF, BGP, multicast, differentiated services, Traffic Engineering, NAT, firewalls, MPLS, redundant layers, … An industry with a “mainframe-mentality” 4 Glacial process of innovation made worse by captive standards process Deployment Idea Standardize Wait 10 years • Driven by vendors • Consumers largely locked out • Glacial innovation 5 Experimenter’s Dream (Vendor’s Nightmare) Standard sw Network hw Processing Userdefined Processing Experimenter writes experimental code on switch/router No obvious way to do this Commercial vendor won’t open software and hardware development environment Complexity of support Market protection and barrier to entry Hard to build my own Prototypes are flakey Software only: Too slow Hardware/software: Fanout too small (need >100 ports for wiring closet) Furthermore, we want… • Isolation: Regular production traffic untouched • Virtualized and programmable: Different flows processed in different ways • Equipment we can trust in our wiring closet • Open development environment for all researchers (e.g. Linux, Verilog, etc). • Flexible definitions of a flow Individual application traffic Aggregated flows Alternatives to IP running side-by-side … The solution: OpenFlow • An open standard to run experimental protocols in campus networks – Added as a feature to commercial switches, routers, and access points • Widescale recent industry adoption – Supported by Cisco, IBM, HP, NEC, etc – Deployed at Microsoft, Facebook, Google, Verizon, Yahoo!, etc • 100% of Google’s backbone is OpenFlowenabled – www.openflow.org 9 OpenFlow Switching Controller OpenFlow Switch specification OpenFlow Switch sw Secure Channel hw Flow Table PC Flow Table Entry “Type 0” OpenFlow Switch Rule Action Stats Packet + byte counters 1. 2. 3. 4. Forward packet to port(s) Encapsulate and forward to controller Drop packet Send to normal processing pipeline Switch MAC MAC Eth VLAN IP Port src dst type ID Src + mask IP Dst IP Prot TCP TCP sport dport OpenFlow “Type 1” • Spec available on www.openflow.org • Additional actions Rewrite headers Map to queue/class Encrypt • More flexible header Allow arbitrary matching of first few bytes • Support multiple controllers Load-balancing and reliability Secure Channel • • • • SSL Connection, site-specific key Controller discovery protocol Encapsulate packets for controller Send link/port state to controller OpenFlow Usage Models 1. Experiments at the flow level User-defined routing protocols Admission control Network access control Network management Energy management VOIP mobility and handoff … • Experiment-specific controllers • Static or dynamic flow-entries 2. Experiments at the packet level Slow: Controller handles packet processing Fast: Redirect flows through programmable hardware Modified routers, firewalls, NAT, congestion control… 3. Alternatives to IP Lab 7: Creating an Ethernet Switch • In Lab 7, you’ll create a learning switch using OpenFlow – Unlike traditional Ethernet, all functions done at the controller – Broadcast, spanning tree, learning • Next: a refresher of how learning switches work 15 Learning Bridges • Suppose Source sends a frame to Dest – Which LANs should a frame be forwarded on? • Trivial algorithm – Forward all frames on all (other) LAN’s – Potentially heavy traffic and processing overhead • Optimize by using address information – – – – “Learn” which hosts live on which LAN Maintain forwarding table Only forward when necessary Reduces bridge workload dest A B source Learning Bridges • Bridge learns table entries based on source address – When receive frame from A on port 1 add A to list of hosts on port 1 – Time out entries to allow movement of hosts • Table is an “optimization”, meaning it helps performance but is not mandatory • Always forward broadcast frames Port 1 A B C Bridge Port 2 X Y Z Host Port A 1 B 1 C 1 X 2 Y 2 Z 2 Learning Bridges • Examples – Frame for A received on port 1: do nothing – Frame for C received on port 2: forward to port 1 – Frame for S received on port 2: forward to port 1 Port 1 A B C Bridge Port 2 X Y Z Networked Games 19 Today: Networked Games • What are networked games? • How are they designed and hosted? • Security/Cheating in networked games 20 Overview of Networked Games 21 Online Games • Computer games are a fast-growing business – Revenues already twice that of movies – MMORPG revenues alone are >$3 billion • Spurred by popularity of Flash and Java • Increasingly associated with online communities and social networks • Varying business models – Pay up front, advertising based, pay for unlocking content, virtual currency 22 Genres of Online Games • FPS (First-person shooters) – You control a gun/crosshair – You shoot and kill other players doing the same • MMORPG (Massively multi-player on-line roleplaying games) – You control an avatar – You kill other avatars to gain loot and power • RTS (Real-time strategy) – You control an army – You go head-to-head against another player’s army 23 Popular FPS Games • Half-Life/Counter-Strike (1/2), Battlefield (2 & 2142) • Wolfenstein: Enemy Territory, Call of Duty (1/2) 24 Popular MMORPG Games • World of Warcraft, Lineage (1 & 2) • Runescape, Final Fantasy XI, EverQuest (1 & 2) 25 Popular RTS Games • Warcraft 3/Starcraft, Age of Empires • Warhammer 40000, Command & Conquer 3 26 Challenges in Network Game Design • Need for consistent views across players – Player A thinks I got shot, but I didn’t see the bullet yet • Large Scale: Extremely large numbers of clients – Apple’s gaming platform has >67 million active users • Clients can be malicious – People sometimes cheat to win the game or make money • Bandwidth-constrained clients – Insufficient capacity, especially in upload direction – Heterogeneous capacities across clients 27 Gaming architectures • Hosted – Racks of servers in data centers – Example: OnLive (games on the cloud) – Advantages: easier to manage and secure game, easier to guarantee resources, privacy of client data, compatible with advertising and content-unlocking business models • Unhosted – P2P sessions formed autonomously between clients – Advantages: reduced hosting costs, avoids bandwidth bottlenecks, no need to trust/coordinate with game provider • Hybrid – Host only subsets of the game – Best (or worst?) of both worlds 28 Idea #1: Constrain updates to Area of Interest (AOI) • Observation: players only interact with other players within “Area of Interest” (AOI) AOIs – Players within local area or field of view • Idea: – Restrict communication updates to other players within AOI – Reduces bandwidth/computation overheads – Problem: might not scale to large battles 29 Idea #2: Reduce update rate with Dopplegangers • Observation: some players are more interesting than other players Doppelgangers Interest Sets – More important to get updates about guy about to shoot me than some guy I’m not even looking at – Limitation of human cognition • Humans focus on small set of players • Idea: do lower-bandwidth updates for non-interesting players – High-fidelity updates only for interesting players 30 How to measure player interest? • Lots of ways to do this • One example approach (Donnybrook): • Aij = Player i’s Attention value to Player j aij – Weighted function of • Proximity: dist(i,j) • Aim : aij • Recency of interaction: tij • Render top-5 most interesting players with high fidelity Sniping dist(i,j) 31 Idea #3: Avoid imbalanced load by multicasting updates “Very” interesting player • Interest sets significantly reduce bandwidth requirements – But have heterogeneity in interest • Problem: player “very interesting” Forwarding pool – Upload bandwidth limitations • Solution: – Forward through a subset of players • E.g., randomly chosen from forwarding pool – Can advertise membership information through control messages Interested players Capture The Flag 32 Idea #4: Client-side lag compensation • Observation: we can’t let clients decide their own position – They could cheat – Hence, server should be responsible for computing position • Problem: delay between server updates – Makes movement jumpy • Idea: Client compensates via interpolation – Client computes a smooth change in position between updates 33 Idea #5: Dead reckoning • Problem: updates may get delayed or lost in the network • Observation: we can predict the player’s position based on current position and velocity • Idea: Dead reckoning – Calculating player’s position based on previously observed position, estimated speed and course, and time since last update – Client project into future , or server rewinds into past, using linear physics – Advantage: can hide delay/loss – Disadvantage: errors/uncertainties are cumulative, grow with time 34 Cheating in Networked Games 35 Cheating • Achilles heel of the PC gaming platform – Must be fixed to compete with consoles – Causes legitimate, paying players to quit – Creates bad word-of-mouth to discourage new players – Wrecks virtual economies in MMORPGs • Why study cheating? – Important problem in gaming – Gives insights on how to secure large distributed systems 36 Types of cheats • Information exposure – Wallhacks (OGC), Maphacks (Warcraft 3), Chest hacks (showEQ) • Automation – Aimbot (OGC), Troop command macros (Warcraft 3), Auto-looting (WoW QuickLoot), AFK bots • Protocol – Reset cheat (Half-Life), Unit fabrication (Warcraft 3), Item duping (MMO), Speed hack (Half-Life), Hit point hack (Diablo), Disconnect cheat • Game bugs – Game-specific coding errors that lead to unintended behavior Information exposure cheats • Server or peer sends complete information to other client – Cheat reveals information that should be hidden • Wallhack – Quake 4 – released 10/18/2005 – Call of Duty 2 – released 10/25/2005 (Server boycott due to cheats) Information exposure cheats • Maphack (reveal map and enemy units) – Warcraft3 without Maphack Information exposure cheats • Maphack (reveal map and enemy units) – Warcraft3 with Maphack Information exposure cheats • Chest hacks – Information about what loot is available in map exposed – Player goes straight to the locations with the best loot Automation cheats • Automate game activities via Bots • Aimbots – OGC – Automate aiming in FPS • Macros and game bot farming – MacroQuest for EQ2 – Automate wealth acquisition via programs Protocol cheats • Hit point cheating – Diablo protocol messages indicating damage done to enemy – Inject messages with inflated damage to instantly kill opponent • Item duping – Disconnect while dropping item – Ambiguity in whether event happened globally • Speed hack – Inject movement messages to make your character move or fire “faster” than normal Types of cheats • Information exposure – Wallhacks: lets player see through opaque objects – Maphacks: lets player see more of a level than intended by developer – Chesthacks: information about what loot is available on map is exposed • Automation – Aimbot: helps target acquisition and automatically shoots opponent – Troop command macros: replicates commands across units – Auto-looting: helps grab items in area 44 – AFK bot: keeps session active or repeats task while “away from keyboard” Types of cheats • Protocol – – – – Reset cheat: return character to earlier state Unit fabrication: create new units/weapons Item duping: create a copy of an existing item Speed hack: adjust speed of game (eg slow down, run faster) – Hit point hack: prevent HP from decrementing – Disconnect cheat: guy about to lose can disconnect • Game bugs – Game-specific coding errors that lead to unintended behavior 45 Software methodology of cheats • How they do it – Proxy • Use separate machine to modify network packets (aimproxies) – Program external to game • Separate process running at higher privilege level • In-kernel modules • Graphics/IO drivers (see-through drivers) • Additional layer between game and Windows/DirectX – Library that hijacks game calls • Runs in address space of game Software methodology of cheats • How they hide from anti-cheats – Ability to disassemble signatures being checked • Polymorphism to thwart file and memory signatures – Run in privileged mode or in-kernel to prevent anti-cheat from accessing it – Automatic disable when anti-cheat code is about to run – Automatic disable when new anti-cheat distributed Anti-cheats • • • • • HLGuard (United admins) Cheating Death (United admins) PunkBuster Warden Intel AMT Anti-cheats • Scanners – Continuously scan memory and filesystem for foreign libraries and cheats • Randomize to keep cheats honest • Steam and VAC, PunkBuster • Heuristics not perfect: Steam and modified OpenGL drivers • Remote screenshot – Provide a facility for dumping a player’s screen remotely • PunkBuster Anti-cheats • Authentic peripherals – Trusted keyboard/mouse clicks • Hardware signing its movement and clicks – Trusted network output • Cryptographic timestamping/ordering • Prevent look-ahead cheats • Continuous player performance monitoring – HLGuard • Machine learning of reasonable human reaction time • Ban those who react too fast • Prone to false positives – Cal-I (Cyberathlete league) players Cheating links • General – http://rpgexploits.com – http://msxsecurity.com – http://zerogamers.com • WoW – WoW Glider • http://wowglider.com – WoW radar, WoW Sharp, ByteBot, GALB – WardenNet, ISXWarden (anti-anti-cheats) • http://ismods.com/warden • http://edgeofnowhere.cc/viewtopic.php?t=311208 • http://www.rootkit.com/newsread.php?newsid==360 – ISXWoW • http://ismods.com/downloads.php Cheating links • Half-Life – OGC • http://mpcdownloads.com • http://www.mpcforum.com/showthread.php?t= 31409 • EverQuest 2 – MacroQuest • http://sourceforge.net/projects/macroquest Anti-cheat links • WoW Warden – http://www.ismods.com/warden • PunkBuster – http://punkbuster.com • Valve Anti-Cheat (VAC) – http://server.counterstrike.net/server.php?cmd=VAC • HLGuard, Cheating-Death – http://unitedadmins.com • Intel’s AMT – http://www.intel.com/go/iamt/ Course Recap 54 Cycle Topic Description 1. Network administration Network defense, troubleshooting, and design 2. ISP networks Routing protocols, ISP systems, how to run your own ISP 3. Equipment and Devices Router, switch, server, and network architectures 4. Server Software Architectures Socket and network programming, server software architectures 5. Distributed Services Content distribution networks, wide-area deployment, coordination protocols 6. OS Network Stacks Linux kernel internals, network stacks, service-customized OS 7. Networked applications Software-defined networking Networked games Overview of Cycles 55 Network Administration and ISP Operations • Jobs: ISP Operator, Network Admin • Responsibilities: – Select and purchase network equipment – Design, configure, and secure networks – Debug and troubleshoot problems • Companies: – ISPs, large enterprises, cloud and data center operators, hosting facilities – AT&T, Verizon, Sprint, Google, Microsoft, UIUC … • Resume keywords: – BGP, OSPF, router configuration, network administration, Cisco IOS Equipment and Devices • Jobs: Device architect, systems architect, network architect • Responsibilities: – Design network equipment (routers, switches, etc) • Internal software and hardware architectures • Testing and management equipment – Network layout, provisioning, and planning • Companies: Cisco, HP, NEC, Huawei, IBM • Resume keywords: performance analysis, network analysis, switch design, router internals 57 Networked Operating Systems • Jobs: OS designer (traditional PC OSes and equipment/device OSes), • Responsibilities – Implementation, design, and performance tuning of network stacks – OS kernel and driver levels, I/O and network stacks • Companies: OS companies (Microsoft, Google, Apple), companies that manage their own inhouse OS (Akamai, Yahoo!), companies that have device-customized OSes (Cisco, HP, Avici) • Resume keywords: Linux kernel, kernel programming, Linux TCP/IP network stack 58 Server Software and Distributed Service Architectures • Jobs: Service architect (Web, Cloud, Database, etc), Distributed system architect • Responsibilities: Building, designing, and tuning: – Infrastructure: middleware, DHTs, locking systems, storage, checkpointing, logging, monitoring, indexing – Applications: social networks, search engines • Companies: Akamai, Facebook, Twitter, Amazon, Microsoft, Google, VMWare, • Resume keywords: DHTs, Planetlab, Emulab, sockets programming, content distribution 59 Software-defined Networking • Jobs: SDN application designer, Network operating system architect • Responsibilities: Deploying and tuning SDN, migrating existing setups to SDN, implementing SDN applications, implementing new SDN infrastructure • Companies: SDN startups (Nicira), companies using SDN (Google, Verizon, Microsoft, Yahoo, Facebook) • Resume keywords: – OpenFlow, NOX, Software-defined Networking 60 Wrapping up • Course feedback? • Questions? 61
Similar documents
Networked Games
into past, using linear physics – Advantage: can hide delay/loss – Disadvantage: errors/uncertainties are cumulative, grow with time
More information