Multi-Nic PC installed OvS transform into openflow switch configuration script

Source: Internet
Author: User

#!/bin/sh

#启动物理端口

echo "OpenFlow" | sudo-s ifconfig eth0 up
echo "OpenFlow" | Sudo-s ifconfig eth1 up
echo "OpenFlow" | Sudo-s Ifconfig eth2 up
echo "OpenFlow" | Sudo-s Ifconfig eth3 up
#如果网桥已存在, deleting

echo "OpenFlow" | Sudo-s ovs-vsctl--if-exists del-br s1

#添加新网桥, and set its OpenFlow version number and Dpid

echo "OpenFlow" | sudo-s ovs-vsctl add-br S1
echo "OpenFlow" | Sudo-s Ovs-vsctl set Bridge s1 protocols=openflow13
echo "OpenFlow" | Sudo-s Ovs-vsctl set Bridge s1 other_config:datapath-id=0000000000000001

#添加物理端口到网桥

echo "OpenFlow" | Sudo-s ovs-vsctl add-port S1 eth0

echo "OpenFlow" | sudo-s ovs-vsctl add-port S1 eth1
echo "OpenFlow" | Sudo-s ovs-vsctl add-port S1 eth2
echo "OpenFlow" | Sudo-s ovs-vsctl add-port S1 eth3
#设置网桥IP
echo "OpenFlow" | Sudo-s ifconfig S1 192.168.1.2 netmask 255.255.255.0
echo "OpenFlow" | Sudo-s Route del Default
echo "OpenFlow" | Sudo-s route Add default GW 192.168.1.1 S1

echo "OpenFlow" | Sudo-s Ovs-vsctl set Bridge s1 fail-mode=secure
#连接控制器
echo "OpenFlow" | Sudo-s Ovs-vsctl del-controller S1

echo "OpenFlow" | Sudo-s ovs-vsctl set-controller S1 tcp:192.168.1.11:6633


Ocean

2015.4.13

From Southeast University

Multi-Nic PC installed OvS transform into openflow switch configuration script

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.