Docstoc

Netkit Easy Emulation of Complex Networks on Inexpensive Hardware

Document Sample
Netkit Easy Emulation of Complex Networks on Inexpensive Hardware Powered By Docstoc
					               UNIVERSITÀ DEGLI STUDI ROMA TRE
               Dipartimento di Informatica e Automazione




      Netkit: Easy Emulation of
       Complex Networks on
       Inexpensive Hardware

                  Maurizio Pizzonia
                 Massimo Rimondini

4th International Conference on Testbeds and Research Infrastructures
 for the Development of Networks & Communities (TridentCom 2008)
                           Mar 18th, 2008
       Netkit in a Nutshell


 software       based on
integration    user mode
  project         linux


                ready to
  tools to     use labs &
   set up       teaching
virtual labs    material
            Overview

Architecture
Supported technologies
Virtual network setup
Applications
Related work
Scalability
              Architecture

Guest OS                    Guest OS
        NIC             NIC
User-Mode                User-Mode
Linux       Virtual hub Linux
Host OS
                      TAP
Host kernel                 forwarding
                                     NIC
                  Architecture

  vhost1                  router                   vhost2
Guest OS                                 Guest OS
                        Quagga
Guest OS       NIC                       NIC
User-Mode
     hostNIC
          machine       NIC                User-Mode
User-Mode ./uml-kernel modules=/home/foo/kernel/modules
   foo@host$
Linux Virtual hub
Linux                 Virtual hub Linux
   name=vhost1 title=vhost1 umid=vhost1 mem=260M
  ubd0=/home/foo/vhost1.disk,/home/foo/fs/fs.img root=98:1
Host OS
  uml_dir=/home/foo/uml/mconsole
  eth0=daemon,,,/home/foo/hubs/vhub_foo_A.cnct
  eth1=daemon,,,/home/foo/hubs/vhub_foo_tap.cnct quiet
                                   TAP
  con0=xterm con1=null SELINUX_INIT=0 █
Host kernel                              forwarding
                                                     NIC
                 Architecture


                      Quagga
Guest OS              Guest OS               Guest OS
       NIC            NIC     NIC            NIC
User-Mode              User-Mode              User-Mode
Linux      Virtual hub Linux      Virtual hub Linux

Host OS
                                 TAP
Host kernel                            forwarding
                                                NIC
                   Architecture
    configure multiple virtual machines
    manage a single user mode linux instance
    set up amachine)
    (virtual virtual lab
    customizable hardware & net configuration
                    ltools

                          vtools
                        Quagga
  host machine
Guest OS                Guest OS                  Guest OS
                    host --eth0=A
foo@host$ vstart vhost1 machine
        NIC
foo@host$
                         Virtual NIC
                 foo@host$ lstart lab
foo@host$ vstart router NIC
                                   █
                                                  NIC
                         --eth0=A --eth1=tap,10.0.0.1,10.0.0.2
                          User-Mode
User-Modevstart vhost2 --eth0=tap,10.0.0.1,10.0.0.3User-Mode
Linux
█           Virtual hub Linux         Virtual hub Linux
     Supported
    Technologies

           virtual machine

           virtual hub software


           virtual machine
           running appropriate
           software

…
           Supported
          Technologies
    • Ethernet 802.3, 802.1d Bridging and Spanning Tree, 802.1Q
     Compile time
      VLAN tagging
  MPLS forwarding
    • MPLS forwarding
     configurations
    • IPv4, IPv6, IP filtering and mangling (NAT, etc.), IPsec
      (transport and tunnel mode, ESP and AH), ARP, ICMP
     provided
    • UDP, TCP, GRE tunnels, Equal cost multipath load balancing,
      PIM-SM
    • ...                      More can
                               be added
    •   DHCP, PPP, DNS, HTTP(S), Web proxy, MTA
    • Debian
        FTP, NFS, Samba
    •   Telnet, SSH
      package
RIP, OSPF, IS-IS, BGP, SNMP
    •   RIP, OSPF, IS-IS, BGP, SNMP
    •
    •
      manager
        RADIUS, PAM, IKE, Snort, Traffic capturing and forging
        Scripting languages
    •   ...
             Setting up a Lab

1. Define nodes
    mkdir as20r1 as20r2 as200r1 as100r1
2. Define topology                  as20r1[0]="A"
                                    as20r1[1]="F"
3. Populate configuration files using native
                                    as20r1[2]="C"
              C
   syntax
   eth1                eth2
                                    as20r2[0]="E"
   Tell nodes toeth1 eth0
                     self configure as20r2[1]="C"
4. as100r1/etc/quagga/bgpd.conf
    eth0
  router bgp 100
  network 100.1.0.0/16                    as200r1[0]="A"
        E
    as100r1.startup  F     A
  neighbor 11.0.0.2 remote-as 20
                                          as200r1[1]="B"
  neighbor 11.0.0.2 descriptionnetmask as20r2 (primary)up
  /sbin/ifconfig eth0 11.0.0.1 Router 255.255.255.252
        eth0    eth1      eth0
  neighbor 11.0.0.2 prefix-list defaultIn in
  /sbin/ifconfig eth1 11.0.0.5 netmask 255.255.255.252 up
  neighbor 11.0.0.2 prefix-list mineOutOnly out
                                          as100r1[0]="E"
  /sbin/ifconfig eth2 100.1.0.1 netmask 255.255.0.0 up
  !        eth2              eth1         as100r1[1]="F"
  ip prefix-list defaultIn seq 5 permit 0.0.0.0/0
  /etc/init.d/quagga start
      J
  ip prefix-list mineOutOnly seq B permit as100r1[2]="J"
                                  5       100.1.0.0/16
                Setting up a Lab
├──   as100r1
│     └── etc
│         └── zebra
│              ├── bgpd.conf
│              └── daemons
├──   as100r1.startup
├──   as200r1
│     └── etc
│         └── zebra
│              ├── bgpd.conf
│              └── daemons
├──   as200r1.startup
├──
│
      as20r1
      └── etc                  Typical size: <200KB
│         └── zebra
│              ├── bgpd.conf   Email/Web friendly


                                     
│              └── daemons
├──   as20r1.startup
├──   as20r2
│     └── etc
│         └── zebra
│              ├── bgpd.conf
│              └── daemons
├──   as20r2.startup
└──   lab.conf
          Ready to Use Labs
Basic topics
  Routing with static routes and RIP
  ARP
Application level
  DNS
  Email
Advanced
  Bridging
  STP
Interdomain Routing
  Prefix filtering
  Stub & Multihomed AS
  Transit AS
               Applications




               Prospective             Actual
            Routing instabilities   IGP–BGP
Research    Protocol                interactions
            development
            Configuration           GARR
Operation   testing                 emulation
         Other Network Emulators


                                               
Communities started around 2002
• L. Peterson, A. Bavier, M. Fiuczynski, and S. Muir. Experiences Building PlanetLab.
                UMLMON
  Proc. OSDI 2006, Nov 2006.                                    VNUML
• L. Peterson and T. Roscoe. The Design Principles of PlanetLab. ACM SIGOPS
  Operating Systems Review, 40(1):11–16, 2006.
• • User-Mode Linux de Madrid • User-Mode Linux
  A. Bavier, N. Politécnica
Universidad Feamster, M. Huang, L. Peterson, and J. Rexford. In VINI Veritas:
                       Einar                         IMUNES
  Realistic and Controlled Network Experimentation. Proc. SIGCOMM 2006, Sep
  F. Galan, D. Fernández. image                 XML
•• No kernel/filesystem Distributed•Virtualization Scenarios Using
  2006.
  P. Mahadevan, D. configuration
  VNUML. Proc. System K. Fall, and A. • Conceived to run as root
• • System wideKrioukov, and Virtualization Management Workshop
                                              Vahdat. A Basis for Systematic Analysis
  • TargetedOct sys admins
  of Network • to 2007 only
                                 ModelNet
  (SVM’07).Topologies. Proc. scale
                  Live•CD                         • Live
                          Large D. Gebhardt, M. Hibler, K.CD only J. Zhang, S.
• R. Ricci, J. Duerig, P. Sanaga,
                                  SIGCOMM 2006, Sep 2006.
                                                            Atkinson,
                                                  • FreeBSD kernel
                • Xen • Galán, T. de Approach to Realistic Emulation of IPv6
• D. Fernández, F. based Flexlab Miguel. Study and Evaluation of Networked
                          Server
  Kasera, and J. Lepreau. The clusters
  Internet Exchange (IX) based Addressing Models. IEEE
                PlanetLab/VINI
University Proc. USENIX NSDI 2007, Apr 2007.& approval
  Systems. of Zagreb Require affiliation
                        •
  Communications Magazine, An Experimentation Workbench            Emulab
• E. Eide, L. Stoller, and J. Lepreau. 42(1):105–112, Jan 2004 for Replayable
  Marko Zec, M. Mikuc. Operating NSDI 2007, Apr 2007.
• Networking Research. Proc. USENIXSystem Support for Integrated Network
• F. Galán, D. Fernández, J. Ruiz, O. Walid, and T. de Miguel. Use of
        Easy Emulation of Complex Networks
  Emulation in IMUNES. Proc. ASPLOS-XI, Oct 2004.
  Virtualization Tools in Computer Network Laboratories. Proc.
  Marko Zec. Implementing a Clonable Network Stack in the FreeBSD
• International Conference on Information Technology Based Higher
  Education andon Inexpensive Hardware Jun 2003.
                  Training (ITHET Technical Conference,
  Kernel. Proc. 2003 USENIX Annual 2004), Jun 2004.
                                        Scalability
                          Pentium 4 3.2GHz, 2GB RAM (~350 €)
                                                                       Current entry
                    Startup time                                       price: >400 €
                    800

                    700

                    600
   Time (seconds)




                    500

            400     400

                    300
                                             VNUML
                    200
                                                             Netkit




                                                                             100
                    100

                      0
# of vms
                          1


                              11


                                   21


                                        31


                                              41


                                                   51


                                                        61


                                                             71


                                                                  81


                                                                        91
              Scalability
   Pentium 4 3.2GHz, 2GB RAM (~350 €)
CPU load during 1GB HTTP transfer

                              1st setting
                              3rd setting
                              2nd setting
                            Scalability
                 Pentium 4 3.2GHz, 2GB RAM (~350 €)
      CPU load during 1GB HTTP transfer
           100
           90                                           VNUML
                                                        Netkit
           80                                           Remote
           70
           60
    %CPU




           50
           40
           30
           20
                                                                 x1
           10
            0
Time (s)         0   20    40    60   80    100   120
                                          Scalability
                               Pentium 4 3.2GHz, 2GB RAM (~350 €)
               CPU load during 1GB HTTP transfer
                           6
                                                                          VNUML
                           5                                              Netkit
                                                                          Remote
    Load average (1 min)




                           4


                           3


                           2


                           1                                                       x1
                           0
Time (s)                       0   20    40    60    80    100      120
                                 Scalability
                 Pentium 4 3.2GHz, 2GB RAM (~350 €)
      CPU load during 1GB HTTP transfer
           100
           90                                                        VNUML
           80                                                        Netkit

           70
           60
    %CPU




           50
           40
           30
           20
                                                                              x5
           10
            0
Time (s)         0   100   200   300   400   500   600   700   800
                                               Scalability
                               Pentium 4 3.2GHz, 2GB RAM (~350 €)
               CPU load during 1GB HTTP transfer
                           9

                           8                                                       VNUML
                           7                                                       Netkit
    Load average (1 min)




                           6

                           5

                           4

                           3

                           2

                           1
                                                                                            x5
                           0
Time (s)                       0   100   200   300   400   500   600   700   800
               So What?
Take home
 Lightweight        Applications
 Easy               Good scalability
 Turn key (labs)

What next?
 UI improvements (e.g., test
 procedure)
 More labs (e.g., ISP topologies)
 Better scalability by distribution
 (VDE?)
         Where to Go Next

    http://www.netkit.org/
Releases & Documentation
  Live CD
Ready to use Labs
Mailing list (138 subscribers) & FAQ
Publications

        Thanks to: You, Giuseppe Di
          Battista, Maurizio Patrignani,
          Stefano Pettini, …