Presentation is loading. Please wait.

Presentation is loading. Please wait.

Programming Assignment 2 Zilong Ye. Traditional router Control plane and data plane embed in a blackbox designed by the vendor high-seed switching fabric.

Similar presentations


Presentation on theme: "Programming Assignment 2 Zilong Ye. Traditional router Control plane and data plane embed in a blackbox designed by the vendor high-seed switching fabric."— Presentation transcript:

1 Programming Assignment 2 Zilong Ye

2 Traditional router Control plane and data plane embed in a blackbox designed by the vendor high-seed switching fabric routing processor router input ports router output ports forwarding data plane (hardware) routing, management control plane (software) forwarding tables computed, pushed to input ports

3 Software-Defined Networking Decouple control plane from data plane Benefits: Fast innovation Global optimization Dynamic reconfiguration Flexibility Programmable network

4 OpenFlow OpenFlow – A representative SDN open protocol Secure channel Flow table

5 Header fields Header values for matching against packets Activity counter Update for matching packets Actions Actions taken on matching packets

6 Matching A packet matches a flow table entry if the values in the header fields used for the lookup (as defined above) match those defined in the ow table. If matching, perform the action and update the counter; If not matching, send the packet to the controller

7 Secure channel OpenFlow protocol Through this interface, the controller configures and manages the switch, receives events from the switch, and send packets out the switch. Three types of messages: Controller to switch Asynchronous Symmentric

8 Controller to switch Configuration The controller is able to set and query configuration parameters in the switch. Read state Read-State messages are used by the controller to collect statistics from the switchs flow-tables, ports and the individual flow entries. Modify state Their primary purpose is to add/delete and modify flows in the flow tables and to set switch port properties. Send packet These are used by the controller to send packets out of a speci- fied port on the switch.

9 Asynchronous Packet-in For all packets that do not have a matching ow entry, a packet-in event is sent to the controller (or if a packet matches an entry with a “send to controller" action). Fraction of packet header – sufficient buffer on switch Full packet – less buffer on switch Flow-removed Idle timeout – flow entries that lack activity Hard timeout – fixed lifetime of flow entry Port-status Error

10 Symmetric Hello Hello messages are exchanged between the switch and controller upon connection startup. Echo They can be used to indicate the latency, bandwidth, and/or liveness of a controller-switch connection. Can be used for efficient fault detection.

11 Trema OpenFlow controller + network emulator + Trema command

12 Trema controller Ruby and C class packetin < controller def packet_in (datapath_id, event) puts ‘received a packet’ info “” end

13 Network emulator Network DSL example

14 Trema command $ trema run packet-in.rb -c packet-in.conf $ trema send_packets --source host1 --dest host2 $ trema show_stats host1 $ trema dump_flows 0xabc

15 Programming assignment 2 Download and install VirtualBox Download Trema virtual machine Install the VM, start Virtual Box, select File->Import Appliance-> and select the downloaded.ova file. The VM requires 1G RAM and 8G disk. Username: cs470; password: trema Run examples: Hello switch Packet in

16 Hello switch./trema run src/examples/hello_trema/hello_trema.rb -c src/examples/hello_trema/hello_trema.conf

17 Packet in dumper./trema run src/examples/packet_in/packet-in.rb -c src/examples/packet_in/packet_in.conf

18 Useful APIs http://www.rubydoc.info/github/trema/trema/mas ter/frames http://www.rubydoc.info/github/trema/trema/mas ter/frames Go to “Controller” and get familiar with the APIs related to OpenFlow messages: Send_flow_mod_add Send_flow_mod_delete Send_message Send_packet_out


Download ppt "Programming Assignment 2 Zilong Ye. Traditional router Control plane and data plane embed in a blackbox designed by the vendor high-seed switching fabric."

Similar presentations


Ads by Google