Update exercises basic_tunnel and calc (#76)

This commit is contained in:
alex1230608 2017-11-03 16:42:14 -05:00 committed by Robert Soule
parent 786ceecf07
commit dcc8744592
5 changed files with 6 additions and 6 deletions

View File

@ -1,7 +1,7 @@
table_set_default ipv4_lpm drop table_set_default ipv4_lpm drop
table_add ipv4_lpm ipv4_forward 10.0.1.1/32 => 00:00:00:00:01:01 1 table_add ipv4_lpm ipv4_forward 10.0.1.1/32 => 00:00:00:00:01:01 1
table_add ipv4_lpm ipv4_forward 10.0.2.2/32 => 00:00:00:02:02:00 2 table_add ipv4_lpm ipv4_forward 10.0.2.2/32 => 00:00:00:02:01:00 2
table_add ipv4_lpm ipv4_forward 10.0.3.3/32 => 00:00:00:03:03:00 3 table_add ipv4_lpm ipv4_forward 10.0.3.3/32 => 00:00:00:03:01:00 3
table_set_default myTunnel_exact drop table_set_default myTunnel_exact drop
table_add myTunnel_exact myTunnel_forward 1 => 1 table_add myTunnel_exact myTunnel_forward 1 => 1

View File

@ -1,7 +1,7 @@
table_set_default ipv4_lpm drop table_set_default ipv4_lpm drop
table_add ipv4_lpm ipv4_forward 10.0.1.1/32 => 00:00:00:01:02:00 2 table_add ipv4_lpm ipv4_forward 10.0.1.1/32 => 00:00:00:01:02:00 2
table_add ipv4_lpm ipv4_forward 10.0.2.2/32 => 00:00:00:00:02:02 1 table_add ipv4_lpm ipv4_forward 10.0.2.2/32 => 00:00:00:00:02:02 1
table_add ipv4_lpm ipv4_forward 10.0.3.3/32 => 00:00:00:03:03:00 3 table_add ipv4_lpm ipv4_forward 10.0.3.3/32 => 00:00:00:03:02:00 3
table_set_default myTunnel_exact drop table_set_default myTunnel_exact drop
table_add myTunnel_exact myTunnel_forward 1 => 2 table_add myTunnel_exact myTunnel_forward 1 => 2

View File

@ -25,7 +25,7 @@ def get_if():
def main(): def main():
if len(sys.argv)<4: if len(sys.argv)<4:
print 'pass 2 arguments: <ip_addr> <dst_nid> "<message>"' print 'pass 3 arguments: <ip_addr> <dst_nid> "<message>"'
exit(1) exit(1)
addr = socket.gethostbyname(sys.argv[1]) addr = socket.gethostbyname(sys.argv[1])

View File

@ -90,7 +90,7 @@ parser MyParser(packet_in packet,
************ C H E C K S U M V E R I F I C A T I O N ************* ************ C H E C K S U M V E R I F I C A T I O N *************
*************************************************************************/ *************************************************************************/
control MyVerifyChecksum(in headers hdr, inout metadata meta) { control MyVerifyChecksum(inout headers hdr, inout metadata meta) {
apply { } apply { }
} }

View File

@ -26,7 +26,7 @@ switch in Mininet to test its behavior.
* start a Mininet instance with one switches (`s1`) connected to * start a Mininet instance with one switches (`s1`) connected to
two hosts (`h1`, `h2`). two hosts (`h1`, `h2`).
* The hosts are assigned IPs of `10.0.1.1` and `10.0.2.2`. * The hosts are assigned IPs of `10.0.1.1` and `10.0.1.2`.
2. We've written a small Python-based driver program that will allow 2. We've written a small Python-based driver program that will allow
you to test your calculator. You can run the driver program directly you to test your calculator. You can run the driver program directly