Openflow: различия между версиями
Материал из noname.com.ua
Перейти к навигацииПерейти к поискуSirmax (обсуждение | вклад) |
Sirmax (обсуждение | вклад) |
||
Строка 1: | Строка 1: | ||
+ | [[Категория:Networking]] |
||
+ | [[Категория:Linux]] |
||
+ | [[Категория:OpenFlow]] |
||
+ | [[Категория:OpenVSwitch]] |
||
+ | [[Категория:Centec]] |
||
+ | =Centec v580= |
||
+ | Некоторые железные свитчи управляются так же как OpenVSwitch<BR> |
||
+ | Просто оставлю тут пример правил |
||
+ | <BR> |
||
+ | OpenFlow configuration |
||
+ | <PRE> |
||
+ | ovs-ofctl add-flow br0 "priority=10 in_port=50,dl_vlan=1001,actions=pop_vlan,output=15" -O openflow13 |
||
+ | ovs-ofctl add-flow br0 "priority=10 in_port=50,dl_vlan=1002,actions=pop_vlan,output=29" -O openflow13 |
||
+ | ovs-ofctl add-flow br0 "priority=10 in_port=50,dl_vlan=1003,actions=pop_vlan,output=6" -O openflow13 |
||
+ | ovs-ofctl add-flow br0 "priority=10 in_port=50,dl_vlan=1004,actions=pop_vlan,output=11" -O openflow13 |
||
+ | ovs-ofctl add-flow br0 "priority=10 in_port=50,dl_vlan=1005,actions=pop_vlan,output=44" -O openflow13 |
||
+ | |||
+ | ovs-ofctl add-flow br0 "priority=10 in_port=44,actions=push_vlan:0x8100,set_field:0x13ed->vlan_vid,output=50" -O openflow13 |
||
+ | ovs-ofctl add-flow br0 "priority=10 in_port=11,actions=push_vlan:0x8100,set_field:0x13ec->vlan_vid,output=50" -O openflow13 |
||
+ | ovs-ofctl add-flow br0 "priority=10 in_port=6, actions=push_vlan:0x8100,set_field:0x13eb->vlan_vid,output=50" -O openflow13 |
||
+ | ovs-ofctl add-flow br0 "priority=10 in_port=29,actions=push_vlan:0x8100,set_field:0x13ea->vlan_vid,output=50" -O openflow13 |
||
+ | ovs-ofctl add-flow br0 "priority=10 in_port=15,actions=push_vlan:0x8100,set_field:0x13e9->vlan_vid,output=50" -O openflow13 |
||
+ | |||
+ | ovs-ofctl add-flow br0 "priority=10 in_port=50,dl_vlan=1006,actions=pop_vlan,output=13" -O openflow13 |
||
+ | ovs-ofctl add-flow br0 "priority=10 in_port=13,actions=push_vlan:0x8100,set_field:0x13ee->vlan_vid,output=50" -O openflow13 |
||
+ | |||
+ | ovs-ofctl add-flow br0 "priority=10 in_port=50,dl_vlan=1007,actions=pop_vlan,output=22" -O openflow13 |
||
+ | ovs-ofctl add-flow br0 "priority=10 in_port=22,actions=push_vlan:0x8100,set_field:0x13ef->vlan_vid,output=50" -O openflow13 |
||
+ | </PRE> |
||
+ | |||
+ | Port configuration (example) |
||
+ | <PRE> |
||
+ | # show running-config interface eth-0-44 |
||
+ | |||
+ | interface eth-0-44 |
||
+ | description OFSW1_P44 |
||
+ | speed 1000 |
||
+ | duplex full |
||
+ | jumboframe enable |
||
+ | switchport access vlan 1005 |
||
+ | spanning-tree edgeport bpdu-filter enable |
||
+ | spanning-tree edgeport |
||
+ | openflow enable |
||
+ | vlan-filter disable |
||
+ | </PRE> |
||
+ | |||
+ | |||
+ | |||
+ | =ССылки про OpenFlow= |
||
* https://tuzs.sut.ru/release/tuzs_v3_i2_y2017/article_2.pdf |
* https://tuzs.sut.ru/release/tuzs_v3_i2_y2017/article_2.pdf |
||
Версия 12:54, 16 августа 2021
Centec v580
Некоторые железные свитчи управляются так же как OpenVSwitch
Просто оставлю тут пример правил
OpenFlow configuration
ovs-ofctl add-flow br0 "priority=10 in_port=50,dl_vlan=1001,actions=pop_vlan,output=15" -O openflow13 ovs-ofctl add-flow br0 "priority=10 in_port=50,dl_vlan=1002,actions=pop_vlan,output=29" -O openflow13 ovs-ofctl add-flow br0 "priority=10 in_port=50,dl_vlan=1003,actions=pop_vlan,output=6" -O openflow13 ovs-ofctl add-flow br0 "priority=10 in_port=50,dl_vlan=1004,actions=pop_vlan,output=11" -O openflow13 ovs-ofctl add-flow br0 "priority=10 in_port=50,dl_vlan=1005,actions=pop_vlan,output=44" -O openflow13 ovs-ofctl add-flow br0 "priority=10 in_port=44,actions=push_vlan:0x8100,set_field:0x13ed->vlan_vid,output=50" -O openflow13 ovs-ofctl add-flow br0 "priority=10 in_port=11,actions=push_vlan:0x8100,set_field:0x13ec->vlan_vid,output=50" -O openflow13 ovs-ofctl add-flow br0 "priority=10 in_port=6, actions=push_vlan:0x8100,set_field:0x13eb->vlan_vid,output=50" -O openflow13 ovs-ofctl add-flow br0 "priority=10 in_port=29,actions=push_vlan:0x8100,set_field:0x13ea->vlan_vid,output=50" -O openflow13 ovs-ofctl add-flow br0 "priority=10 in_port=15,actions=push_vlan:0x8100,set_field:0x13e9->vlan_vid,output=50" -O openflow13 ovs-ofctl add-flow br0 "priority=10 in_port=50,dl_vlan=1006,actions=pop_vlan,output=13" -O openflow13 ovs-ofctl add-flow br0 "priority=10 in_port=13,actions=push_vlan:0x8100,set_field:0x13ee->vlan_vid,output=50" -O openflow13 ovs-ofctl add-flow br0 "priority=10 in_port=50,dl_vlan=1007,actions=pop_vlan,output=22" -O openflow13 ovs-ofctl add-flow br0 "priority=10 in_port=22,actions=push_vlan:0x8100,set_field:0x13ef->vlan_vid,output=50" -O openflow13
Port configuration (example)
# show running-config interface eth-0-44 interface eth-0-44 description OFSW1_P44 speed 1000 duplex full jumboframe enable switchport access vlan 1005 spanning-tree edgeport bpdu-filter enable spanning-tree edgeport openflow enable vlan-filter disable