Changes between Version 4 and Version 5 of Tutorials/m0SDN/cTutorial2


Ignore:
Timestamp:
Mar 14, 2010, 11:51:35 PM (15 years ago)
Author:
ssugrim
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Tutorials/m0SDN/cTutorial2

    v4 v5  
    7373
    7474=== Production: SNAC - IP port 6634 ===
    75 On console.sb9 SNAC is preconfigured to listen to port 6634. For the purposes of this example, SNAC will handle the production traffic and as such is not configured to do anything beyond the scope of a simple learning switch. The web interface for SNAC is accessible externally at http://sb9.orbit-lab.org (default credentials).
     75On console.sb9 SNAC is preconfigured to listen to port 6634. For the purposes of this example, SNAC will handle the production traffic and as such is not configured to do anything beyond the scope of a simple learning switch. The web interface for SNAC is accessible externally at https://sb9.orbit-lab.org (default credentials).
    7676
    7777=== Experimental: NOX - IP port 6635 ===
     
    7979For demonstration purposes we will have this controller simply pass traffic. We could manipulate this traffic by configuring NOX to behave differently, or by running a completely different controller that listens on port 6635. Since our model is that "production" traffic is handled by a controller at port 6634 and experimental traffic is handled by a controller at port 6635, it is expected that the states of the port 6635 controller be transient.
    8080
    81 
    82 == TESTS for connectivity ==
     81Using my compiled nox I ran
     82{{{
     83./nox_core -i ptcp:6635 switch packetdump
     84}}}
     85
     86== ASIDE: TESTS for connectivity ==
     87
     88In case your expirement is failing, here are a few sanity checks.
    8389
    8490=== The SNAC controller Web interface ===
     
    8894
    8995=== Inter-node traffic ===
    90 
    91 ==== FIXME probably this will be a script detail ====
    9296
    9397Once the data interfaces are brought up on each of the 4 nodes, they should be discovered by SNAC. Assuming we place them all in the same IP subnet, it should be possible to ping each node from every other node. A simple test can be done as follows:
     
    105109This should be done with independent sessions, as each session will start display traffic information. Once completed SNAC should report an increase in production  traffic, and 4 discovered hosts with the specified ips.
    106110
    107 ==
     111=== High Numbered port Test ===
     112
     113Start a fresh NOX controller instance on sb9 and enable packet dumps
     114{{{
     115root@console:/root/nox/build/src# ./nox_core -i ptcp:6635 switch packetdump
     116}}}
     117
     118Attempt to connect to a high numbered port on a different node (using the Ip of the data interface):
     119{{{
     120root@node1-1:~# telnet 192.168.1.2 10001
     121Trying 192.168.1.2...
     122telnet: Unable to connect to remote host: Connection refused
     123}}}
     124
     125If the traffic is split properly, your controller should register event similar to this:
     126
     127{{{
     128[(Giga-Byte Technology Co.,LTD.):84:9b:30>(Giga-Byte Technology Co.,LTD.):83:a0:5c:IP]([v:4hl:5l:60t:64]TCP cs:8a65[192.168.1.1>192.168.1.2]){44653>10001} seq:3830918239 ack:0 f:0x2
     129[(Giga-Byte Technology Co.,LTD.):83:a0:5c>(Giga-Byte Technology Co.,LTD.):84:9b:30:IP]([v:4hl:5l:40t:64]TCP cs:b76c[192.168.1.2>192.168.1.1]){10001>44653} seq:0 ack:3830918240 f:0x14
     130}}}
     131
     132== The experimental Traffic ==
     133
     134'''''FIXME:This process will probably be Scripted.'''''
     135
     136Our experiment setup is as follows (refer to diagram above):
     137
     138Node1-1: Tracker 192.168.1.1:6969
     139Node1-2: Seeder 192.168.1.2:10001-10005
     140Node1-3: First downloader 192.168.1.3:10001-10005
     141Node1-4: Second downloader (starts 1 Minute later to pull from multiple sources) 192.168.1.4:10001-10005
     142
     143A torrent file and data file were created on node1-1
     144{{{
     145root@node1-1:~# dd if=/dev/zero of=./data.mp3 bs=100MB count=1
     146root@node1-1:~# btmakemetafile data.mp3 http://192.168.1.1:6969/announce
     147root@node1-1:~# scp data.mp3 root@node1-2:
     148root@node1-1:~# scp data.mp3.torrent root@node1-2:
     149root@node1-1:~# scp data.mp3.torrent root@node1-3:
     150root@node1-1:~# scp data.mp3.torrent root@node1-4:
     151}}}
     152
     153We then start the tracker on node1-1 and when the process is running we see:
     154{{{
     155root@node1-1:~# bttrack --port 6969 --dfile tracker.log
     156192.168.1.4 - - [14/Mar/2010:19:44:46] "GET /announce?info_hash=%7Es%D0%B1%03%E5%02%BA%B6c_%7D%D6%DB%E1%A9%F5%CD%BC%DE&peer_id=M3-4-2--7f9e2d5669d8&port=10001&key=8a1ab764&uploaded=0&downloaded=0&left=1000000000&compact=1&event=started HTTP/1.1" 200 33 "-" "Python-urllib/2.6"
     157192.168.1.4 - - [14/Mar/2010:19:44:47] "GET /announce?info_hash=%7Es%D0%B1%03%E5%02%BA%B6c_%7D%D6%DB%E1%A9%F5%CD%BC%DE&peer_id=M3-4-2--7f9e2d5669d8&port=10001&key=8a1ab764&uploaded=0&downloaded=0&left=1000000000&compact=1&event=stopped HTTP/1.1" 200 33 "-" "Python-urllib/2.6"
     158...
     159}}}
     160
     161The seeders and downloaders on the respective nodes output:
     162{{{
     163root@node1-2:~# btdownloadheadless --minport 10001 --maxport 10005 data.mp3.torrent
     164
     165saving:         data.mp3 (953.7 M)
     166percent done:   0.0
     167time left:      checking existing file
     168download to:    /root/data.mp3
     169
     170saving:         data.mp3 (953.7 M)
     171percent done:   0.2
     172time left:      checking existing file
     173download to:    /root/data.mp3
     174...
     175}}}
     176
     177{{{
     178root@node1-4:~# btdownloadheadless --minport 10001 --maxport 10005 data.mp3.torrent
     179saving:         data.mp3 (953.7 M)
     180percent done:   0.0
     181time left:
     182download to:    /root/data.mp3
     183download rate:  0.00 K/s
     184upload rate:    0.00 K/s
     185download total: 0.0 M
     186upload total:   0.0 M
     187
     188saving:         data.mp3 (953.7 M)
     189percent done:   9.5
     190time left:      5 min 55 sec
     191download to:    /root/data.mp3
     192download rate:  2497.60 K/s
     193upload rate:    665.95 K/s
     194download total: 91.5 M
     195upload total:   19.8 M
     196...
     197}}}
     198root@node1-3:~# btdownloadheadless --minport 10001 --maxport 10005 data.mp3.torrent
     199saving:         data.mp3 (953.7 M)
     200percent done:   1.9
     201time left:      6 min 57 sec
     202download to:    /root/data.mp3
     203download rate:  2556.24 K/s
     204upload rate:    223.78 K/s
     205download total: 18.8 M
     206upload total:   2.5 M
     207...
     208{{{
     209
     210Finally on the Nox controller we should see events like this:
     211{{{
     212NOX 0.8.0~full~beta (nox_core), compiled Mar 14 2010 16:21:17
     213Compiled with OpenFlow 0x97 (exp)
     214[(Giga-Byte Technology Co.,LTD.):84:9b:30>(Giga-Byte Technology Co.,LTD.):83:a0:5c:IP]([v:4hl:5l:60t:64]TCP cs:8a65[192.168.1.1>192.168.1.2]){44653>10001} seq:3830918239 ack:0 f:0x2
     215[(Giga-Byte Technology Co.,LTD.):83:a0:5c>(Giga-Byte Technology Co.,LTD.):84:9b:30:IP]([v:4hl:5l:40t:64]TCP cs:b76c[192.168.1.2>192.168.1.1]){10001>44653} seq:0 ack:3830918240 f:0x14
     216[(Giga-Byte Technology Co.,LTD.):84:9b:30>(Giga-Byte Technology Co.,LTD.):85:9b:64:IP]([v:4hl:5l:60t:64]TCP cs:8d0d[192.168.1.1>192.168.1.4]){45508>10001} seq:1710024440 ack:0 f:0x2
     217...
     218}}}
     219
     220