Ryu Book Chapter 1 Speaker: Chang, Cheng-Yu Date: 25/Nov./2014 1.

Slides:



Advertisements
Similar presentations
ARP AND RARP ROUTED AND ROUTING Tyler Bish. ARP There are a variety of ways that devices can determine the MAC addresses they need to add to the encapsulated.
Advertisements

An OpenFlow Extension for the OMNeT++ INET Framework
CSC458 Programming Assignment II: NAT Nov 7, 2014.
P4 demo: a basic L2/L3 switch in 170 LOC
Computer Networks21-1 Chapter 21. Network Layer: Address Mapping, Error Reporting, and Multicasting 21.1 Address Mapping 21.2 ICMP 21.3 IGMP 21.4 ICMPv6.
Internet Control Protocols Savera Tanwir. Internet Control Protocols ICMP ARP RARP DHCP.
SYSTEM ADMINISTRATION Chapter 19
Cache Table. ARP Modules Output Module Sleep until IP packet is received from IP Software Check cache table for entry corresponding to the destination.
IP Routing: an Introduction. Quiz
1 Reminding - ARP Two machines on a given network can communicate only if they know each other’s physical network address ARP (Address Resolution Protocol)
Address Resolution Protocol (ARP). Mapping IP Address to Data-Link Address  How does a machine map an IP address to its Data- Link layer (hardware or.
Network Layer (Part IV). Overview A router is a type of internetworking device that passes data packets between networks based on Layer 3 addresses. A.
ARP Under Normal Conditions. The basics arp with reverse DNS lookup for each IP arp –a # Windows & linux Without reverse DNS lookup (runs faster) arp.
CN2668 Routers and Switches Kemtis Kunanuraksapong MSIS with Distinction MCTS, MCDST, MCP, A+
TELE202 Lecture 10 Internet Protocols (2) 1 Lecturer Dr Z. Huang Overview ¥Last Lecture »Internet Protocols (1) »Source: chapter 15 ¥This Lecture »Internet.
1 Overview Midterm Solution Lab 5 Questions Lab Trouble Shooting Techniques.
ICMP (Internet Control Message Protocol) Computer Networks By: Saeedeh Zahmatkesh spring.
Network Redundancy Multiple paths may exist between systems. Redundancy is not a requirement of a packet switching network. Redundancy was part of the.
ARP Scenarios CIS 81 and CST 311 Rick Graziani Fall 2005.
1 Computer Communication & Networks Lecture 20 Network Layer: IP and Address Mapping (contd.) Waleed.
PA3: Router Junxian (Jim) Huang EECS 489 W11 /
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
Router and Routing Basics
1 Chapter Overview Routing Principles. Understanding Routing--important Routing refers to the process of taking a packet from one device and sending it.
IP Forwarding.
CMPT 471 Networking II Address Resolution IPv4 ARP RARP 1© Janice Regan, 2012.
Introduction to InfoSec – Recitation 11 Nir Krakowski (nirkrako at post.tau.ac.il) Itamar Gilad (itamargi at post.tau.ac.il)
Polytechnic University1 The internetworking solution of the Internet Prof. Malathi Veeraraghavan Elec. & Comp. Engg. Dept/CATT Polytechnic University
ARP The Process and the Protocol. Note to reader The information explained in this section is a simplification and extrapolation of the actual ARP determination.
Internet Control Message Protocol (ICMP) Chapter 7.
LAN Switching Concepts. Overview Ethernet networks used to be built using repeaters. When the performance of these networks began to suffer because too.
1 Requirements for Internet Routers (Gateways) and Hosts Relates to Lab 3. (Supplement) Covers the compliance requirements of Internet routers and hosts.
Internet Protocols. ICMP ICMP – Internet Control Message Protocol Each ICMP message is encapsulated in an IP packet – Treated like any other datagram,
Mininet and Openflow Labs. Install Mininet (do not do this in class) Download VirtualBox Download Xming for windows (X11) Download Mininet VM for linux-ubuntu.
Mapping IP Addresses to Hardware Addresses Chapter 5.
Introduction to Mininet, Open vSwitch, and POX
Jennifer Rexford Princeton University MW 11:00am-12:20pm Data-Plane Verification COS 597E: Software Defined Networking.
ARP ‘n RARP. The Address Resolution Protocol (ARP) is a request sent out by a computer to find another computer’s MAC address. It already knows the IP.
SPEAKER: MUHAMMAD REZA ZULMAN DATE: NOVEMBER 17, 2014 OPENFLOW SPECIFICATION.
Address Resolution Protocol Yasir Jan 20 th March 2008 Future Internet.
www.visualland.net1 ARP Basic ARP tutorial with pictures Watch animation to learn networking. Visualize.
1 Address Resolution Protocol (ARP). 2 Overview 3 Need for Address Translation Note: –The Internet is based on IP addresses –Local area networks use.
ARP spoofing ARP tutorial with pictures -7 Watch animation to learn networking. Visualize.
Chapter 3 Part 1 Switching and Bridging
Mininet and Openflow Labs
Chapter 9 Introduction To Data-Link Layer 9.# 1
CSC458 Programming Assignment II: NAT
Scaling the Network Chapters 3-4 Part 2
MAC Address Tables on Connected Switches
Programming Assignment
Programming Assignment
Address Resolution Protocol (ARP)
Scaling the Network: The Internet Protocol
Chapter 8 ARP(Address Resolution Protocol)
21-2 ICMP(Internet control message protocol)
ICMP ICMP – Internet Control Message Protocol
Error and Control Messages in the Internet Protocol
Network Data Plane Part 2
Troubleshooting IP Communications
Introduction to Networking
Byungchul Park ICMP & ICMPv DPNM Lab. Byungchul Park
Internet Control Message Protocol (ICMP)
Internet Control Message Protocol (ICMP)
Setting Up Firewall using Netfilter and Iptables
Address Resolution Protocol (ARP)
Implementing an OpenFlow Switch on the NetFPGA platform
Scaling the Network: The Internet Protocol
Networking and Network Protocols (Part2)
IP Forwarding Relates to Lab 3.
Chapter 4: outline 4.1 Overview of Network layer data plane
Presentation transcript:

Ryu Book Chapter 1 Speaker: Chang, Cheng-Yu Date: 25/Nov./2014 1

Outline Switching Hub Switching Hub by OpenFlow Archieve a switching hub Ryu application example 2

Switiching Hub Switching hubs have a variety of functions. Here, we take a look at a switching hub having the following simple functions Learns the MAC address of the host connected to a port and retains it in the MAC address table. When receiving packets addressed to a host already learned, transfers them to the port connected to the host. When receiving packets addressed to an unknown host, performs flooding. 3

Switiching Hub by OpenFlow OpenFlow switches can perform the following by receiving instructions from OpenFlow controllers such as Ryu. Rewrites the address of received packets or transfers the packets from the specified port. Transfers the received packets to the controller (Packet-In). Transfers the packets forwarded by the controller from the specified port (Packet-Out). It is possible to achieve a switching hub having those functions combined. 4

Achieve a switching hub Step 1. Initial status The flow table is empty. host A is connected to port 1. host B is connected to part 4. host C is connected to port 3. 5

Achieve a switching hub Step 2-1. Host A -> Host B Packet-In: in-port: 1 eth-dst: Host B eth-src: Host A 6 When packets are sent from host A to host B, a Packet-In message is sent and the MAC address of host A is learned by port 1.

Packet-in Message Create the handler of the Packet-In event handler in order to accept received packets with an unknown destination. Ryu Event Handler: With Ryu, when an OpenFlow message is received, an event corresponding to the message is generated. The event handler defines a function having the event object for the argument and use the ryu.controller.handler.set_ev_cls decorator to decorate. 7

Updating the MAC Address Table Based on the acquired sender MAC address and received port number, the MAC address table is updated. 8

Achieve a switching hub Step 2-2. Host A -> Host B Packet-In: in-port: 1 eth-dst: Host B eth-src: Host A Packet-Out: action: OUTPUT:Flooding 9 Because the port for host B has not been found, the packets are flooded and are received by host B and host C.

Judging the Transfer Destination Port The corresponding port number is used when the destination MAC address exists in the MAC address table. If not found, the instance of the OUTPUT action class specifying flooding (OFPP_FLOOD) for the output port is generated. 10

Achieve a switching hub Step 3. Host B -> Host A Packet-In: in-port: 4 eth-dst: Host A eth-src: Host B Packet-Out: action: OUTPUT:Port 1 11 When the packets are returned from host B to host A, an entry is added to the flow table and also the packets are transferred to port 1. For that reason, the packets are not received by host C.

Adding Processing of Flow Entry For flow entries, set match that indicates the target packet conditions, and instruction that indicates the operation on the packet, entry priority level, and effective time. Finally, add an entry to the flow table by issuing the Flow Mod message. 12

Achieve a switching hub Step 4. Host A -> Host B Packet-In: in-port: 1 eth-dst: Host B eth-src: Host A Packet-Out: action: OUTPUT:Port 4 13 Again, when packets are sent from host A to host B, an entry is added to the flow table and also the packets are transferred to port 4.

Packet Transfer Regardless whether the destination MAC address is found from the MAC address table, at the end the Packet-Out message is issued and received packets are transferred. The class corresponding to the Packet-Out message is OFPPacketOut class 14

Ryu application example architecture Run ryu-manager --verbose ryu.app.simple_switch_13 c0 s1 h1 -mac_address 00:00:00:00:00:01 h2 -mac_address 00:00:00:00:00:02 h3 -mac_address 00:00:00:00:00:03 Env: Ubuntu 14.04, Ryu,Mininet 15

Ryu application example Execute ping from host 1 to host ARP request At this point, host 1 does not know the MAC address of host 2, therefore, before ICMP echo request, an ARP request is supposed to be broadcast. The broadcast packet is received by host 2 and host ARP reply In response to the ARP, host 2 returns an ARP reply to host ICMP echo request Now host 1 knows the MAC address of host 2, host 1 sends an echo request to host ICMP echo reply Because host 2 already knows the MAC address of host 1, host 2 returns an echo reply to host 1. 16

Ryu application example Execute ping from host 1 to host ARP request At this point, host 1 does not know the MAC address of host 2, therefore, before ICMP echo request, an ARP request is supposed to be broadcast. The broadcast packet is received by host 2 and host ARP reply In response to the ARP, host 2 returns an ARP reply to host ICMP echo request Now host 1 knows the MAC address of host 2, host 1 sends an echo request to host ICMP echo reply Because host 2 already knows the MAC address of host 1, host 2 returns an echo reply to host 1. 17

Ryu application example Execute ping from host 1 to host ARP request At this point, host 1 does not know the MAC address of host 2, therefore, before ICMP echo request, an ARP request is supposed to be broadcast. The broadcast packet is received by host 2 and host ARP reply In response to the ARP, host 2 returns an ARP reply to host ICMP echo request Now host 1 knows the MAC address of host 2, host 1 sends an echo request to host ICMP echo reply Because host 2 already knows the MAC address of host 1, host 2 returns an echo reply to host 1. 18

Ryu application example Execute ping from host 1 to host ARP request At this point, host 1 does not know the MAC address of host 2, therefore, before ICMP echo request, an ARP request is supposed to be broadcast. The broadcast packet is received by host 2 and host ARP reply In response to the ARP, host 2 returns an ARP reply to host ICMP echo request Now host 1 knows the MAC address of host 2, host 1 sends an echo request to host ICMP echo reply Because host 2 already knows the MAC address of host 1, host 2 returns an echo reply to host 1. 19

h1 ping h2: switch s1 (flow table) controller c0 (log) ARP request 1. ARP request 20

Host h1: Host h2: Host h3: 1. ARP request 21

ARP replay 2. ARP replay ARP replay 22 switch s1 (flow table) controller c0 (log)

Host h1: Host h2: Host h3: 2. ARP Replay 23

3. ICMP echo request 24 switch s1 (flow table) controller c0 (log)

Host h1: Host h2: Host h3: 3. ICMP echo request 25

4. ICMP echo replay The ICMP echo reply returned from host 2 to host 1 matches the already registered flow entry (1) thus is transferred to host 1 without issuing Packet-In. 26 switch s1 (flow table) controller c0 (log)

Host h1: Host h2: Host h3: 4. ICMP echo replay 27