Interactive end-of-chapter exercises


Openflow Flow Tables

Consider the 4-router network shown below, where packet forwarding is controlled by flow tables (e.g., configured via OpenFlow in an SDN controller), rather than by a forwarding table computed by a routing algorithm. The addresses of networks attached to each of the router is also shown. The interfaces at each of the routers are also as indicated.


Suppose we want the following forwarding behavior of packets to be implemented:

Complete the match-plus-action tables in each of the routers, s1, s2, s3, and s4, that implement these forwarding behaviors. Your rules should be as strict as possible (should only allow these behaviors, and no other forwarding behaviors). You can assume that any packet arriving at a router that does not match a rule in that table will be dropped.



Question List


1. For router s1, what should the value of the 'IP Src' be? Pick either a specific address (including CIDR), any, or none

2. For router s1, what should the value of the 'IP Dst' be? Pick either a specific address (including CIDR), any, or none

3. For router s1, what should the value of the 'Src Port' be? Pick either a specific port, or any

4. For router s1, what should the value of the 'Dst Port' be? Pick either a specific port, or any

5. For router s1, what should the value of the 'IP Proto' be? Pick either TCP, UDP, or any

6. For router s1, what should the action of the rule be? Some examples include forward, allow, deny, etc

7. For router s1, what interface should the packets be forwarded to?

8. For router s2, what should the value of the 'IP Src' be? Pick either a specific address (including CIDR), any, or none

9. For router s2, what should the value of the 'IP Dst' be? Pick either a specific address (including CIDR), any, or none

10. For router s2, what should the value of the 'Src Port' be? Pick either a specific port, or any

11. For router s2, what should the value of the 'Dst Port' be? Pick either a specific port, or any

12. For router s2, what should the value of the 'IP Proto' be? Pick either TCP, UDP, or any

13. For router s2, what should the action of the rule be? Some examples include forward, allow, deny, etc

14. For router s2, what interface should the packets be forwarded to?

15. For router s2, what should the value of the 'IP Src' be? Pick either a specific address (including CIDR), any, or none

16. For router s2, what should the value of the 'IP Dst' be? Pick either a specific address (including CIDR), any, or none

17. For router s2, what should the value of the 'Src Port' be? Pick either a specific port, or any

18. For router s2, what should the value of the 'Dst Port' be? Pick either a specific port, or any

19. For router s2, what should the value of the 'IP Proto' be? Pick either TCP, UDP, or any

20. For router s2, what should the action of the rule be? Some examples include forward, allow, deny, etc

21. For router s2, what interface should the packets be forwarded to?

22. For router s3, what should the value of the 'IP Src' be? Pick either a specific address (including CIDR), any, or none

23. For router s3, what should the value of the 'IP Dst' be? Pick either a specific address (including CIDR), any, or none

24. For router s3, what should the value of the 'Src Port' be? Pick either a specific port, or any

25. For router s3, what should the value of the 'Dst Port' be? Pick either a specific port, or any

26. For router s3, what should the value of the 'IP Proto' be? Pick either TCP, UDP, or any

27. For router s3, what should the action of the rule be? Some examples include forward, allow, deny, etc

28. For router s3, what interface should the packets be forwarded to?

29. For router s3, what should the value of the 'IP Src' be? Pick either a specific address (including CIDR), any, or none

30. For router s3, what should the value of the 'IP Dst' be? Pick either a specific address (including CIDR), any, or none

31. For router s3, what should the value of the 'Src Port' be? Pick either a specific port, or any

32. For router s3, what should the value of the 'Dst Port' be? Pick either a specific port, or any

33. For router s3, what should the value of the 'IP Proto' be? Pick either TCP, UDP, or any

34. For router s3, what should the action of the rule be? Some examples include forward, allow, deny, etc

35. For router s3, what interface should the packets be forwarded to?

36. For router s4, what should the value of the 'IP Src' be? Pick either a specific address (including CIDR), any, or none

37. For router s4, what should the value of the 'IP Dst' be? Pick either a specific address (including CIDR), any, or none

38. For router s4, what should the value of the 'Src Port' be? Pick either a specific port, or any

39. For router s4, what should the value of the 'Dst Port' be? Pick either a specific port, or any

40. For router s4, what should the value of the 'IP Proto' be? Pick either TCP, UDP, or any

41. For router s4, what should the action of the rule be? Some examples include forward, allow, deny, etc

42. For router s4, what interface should the packets be forwarded to?

43. For router s4, what should the value of the 'IP Src' be? Pick either a specific address (including CIDR), any, or none

44. For router s4, what should the value of the 'IP Dst' be? Pick either a specific address (including CIDR), any, or none

45. For router s4, what should the value of the 'Src Port' be? Pick either a specific port, or any

46. For router s4, what should the value of the 'Dst Port' be? Pick either a specific port, or any

47. For router s4, what should the value of the 'IP Proto' be? Pick either TCP, UDP, or any

48. For router s4, what should the action of the rule be? Some examples include forward, allow, deny, etc

49. For router s4, what interface should the packets be forwarded to?




Solution


(Q1-Q7) Rule 1. | IP_Src=128.120/16, IP_Dst=128.122/16, Src_Port=Any, Dst_Port=Any, IP_Protocol=UDP, Action=Forward(3) |

(Q8-Q14) Rule 2. | IP_Src=128.120/16, IP_Dst=128.122/16, Src_Port=Any, Dst_Port=Any, IP_Protocol=TCP, Action=Forward(2) |

(Q15-Q21) Rule 3. | IP_Src=128.120/16, IP_Dst=128.122/16, Src_Port=Any, Dst_Port=Any, IP_Protocol=UDP, Action=Forward(3) |

(Q22-Q28) Rule 4. | IP_Src=128.120/16, IP_Dst=128.122/16, Src_Port=Any, Dst_Port=Any, IP_Protocol=TCP, Action=Forward(2) |

(Q29-Q35) Rule 5. | IP_Src=128.120/16, IP_Dst=128.122/16, Src_Port=Any, Dst_Port=Any, IP_Protocol=UDP, Action=Forward(2) |

(Q36-Q42) Rule 6. | IP_Src=128.120/16, IP_Dst=128.122/16, Src_Port=Any, Dst_Port=Any, IP_Protocol=TCP, Action=Forward(1) |

(Q43-Q49) Rule 7. | IP_Src=128.120/16, IP_Dst=128.122/16, Src_Port=Any, Dst_Port=Any, IP_Protocol=UDP, Action=Forward(1) |



That's incorrect

That's correct

The answer was: 128.120/16

Question 1 of 49

The answer was: 128.122/16

Question 2 of 49

The answer was: Any

Question 3 of 49

The answer was: Any

Question 4 of 49

The answer was: UDP

Question 5 of 49

The answer was: Forward

Question 6 of 49

The answer was: 3

Question 7 of 49

The answer was: 128.120/16

Question 8 of 49

The answer was: 128.122/16

Question 9 of 49

The answer was: Any

Question 10 of 49

The answer was: Any

Question 11 of 49

The answer was: TCP

Question 12 of 49

The answer was: Forward

Question 13 of 49

The answer was: 2

Question 14 of 49

The answer was: 128.120/16

Question 15 of 49

The answer was: 128.122/16

Question 16 of 49

The answer was: Any

Question 17 of 49

The answer was: Any

Question 18 of 49

The answer was: UDP

Question 19 of 49

The answer was: Forward

Question 20 of 49

The answer was: 3

Question 21 of 49

The answer was: 128.120/16

Question 22 of 49

The answer was: 128.122/16

Question 23 of 49

The answer was: Any

Question 24 of 49

The answer was: Any

Question 25 of 49

The answer was: TCP

Question 26 of 49

The answer was: Forward

Question 27 of 49

The answer was: 2

Question 28 of 49

The answer was: 128.120/16

Question 29 of 49

The answer was: 128.122/16

Question 30 of 49

The answer was: Any

Question 31 of 49

The answer was: Any

Question 32 of 49

The answer was: UDP

Question 33 of 49

The answer was: Forward

Question 34 of 49

The answer was: 2

Question 35 of 49

The answer was: 128.120/16

Question 36 of 49

The answer was: 128.122/16

Question 37 of 49

The answer was: Any

Question 38 of 49

The answer was: Any

Question 39 of 49

The answer was: TCP

Question 40 of 49

The answer was: Forward

Question 41 of 49

The answer was: 1

Question 42 of 49

The answer was: 128.120/16

Question 43 of 49

The answer was: 128.122/16

Question 44 of 49

The answer was: Any

Question 45 of 49

The answer was: Any

Question 46 of 49

The answer was: UDP

Question 47 of 49

The answer was: Forward

Question 48 of 49

The answer was: 1

Question 49 of 49

Try Another Problem

We gratefully acknowledge the programming and problem design work of John Broderick (UMass '21), which has really helped to substantially improve this site.

Copyright © 2010-2022 J.F. Kurose, K.W. Ross
Comments welcome and appreciated: kurose@cs.umass.edu