Changes between Version 16 and Version 17 of ClickExampleExperiment
- Timestamp:
- 06/22/12 14:47:40 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ClickExampleExperiment
v16 v17 157 157 Once 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. 158 158 159 [[Image( sampleDiagram.png, nolink, 25%)]]159 [[Image(myslice.png, nolink, 25%)]] 160 160 161 161 The 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. … … 252 252 Please 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. 253 253 254 Let's take a look at what's happening in the four routers in your configuration. There are two basic router configurations. 254 Let'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.) 255 255 256 256 === Packet transformation === … … 272 272 modify; 273 273 274 route[0] -> left :: EtherEncap(0x7744, 00:0 2:b3:35:f1:b7, 00:02:b3:86:1d:13) ->274 route[0] -> left :: EtherEncap(0x7744, 00:04:23:b7:14:76, 00:04:23:b7:18:fa) -> 275 275 SimpleQueue -> 276 276 Print(outL) -> 277 ToDevice(eth 1);278 279 route[1] -> right :: EtherEncap(0x7744, 00:0 3:47:94:c7:fd, 00:02:b3:65:d1:2b) ->277 ToDevice(eth2); 278 279 route[1] -> right :: EtherEncap(0x7744, 00:04:23:b7:1c:e0, 00:04:23:b7:19:2e) -> 280 280 SimpleQueue -> 281 281 Print(outR) -> 282 ToDevice(eth 2);282 ToDevice(eth4); 283 283 284 284 // This portion accepts non-IP packets … … 288 288 restore :: SimpleQueue -> 289 289 Strip(30) -> 290 EtherEncap(0x800, 00:0 3: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) -> 291 291 ToDevice(eth3); 292 292 293 FromDevice(eth 1) -> Classifier(12/7744) -> Print(inL) -> restore;294 FromDevice(eth 2) -> Classifier(12/7744) -> Print(inR) -> restore;293 FromDevice(eth2) -> Classifier(12/7744) -> Print(inL) -> restore; 294 FromDevice(eth4) -> Classifier(12/7744) -> Print(inR) -> restore; 295 295 }}} 296 296 … … 307 307 {{{ 308 308 // Copy packets from top to bottom. 309 FromDevice(eth 1) ->310 StoreEtherAddress(00:0 2:b3:86:1a:4b, dst) ->311 StoreEtherAddress(00:0 3:47:95:7a:fe, src) ->309 FromDevice(eth2) -> 310 StoreEtherAddress(00:04:23:b7:42:b6, dst) -> 311 StoreEtherAddress(00:04:23:b7:18:fb, src) -> 312 312 SimpleQueue -> 313 313 Print(top) -> 314 ToDevice(eth 2);314 ToDevice(eth3); 315 315 // Copy packets from bottom to top. 316 FromDevice(eth 2) ->317 StoreEtherAddress(00:0 2:b3:35:f1:b7, dst) ->318 StoreEtherAddress(00:0 2:b3:86:1d:13, src) ->316 FromDevice(eth3) -> 317 StoreEtherAddress(00:04:23:b7:14:76, dst) -> 318 StoreEtherAddress(00:04:23:b7:18:fa, src) -> 319 319 SimpleQueue -> 320 320 Print(bottom) -> 321 ToDevice(eth 1);321 ToDevice(eth2); 322 322 }}} 323 323 … … 326 326 === Monitoring your core network === 327 327 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. 328 Let'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 330 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. 335 331 336 332 Now 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: … … 338 334 In the '''top''' router log: 339 335 {{{ 340 outR: 76 | 000 2b365 d12b0003 4794c7fd7744416c 69636557 61734865341 }}} 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:0 2: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 '''eth 2''' on '''bottom''' and '''eth2''' on '''right'''.346 347 {{{ 348 top: 76 | 000 34794 c7fc0003 4794c1f77744416c 69636557 61734865336 outR: 76 | 000423b7 192e0004 23b71ce0 7744416c 69636557 61734865 337 }}} 338 339 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: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 341 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 '''eth5''' on '''bottom''' and '''eth5''' on '''right'''. 342 343 {{{ 344 top: 76 | 000423b7 42590004 23b7192f 7744416c 69636557 61734865 349 345 }}} 350 346 351 347 Finally, here's the entry on '''bottom''': 352 348 {{{ 353 inR: 76 | 000 34794 c7fc0003 4794c1f77744416c 69636557 61734865349 inR: 76 | 000423b7 42590004 23b7192f 7744416c 69636557 61734865 354 350 }}} 355 351 … … 365 361 366 362 {{{ 367 /path/to/omni/src/omni.py deletesliver -a http://www.emulab.net/protogeni/xmlrpc/am StupidSliceName363 omni.py deletesliver -a http://www.emulab.net/protogeni/xmlrpc/am StupidSliceName 368 364 }}} 369 365