Update exercises basic_tunnel and calc (#76)
This commit is contained in:
parent
786ceecf07
commit
dcc8744592
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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])
|
||||||
|
@ -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 { }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user