Changes between Version 16 and Version 17 of ClickExampleExperiment


Ignore:
Timestamp:
06/22/12 14:47:40 (12 years ago)
Author:
Mark Berman
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ClickExampleExperiment

    v16 v17  
    157157Once you have the '''myslice.png''' on your local machine, open it in a browser other viewer program. Your slice will look something like the one below (see [attachment:sampleDiagram.png]). The overall configuration should be the same, with two end hosts, named hostA and hostB, and four routers (top, left, right, bottom) in a diamond configuration. The host names, interface names, and MAC addresses will be different, depending on the actual resources assigned to your slice.
    158158
    159 [[Image(sampleDiagram.png, nolink, 25%)]]
     159[[Image(myslice.png, nolink, 25%)]]
    160160
    161161The four routers interconnected by solid lines are your "core network," which will run a non-standard, non-IP protocol. The dashed lines out to the end hosts carry standard IP traffic.
     
    252252Please note: the interface names and MAC addresses below are for the sample configuration shown in the figure above. You will want to refer to your network diagram to get the correct interfaces and addresses for your configuration.
    253253
    254 Let's take a look at what's happening in the four routers in your configuration. There are two basic router configurations.
     254Let's take a look at what's happening in the four routers in your configuration. There are two basic router configurations. (You can find all of these files on any of your router hosts.)
    255255
    256256=== Packet transformation ===
     
    272272    modify;
    273273
    274 route[0] -> left :: EtherEncap(0x7744, 00:02:b3:35:f1:b7, 00:02:b3:86:1d:13) ->
     274route[0] -> left :: EtherEncap(0x7744, 00:04:23:b7:14:76, 00:04:23:b7:18:fa) ->
    275275    SimpleQueue ->
    276276    Print(outL) ->
    277     ToDevice(eth1);
    278 
    279 route[1] -> right :: EtherEncap(0x7744, 00:03:47:94:c7:fd, 00:02:b3:65:d1:2b) ->
     277    ToDevice(eth2);
     278
     279route[1] -> right :: EtherEncap(0x7744, 00:04:23:b7:1c:e0, 00:04:23:b7:19:2e) ->
    280280    SimpleQueue ->
    281281    Print(outR) ->
    282     ToDevice(eth2);
     282    ToDevice(eth4);
    283283
    284284// This portion accepts non-IP packets
     
    288288restore :: SimpleQueue ->
    289289    Strip(30) ->
    290     EtherEncap(0x800, 00:03:47:73:8e:bd, 00:02:b3:3f:7a:a1) ->
     290    EtherEncap(0x800, 00:04:23:b7:14:77, 00:04:23:b7:20:00) ->
    291291    ToDevice(eth3);
    292292
    293 FromDevice(eth1) -> Classifier(12/7744) -> Print(inL) -> restore;
    294 FromDevice(eth2) ->  Classifier(12/7744) -> Print(inR) -> restore;
     293FromDevice(eth2) -> Classifier(12/7744) -> Print(inL) -> restore;
     294FromDevice(eth4) ->  Classifier(12/7744) -> Print(inR) -> restore;
    295295}}}
    296296
     
    307307{{{
    308308// Copy packets from top to bottom.
    309 FromDevice(eth1) ->
    310     StoreEtherAddress(00:02:b3:86:1a:4b, dst) ->
    311     StoreEtherAddress(00:03:47:95:7a:fe, src) ->
     309FromDevice(eth2) ->
     310    StoreEtherAddress(00:04:23:b7:42:b6, dst) ->
     311    StoreEtherAddress(00:04:23:b7:18:fb, src) ->
    312312    SimpleQueue ->
    313313    Print(top) ->
    314     ToDevice(eth2);
     314    ToDevice(eth3);
    315315// Copy packets from bottom to top.
    316 FromDevice(eth2) ->
    317     StoreEtherAddress(00:02:b3:35:f1:b7, dst) ->
    318     StoreEtherAddress(00:02:b3:86:1d:13, src) ->
     316FromDevice(eth3) ->
     317    StoreEtherAddress(00:04:23:b7:14:76, dst) ->
     318    StoreEtherAddress(00:04:23:b7:18:fa, src) ->
    319319    SimpleQueue ->
    320320    Print(bottom) ->
    321     ToDevice(eth1);
     321    ToDevice(eth2);
    322322}}}
    323323
     
    326326=== Monitoring your core network ===
    327327
    328 Let's watch how the packets travel through the network. In addition to the windows you already have open to the two end hosts, you'll need four more windows to watch the logs for all four routers.  In each window, you should use '''ssh''' to connect to one router host, '''ssh -F ssh_config top''', '''ssh -F ssh_config left''', '''ssh -F ssh_config right''' and '''ssh -F ssh_config bottom'''. You can monitor the click log files with '''tail''':
    329 
    330 {{{
    331 [mberman@top ~]$ tail -f click.log
    332 }}}
    333 
    334 The log files may have a couple of warnings at the top complaining that your interfaces have no IPv4 addresses. No worries, we did that on purpose, since we don't use IP in the core network. Other than those warnings, you should just see packet log messages, one line per packet. Type <enter> a few times in each router window to create a space below the existing log entries, so you can identify new log messages as they appear.
     328Let's watch how the packets travel through the network. The terminal windows on your four router hosts show the log output from the '''Print''' statements shown above, one line per packet.
     329
     330Type <enter> a few times in each router window to create a space below the existing log entries, so you can identify new log messages as they appear.
    335331
    336332Now go to your window for hostA, where your '''nc''' command is still running. Type a message into this window. You should see a log message in three of your four router windows. In this example, you might see:
     
    338334In the '''top''' router log:
    339335{{{
    340 outR:   76 | 0002b365 d12b0003 4794c7fd 7744416c 69636557 61734865
    341 }}}
    342 
    343 This log entry says that the '''top''' router received a packet from '''hostA''', modified it, and sent it out to the '''right''' router. If the entry started with '''outL''', that would indicate that it sent the packet out to the '''left''' router. Let's look a bit at the start of the packet (the first 24 bytes are logged). It starts with an Ethernet header. The first six bytes are the MAC address of the destination interface, that's 00:02:b3:65:d1:2b, the MAC address of '''eth1''' on '''right'''. The next six bytes are the MAC address of the source interface, 00:03:47:94:c7:fd, or '''eth2''' on '''top'''. Next comes your ether type, 0x7744. The remaining bytes, "416c 69636557 61734865" are the start of the first field in your new protocol, "!AliceWasHe" in ASCII.
    344 
    345 Since this packet was routed to the right, there's an entry in the '''right''' router log. This entry indicates that a packet was received from '''top'''. The logged contents show the packet sent to '''bottom''', with rewritten MAC addresses, corresponding to '''eth2''' on '''bottom''' and '''eth2''' on '''right'''.
    346 
    347 {{{
    348 top:   76 | 00034794 c7fc0003 4794c1f7 7744416c 69636557 61734865
     336outR:   76 | 000423b7 192e0004 23b71ce0 7744416c 69636557 61734865
     337}}}
     338
     339This log entry says that the '''top''' router received a packet from '''hostA''', modified it, and sent it out to the '''right''' router. If the entry started with '''outL''', that would indicate that it sent the packet out to the '''left''' router. Let's look a bit at the start of the packet (the first 24 bytes are logged). It starts with an Ethernet header. The first six bytes are the MAC address of the destination interface, that's 00:04:23:B7:19:2E, the MAC address of '''eth4''' on '''right'''. The next six bytes are the MAC address of the source interface, 00:04:23:B7:1C:E0, or '''eth4''' on '''top'''. Next comes your ether type, 0x7744. The remaining bytes, "416c 69636557 61734865" are the start of the first field in your new protocol, "!AliceWasHe" in ASCII.
     340
     341Since this packet was routed to the right, there's an entry in the '''right''' router log. This entry indicates that a packet was received from '''top'''. The logged contents show the packet sent to '''bottom''', with rewritten MAC addresses, corresponding to '''eth5''' on '''bottom''' and '''eth5''' on '''right'''.
     342
     343{{{
     344top:   76 | 000423b7 42590004 23b7192f 7744416c 69636557 61734865
    349345}}}
    350346
    351347Finally, here's the entry on '''bottom''':
    352348{{{
    353 inR:   76 | 00034794 c7fc0003 4794c1f7 7744416c 69636557 61734865
     349inR:   76 | 000423b7 42590004 23b7192f 7744416c 69636557 61734865
    354350}}}
    355351
     
    365361
    366362{{{
    367 /path/to/omni/src/omni.py deletesliver -a http://www.emulab.net/protogeni/xmlrpc/am StupidSliceName
     363omni.py deletesliver -a http://www.emulab.net/protogeni/xmlrpc/am StupidSliceName
    368364}}}
    369365