Jump to content

Recommended Posts

Posted

Hi there,

 

I'm trying to make the r1 work as a openflow switch using open vswitch.

 

The most I've achieved is to make it work as a dumb 5 ports switch using this configuration script that I got from the sticky post:
 

#!/bin/bash
set -x

ip addr flush dev eth0
ip addr flush dev wlan1
ip addr flush dev br0

ip link set eth0 up

# No WLAN. Set cpu VLAN interfaces to associate to eth ports.
ip link add link eth0 name eth0.101 type vlan id 101
ip link set eth0.101 up
ip link add link eth0 name eth0.102 type vlan id 102
ip link set eth0.102 up
ip link add link eth0 name eth0.103 type vlan id 103
ip link set eth0.103 up
ip link add link eth0 name eth0.104 type vlan id 104
ip link set eth0.104 up
ip link add link eth0 name eth0.105 type vlan id 105
ip link set eth0.105 up

# Set software bridge and attach hardware eth ports
ip link add br0 type bridge
ip link set dev br0 type bridge stp_state 0

ip link set lan1 master br0
ip link set lan2 master br0
ip link set lan3 master br0
ip link set lan4 master br0
ip link set wan master br0

# Configure ports VLAN bahaviour to match BCM53125 behaviour
bridge vlan add vid 101 dev lan1 pvid untagged
bridge vlan del dev lan1 vid 1 self
bridge vlan add vid 102 dev lan2 pvid untagged
bridge vlan del dev lan2 vid 1 self
bridge vlan add vid 103 dev lan3 pvid untagged
bridge vlan del dev lan3 vid 1 self
bridge vlan add vid 104 dev lan4 pvid untagged
bridge vlan del dev lan4 vid 1 self
bridge vlan add vid 105 dev wan pvid untagged
bridge vlan del dev wan vid 1 self

# Activate CPU ports
ip link set eth0.101 master br0
ip link set eth0.102 master br0
ip link set eth0.103 master br0
ip link set eth0.104 master br0
ip link set eth0.105 master br0

# Activate Hardware ports
ip link set br0 up
ip link set lan1 up
ip link set lan4 up
ip link set lan2 up
ip link set lan3 up
ip link set wan up

ip addr add 192.168.1.200/24 dev br0
route add -net 0.0.0.0/0 gw 192.168.1.1

Now I want to create an ovs bridge, but I don't know which ports should be added.

 

The only information I've found about this is in this post, but he's using the swconfig command, which is not working in this version.

 

Any ideas on how to do it?

 

Thank you all.

Posted

There's only one CPU port eth0, so free  eth0.* ports

Quote

for i in {102..105}; do 

ip l set eth0.${i} nomaster

done

and add them as netdev ports to openvswitch
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines