200 likes | 214 Views
This overview covers the POX controller platform for SDN, its advantages, disadvantages, packet handling flow, and a switch implementation example. Learn about controllers, events, messages, and control logic execution with POX. Explore network slicing and FlowVisor for SDN network management.
E N D
Project Overview CS5229 Lecturer: Dr.Richard MA TA: Mostafa Rezazad
Variety of SDN Controllers • NOX/POX • Ryu • Floodlight • OpenDaylight • Pyretic • Frenetic • Procera • RouteFlow • Trema
POX: Overview • A platform for building network control applications using Python • Supports OpenFlow v. 1.0 only • Advantages: • Widely used, maintained, supported • Relatively easy to read and write code • Disadvantages: Performance
Preview Parse packet and execute control logic Compose and send message Packet sent to controller “PacketIn” event fired No flow table match First packet arrives at switch Flow table match Action Write flow table entry Second packet arrives at switch Msg Listener Control Logic Messager OpenFlow OpenFlow OpenFlow PacketIn Control Plane Data Plane OpenFlow Switch OpenFlow Switch Entry 1 OpenFlow Switch 1 2
Learn through an example • Implement a switch • What is a switch? • What is a hub?
Simple hub • Ethernet is a broadcast medium • Hub is a flooding device
Example: Simple Switch • Switch layer 2: • A multiple port bridge • learn about the MAC addresses on each ports • passes MAC frames destined to those ports.
Source: A Dest: A’ A’ A MAC addr interface TTL 60 60 4 1 A A’ A A’ A A’ A A’ A A’ A A’ A A’ Self-learning, forwarding: example • frame destination, A’, location unknown: A flood B C’ 1 2 6 • destination A location known: 4 5 3 B’ C selectively send on just one link A’ switch table (initially empty)
How it works? Controller Listener Event • Step 1: Register event listeners to handle specific events (e.g. ConnectionUp, PacketIn) • Step 2: Parse packet and execute control logics • Step 3: Compose and send the OpenFlow message to the switch def launch (): 1-core.openflow.addListenerByName("PacketIn", _handle_PacketIn) 2- core.registerNew(Tutorial) Class Tutorial(EventMixin): //EventMixinis the class that raises events def__init__(self): self.listenTo(core.openflow) core.openflow_discovery.addListeners(self) //then implement all handlers you need….
How it works? Controller Listener Control Logic Event • Step 1: Register event listeners to handle specific events (e.g. ConnectionUp, PacketIn) • Step 2: Parse packet and execute control logics • Step 3: Compose and send the OpenFlow message to the switch def_handle_PacketIn(self, event): packet = event.parsed dst_port = table.get(packet.dst) def_handle_ConnectioUp(self, event) : log.debug(“Switch %s has come up.”, dpid_to_str(event.dpid)) Every switch connected to the controller has an id named dpid (data path id).
How it works? Listener Control Logic Messager Event Msg • Step 1: Register event listeners to handle specific events (e.g. ConnectionUp, PacketIn) • Step 2: Parse packet and execute control logics • Step 3: Compose and send the OpenFlow message to the switch msg = of.ofp_flow_mod() <- This instructs a switch to install a flow table entry msg.match.dl_src= packet.srcanother example is: msg.match.dl_dst= packet.dst_packet_out() msg.actions.append(of.ofp_action_output(port = dst_port)) event.connection.send(msg)
Example: Simple Switch deflaunch (): core.openflow.addListenerByName("PacketIn", _handle_PacketIn) def_handle_PacketIn (event): packet = event.parsed dst_port= table.get(packet.dst) msg = of.ofp_flow_mod() msg.match.dl_src = packet.src msg.match.dl_dst = packet.dst msg.actions.append(of.ofp_action_output(port = dst_port)) event.connection.send(msg) Step 1: Register event listener
Example: Simple Switch deflaunch (): core.openflow.addListenerByName("PacketIn", _handle_PacketIn) def_handle_PacketIn (event): packet = event.parsed dst_port= table.get(packet.dst) msg = of.ofp_flow_mod() msg.match.dl_src = packet.src msg.match.dl_dst = packet.dst msg.actions.append(of.ofp_action_output(port = dst_port)) event.connection.send(msg) Step 2: Parse the packet and execute control logics
Example: Simple Switch deflaunch (): core.openflow.addListenerByName("PacketIn", _handle_PacketIn) def_handle_PacketIn (event): packet = event.parsed dst_port= table.get(packet.dst) msg = of.ofp_flow_mod() msg.match.dl_src = packet.src msg.match.dl_dst = packet.dst msg.actions.append(of.ofp_action_output(port = dst_port)) event.connection.send(msg) Step 3: Compose and send OpenFlow message
Network slicing • Divide the production network into logical slices • Each slice controls its own packet forwarding • Enforce strong isolation between slices • Actions in one slice do not affect another
Example1: FlowVisor • FlowVisor a transparent proxy between switches and multiple controllers • FlowVisor enforces isolation between each slice Slice 1 Controller Slice 2 Controller Slice 3 Controller OF OF OF FlowVisor OF OF OF OF OF OpenFlow Switch OpenFlow Switch OpenFlow Switch OpenFlow Switch OpenFlow Switch
Example2: QoS-related Network Slicing • Multiple queues for multiple classes • Guaranteed minimum bandwidth • Queue configuration is not part of the openflow • Configuration defines packet treatment • Openflow maps flows to queues Ref:http://archive.openflow.org/wk/index.php/Slicing Controller OF OpenFlow Switch IF2 Q3 Q4 Q5 Q2 DQ Q1 IF1 IF3 IF1 IF4
Your project • It is not FlowVisor • It is not multiple queues (e.g., QoS) • Special case where multiple bandwidth is provided • Separate traffics into two slices and assign to different interfaces (not different controller not different queues) • Try to keep it simple.