4. RouterOSでのOpenFlow対応
あくまで、実験用途とのことですが、個人の出費レベル
でOpenFlowスイッチが手に入るのは魅力ですよね。
Currently RouterOS implements OpenFlow version 1.0.0 required
features. Support for newer versions, optional features and switching
hardware acceleration are to be added. Current implementation should
be considered experimental - NOT production ready and is available
for evaluation purposes. Please contact support with feature requests
and bug reports.
OpenFlow support is available as standalone openflow package.
OpenFlow feature overrides regular packet processing functionality packets that are received on interfaces that are OpenFlow switch ports,
will not pass through the regular networking stack unless OpenFlow
controller sets up flows that enable this. Due to this care must be taken
to not disable access to the device when configuring OpenFlow.
Currently only unencrypted TCP is available as the communications
channel between RouterOS OpenFlow switch and controller.
http://wiki.mikrotik.com/wiki/Manual:OpenFlow
4
9. Max packets buffered
/* Switch features. */
struct ofp_switch_features {
struct ofp_header header;
};
OpenFlow Switch Specification Version 1.3.2
7.3 Controller-to-Switch Messages
uint64_t datapath_id;
uint32_t n_buffers;
uint8_t n_tables;
uint8_t auxiliary_id;
uint8_t pad[2];
/* Datapath unique ID. The lower 48-bits are for
a MAC address, while the upper 16-bits are
implementer-defined. */
/* Max packets buffered at once. */
/* Number of tables supported by datapath. */
/* Identify auxiliary connections */
/* Align to 64-bits. */
/* Features. */
uint32_t capabilities; /* Bitmap of support "ofp_capabilities". */
uint32_t reserved;
};
OFP_ASSERT(sizeof(struct ofp_switch_features) == 32);
The datapath_id field uniquely identifies a datapath. The lower 48 bits are intended for the switch MAC address, while the
top 16 bits are up to the implementer. An example use of the top 16 bits would be a VLAN ID to distinguish multiple virtual
switch instances on a single physical switch. This field should be treated as an opaque bit string by controllers.
The n_buffers field specifies the maximum number of packets the switch can buffer
when sending packets to the controller using packet-in messages (see 6.1.2).
RouterBoard (RB750GL)によるOpenFlow環境では、
Packet-in処理は対応していないみたい...
9
24. 参考) Buffaloルータの場合
BusyBox v1.19.3 (2012-03-24 08:32:17 JST) built-in shell (ash)
Enter 'help' for a list of built-in commands.
!
_______
________
__
|
|.-----.-----.-----.| | | |.----.| |_
|
|| _ | -__|
|| | | ||
_||
_|
|_______||
__|_____|__|__||________||__| |____|
|__| W I R E L E S S
F R E E D O M
ATTITUDE ADJUSTMENT (bleeding edge, r30406) ---------* 1/4 oz Vodka
Pour all ingredients into mixing
* 1/4 oz Gin
tin with ice, strain into glass.
* 1/4 oz Amaretto
* 1/4 oz Triple sec
* 1/4 oz Peach schnapps
* 1/4 oz Sour mix
* 1 splash Cranberry juice
----------------------------------------------------root@OpenWrt1:~# dpctl dump-flows unix:/var/run/dp0.sock
stats_reply (xid=0x430268b9): flags=none type=1(flow)
cookie=0, duration_sec=16s, duration_nsec=17000000s, table_id=1, priority=255,
n_packets=16, n_bytes=1568,
idle_timeout=0,hard_timeout=0,ip,in_port=1,dl_src=7c:c3:a1:87:8f:
65,dl_dst=00:00:00:00:00:01,nw_dst=192.168.1.1,actions=mod_dl_src:
00:00:00:00:00:02,mod_dl_dst:00:1a:80:0a:9e:d4,output:2
cookie=0, duration_sec=16s, duration_nsec=17000000s, table_id=1, priority=255,
n_packets=16, n_bytes=1568, idle_timeout=0,hard_timeout=0,ip,in_port=2,dl_src=00:1a:80:0a:
9e:d4,dl_dst=00:00:00:00:00:02,nw_dst=192.168.0.1,actions=mod_dl_src:
00:00:00:00:00:01,mod_dl_dst:7c:c3:a1:87:8f:65,output:1
root@OpenWrt1:~#
Flowエントリ
に従った転送制御
が行われている !!
OpenFlow化されたBuffalo WHR-G301NでのFlowTable
24