Opendaylight study (by quqi99)

Source: Internet
Author: User
Tags zip git clone oscp
Author: Zhang Hua posted: 2013-06-13
Copyright notice: Can be reproduced arbitrarily, please be sure to use hyperlinks in the form of the original source of the article and the author's information and this copyright notice
(http://blog.csdn.net/quqi99)

In my opinion, the essence of SDN is technically mainly the following three points:

1) There is a controller that separates the control flow from the data stream. The switch will ask the controller which port the packet is forwarded to. The South Bridge protocol between the switch and the controller has a standard called openflow, but not all manufacturers are willing to abide by the standard. In addition to supporting the OpenFlow protocol, Opendaylight supports a number of other protocols.

2) The concept of tenant tenant is achieved in the switch. The essence of cloud computing is to rent services to tenants, and services should be segregated for tenants. The traditional two-tier network is isolated with VLANs, and is now tenant. Just before the concept of tenant in the application layer, now directly below the L2 layer. In addition, VLANs have many drawbacks (such as VLAN number only to 1-4094, this is not suitable for public cloud, and need to configure the actual physical switch), so you can customize the frame head with some tunnel technology like GRE, in the frame header can be customized similar to VLAN and tenant isolation concept, Just like an application, it is sent through the socket and the receiver parses the data through a custom protocol.

3) The controller provides the North Bridge API for user invocation to implement a software-defined network.


, after today's initial study of Opendaylight, achieved a few purposes.

1) Opendaylight What it looks like, its principle is familiar. In addition to the CLI and rest APIs, other high-level things are understandable.

2) Although the code for OpenStack's Opendaylight plugin is not yet available, you can imagine how it will be used in OpenStack in the future. Also clear how this plugin write the approximate steps.

3) familiar with the use of Mininet, Mininet is a machine used to simulate the OpenFlow experimental environment. Its implementation principle is: uses the root namespace to do the openflow switch, each other host is one namespace,host and the switch to connect through the Veth peer device.

But since Opendaylight's documentation is very unclear, one thing is not too clear, leading to the subsequent experiment not doing:

1) It is unclear how the NodeA of the following Controller-node commands is coming, NodeA should be a UUID-like value for the database, but it is unclear what commands can get it.

OSCP (config) # Controller-node <nodeA>



Installing the Opendaylight controller

Can be compiled from the source code, you can also directly download the compiled Opendaylight Controller (https://jenkins.opendaylight.org/controller/job/controller-nightly/ lastsuccessfulbuild/artifact/opendaylight/distribution/opendaylight/target/), we choose the way to compile directly from the source code:

1, install Maven,java, ant (sudo yum install ant) software, the following is the installation steps of Maven:

Http://mirror.bit.edu.cn/apache/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.zip

After extracting, set the following environment variables directly in the ~/.BASHRC file:

Export java_home=/bak/java/jdk1.7.0_21

Export m2_home=/bak/java/apache-maven-3.0.5

Export maven_opts= "-xms256m-xmx512m"

Export path= $JAVA _home/bin: $M 2_home/bin: $PATH


2. Download the Opendaylightcontroller code and compile it:

git clone https://git.opendaylight.org/gerrit/p/controller.git

CD controller/opendaylight/distribution/opendaylight/

MVN clean Install (This step occasionally first execution will be error, after the error, add the-x parameter to execute again on it)


3, Start Opendaylightcontroller,

CD controller/opendaylight/distribution/opendaylight/target/ Distribution.opendaylight-0.1.0-snapshot-osgipackage/opendaylight

./run.sh

Then you can access the link in the browser http://localhost:8080


4, (optional) The Eclipse Development environment environment is set up as follows:

1) Install the Maven plugin in eclipse (find Maven integration for Eclipse in Eclipse Market)

2) Import "Existing Maven project", I set Workspace to:/bak/opendaylight/controller

3) Set the target for OSGi, Controller/opendaylight/distribution/opendaylight/opendaylight.target

4) Start Opendaylight-osgi-launcher in debug mode

5) Address of Opendaylight Gerrit, https://git.opendaylight.org/gerrit/


or with other OpenFlow controllers, such as Floodlight, Http://docs.projectfloodlight.org/display/floodlightcontroller/Installation+Guide

$ git clone git://github.com/floodlight/floodlight.git
$ cd floodlight
$ git checkout fl-last-passed-build
$ ant

$java-jar Target/floodlight.jar # run Floodlight

Http://localhost:8080/ui/index.html


Installing Mininet

Mininet currently cannot run on a 64-bit system and has to download the VirtualBox image Http://floodlight.openflowhub.org/files/floodlight-vm.zip

Start mininet and connect the controller

sudo mn--controller=remote--ip=192.168.99.104--port=6633--mac--topo=tree,depth=2

or simple, sudo mn--controller=remote--ip=192.168.99.104--port=6633

root@localhost:/home/floodlight# dpctl Show tcp:127.0.0.1:6634 features_reply (XID=0XC1D3DDD4): ver:0x1, Dpid:1 n_ Tables:2, n_buffers:256 features:capabilities:0x87, actions:0xfff 1 (s1-eth1): addr:f2:91:cb:40:c7:5a, config:0, state : 0 current:10gb-fd COPPER 2 (s1-eth2): Addr:1a:91:f7:1e:2a:be, config:0, state:0 current:10gb-fd CO Pper 3 (S1-ETH3): Addr:16:04:cc:cb:59:de, config:0, state:0 current:10gb-fd COPPER LOCAL (dp0): addr:00:23: 20:89:2d:61, config:0x1, state:0x1 get_config_reply (XID=0X9F508DB3): Miss_send_len=0 root@localhost:/home/ floodlight# dpctl dump-flows tcp:127.0.0.1:6634 stats_reply (xid=0x77dd14d8): Flags=none type=1 (flow) root@localhost:/ home/floodlight# sudo dpctl add-flow tcp:127.0.0.1:6634 in_port=1,idle_timeout=360,actions=output:2 root@localhost:/ home/floodlight# dpctl dump-flows tcp:127.0.0.1:6634 stats_reply (xid=0x469554d): Flags=none type=1 (Flow) cookie=0, Du Ration_sec=2s, duration_nsec=939000000s, table_iD=0, priority=32768, N_packets=0, N_bytes=0, Idle_timeout=360,hard_timeout=0,in_port=1,actions=output:2



 


opendaylight SDN Controller Platform (OSCP)

Note that the Opendaylight controller and OSCP actually have 2 separate SDN controller projects (respectively, by Cisco and Bigswitch). However, Bigswitch withdrew from Opendaylight (downgraded to silver member) in June, and OSCP the project was largely scrapped (since 2013-06, it has not been updated)

git clone ssh://veryhua2006@git.opendaylight.org:29418/net-virt-platform.git./setup.sh make Java-jar target/ Sdnplatform.jar source./workspace/ve/bin/activate Make Stop-sdncon Reset-cassandra start-sdncon (OSCP REST APIs implemented in a simple Process Sdncon) Java-jar Sdnplatform/target/sdnplatform.jar GUI address: http://192.168.99.100:8000/run CLI command (https://wiki.ope Ndaylight.org/view/opendaylight_command-line_interface_ (CLI): Main): [hua@laptop net-virt-platform]$ CD cli/[

Hua@laptop cli]$./cli.py version200 default controller:127.0.0.1:8000, SDN OS 1.0-custom version laptop> Help Specific commands type help <topic> commands:clearterm clears and resets the terminal screen C Onnect Connect to a controller's REST API date Display Current date and time debug Manage various C  Li debugging features echo Echo remaining arguments enable Enter enable mode exit Exit current

 Mode help, on commands or topics History Display History of commands logout Exit from CLI no Delete or disable configuration param Eters Ping Ping A switch or IP address set Manage CLI sessions settings show Show links, CO Ntroller managed switch to switch interfaces test Perform various tests on the network trace determine The L3 path to some destination traceroute determine the L3 path to some destination Tunnel-link version WATC H Iterate indicated command displaying results laptop> show Switch # switch dpid Alias Connected Si nce IP Address Tun capable-enabled-state Core Switch-|-----------------------|-----|-------------------- ---|--------------|-----------|--------|--------|-----------1 00:00:00:00:00:00:00:01 2013-06-23 17:34:35 CST 192.

 168.99.104 false disabled false laptop> show host

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.