Changes between Version 24 and Version 25 of NikySandbox/TridentCommTut
- Timestamp:
- 05/17/12 10:30:59 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
NikySandbox/TridentCommTut
v24 v25 224 224 An example output should look like : 225 225 {{{ 226 [[inki@ pcut~]$ ping 10.10.2.1 -c 5226 [[inki@r2 ~]$ ping 10.10.2.1 -c 5 227 227 PING 10.10.2.1 (10.10.2.1) 56(84) bytes of data. 228 228 64 bytes from 10.10.2.1: icmp_seq=1 ttl=64 time=1.95 ms … … 237 237 }}} 238 238 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 --- 239 From 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 --- 250 245 5 packets transmitted, 5 received, 0% packet loss, time 4004ms 251 246 rtt min/avg/max/mdev = 0.218/1.504/2.398/1.037 ms 252 247 }}} 253 248 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 : 249 Now let's try and ping the PCRemote from source. Login to source the same way you logged in to r2 and run: 250 {{{ 251 ping 10.1.1.2 -c 5 -w 5 252 }}} 253 254 The ping should work. Run a traceroute to see how your packets are routed: 255 {{{ 256 traceroute 10.1.1.2 257 }}} 258 259 You see that you packets are routed through r2. This is because IP forwarding 260 is enabled at r2. Go back to the terminal of r2 and run : 261 {{{ 262 [inki@r2 ~]$ cat /proc/sys/net/ipv4/ip_forward 263 1 264 }}} 265 266 Disable IP forwarding: 267 {{{ 268 echo "0" | sudo tee /proc/sys/net/ipv4/ip_forward 269 }}} 270 271 Now try to ping again from source. The ping should time out 260 272 {{{ 261 273 [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 }}} 298 275 299 276 = 3. Sending Layer 2 traffic = … … 303 280 In this exercise we are going to send layer 2 traffic between the hosts of our topology. 304 281 305 == 3a. Bring Down IP at PCUT==306 First of all lets bring down the IP configuration from our hosts. At the terminal of PCUTfirst run ifconfig to figure out which are the dataplane interfaces. Run :282 == 3a. Bring Down IP at r2 == 283 First 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 : 307 284 {{{ 308 285 /sbin/ifconfig … … 311 288 The output should look like : 312 289 {{{ 313 [inki@ pcut ~/pingPlus]$ /sbin/ifconfig290 [inki@r2 ]$ /sbin/ifconfig 314 291 VLAN02 Link encap:UNSPEC HWaddr 9B-62-24-9B-6F-00-F4-EF-00-00-00-00-00-00-00-00 315 292 inet addr:192.168.5.2 P-t-P:192.168.5.2 Mask:255.255.255.0 … … 357 334 }}} 358 335 359 The two interface that are connected to VMUTand PCRemote are eth1 and eth2 respectively. To bring them down run :336 The two interface that are connected to source and PCRemote are eth1 and eth2 respectively. To bring them down run : 360 337 {{{ 361 338 sudo /sbin/ifconfig eth1 0.0.0.0 … … 365 342 366 343 == 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 bytchecking the information on the link.368 You will need to use the ethernet type that is given in your account slip. 344 From 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 369 346 Run : 370 347 {{{ 371 348 cd pingPlus 372 sudo ./pingPlus <MAC_ADDRESS> <INTERFACE_NAME> <ETH_TYPE>349 sudo ./pingPlus <MAC_ADDRESS> <INTERFACE_NAME> 12345 373 350 }}} 374 351 375 352 The result should look like : 376 353 {{{ 377 [inki@VMUT ~/pingPlus]$ sudo ./pingPlus 00:24:E8:7A:97:DD eth419 1 0000354 [inki@VMUT ~/pingPlus]$ sudo ./pingPlus 00:24:E8:7A:97:DD eth419 12345 378 355 audit_log_user_command(): Connection refused 379 356 RQ:'9561+2063' to 0:24:e8:7a:97:dd. … … 381 358 }}} 382 359 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 no385 router running at PCUTthat will forward the packets along. For this tutorial we have installed386 click router on PCUT, and we are going to run a simple learning switch module. However you can360 == 3c. Enable Layer 2 forwarding at r2 == 361 If we try to ping PCRemote from source, the packets will not get through, since there is no 362 router running at r2 that will forward the packets along. For this tutorial we have installed 363 click router on r2, and we are going to run a simple learning switch module. However you can 387 364 imagine that you can implement a more complicated routing algorithm. 388 In order to start the click router, at PCUTrun :365 In order to start the click router, at r2 run : 389 366 {{{ 390 367 cd 391 368 sudo /usr/local/bin/click switch.click 392 369 }}} 393 The MAC address of PCRemote is 00: 24:E8:77:89:B6370 The MAC address of PCRemote is 00:02:B3:23:78:E5 394 371 395 372 Then from VMUT, try to ping PCRemote 396 373 {{{ 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 398 375 }}} 399 376 400 377 The output should look like : 401 378 {{{ 402 [inki@VMUT ~/pingPlus]$ sudo ./pingPlus 00: 24:E8:77:89:B6 eth419 10000379 [inki@VMUT ~/pingPlus]$ sudo ./pingPlus 00:02:B3:23:78:E5 eth419 12345 403 380 audit_log_user_command(): Connection refused 404 381 RQ:'7124+8793' to 0:24:e8:77:89:b6.