Changes between Version 44 and Version 45 of GENIExperimenter/Tutorials/ClickExample/Execute
- Timestamp:
- 07/16/14 14:36:55 (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GENIExperimenter/Tutorials/ClickExample/Execute
v44 v45 224 224 === Packet transformation === 225 225 226 i. The more interesting configuration appears here, in the '''top.click''' configuration file. In a local terminal type: 227 {{{ 226 i. The more interesting configuration appears in the '''top.click''' configuration file. 227 228 {{{ 229 #!div style="background: #ffd; border: 3px ridge; width: 685px;" 230 231 In a local terminal type: 232 {{{ 228 233 ssh -A top "cat top.click" 229 234 }}} 230 235 The output will look like : 231 236 {{{ 232 237 #!cpp … … 266 271 FromDevice(eth4) -> Classifier(12/7744) -> Print(inR) -> restore; 267 272 }}} 268 273 }}} 269 274 As indicated in the comments, the top portion of the configuration listens ('''!FromDevice''') for IP packets arriving on the interface connected to '''hostA''' (that's '''eth3''' in this example). It then creates a new 16-byte field at the head of the packet (two bytes added by the '''Unstrip''' operation, plus the existing 14-byte Ethernet header. It fills that field with what could be important routing instructions, but in this case is just graffiti ('''!StoreData'''). The '''route''' operation then routes the packet via either the '''left''' or '''right''' router toward '''hostB'''. In either case, it wraps the packet in a fresh Ethernet header ('''!EtherEncap''') with a distinctive ether type code (0x7744), logs the new packet on its way out ('''Print''') and sends it out on the correct interface ('''!ToDevice'''). 270 275