Changes between Version 24 and Version 25 of NikySandbox/TridentCommTut


Ignore:
Timestamp:
05/17/12 10:30:59 (12 years ago)
Author:
nriga@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NikySandbox/TridentCommTut

    v24 v25  
    224224An example output should look like :
    225225{{{
    226 [[inki@pcut ~]$ ping 10.10.2.1 -c 5
     226[[inki@r2 ~]$ ping 10.10.2.1 -c 5
    227227PING 10.10.2.1 (10.10.2.1) 56(84) bytes of data.
    22822864 bytes from 10.10.2.1: icmp_seq=1 ttl=64 time=1.95 ms
     
    237237}}}
    238238
    239 From PCUT you should also be able to ping PCRemote. The IP of PCRemote is '''"10.10.4.2"'''.
    240 {{{
    241 [inki@pcut ~]$ ping 10.10.4.2 -c 5
    242 PING 10.10.4.2 (10.10.4.2) 56(84) bytes of data.
    243 64 bytes from 10.10.4.2: icmp_seq=1 ttl=64 time=2.39 ms
    244 64 bytes from 10.10.4.2: icmp_seq=2 ttl=64 time=0.218 ms
    245 64 bytes from 10.10.4.2: icmp_seq=3 ttl=64 time=2.32 ms
    246 64 bytes from 10.10.4.2: icmp_seq=4 ttl=64 time=0.253 ms
    247 64 bytes from 10.10.4.2: icmp_seq=5 ttl=64 time=2.33 ms
    248 
    249 --- 10.10.4.2 ping statistics ---
     239From r2 you should also be able to ping PCRemote. The IP of PCRemote is '''"10.1.1.2"'''.
     240{{{
     241[inki@r2 ~]$ ping 10.1.1.2 -c 5
     242
     243
     244--- 10.1.1.2 ping statistics ---
    2502455 packets transmitted, 5 received, 0% packet loss, time 4004ms
    251246rtt min/avg/max/mdev = 0.218/1.504/2.398/1.037 ms
    252247}}}
    253248
    254 Now let's try and ping the PCRemote from VMUT. Login to VMUT and run:
    255 {{{
    256 ping 10.10.4.2 -c 5 -w 5
    257 }}}
    258 
    259 The ping should timeout. The output should look like :
     249Now let's try and ping the PCRemote from source. Login to source the same way you logged in to r2 and run:
     250{{{
     251ping 10.1.1.2 -c 5 -w 5
     252}}}
     253
     254The ping should work. Run a traceroute to see how your packets are routed:
     255{{{
     256traceroute 10.1.1.2
     257}}}
     258
     259You see that you packets are routed through r2. This is because IP forwarding
     260is enabled at r2. Go back to the terminal of r2 and run :
     261{{{
     262[inki@r2 ~]$ cat /proc/sys/net/ipv4/ip_forward                               
     2631
     264}}}
     265
     266Disable IP forwarding:
     267{{{
     268echo "0" | sudo tee /proc/sys/net/ipv4/ip_forward
     269}}}
     270
     271Now try to ping again from source. The ping should time out
    260272{{{
    261273[inki@VMUT ~]$ ping 10.10.4.2 -c 5 -w 5
    262 PING 10.10.4.2 (10.10.4.2) 56(84) bytes of data.
    263 
    264 --- 10.10.4.2 ping statistics ---
    265 6 packets transmitted, 0 received, 100% packet loss, time 4998ms
    266 }}}
    267 
    268 == 2c. Enable IP forwarding at PCUT ==
    269 The ping fails because although PCRemote and VMUT are both connected
    270 to PCUT, the PCUT is not configured to route packets. Check the IP routing
    271 flag :
    272 {{{
    273 [inki@pcut ~]$ cat /proc/sys/net/ipv4/ip_forward                               
    274 0
    275 }}}
    276 
    277 To enable IP forwarding run :
    278 {{{
    279 echo "1" | sudo tee /proc/sys/net/ipv4/ip_forward
    280 }}}
    281 
    282 Now try to ping again from VMUT. The output should look like :
    283 {{{
    284 [inki@VMUT ~]$ ping 10.10.4.2 -c 5
    285 PING 10.10.4.2 (10.10.4.2) 56(84) bytes of data.
    286 64 bytes from 10.10.4.2: icmp_seq=1 ttl=63 time=4.02 ms
    287 64 bytes from 10.10.4.2: icmp_seq=2 ttl=63 time=3.48 ms
    288 64 bytes from 10.10.4.2: icmp_seq=3 ttl=63 time=3.44 ms
    289 64 bytes from 10.10.4.2: icmp_seq=4 ttl=63 time=3.46 ms
    290 64 bytes from 10.10.4.2: icmp_seq=5 ttl=63 time=3.44 ms
    291 
    292 --- 10.10.4.2 ping statistics ---
    293 5 packets transmitted, 5 received, 0% packet loss, time 3998ms
    294 rtt min/avg/max/mdev = 3.444/3.574/4.028/0.233 ms
    295 }}}
    296 
    297 Congrats you were able to run a multihop IP experiment.
     274}}}
    298275
    299276= 3. Sending Layer 2 traffic =
     
    303280In this exercise we are going to send layer 2 traffic between the hosts of our topology.
    304281
    305 == 3a. Bring Down IP at PCUT ==
    306 First of all lets bring down the IP configuration from our hosts. At the terminal  of PCUT first run ifconfig to figure out which are the dataplane interfaces. Run :
     282== 3a. Bring Down IP at r2 ==
     283First of all lets bring down the IP configuration from our hosts. At the terminal  of r2 first run ifconfig to figure out which are the dataplane interfaces. Run :
    307284{{{
    308285/sbin/ifconfig
     
    311288The output should look like :
    312289{{{
    313 [inki@pcut ~/pingPlus]$ /sbin/ifconfig
     290[inki@r2 ]$ /sbin/ifconfig
    314291VLAN02    Link encap:UNSPEC  HWaddr 9B-62-24-9B-6F-00-F4-EF-00-00-00-00-00-00-00-00 
    315292          inet addr:192.168.5.2  P-t-P:192.168.5.2  Mask:255.255.255.0
     
    357334}}}
    358335
    359 The two interface that are connected to VMUT and PCRemote are eth1 and eth2 respectively. To bring them down run :
     336The two interface that are connected to source and PCRemote are eth1 and eth2 respectively. To bring them down run :
    360337{{{
    361338sudo /sbin/ifconfig eth1 0.0.0.0
     
    365342
    366343== 3b. Run Layer 2 Ping ==
    367 From VMUT try to ping PCUT. First we will need to figure out the MAC address of PCUT. We can find the MAC address the same way as the IP addresses byt checking the information on the link.
    368 You will need to use the ethernet type that is given in your account slip.
     344From source try to ping r2. First we will need to figure out the MAC address of r2. We can find the MAC address the same way as the IP addresses by checking the information on the link.
     345
    369346Run :
    370347{{{
    371348cd pingPlus
    372 sudo ./pingPlus <MAC_ADDRESS> <INTERFACE_NAME> <ETH_TYPE>
     349sudo ./pingPlus <MAC_ADDRESS> <INTERFACE_NAME> 12345
    373350}}}
    374351
    375352The result should look like :
    376353{{{
    377 [inki@VMUT ~/pingPlus]$ sudo ./pingPlus 00:24:E8:7A:97:DD eth419 10000
     354[inki@VMUT ~/pingPlus]$ sudo ./pingPlus 00:24:E8:7A:97:DD eth419 12345
    378355audit_log_user_command(): Connection refused
    379356RQ:'9561+2063' to 0:24:e8:7a:97:dd.
     
    381358}}}
    382359
    383 == 3c. Enable Layer 2 forwarding at PCUT ==
    384 If we try to ping PCRemote from VMUT, the packets will not get through, since there is no
    385 router running at PCUT that will forward the packets along. For this tutorial we have installed
    386 click router on PCUT, and we are going to run a simple learning switch module. However you can
     360== 3c. Enable Layer 2 forwarding at r2 ==
     361If we try to ping PCRemote from source, the packets will not get through, since there is no
     362router running at r2 that will forward the packets along. For this tutorial we have installed
     363click router on r2, and we are going to run a simple learning switch module. However you can
    387364imagine that you can implement a more complicated routing algorithm.
    388 In order to start the click router, at PCUT run :
     365In order to start the click router, at r2 run :
    389366{{{
    390367cd
    391368sudo /usr/local/bin/click switch.click
    392369}}}
    393 The MAC address of PCRemote is 00:24:E8:77:89:B6
     370The MAC address of PCRemote is 00:02:B3:23:78:E5
    394371
    395372Then from VMUT, try to ping PCRemote
    396373{{{
    397 [inki@VMUT ~/pingPlus]$ sudo ./pingPlus 00:24:E8:77:89:B6 <INTERFACE_NAME> <ETH_TYPE>
     374[inki@source /local/tutorial/pingPlus]$ sudo ./pingPlus 00:24:E8:77:89:B6 <INTERFACE_NAME> 12345
    398375}}}
    399376
    400377The output should look like :
    401378{{{
    402 [inki@VMUT ~/pingPlus]$ sudo ./pingPlus 00:24:E8:77:89:B6 eth419 10000
     379[inki@VMUT ~/pingPlus]$ sudo ./pingPlus 00:02:B3:23:78:E5 eth419 12345
    403380audit_log_user_command(): Connection refused
    404381RQ:'7124+8793' to 0:24:e8:77:89:b6.