network emulation using linux network namespaces
play

Network Emulation using Linux Network Namespaces Daniel Schubert - PowerPoint PPT Presentation

Chair of Network Architectures and Services Department of Informatics Technical University of Munich Network Emulation using Linux Network Namespaces Daniel Schubert Friday 5 th July, 2019 IITM SS19 Garching b. Mnchen, Germany Chair of


  1. Chair of Network Architectures and Services Department of Informatics Technical University of Munich Network Emulation using Linux Network Namespaces Daniel Schubert Friday 5 th July, 2019 IITM SS19 Garching b. München, Germany Chair of Network Architectures and Services Department of Informatics Technical University of Munich

  2. Agenda • Options for Network Testing • Linux lightweight emulation features • Mininet • Conclusion D. Schubert — Network Emulation using Linux Network Namespaces 2

  3. Introduction Options for Network Testing Hardware Testbed Simulator Emulator accurate inexpensive inexpensive hard to recon fi gure fl exible fl exible expensive might be unrealis � c real code D. Schubert — Network Emulation using Linux Network Namespaces 3

  4. Introduction Hardware Testbed Hardware Switch Switch tap0 tap1 eth0 eth0 Host Host Hardware Host Hardware Host D. Schubert — Network Emulation using Linux Network Namespaces 4

  5. Introduction Network Emulation Hardware Host v Switch tap0 tap1 eth0 eth0 Host Host Virtual machine Virtual machine D. Schubert — Network Emulation using Linux Network Namespaces 5

  6. Introduction Network Emulation Hardware Host Switch veth0 veth1 Virtual Ethernet pairs eth0 eth0 Host Host Network Namespace Network Namespace D. Schubert — Network Emulation using Linux Network Namespaces 6

  7. Linux Emulation Features Namespaces • Isolate one or serveral processes • Own view of system resource • Examples: • Mount Namespace • PID Namespace • Network Namespace D. Schubert — Network Emulation using Linux Network Namespaces 7

  8. Linux Emulation Features Network Namespaces • Individual copy of network stack per namespace • Network devices • Routing tables • Ports ... • • Creation • ip netns add <name> • ip netns exec <name> <command> D. Schubert — Network Emulation using Linux Network Namespaces 8

  9. Linux Emulation Features Network Namespaces • Individual copy of network stack per namespace • Network devices • Routing tables • Ports ... • • Creation • ip netns add <name> • ip netns exec <name> <command> Virtual Ethernet Devices • Always created as interconnected pairs • Acts as tunnel connecting two namespaces • Creation: • ip link add <d1> type veth peer name <d2> • ip link set <d2> netns <d2-namespace> D. Schubert — Network Emulation using Linux Network Namespaces 8

  10. Linux Emulation Features Control Groups • Limit resources for group of processes • Used to emulate CPU limited Hosts D. Schubert — Network Emulation using Linux Network Namespaces 9

  11. Linux Emulation Features Control Groups • Limit resources for group of processes • Used to emulate CPU limited Hosts Linux Traffic Control (tc) • Configure Traffic Control of Linux kernel • Influence how packets are handled at specific interfaces • Used to emulate links with lower bandwidth or delay D. Schubert — Network Emulation using Linux Network Namespaces 9

  12. Linux Emulation Features Creating Emulation Manually 1 1 From [1] D. Schubert — Network Emulation using Linux Network Namespaces 10

  13. Mininet Overview • CLI and API to create and interact with network • Open source project written in Python • Emulation is performed by C-code • Developped as a tool for rapid prototyping of SDNs D. Schubert — Network Emulation using Linux Network Namespaces 11

  14. Mininet Create Emulation with Mininet API 2 2 From [1] D. Schubert — Network Emulation using Linux Network Namespaces 12

  15. Mininet Create Emulation with Mininet API 3 3 From [1] D. Schubert — Network Emulation using Linux Network Namespaces 13

  16. Mininet Create Emulation with Mininet API 4 4 From [1] D. Schubert — Network Emulation using Linux Network Namespaces 14

  17. Mininet Performance Host 1 Host 1 Host 2 Host 2 Switch v Switch v Switch v Switch v Host N Hosts (N) 1 100 500 1000 Switches (N) 1 100 500 1000 Setup (s) 0.103 ± 0.005 0.652 ± 0.033 3.32 ± 0.166 7.06 ± 0.353 Setup (s) 0.104 ± 0.005 5.47 ± 0.273 185.5 ± 9.276 230.95 ± 15.70 RAM (MB) 396 ± 9.17 438 ± 30.52 941 ± 19.49 1570 ± 155.77 RAM (MB) 308 ± 12.17 433 ± 54.41 961 ± 51.43 1737 ± 158.41 NRFR (%) 0.0 0.0 0.0 30.91 NRFR (%) 0.0 0.0 65.08 85.48 [2] D. Schubert — Network Emulation using Linux Network Namespaces 15

  18. Mininet Pros • Fast Setup of Networks • Use real programs on Network Nodes • Runs on a single laptop • Easy to install (included with Ubuntu 12.10) • Easy to use with CLI and Python scripts • Open source • Under active development D. Schubert — Network Emulation using Linux Network Namespaces 16

  19. Mininet Pros • Fast Setup of Networks • Use real programs on Network Nodes • Runs on a single laptop • Easy to install (included with Ubuntu 12.10) • Easy to use with CLI and Python scripts • Open source • Under active development Cons • Resource limits • Only with Linux kernel • By default all hosts share file system and PID space • No timing guarantees • No virtual time D. Schubert — Network Emulation using Linux Network Namespaces 16

  20. Mininet Related Work • ns-3: open source discret-event simulator • Mahimahi: record-and-replay network emulator • Mininet clustering: Split network topology between multiple machines D. Schubert — Network Emulation using Linux Network Namespaces 17

  21. Conclusion • Linux Network Namespaces + Virtual Ethernet Pairs + Open Flow Switches = Lightweight Network Emulation • Mininet offers API to build network conveniently • Networks with several hundred nodes possible • For larger networks distributed Mininet exists/is being developed D. Schubert — Network Emulation using Linux Network Namespaces 18

  22. Bibliography [1] T.-Y. Huang, V. Jeyakumar, B. Lantz, N. Feamster, K. Winstein, and A. Sivaraman. Teaching computer networking with mininet. In ACM SIGCOMM , 2014. [2] P . Isaia and L. Guan. Performance benchmarking of sdn experimental platforms. In 2016 IEEE NetSoft Conference and Workshops (NetSoft) , pages 116–120, June 2016. D. Schubert — Network Emulation using Linux Network Namespaces 19

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend