SlideShare uma empresa Scribd logo
1 de 22
Baixar para ler offline
Open vSwitch의
Vendor Extension 구현
2015.03.31
(주)파이오링크
SDN 개발실 백승훈 (sh.baek@piolink.com)
© PIOLINK, Inc. SDN No.1
목차
 Vendor Extension
 Implementation
-System Overview
-ovs-vswitchd (User Space Application)
-openvswitch.ko (Kernel Module)
-ovs-ofctl (Test Program)
 References
© PIOLINK, Inc. SDN No.1
Vendor Extension
 Vendor Extension
- OpenFlow에서 Vendor가 원하는 기능을 확장할 수 있도록 제공하는 표준
- OpenFlow 1.1 부터 Vendor를 Experimenter로 재정의함 (*본 ppt는 Vendor로 표현)
- 메시지 헤더의 Type이 0x04이면 Vendor Message임
- Vendor Message에서 vendor_id 값으로 Vendor를 구분
- vendor_id의 최상위 바이트가 0이면 IEEE OUI(Organizationally Unique Identifier)임
(IEEE OUI는 ONF로부터 할당 받은 고유 ID임)
- OpenFlow 메시지 data의 Action에서 action type이 0xFFFF이면 Vendor Action임
Version
(8 bits)
Type
(8 bits)
Length
(16 bits)
xid (32 bits)
vendor_id (32 bits)
data[ ]…
Controller Switch
0x00 Hello
0x01 Error
....
0x04 Vendor
…
0x14 FlowMod
…
Vendor
고유 식별자
< Vendor 메시지 (OpenFlow 1.0 기준) >
Type
(16 bits)
Length
(16 bits)
Vendor(32 bits)
data[]…
< Vendor Action (OpenFlow 1.0 기준) >
0x0000 Output
0x0001 SetVLANVID
…
0xFFFF Vendor
© PIOLINK, Inc. SDN No.1
Implementation(System Overview)
 Implementation System
- OVS에 Vendor Extension을 구현하기 위해서는 ovs-vswitchd, openvswitch.ko의 수정이 필요함.
- OVS에 Vendor Message를 전송하기 위한 컨트롤러 프로그램은 ovs-ofctl을 수정해 사용
ovs-ofctl
ovs-vswitchd
openvswitch.ko
Open vSwitch
OpenFlow를 이용해 ovs-vswitchd를 관리하는 OVS 툴
*본 ppt에서 Vendor Message를 생성하고 전송하기 위한
테스트 목적으로 사용됨
OVS 데몬으로 controller로부터 Vendor Message를 받고
kernel 모듈로 Vendor Action을 전달함
OVS의 kernel 모듈로 network 장비로부터 packet을 받아
매칭되는 Vendor Action을 수행함
만약 없으면 ovs-vswitchd에게 Vendor Action을 받아옴
Vendor Action
Vendor Message
© PIOLINK, Inc. SDN No.1
Implementation(System Overview)
 구현 방법 설명은 예제프로그램을 만드는 과정으로 진행
-예제프로그램은 PIOLINK Vendor Message와 Action을 추가해 in_port 1에
매칭되는 packet에 대해 Vendor Action을 수행하도록 함.
-전체 과정을 4 단계로 구분해 성공 시 해당 Log를 출력해 동작을 검증
-Log 출력 API 및 확인 방법
•ovs-vswitchd
-API : VLOG_WARN(string, args…)
-확인 방법 : cat /usr/local/var/log/openvswitch/ovs-vswitchd.log
•openvswitch.ko
-API : pr_info(), printk() …
-확인 방법 : dmesg
단계 동작 Log
1 Vendor Message를 OVS가 수신 “Vendor Message Receive”
2 Vendor Action을 OVS datapath로 전송 “Vendor Action Send”
3 Vendor Action을 OVS datapath가 수신 “Vendor Action Receive”
4 매칭되는 packet에 Vendor Action을 수행 “Vendor Action Processing”
© PIOLINK, Inc. SDN No.1
Implementation(수정할 소스 파일)
 ovs-vswitchd (User Space Application)
- Vendor Message
• ~/include/openflow/openflow-common.h
• ~/lib/ofp-msgs.c
• ~/lib/ofp-msgs.h
• ~/lib/ofp-msgs.inc
• ~/lib/ofp-util.c
- Vendor Action
• ~/lib/ofp-actions.c
• ~/lib/ofp-actions.h
• ~/lib/ofp-actions.inc1
• ~/lib/ofp-actions.inc2
• ~/ofproto/ofproto-dpif-xlate.c
 openvswitch.ko (Kernel Module)
- Vendor Action
• ~/datapath/flow_netlink.c
• ~/datapath/actions.c
• ~/datapath/linux/compat/include/linux/openvswitch.h
 ovs-ofctl (Test Program)
- Vendor Message & Vendor Action
• ~/utilities/ovs-ofctl.c
© PIOLINK, Inc. SDN No.1
Implementation(ovs-vswitchd: Vendor Message)
 ovs-vswitchd(Vendor Message)
…
#define ONF_VENDOR_ID 0x4f4e4600
#define PIOLINK_VENDOR_ID 0xFF001021
…
파일명 : ~/include/openflow/openflow-common.h
YYY는 바로 밑에 “OFPTYPE_FLOW_MOD,”를 추가한 라인 번호
XXX는 ~/lib/ofp-msgs.h 파일에서 “OFPRAW_PIOLINK_FLOW_MOD,”를 추가한 라인 번호
static struct raw_info raw_infos[]{
...
{
ofpraw_piolink_flow_mod_instances,
1, 6,
#line XXX "./lib/ofp-msgs.h"
16, // OpenFlow 메시지 길이( header(8bytes) + body )
#line XXX "./lib/ofp-msgs.h"
0,
#line YYY "./lib/ofp-msgs.inc"
OFPTYPE_FLOW_MOD,
"PIOLINK_FLOW_MOD",
}
};
파일명 : ~/lib/ofp-msgs.inc
*편의를 위해 따로 헤더 파일을 만들어 관리
파일명 : ~/lib/piolink_msgs.h
#ifndef __PIOLINK_MSGS_H__
#define __PIOLINK_MSGS_H__
static struct raw_instance ofpraw_piolink_flow_mod_instances[] = {
{{0, NULL}, {1, 4, 0, 0xFF001021, 0}, OFPRAW_PIOLINK_FLOW_MOD, 0},
{{0, NULL}, {2, 4, 0, 0xFF001021, 0}, OFPRAW_PIOLINK_FLOW_MOD, 0},
{{0, NULL}, {3, 4, 0, 0xFF001021, 0}, OFPRAW_PIOLINK_FLOW_MOD, 0},
{{0, NULL}, {4, 4, 0, 0xFF001021, 0}, OFPRAW_PIOLINK_FLOW_MOD, 0},
{{0, NULL}, {5, 4, 0, 0xFF001021, 0}, OFPRAW_PIOLINK_FLOW_MOD, 0},
{{0, NULL}, {6, 4, 0, 0xFF001021, 0}, OFPRAW_PIOLINK_FLOW_MOD, 0},
};
#endif
*두꺼운 글씨가 추가/수정한 부분임!
enum ofraw {
...
OFPRAW_PIOLINK_FLOW_MOD,
};
파일명 : ~/lib/ofp-msgs.h
Vendor ID, Subtype
Vendor ID : vendor의 고유 식별번호
Subtype : 같은 vendor에서의 식별번호
*컴파일할 때 삭제 되는 경우도 있으니 주의 !
© PIOLINK, Inc. SDN No.1
Implementation(ovs-vswitchd: Vendor Message)
 ovs-vswitchd(Vendor Message)
...
#include "piolink-msgs.h"
#include "ofp-msgs.inc"
…
static enum ofperr ofphdrs_decode(…){
…
if(hdrs->type == OFPT_VENDOR){
…
if( (hdrs->vendor == NX_VENDOR_ID) || (hdrs->vendor == PIOLINK_VENDOR_ID) ){
…
}
}
else if( hdrs->version == OFP10_VERSION
&& (hdrs->type == OFPT10_STATS_REQUEST || hdrs->type == OFPT10_STATS_REPLY)){
…
if(hdrs->stat == OFPST_VENDOR){
…
if( (hdrs->vendor == NX_VENDOR_ID) || (hdrs->vendor == PIOLINK_VENDOR_ID) ){
…
}
…
}
…
} else if( hdrs->version != OFP10_VERSION
&& (hdrs->type == OFPT11_STATS_REQUEST || hdrs->type == OFPT11_STATS_REPLY)){
…
if(hdrs->stat == OFPST_VENDOR){
…
if( (hdrs->vendor == NX_VENDOR_ID) || (hdrs->vendor == PIOLINK_VENDOR_ID) ){
…
}
…
}
…
}
… (뒷장에 계속!!) …
파일명 : ~/lib/ofp-msgs.c
#include "ofp-msgs.inc" 위에 추가하기!
OVS에서 기본으로 구현돼있는 Nicira의 Vendor id
© PIOLINK, Inc. SDN No.1
Implementation(ovs-vswitchd: Vendor Message)
 ovs-vswitchd(Vendor Message)
static void ofpraw_put__(…){
…
if(hdrs->type == OFPT_VENDOR){
…
ovs_assert( (hdrs->vendor == NX_VENDOR_ID) || (hdrs->vendor == PIOLINK_VENDOR_ID) );
…
}
else if( hdrs->version == OFP10_VERSION
&& (hdrs->type == OFPT10_STATS_REQUEST || hdrs->type == OFPT10_STATS_REPLY)){
…
if(hdrs->stat == OFPST_VENDOR){
…
if( (hdrs->vendor == NX_VENDOR_ID) || (hdrs->vendor == PIOLINK_VENDOR_ID) ){
…
}
…
}
…
} else if( hdrs->version != OFP10_VERSION
&& (hdrs->type == OFPT11_STATS_REQUEST || hdrs->type == OFPT11_STATS_REPLY)){
…
if(hdrs->stat == OFPST_VENDOR){
…
if( (hdrs->vendor == NX_VENDOR_ID) || (hdrs->vendor == PIOLINK_VENDOR_ID) ){
…
}
…
}
…
}
파일명 : ~/lib/ofp-msgs.c
© PIOLINK, Inc. SDN No.1
Implementation(ovs-vswitchd: Vendor Message)
 ovs-vswitchd(Vendor Message)
enum ofperr ofputil_decode_flow_mod(…){
…
if(raw == OFPRAW_OFPT11_FLOW_MOD){
…
}
else{
…
if(raw == OFPRAW_OFPT10_FLOW_MOD){
…
}
else if(…) { … }
else if(raw == OFPRAW_PIOLINK_FLOW_MOD){
/* PIOLINK EXTEND FLOW MOD */
VLOG_WARN(“Vendor Message Receive! ");
/* fm 변수 설정 (match, cookie 등 ) */
memset(&fm->match.flow, 0, sizeof fm->match.flow);
ofputil_wildcard_from_ofpfw10(0x003FFFFE, &fm->match.wc);
fm->match.flow.in_port.ofp_port = 1;
fm->priority = 200;
fm->cookie = htonll(0);
fm->cookie_mask = htonll(0);
fm->new_cookie = 0x01;
fm->idle_timeout = 10000;
fm->hard_timeout = 30000;
fm->importance = 0;
fm->buffer_id = 0xFFFFFFFF;
fm->out_port = 0x00;
fm->out_group = OFPG11_ANY;
/* command 변수 설정 (flow add, flow delete 등) */
command = 0x0000; // flow add
/* raw_flags 변수 설정 */
raw_flags = 0x0000;
}
…
}
…
}
파일명 : ~/lib/ofp-util.c
OpenFlow의 FLOW_MOD에 관련된 파라미터를
OVS에 설정하는 부분.
(*예제는 임의로 in_port 1에 매칭하도록 하드코딩 함.)
1. Vendor Message를 OVS가 수신 성공
(동작 검증을 위한 Log는 빨간색으로 표시)
© PIOLINK, Inc. SDN No.1
Implementation(ovs-vswitchd: Vendor Action)
 ovs-vswitchd(Vendor Action)
…
#define OFPACTS
/* Output. */
OFPACT(OUTPUT, ofpact_output, ofpact, "output") 
…
OFPACT(PIOLINK, ofpact_piolink, ofpact, "piolink")
…
struct ofpact_piolink {
struct ofpact ofpact;
/* body 선언 */
uint16_t nop;
uint32_t body;
};
…
파일명 : ~/lib/ofp-actions.h
…
put_PIOLINK(struct ofpbuf *openflow);
…
static enum ofperr decode_PIOLINK(const struct piolink_action * , struct ofpbuf *);
…
파일명 : ~/lib/ofp-actions.inc1
*컴파일할 때 삭제 되는 경우도 있으니 주의 !
© PIOLINK, Inc. SDN No.1
Implementation(ovs-vswitchd: Vendor Action)
 ovs-vswitchd(Vendor Action)
...
BUILD_ASSERT_DECL(sizeof(struct piolink_action) %
OFP_ACTION_ALIGN == 0);
…
static struct ofpact_raw_instance all_raw_instances[] = {
…
{ { 0xFF001021, 1, 0x01 },
PIOLINK_RAW,
HMAP_NODE_NULL_INITIALIZER,
HMAP_NODE_NULL_INITIALIZER,
sizeof(struct piolink_action),
sizeof(struct piolink_action),
0,
0,
"PIOLINK",
NULL,
},
… (*중간의 OpenFlow Version은 내용이 반복돼 생략함)
{ { 0xFF001021, 1, 0x06 },
PIOLINK_RAW,
HMAP_NODE_NULL_INITIALIZER,
HMAP_NODE_NULL_INITIALIZER,
sizeof(struct piolink_action),
sizeof(struct piolink_action),
0,
0,
"PIOLINK",
NULL,
},
};
…
static inline struct piolink_action * put_PIOLINK (struct ofpbuf
*openflow){
return ofpact_put_raw(openflow, 1, PIOLINK_RAW, 0); //
version 1.0
}
…
static enum ofperr ofpact_decode(…){
switch(raw){
…
case PIOLINK_RAW :
return decode_PIOLINK_RAW(ALIGNED_CAST(const
struct ship_action *, a), out);
…
}
…
}
파일명 : ~/lib/ofp-actions.inc2
OpenFlow Version
위의 내용과 OpenFlow Version만 다름
*컴파일할 때 삭제 되는 경우도 있으니 주의 !
© PIOLINK, Inc. SDN No.1
Implementation(ovs-vswitchd: Vendor Action)
 ovs-vswitchd(Vendor Action)
…
enum ofp_raw_action_type{
…
PIOLINK_RAW,
};
…
struct piolink_action{
ovs_be16 type; /* OFPAT_VENDOR. */
ovs_be16 len; /* piolink_action 길이 = 16*/
ovs_be32 vendor; /* PIOLINK_VENDOR_ID */
ovs_be16 subtype; /* PIOLINK */
/* body */
ovs_be16 nop; /* 구조체 크기를 맞추기 위함 */
ovs_be32 body;
};
OFP_ASSERT(sizeof(struct piolink_action) == 16);
static enum ofperr
decode_PIOLINK_RAW(const struct piolink_action* pa, struct
ofpbuf* out){
struct ofpact_piolink *piolink;
piolink = ofpact_put_PIOLINK(out);
/* piolink body 값 디코딩 */
piolink->body = ntohl(pa->body);
return 0;
}
static void encode_PIOLINK( const struct ofpact_piolink* piolink
, enum ofp_version ofp_version OVS_UNUSED
, struct ofpbuf *out){
struct piolink_action* pa;
pa = put_PIOLINK(out);
/* piolink body 값 엔코딩 */
pa->body = htonl(piolink->body);
}
static char* OVS_WARN_UNUSED_RESULT
parse_PIOLINK(char* arg, struct ofpbuf* ofpacts
, enum ofputil_protocol* usable_protocols OVS_UNUSED){
struct ofpact_piolink* piolink = ofpact_put_PIOLINK(ofpacts);
char *key, *value;
while(ofputil_parse_key_value(&arg, &key, &value)){
char* error = NULL;
if(!strcmp(key, "body")){
error = str_to_u32(value, &piolink->body);
}
else{
error = xasprintf("invalid key "%s"", key);
}
if(error) return error;
}
return NULL;
}
static void
format_PIOLINK(const struct ofpact_piolink* piolink, struct ds* s)
{
ds_put_format(s, "piolink(body=%"PRIu32") ",piolink->body);
}
…
static bool ofpact_is_set_or_move_action(…)
{
switch(a->type){
…
case OFPACT_PIOLINK:
return false;
…
}
}
… (뒷장에 계속!!) …
파일명 : ~/lib/ofp-actions.c
구조체 크기는
16의 배수로 해야함!
© PIOLINK, Inc. SDN No.1
Implementation(ovs-vswitchd: Vendor Action)
 ovs-vswitchd(Vendor Action)
static bool ofpact_is_allowed_in_actions_set(…){
switch(a->type){
…
case OFPACT_PIOLINK:
return false;
…
}
}
…
enum ovs_instruction_type
ovs_instruction_type_from_ofpact_type(…){
switch(type){
…
case OFPACT_PIOLINK:
default:
…
}
}
…
static enum ofperr ofpact_check(…){
…
switch(a->type){
…
case OFPACT_PIOLINK:
/* action 유효 체크 */
VLOG_WARN("OFPACT_PIOLINK VALID");
return 0;
…
}
}
…
static bool ofpact_outputs_to_port(…){
switch(ofpact->type){
…
case OFPACT_PIOLINK:
default:
return false;
}
}
…
static enum ofperr ofpact_decode_raw(…){
…
if(oah->type == htons(OFPAT_VENDOR)){
…
if( ( hdrs.vendor == …) || …
|| (hdrs.vendor == PIOLINK_VENDOR_ID) ){
…
}
…
}
…
}
…
static void* ofpact_put_raw(…){
…
switch(hdrs->vendor){
…
case NX_VENDOR_ID:
case PIOLINK_VENDOR_ID;
…
}
}
파일명 : ~/lib/ofp-actions.c
© PIOLINK, Inc. SDN No.1
Implementation(ovs-vswitchd: Vendor Action)
 ovs-vswitchd(Vendor Action)
…
static bool ofpact_needs_recirculation_after_mpls(…){
…
switch(a->type){
…
case OFPACT_PIOLINK:
return false;
…
}
…
}
static void do_xlate_actions(…){
…
OFPACT_FOR_EACH(a, ofpacts, ofpacts_len){
…
switch(a->type) {
…
case OFPACT_PIOLINK:
/* 커널로 전달할 메시지 만들기 */
VLOG_WARN(“Vendor Action Send");
const struct ofpact_piolink* piolink = ofpact_get_PIOLINK(a);
ctx->xout->slow |= commit_odp_actions(&ctx->xin->flow, &ctx->base_flow, ctx->xout->odp_actions
, &ctx->xout->wc, ctx->xbridge->masked_set_action);
nl_msg_put_u32( ctx->xout->odp_actions
, OVS_ACTION_ATTR_PIOLINK /* kernel module에서 메시지를 구별하기 위한 식별자 */
, odp_to_u32(20 ) /* kernel module에 전달할 메시지 body */ );
break;
}
}
}
…
파일명 : ~/ofproto/ofproto-dpif-xlate.c
2. Vendor Action을 OVS datapath로 전송
© PIOLINK, Inc. SDN No.1
Implementation(openvswitch.ko: Vendor Action)
 openvswitch.ko(Vendor Action)
…
enum ovs_piolink_attr{
OVS_PIOLINK_ATTR_UNSPEC,
OVS_PIOLINK_ATTR_NOMAL,
__OVS_PIOLINK_ATTR_MAX,
};
#define OVS_PIOLINK_ATTR_MAX (__OVS_PIOLINK_ATTR_MAX – 1)
…
enum ovs_action_attr {
OVS_ACTION_ATTR_UNSPEC,
…
OVS_ACTION_ATTR_PIOLINK,
…
__OVS_ACTION_ATTR_MAX
};
…
파일명 : ~/datapath/linux/compat/include/linux/openvswitch.h
Vendor Action 추가
Vendor Action의 subtype
© PIOLINK, Inc. SDN No.1
Implementation(openvswitch.ko: Vendor Action)
 openvswitch.ko(Vendor Action)
…
static int __ovs_nla_copy_actions(…){
…
nla_for_each_nested(a, attr, rem) {
static const u32 action_lens[OVS_ACTION_ATTR_MAX + 1] = {
[OVS_ACTION_ATTR_OUTPUT] = sizeof(u32),
…
[OVS_ACTION_ATTR_PIOLINK] = (u32)-1
};
…
switch(type) {
…
case OVS_ACTION_ATTR_PIOLINK:
/* action 유효 체크 */
pr_info(“Vendor Action Receiven");
break;
…
}
…
}
…
}
…
파일명 : ~/datapath/flow_netlink.c
3. Vendor Action을 OVS datapath가 수신
© PIOLINK, Inc. SDN No.1
Implementation(openvswitch.ko: Vendor Action)
 openvswitch.ko(Vendor Action)
…
static int do_execute_actions(…){
…
for(a = attr, rem = len; rem > 0; a = nla_next(a, &rem)){
…
switch(nla_type(a)) {
…
case OVS_ACTION_ATTR_PIOLINK:
/* packet에 대한 action !! THE END!!*/
pr_info(“Vendor Action Processingn");
err = 0;
break;
…
}
…
}
…
}
파일명 : ~/datapath/actions.c
4. 매칭되는 packet에 Vendor Action을 수행
© PIOLINK, Inc. SDN No.1
Implementation(ovs-ofctl: Vendor Message & Vendor Action)
 ovs-ofctl(Vendor Message & Vendor Action) ~> *수정 후 테스트 프로그램으로 사용
…
static void piolink_vendor_test(int argc OVS_UNUSED, char* argv[]);
static const struct command all_commands[] = {
{"show", "switch", 1, 1, ofctl_show },
…
{"piolink", NULL, 1, 1, piolink_vendor_test },
{ NULL, NULL, 0, 0, NULL },
};
…
static struct piolink_action {
ovs_be16 type;
ovs_be16 len;
ovs_be32 vendor;
ovs_be16 subtype;
ovs_be16 nop;
ovs_be32 body;
};
static void piolink_vendor_test(int argc OVS_UNUSED, char* argv[]){
struct vconn* vconn;
struct ofpbuf* request;
enum ofputil_protocol protocol;
enum ofp_version version;;
struct ofpact_piolink* piolink;
struct piolink_action pa = { 0xFFFF, htons(16), htonl(0xFF001021), htons(1), htons(0), htonl(2) };
protocol = open_vconn(argv[1], &vconn);
protocol = set_protocol_for_flow_dump(vconn, protocol, OFPUTIL_P_OF10_STD);
version = ofputil_protocol_to_ofp_version(protocol);
request = ofpraw_alloc(OFPRAW_PIOLINK_FLOW_MOD, version, 0);
piolink = ofpact_put(request, OFPACT_PIOLINK, 16);
memcpy(piolink, &pa, sizeof(struct piolink_action));
transact_noreply(vconn, request);
vconn_close(vconn);
}
파일명 : ~/utilities/ovs-ofctl.c
© PIOLINK, Inc. SDN No.1
Implementation(검증)
1) Mininet을 이용해 환경 구축
2) 수정한 ovs-ofctl을 이용해 Vendor Message 전송
• “sudo ovs-ofctl piolink s1”
3) Vendor Message 수신 확인 “Log 1”
4) “ovs-ofpctl dump-flows s1” 으로 OVS의 flow table에 Vendor Action 저장 확인
5) Mininet에서 h1(port 1)에서 h2(port 2)로 ping을 보냄
6) Vendor Action 전송 확인 “Log 2”
7) Vendor Action 수신 확인 “Log 3”
8) Vendor Action으로 packet을 처리하는 것 확인 “Log 4”
© PIOLINK, Inc. SDN No.1
References
 http://www.openvswitch.org/
 https://github.com/openvswitch/ovs/
 http://en.wikipedia.org/wiki/Open_vSwitch
 http://www.slideshare.net/rajdeep/openvswitch-deep-dive
 http://mininet.org/
 http://flowgrammable.org/sdn/openflow/message-layer/
 https://www.opennetworking.org/images/stories/downloads/sdn-
resources/onf-specifications/openflow/openflow-spec-v1.3.0.pdf
 http://dpdk.org/
 http://www.apache.org/
 http://www.xenproject.org/
 https://www.openstack.org/
 http://www.linux-kvm.org/page/Main_Page
 https://www.opennetworking.org/sdn-resources/openflow
감사합니다.
㈜파이오링크
서울시 금천구 가산디지털2로 98
(가산동 550-1) IT캐슬 1동 401호
TEL: 02-2025-6900
FAX: 02-2025-6901
www.PIOLINK.com

Mais conteúdo relacionado

Mais procurados

20150818 jun lee_openstack juno release 내용 분석
20150818 jun lee_openstack juno release 내용 분석20150818 jun lee_openstack juno release 내용 분석
20150818 jun lee_openstack juno release 내용 분석rootfs32
 
ONS2014 출장보고
ONS2014 출장보고ONS2014 출장보고
ONS2014 출장보고Yongyoon Shin
 
[OpenStack 하반기 스터디] Docker를 이용한 OpenStack 가상화
[OpenStack 하반기 스터디] Docker를 이용한 OpenStack 가상화[OpenStack 하반기 스터디] Docker를 이용한 OpenStack 가상화
[OpenStack 하반기 스터디] Docker를 이용한 OpenStack 가상화OpenStack Korea Community
 
F5 container ingress_service_in_kuernetes_with_calico_cni_by_duck_in_korea
F5 container ingress_service_in_kuernetes_with_calico_cni_by_duck_in_koreaF5 container ingress_service_in_kuernetes_with_calico_cni_by_duck_in_korea
F5 container ingress_service_in_kuernetes_with_calico_cni_by_duck_in_koreaInfraEngineer
 
오픈 소스 클라우드 플랫폼 분석
오픈 소스 클라우드 플랫폼 분석오픈 소스 클라우드 플랫폼 분석
오픈 소스 클라우드 플랫폼 분석Jennifer Noh
 
초보자를 위한 네트워크/VLAN 기초
초보자를 위한 네트워크/VLAN 기초초보자를 위한 네트워크/VLAN 기초
초보자를 위한 네트워크/VLAN 기초Open Source Consulting
 
[오픈소스컨설팅]Docker on Kubernetes v1
[오픈소스컨설팅]Docker on Kubernetes v1[오픈소스컨설팅]Docker on Kubernetes v1
[오픈소스컨설팅]Docker on Kubernetes v1Ji-Woong Choi
 
Build the OpenStack Cloud with Neutron Networing, IceHouse
Build the OpenStack Cloud with Neutron Networing, IceHouseBuild the OpenStack Cloud with Neutron Networing, IceHouse
Build the OpenStack Cloud with Neutron Networing, IceHousejieun kim
 
[MeetUp][1st] 오리뎅이의_쿠버네티스_네트워킹
[MeetUp][1st] 오리뎅이의_쿠버네티스_네트워킹[MeetUp][1st] 오리뎅이의_쿠버네티스_네트워킹
[MeetUp][1st] 오리뎅이의_쿠버네티스_네트워킹InfraEngineer
 
20150511 jun lee_openstack neutron 분석 (최종)
20150511 jun lee_openstack neutron 분석 (최종)20150511 jun lee_openstack neutron 분석 (최종)
20150511 jun lee_openstack neutron 분석 (최종)rootfs32
 
Calico routing modes_trans_by_duck_in_korean
Calico routing modes_trans_by_duck_in_koreanCalico routing modes_trans_by_duck_in_korean
Calico routing modes_trans_by_duck_in_koreanInfraEngineer
 
[오픈소스컨설팅]RHEL7/CentOS7 Pacemaker기반-HA시스템구성-v1.0
[오픈소스컨설팅]RHEL7/CentOS7 Pacemaker기반-HA시스템구성-v1.0[오픈소스컨설팅]RHEL7/CentOS7 Pacemaker기반-HA시스템구성-v1.0
[오픈소스컨설팅]RHEL7/CentOS7 Pacemaker기반-HA시스템구성-v1.0Ji-Woong Choi
 
클라우드 환경을 위한 네트워크 가상화와 NSX(기초편)
클라우드 환경을 위한 네트워크 가상화와 NSX(기초편)클라우드 환경을 위한 네트워크 가상화와 NSX(기초편)
클라우드 환경을 위한 네트워크 가상화와 NSX(기초편)Laehyoung Kim
 
Opendaylight beryllium
Opendaylight berylliumOpendaylight beryllium
Opendaylight berylliumCheolmin Lee
 
ONOS (Open Network Operating System) Blackbird Release 분석
ONOS (Open Network Operating System)  Blackbird Release 분석ONOS (Open Network Operating System)  Blackbird Release 분석
ONOS (Open Network Operating System) Blackbird Release 분석rootfs32
 
Openstack live migration
Openstack live migrationOpenstack live migration
Openstack live migrationymtech
 
Brocade Vyatta Controller Overview
Brocade Vyatta Controller OverviewBrocade Vyatta Controller Overview
Brocade Vyatta Controller OverviewSeung-Hoon Baek
 
[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2
[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2
[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2InfraEngineer
 
OpenDaylight의 High Availability 기능 분석
OpenDaylight의 High Availability 기능 분석OpenDaylight의 High Availability 기능 분석
OpenDaylight의 High Availability 기능 분석Seung-Hoon Baek
 

Mais procurados (20)

20150818 jun lee_openstack juno release 내용 분석
20150818 jun lee_openstack juno release 내용 분석20150818 jun lee_openstack juno release 내용 분석
20150818 jun lee_openstack juno release 내용 분석
 
ONS2014 출장보고
ONS2014 출장보고ONS2014 출장보고
ONS2014 출장보고
 
[OpenStack 하반기 스터디] Docker를 이용한 OpenStack 가상화
[OpenStack 하반기 스터디] Docker를 이용한 OpenStack 가상화[OpenStack 하반기 스터디] Docker를 이용한 OpenStack 가상화
[OpenStack 하반기 스터디] Docker를 이용한 OpenStack 가상화
 
F5 container ingress_service_in_kuernetes_with_calico_cni_by_duck_in_korea
F5 container ingress_service_in_kuernetes_with_calico_cni_by_duck_in_koreaF5 container ingress_service_in_kuernetes_with_calico_cni_by_duck_in_korea
F5 container ingress_service_in_kuernetes_with_calico_cni_by_duck_in_korea
 
오픈 소스 클라우드 플랫폼 분석
오픈 소스 클라우드 플랫폼 분석오픈 소스 클라우드 플랫폼 분석
오픈 소스 클라우드 플랫폼 분석
 
초보자를 위한 네트워크/VLAN 기초
초보자를 위한 네트워크/VLAN 기초초보자를 위한 네트워크/VLAN 기초
초보자를 위한 네트워크/VLAN 기초
 
[오픈소스컨설팅]Docker on Kubernetes v1
[오픈소스컨설팅]Docker on Kubernetes v1[오픈소스컨설팅]Docker on Kubernetes v1
[오픈소스컨설팅]Docker on Kubernetes v1
 
Build the OpenStack Cloud with Neutron Networing, IceHouse
Build the OpenStack Cloud with Neutron Networing, IceHouseBuild the OpenStack Cloud with Neutron Networing, IceHouse
Build the OpenStack Cloud with Neutron Networing, IceHouse
 
[MeetUp][1st] 오리뎅이의_쿠버네티스_네트워킹
[MeetUp][1st] 오리뎅이의_쿠버네티스_네트워킹[MeetUp][1st] 오리뎅이의_쿠버네티스_네트워킹
[MeetUp][1st] 오리뎅이의_쿠버네티스_네트워킹
 
20150511 jun lee_openstack neutron 분석 (최종)
20150511 jun lee_openstack neutron 분석 (최종)20150511 jun lee_openstack neutron 분석 (최종)
20150511 jun lee_openstack neutron 분석 (최종)
 
Calico routing modes_trans_by_duck_in_korean
Calico routing modes_trans_by_duck_in_koreanCalico routing modes_trans_by_duck_in_korean
Calico routing modes_trans_by_duck_in_korean
 
[오픈소스컨설팅]RHEL7/CentOS7 Pacemaker기반-HA시스템구성-v1.0
[오픈소스컨설팅]RHEL7/CentOS7 Pacemaker기반-HA시스템구성-v1.0[오픈소스컨설팅]RHEL7/CentOS7 Pacemaker기반-HA시스템구성-v1.0
[오픈소스컨설팅]RHEL7/CentOS7 Pacemaker기반-HA시스템구성-v1.0
 
클라우드 환경을 위한 네트워크 가상화와 NSX(기초편)
클라우드 환경을 위한 네트워크 가상화와 NSX(기초편)클라우드 환경을 위한 네트워크 가상화와 NSX(기초편)
클라우드 환경을 위한 네트워크 가상화와 NSX(기초편)
 
Opendaylight beryllium
Opendaylight berylliumOpendaylight beryllium
Opendaylight beryllium
 
ONOS (Open Network Operating System) Blackbird Release 분석
ONOS (Open Network Operating System)  Blackbird Release 분석ONOS (Open Network Operating System)  Blackbird Release 분석
ONOS (Open Network Operating System) Blackbird Release 분석
 
Openstack live migration
Openstack live migrationOpenstack live migration
Openstack live migration
 
DPDK
DPDKDPDK
DPDK
 
Brocade Vyatta Controller Overview
Brocade Vyatta Controller OverviewBrocade Vyatta Controller Overview
Brocade Vyatta Controller Overview
 
[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2
[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2
[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2
 
OpenDaylight의 High Availability 기능 분석
OpenDaylight의 High Availability 기능 분석OpenDaylight의 High Availability 기능 분석
OpenDaylight의 High Availability 기능 분석
 

Destaque

NFV VNF Architecture
NFV VNF ArchitectureNFV VNF Architecture
NFV VNF Architecturejungbh
 
NFV Architectural Framework
NFV Architectural FrameworkNFV Architectural Framework
NFV Architectural FrameworkSeung-Hoon Baek
 
Introduction to Virtualization, Virsh and Virt-Manager
Introduction to Virtualization, Virsh and Virt-ManagerIntroduction to Virtualization, Virsh and Virt-Manager
Introduction to Virtualization, Virsh and Virt-Managerwalkerchang
 
QEMU Disk IO Which performs Better: Native or threads?
QEMU Disk IO Which performs Better: Native or threads?QEMU Disk IO Which performs Better: Native or threads?
QEMU Disk IO Which performs Better: Native or threads?Pradeep Kumar
 
20151030 jun lee_vnf 의 reliabilityavailability 제공을 위한 방법 (최종)
20151030 jun lee_vnf 의 reliabilityavailability 제공을 위한 방법 (최종)20151030 jun lee_vnf 의 reliabilityavailability 제공을 위한 방법 (최종)
20151030 jun lee_vnf 의 reliabilityavailability 제공을 위한 방법 (최종)rootfs32
 
Kvm performance optimization for ubuntu
Kvm performance optimization for ubuntuKvm performance optimization for ubuntu
Kvm performance optimization for ubuntuSim Janghoon
 
NFV Management and Orchestration 분석
NFV Management and Orchestration 분석NFV Management and Orchestration 분석
NFV Management and Orchestration 분석rootfs32
 

Destaque (8)

NFV VNF Architecture
NFV VNF ArchitectureNFV VNF Architecture
NFV VNF Architecture
 
NFV Architectural Framework
NFV Architectural FrameworkNFV Architectural Framework
NFV Architectural Framework
 
Docker Container
Docker ContainerDocker Container
Docker Container
 
Introduction to Virtualization, Virsh and Virt-Manager
Introduction to Virtualization, Virsh and Virt-ManagerIntroduction to Virtualization, Virsh and Virt-Manager
Introduction to Virtualization, Virsh and Virt-Manager
 
QEMU Disk IO Which performs Better: Native or threads?
QEMU Disk IO Which performs Better: Native or threads?QEMU Disk IO Which performs Better: Native or threads?
QEMU Disk IO Which performs Better: Native or threads?
 
20151030 jun lee_vnf 의 reliabilityavailability 제공을 위한 방법 (최종)
20151030 jun lee_vnf 의 reliabilityavailability 제공을 위한 방법 (최종)20151030 jun lee_vnf 의 reliabilityavailability 제공을 위한 방법 (최종)
20151030 jun lee_vnf 의 reliabilityavailability 제공을 위한 방법 (최종)
 
Kvm performance optimization for ubuntu
Kvm performance optimization for ubuntuKvm performance optimization for ubuntu
Kvm performance optimization for ubuntu
 
NFV Management and Orchestration 분석
NFV Management and Orchestration 분석NFV Management and Orchestration 분석
NFV Management and Orchestration 분석
 

Semelhante a Open vSwitch의 Vendor Extension 구현

오픈소스 기반 비행제어컴퓨터 PX4 소개
오픈소스 기반 비행제어컴퓨터 PX4 소개오픈소스 기반 비행제어컴퓨터 PX4 소개
오픈소스 기반 비행제어컴퓨터 PX4 소개SungTae Moon
 
안드로이드 플랫폼 설명
안드로이드 플랫폼 설명안드로이드 플랫폼 설명
안드로이드 플랫폼 설명Peter YoungSik Yun
 
[2014 CodeEngn Conference 11] 이경식 - 동적 추적 프레임워크를 이용한 OS X 바이너리 분석
[2014 CodeEngn Conference 11] 이경식 - 동적 추적 프레임워크를 이용한 OS X 바이너리 분석[2014 CodeEngn Conference 11] 이경식 - 동적 추적 프레임워크를 이용한 OS X 바이너리 분석
[2014 CodeEngn Conference 11] 이경식 - 동적 추적 프레임워크를 이용한 OS X 바이너리 분석GangSeok Lee
 
[232] 성능어디까지쥐어짜봤니 송태웅
[232] 성능어디까지쥐어짜봤니 송태웅[232] 성능어디까지쥐어짜봤니 송태웅
[232] 성능어디까지쥐어짜봤니 송태웅NAVER D2
 
초보 개발자/학생들을 위한 오픈소스 트랜드
초보 개발자/학생들을 위한 오픈소스 트랜드 초보 개발자/학생들을 위한 오픈소스 트랜드
초보 개발자/학생들을 위한 오픈소스 트랜드 YoungSu Son
 
DPDK (Data Plane Development Kit)
DPDK (Data Plane Development Kit) DPDK (Data Plane Development Kit)
DPDK (Data Plane Development Kit) ymtech
 
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축Ji-Woong Choi
 
[IoT] MAKE with Open H/W + Node.JS - 3rd
[IoT] MAKE with Open H/W + Node.JS - 3rd[IoT] MAKE with Open H/W + Node.JS - 3rd
[IoT] MAKE with Open H/W + Node.JS - 3rdPark Jonggun
 
[네이버오픈소스세미나] Pinpoint를 이용해서 서버리스 플랫폼 Apache Openwhisk 트레이싱하기 - 오승현
[네이버오픈소스세미나] Pinpoint를 이용해서 서버리스 플랫폼 Apache Openwhisk 트레이싱하기 - 오승현[네이버오픈소스세미나] Pinpoint를 이용해서 서버리스 플랫폼 Apache Openwhisk 트레이싱하기 - 오승현
[네이버오픈소스세미나] Pinpoint를 이용해서 서버리스 플랫폼 Apache Openwhisk 트레이싱하기 - 오승현NAVER Engineering
 
141 deview 2013 발표자료(박준형) v1.1(track4-session1)
141 deview 2013 발표자료(박준형) v1.1(track4-session1)141 deview 2013 발표자료(박준형) v1.1(track4-session1)
141 deview 2013 발표자료(박준형) v1.1(track4-session1)NAVER D2
 
Tensorflow service & Machine Learning
Tensorflow service & Machine LearningTensorflow service & Machine Learning
Tensorflow service & Machine LearningJEEHYUN PAIK
 
머신러닝 및 데이터 과학 연구자를 위한 python 기반 컨테이너 분산처리 플랫폼 설계 및 개발
머신러닝 및 데이터 과학 연구자를 위한 python 기반 컨테이너 분산처리 플랫폼 설계 및 개발머신러닝 및 데이터 과학 연구자를 위한 python 기반 컨테이너 분산처리 플랫폼 설계 및 개발
머신러닝 및 데이터 과학 연구자를 위한 python 기반 컨테이너 분산처리 플랫폼 설계 및 개발Jeongkyu Shin
 
Puppet과 자동화된 시스템 관리
Puppet과 자동화된 시스템 관리Puppet과 자동화된 시스템 관리
Puppet과 자동화된 시스템 관리Keon Ahn
 
Red Hat Forum 2012 - JBoss RHQ - Java Application Monitoring & Management Pla...
Red Hat Forum 2012 - JBoss RHQ - Java Application Monitoring & Management Pla...Red Hat Forum 2012 - JBoss RHQ - Java Application Monitoring & Management Pla...
Red Hat Forum 2012 - JBoss RHQ - Java Application Monitoring & Management Pla...Ted Won
 
리눅스 커널 기초 태스크관리
리눅스 커널 기초 태스크관리리눅스 커널 기초 태스크관리
리눅스 커널 기초 태스크관리Seungyong Lee
 
[225]빅데이터를 위한 분산 딥러닝 플랫폼 만들기
[225]빅데이터를 위한 분산 딥러닝 플랫폼 만들기[225]빅데이터를 위한 분산 딥러닝 플랫폼 만들기
[225]빅데이터를 위한 분산 딥러닝 플랫폼 만들기NAVER D2
 
Ryu with OpenFlow 1.3, Traffic Monitor
Ryu with OpenFlow 1.3, Traffic MonitorRyu with OpenFlow 1.3, Traffic Monitor
Ryu with OpenFlow 1.3, Traffic Monitorjieun kim
 
Fluentd with MySQL
Fluentd with MySQLFluentd with MySQL
Fluentd with MySQLI Goo Lee
 

Semelhante a Open vSwitch의 Vendor Extension 구현 (20)

오픈소스 기반 비행제어컴퓨터 PX4 소개
오픈소스 기반 비행제어컴퓨터 PX4 소개오픈소스 기반 비행제어컴퓨터 PX4 소개
오픈소스 기반 비행제어컴퓨터 PX4 소개
 
안드로이드 플랫폼 설명
안드로이드 플랫폼 설명안드로이드 플랫폼 설명
안드로이드 플랫폼 설명
 
[2014 CodeEngn Conference 11] 이경식 - 동적 추적 프레임워크를 이용한 OS X 바이너리 분석
[2014 CodeEngn Conference 11] 이경식 - 동적 추적 프레임워크를 이용한 OS X 바이너리 분석[2014 CodeEngn Conference 11] 이경식 - 동적 추적 프레임워크를 이용한 OS X 바이너리 분석
[2014 CodeEngn Conference 11] 이경식 - 동적 추적 프레임워크를 이용한 OS X 바이너리 분석
 
[232] 성능어디까지쥐어짜봤니 송태웅
[232] 성능어디까지쥐어짜봤니 송태웅[232] 성능어디까지쥐어짜봤니 송태웅
[232] 성능어디까지쥐어짜봤니 송태웅
 
초보 개발자/학생들을 위한 오픈소스 트랜드
초보 개발자/학생들을 위한 오픈소스 트랜드 초보 개발자/학생들을 위한 오픈소스 트랜드
초보 개발자/학생들을 위한 오픈소스 트랜드
 
DPDK (Data Plane Development Kit)
DPDK (Data Plane Development Kit) DPDK (Data Plane Development Kit)
DPDK (Data Plane Development Kit)
 
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축
 
[IoT] MAKE with Open H/W + Node.JS - 3rd
[IoT] MAKE with Open H/W + Node.JS - 3rd[IoT] MAKE with Open H/W + Node.JS - 3rd
[IoT] MAKE with Open H/W + Node.JS - 3rd
 
JetsonTX2 Python
 JetsonTX2 Python  JetsonTX2 Python
JetsonTX2 Python
 
[네이버오픈소스세미나] Pinpoint를 이용해서 서버리스 플랫폼 Apache Openwhisk 트레이싱하기 - 오승현
[네이버오픈소스세미나] Pinpoint를 이용해서 서버리스 플랫폼 Apache Openwhisk 트레이싱하기 - 오승현[네이버오픈소스세미나] Pinpoint를 이용해서 서버리스 플랫폼 Apache Openwhisk 트레이싱하기 - 오승현
[네이버오픈소스세미나] Pinpoint를 이용해서 서버리스 플랫폼 Apache Openwhisk 트레이싱하기 - 오승현
 
141 deview 2013 발표자료(박준형) v1.1(track4-session1)
141 deview 2013 발표자료(박준형) v1.1(track4-session1)141 deview 2013 발표자료(박준형) v1.1(track4-session1)
141 deview 2013 발표자료(박준형) v1.1(track4-session1)
 
InfiniFlux with_php
InfiniFlux with_phpInfiniFlux with_php
InfiniFlux with_php
 
Tensorflow service & Machine Learning
Tensorflow service & Machine LearningTensorflow service & Machine Learning
Tensorflow service & Machine Learning
 
머신러닝 및 데이터 과학 연구자를 위한 python 기반 컨테이너 분산처리 플랫폼 설계 및 개발
머신러닝 및 데이터 과학 연구자를 위한 python 기반 컨테이너 분산처리 플랫폼 설계 및 개발머신러닝 및 데이터 과학 연구자를 위한 python 기반 컨테이너 분산처리 플랫폼 설계 및 개발
머신러닝 및 데이터 과학 연구자를 위한 python 기반 컨테이너 분산처리 플랫폼 설계 및 개발
 
Puppet과 자동화된 시스템 관리
Puppet과 자동화된 시스템 관리Puppet과 자동화된 시스템 관리
Puppet과 자동화된 시스템 관리
 
Red Hat Forum 2012 - JBoss RHQ - Java Application Monitoring & Management Pla...
Red Hat Forum 2012 - JBoss RHQ - Java Application Monitoring & Management Pla...Red Hat Forum 2012 - JBoss RHQ - Java Application Monitoring & Management Pla...
Red Hat Forum 2012 - JBoss RHQ - Java Application Monitoring & Management Pla...
 
리눅스 커널 기초 태스크관리
리눅스 커널 기초 태스크관리리눅스 커널 기초 태스크관리
리눅스 커널 기초 태스크관리
 
[225]빅데이터를 위한 분산 딥러닝 플랫폼 만들기
[225]빅데이터를 위한 분산 딥러닝 플랫폼 만들기[225]빅데이터를 위한 분산 딥러닝 플랫폼 만들기
[225]빅데이터를 위한 분산 딥러닝 플랫폼 만들기
 
Ryu with OpenFlow 1.3, Traffic Monitor
Ryu with OpenFlow 1.3, Traffic MonitorRyu with OpenFlow 1.3, Traffic Monitor
Ryu with OpenFlow 1.3, Traffic Monitor
 
Fluentd with MySQL
Fluentd with MySQLFluentd with MySQL
Fluentd with MySQL
 

Open vSwitch의 Vendor Extension 구현

  • 1. Open vSwitch의 Vendor Extension 구현 2015.03.31 (주)파이오링크 SDN 개발실 백승훈 (sh.baek@piolink.com)
  • 2. © PIOLINK, Inc. SDN No.1 목차  Vendor Extension  Implementation -System Overview -ovs-vswitchd (User Space Application) -openvswitch.ko (Kernel Module) -ovs-ofctl (Test Program)  References
  • 3. © PIOLINK, Inc. SDN No.1 Vendor Extension  Vendor Extension - OpenFlow에서 Vendor가 원하는 기능을 확장할 수 있도록 제공하는 표준 - OpenFlow 1.1 부터 Vendor를 Experimenter로 재정의함 (*본 ppt는 Vendor로 표현) - 메시지 헤더의 Type이 0x04이면 Vendor Message임 - Vendor Message에서 vendor_id 값으로 Vendor를 구분 - vendor_id의 최상위 바이트가 0이면 IEEE OUI(Organizationally Unique Identifier)임 (IEEE OUI는 ONF로부터 할당 받은 고유 ID임) - OpenFlow 메시지 data의 Action에서 action type이 0xFFFF이면 Vendor Action임 Version (8 bits) Type (8 bits) Length (16 bits) xid (32 bits) vendor_id (32 bits) data[ ]… Controller Switch 0x00 Hello 0x01 Error .... 0x04 Vendor … 0x14 FlowMod … Vendor 고유 식별자 < Vendor 메시지 (OpenFlow 1.0 기준) > Type (16 bits) Length (16 bits) Vendor(32 bits) data[]… < Vendor Action (OpenFlow 1.0 기준) > 0x0000 Output 0x0001 SetVLANVID … 0xFFFF Vendor
  • 4. © PIOLINK, Inc. SDN No.1 Implementation(System Overview)  Implementation System - OVS에 Vendor Extension을 구현하기 위해서는 ovs-vswitchd, openvswitch.ko의 수정이 필요함. - OVS에 Vendor Message를 전송하기 위한 컨트롤러 프로그램은 ovs-ofctl을 수정해 사용 ovs-ofctl ovs-vswitchd openvswitch.ko Open vSwitch OpenFlow를 이용해 ovs-vswitchd를 관리하는 OVS 툴 *본 ppt에서 Vendor Message를 생성하고 전송하기 위한 테스트 목적으로 사용됨 OVS 데몬으로 controller로부터 Vendor Message를 받고 kernel 모듈로 Vendor Action을 전달함 OVS의 kernel 모듈로 network 장비로부터 packet을 받아 매칭되는 Vendor Action을 수행함 만약 없으면 ovs-vswitchd에게 Vendor Action을 받아옴 Vendor Action Vendor Message
  • 5. © PIOLINK, Inc. SDN No.1 Implementation(System Overview)  구현 방법 설명은 예제프로그램을 만드는 과정으로 진행 -예제프로그램은 PIOLINK Vendor Message와 Action을 추가해 in_port 1에 매칭되는 packet에 대해 Vendor Action을 수행하도록 함. -전체 과정을 4 단계로 구분해 성공 시 해당 Log를 출력해 동작을 검증 -Log 출력 API 및 확인 방법 •ovs-vswitchd -API : VLOG_WARN(string, args…) -확인 방법 : cat /usr/local/var/log/openvswitch/ovs-vswitchd.log •openvswitch.ko -API : pr_info(), printk() … -확인 방법 : dmesg 단계 동작 Log 1 Vendor Message를 OVS가 수신 “Vendor Message Receive” 2 Vendor Action을 OVS datapath로 전송 “Vendor Action Send” 3 Vendor Action을 OVS datapath가 수신 “Vendor Action Receive” 4 매칭되는 packet에 Vendor Action을 수행 “Vendor Action Processing”
  • 6. © PIOLINK, Inc. SDN No.1 Implementation(수정할 소스 파일)  ovs-vswitchd (User Space Application) - Vendor Message • ~/include/openflow/openflow-common.h • ~/lib/ofp-msgs.c • ~/lib/ofp-msgs.h • ~/lib/ofp-msgs.inc • ~/lib/ofp-util.c - Vendor Action • ~/lib/ofp-actions.c • ~/lib/ofp-actions.h • ~/lib/ofp-actions.inc1 • ~/lib/ofp-actions.inc2 • ~/ofproto/ofproto-dpif-xlate.c  openvswitch.ko (Kernel Module) - Vendor Action • ~/datapath/flow_netlink.c • ~/datapath/actions.c • ~/datapath/linux/compat/include/linux/openvswitch.h  ovs-ofctl (Test Program) - Vendor Message & Vendor Action • ~/utilities/ovs-ofctl.c
  • 7. © PIOLINK, Inc. SDN No.1 Implementation(ovs-vswitchd: Vendor Message)  ovs-vswitchd(Vendor Message) … #define ONF_VENDOR_ID 0x4f4e4600 #define PIOLINK_VENDOR_ID 0xFF001021 … 파일명 : ~/include/openflow/openflow-common.h YYY는 바로 밑에 “OFPTYPE_FLOW_MOD,”를 추가한 라인 번호 XXX는 ~/lib/ofp-msgs.h 파일에서 “OFPRAW_PIOLINK_FLOW_MOD,”를 추가한 라인 번호 static struct raw_info raw_infos[]{ ... { ofpraw_piolink_flow_mod_instances, 1, 6, #line XXX "./lib/ofp-msgs.h" 16, // OpenFlow 메시지 길이( header(8bytes) + body ) #line XXX "./lib/ofp-msgs.h" 0, #line YYY "./lib/ofp-msgs.inc" OFPTYPE_FLOW_MOD, "PIOLINK_FLOW_MOD", } }; 파일명 : ~/lib/ofp-msgs.inc *편의를 위해 따로 헤더 파일을 만들어 관리 파일명 : ~/lib/piolink_msgs.h #ifndef __PIOLINK_MSGS_H__ #define __PIOLINK_MSGS_H__ static struct raw_instance ofpraw_piolink_flow_mod_instances[] = { {{0, NULL}, {1, 4, 0, 0xFF001021, 0}, OFPRAW_PIOLINK_FLOW_MOD, 0}, {{0, NULL}, {2, 4, 0, 0xFF001021, 0}, OFPRAW_PIOLINK_FLOW_MOD, 0}, {{0, NULL}, {3, 4, 0, 0xFF001021, 0}, OFPRAW_PIOLINK_FLOW_MOD, 0}, {{0, NULL}, {4, 4, 0, 0xFF001021, 0}, OFPRAW_PIOLINK_FLOW_MOD, 0}, {{0, NULL}, {5, 4, 0, 0xFF001021, 0}, OFPRAW_PIOLINK_FLOW_MOD, 0}, {{0, NULL}, {6, 4, 0, 0xFF001021, 0}, OFPRAW_PIOLINK_FLOW_MOD, 0}, }; #endif *두꺼운 글씨가 추가/수정한 부분임! enum ofraw { ... OFPRAW_PIOLINK_FLOW_MOD, }; 파일명 : ~/lib/ofp-msgs.h Vendor ID, Subtype Vendor ID : vendor의 고유 식별번호 Subtype : 같은 vendor에서의 식별번호 *컴파일할 때 삭제 되는 경우도 있으니 주의 !
  • 8. © PIOLINK, Inc. SDN No.1 Implementation(ovs-vswitchd: Vendor Message)  ovs-vswitchd(Vendor Message) ... #include "piolink-msgs.h" #include "ofp-msgs.inc" … static enum ofperr ofphdrs_decode(…){ … if(hdrs->type == OFPT_VENDOR){ … if( (hdrs->vendor == NX_VENDOR_ID) || (hdrs->vendor == PIOLINK_VENDOR_ID) ){ … } } else if( hdrs->version == OFP10_VERSION && (hdrs->type == OFPT10_STATS_REQUEST || hdrs->type == OFPT10_STATS_REPLY)){ … if(hdrs->stat == OFPST_VENDOR){ … if( (hdrs->vendor == NX_VENDOR_ID) || (hdrs->vendor == PIOLINK_VENDOR_ID) ){ … } … } … } else if( hdrs->version != OFP10_VERSION && (hdrs->type == OFPT11_STATS_REQUEST || hdrs->type == OFPT11_STATS_REPLY)){ … if(hdrs->stat == OFPST_VENDOR){ … if( (hdrs->vendor == NX_VENDOR_ID) || (hdrs->vendor == PIOLINK_VENDOR_ID) ){ … } … } … } … (뒷장에 계속!!) … 파일명 : ~/lib/ofp-msgs.c #include "ofp-msgs.inc" 위에 추가하기! OVS에서 기본으로 구현돼있는 Nicira의 Vendor id
  • 9. © PIOLINK, Inc. SDN No.1 Implementation(ovs-vswitchd: Vendor Message)  ovs-vswitchd(Vendor Message) static void ofpraw_put__(…){ … if(hdrs->type == OFPT_VENDOR){ … ovs_assert( (hdrs->vendor == NX_VENDOR_ID) || (hdrs->vendor == PIOLINK_VENDOR_ID) ); … } else if( hdrs->version == OFP10_VERSION && (hdrs->type == OFPT10_STATS_REQUEST || hdrs->type == OFPT10_STATS_REPLY)){ … if(hdrs->stat == OFPST_VENDOR){ … if( (hdrs->vendor == NX_VENDOR_ID) || (hdrs->vendor == PIOLINK_VENDOR_ID) ){ … } … } … } else if( hdrs->version != OFP10_VERSION && (hdrs->type == OFPT11_STATS_REQUEST || hdrs->type == OFPT11_STATS_REPLY)){ … if(hdrs->stat == OFPST_VENDOR){ … if( (hdrs->vendor == NX_VENDOR_ID) || (hdrs->vendor == PIOLINK_VENDOR_ID) ){ … } … } … } 파일명 : ~/lib/ofp-msgs.c
  • 10. © PIOLINK, Inc. SDN No.1 Implementation(ovs-vswitchd: Vendor Message)  ovs-vswitchd(Vendor Message) enum ofperr ofputil_decode_flow_mod(…){ … if(raw == OFPRAW_OFPT11_FLOW_MOD){ … } else{ … if(raw == OFPRAW_OFPT10_FLOW_MOD){ … } else if(…) { … } else if(raw == OFPRAW_PIOLINK_FLOW_MOD){ /* PIOLINK EXTEND FLOW MOD */ VLOG_WARN(“Vendor Message Receive! "); /* fm 변수 설정 (match, cookie 등 ) */ memset(&fm->match.flow, 0, sizeof fm->match.flow); ofputil_wildcard_from_ofpfw10(0x003FFFFE, &fm->match.wc); fm->match.flow.in_port.ofp_port = 1; fm->priority = 200; fm->cookie = htonll(0); fm->cookie_mask = htonll(0); fm->new_cookie = 0x01; fm->idle_timeout = 10000; fm->hard_timeout = 30000; fm->importance = 0; fm->buffer_id = 0xFFFFFFFF; fm->out_port = 0x00; fm->out_group = OFPG11_ANY; /* command 변수 설정 (flow add, flow delete 등) */ command = 0x0000; // flow add /* raw_flags 변수 설정 */ raw_flags = 0x0000; } … } … } 파일명 : ~/lib/ofp-util.c OpenFlow의 FLOW_MOD에 관련된 파라미터를 OVS에 설정하는 부분. (*예제는 임의로 in_port 1에 매칭하도록 하드코딩 함.) 1. Vendor Message를 OVS가 수신 성공 (동작 검증을 위한 Log는 빨간색으로 표시)
  • 11. © PIOLINK, Inc. SDN No.1 Implementation(ovs-vswitchd: Vendor Action)  ovs-vswitchd(Vendor Action) … #define OFPACTS /* Output. */ OFPACT(OUTPUT, ofpact_output, ofpact, "output") … OFPACT(PIOLINK, ofpact_piolink, ofpact, "piolink") … struct ofpact_piolink { struct ofpact ofpact; /* body 선언 */ uint16_t nop; uint32_t body; }; … 파일명 : ~/lib/ofp-actions.h … put_PIOLINK(struct ofpbuf *openflow); … static enum ofperr decode_PIOLINK(const struct piolink_action * , struct ofpbuf *); … 파일명 : ~/lib/ofp-actions.inc1 *컴파일할 때 삭제 되는 경우도 있으니 주의 !
  • 12. © PIOLINK, Inc. SDN No.1 Implementation(ovs-vswitchd: Vendor Action)  ovs-vswitchd(Vendor Action) ... BUILD_ASSERT_DECL(sizeof(struct piolink_action) % OFP_ACTION_ALIGN == 0); … static struct ofpact_raw_instance all_raw_instances[] = { … { { 0xFF001021, 1, 0x01 }, PIOLINK_RAW, HMAP_NODE_NULL_INITIALIZER, HMAP_NODE_NULL_INITIALIZER, sizeof(struct piolink_action), sizeof(struct piolink_action), 0, 0, "PIOLINK", NULL, }, … (*중간의 OpenFlow Version은 내용이 반복돼 생략함) { { 0xFF001021, 1, 0x06 }, PIOLINK_RAW, HMAP_NODE_NULL_INITIALIZER, HMAP_NODE_NULL_INITIALIZER, sizeof(struct piolink_action), sizeof(struct piolink_action), 0, 0, "PIOLINK", NULL, }, }; … static inline struct piolink_action * put_PIOLINK (struct ofpbuf *openflow){ return ofpact_put_raw(openflow, 1, PIOLINK_RAW, 0); // version 1.0 } … static enum ofperr ofpact_decode(…){ switch(raw){ … case PIOLINK_RAW : return decode_PIOLINK_RAW(ALIGNED_CAST(const struct ship_action *, a), out); … } … } 파일명 : ~/lib/ofp-actions.inc2 OpenFlow Version 위의 내용과 OpenFlow Version만 다름 *컴파일할 때 삭제 되는 경우도 있으니 주의 !
  • 13. © PIOLINK, Inc. SDN No.1 Implementation(ovs-vswitchd: Vendor Action)  ovs-vswitchd(Vendor Action) … enum ofp_raw_action_type{ … PIOLINK_RAW, }; … struct piolink_action{ ovs_be16 type; /* OFPAT_VENDOR. */ ovs_be16 len; /* piolink_action 길이 = 16*/ ovs_be32 vendor; /* PIOLINK_VENDOR_ID */ ovs_be16 subtype; /* PIOLINK */ /* body */ ovs_be16 nop; /* 구조체 크기를 맞추기 위함 */ ovs_be32 body; }; OFP_ASSERT(sizeof(struct piolink_action) == 16); static enum ofperr decode_PIOLINK_RAW(const struct piolink_action* pa, struct ofpbuf* out){ struct ofpact_piolink *piolink; piolink = ofpact_put_PIOLINK(out); /* piolink body 값 디코딩 */ piolink->body = ntohl(pa->body); return 0; } static void encode_PIOLINK( const struct ofpact_piolink* piolink , enum ofp_version ofp_version OVS_UNUSED , struct ofpbuf *out){ struct piolink_action* pa; pa = put_PIOLINK(out); /* piolink body 값 엔코딩 */ pa->body = htonl(piolink->body); } static char* OVS_WARN_UNUSED_RESULT parse_PIOLINK(char* arg, struct ofpbuf* ofpacts , enum ofputil_protocol* usable_protocols OVS_UNUSED){ struct ofpact_piolink* piolink = ofpact_put_PIOLINK(ofpacts); char *key, *value; while(ofputil_parse_key_value(&arg, &key, &value)){ char* error = NULL; if(!strcmp(key, "body")){ error = str_to_u32(value, &piolink->body); } else{ error = xasprintf("invalid key "%s"", key); } if(error) return error; } return NULL; } static void format_PIOLINK(const struct ofpact_piolink* piolink, struct ds* s) { ds_put_format(s, "piolink(body=%"PRIu32") ",piolink->body); } … static bool ofpact_is_set_or_move_action(…) { switch(a->type){ … case OFPACT_PIOLINK: return false; … } } … (뒷장에 계속!!) … 파일명 : ~/lib/ofp-actions.c 구조체 크기는 16의 배수로 해야함!
  • 14. © PIOLINK, Inc. SDN No.1 Implementation(ovs-vswitchd: Vendor Action)  ovs-vswitchd(Vendor Action) static bool ofpact_is_allowed_in_actions_set(…){ switch(a->type){ … case OFPACT_PIOLINK: return false; … } } … enum ovs_instruction_type ovs_instruction_type_from_ofpact_type(…){ switch(type){ … case OFPACT_PIOLINK: default: … } } … static enum ofperr ofpact_check(…){ … switch(a->type){ … case OFPACT_PIOLINK: /* action 유효 체크 */ VLOG_WARN("OFPACT_PIOLINK VALID"); return 0; … } } … static bool ofpact_outputs_to_port(…){ switch(ofpact->type){ … case OFPACT_PIOLINK: default: return false; } } … static enum ofperr ofpact_decode_raw(…){ … if(oah->type == htons(OFPAT_VENDOR)){ … if( ( hdrs.vendor == …) || … || (hdrs.vendor == PIOLINK_VENDOR_ID) ){ … } … } … } … static void* ofpact_put_raw(…){ … switch(hdrs->vendor){ … case NX_VENDOR_ID: case PIOLINK_VENDOR_ID; … } } 파일명 : ~/lib/ofp-actions.c
  • 15. © PIOLINK, Inc. SDN No.1 Implementation(ovs-vswitchd: Vendor Action)  ovs-vswitchd(Vendor Action) … static bool ofpact_needs_recirculation_after_mpls(…){ … switch(a->type){ … case OFPACT_PIOLINK: return false; … } … } static void do_xlate_actions(…){ … OFPACT_FOR_EACH(a, ofpacts, ofpacts_len){ … switch(a->type) { … case OFPACT_PIOLINK: /* 커널로 전달할 메시지 만들기 */ VLOG_WARN(“Vendor Action Send"); const struct ofpact_piolink* piolink = ofpact_get_PIOLINK(a); ctx->xout->slow |= commit_odp_actions(&ctx->xin->flow, &ctx->base_flow, ctx->xout->odp_actions , &ctx->xout->wc, ctx->xbridge->masked_set_action); nl_msg_put_u32( ctx->xout->odp_actions , OVS_ACTION_ATTR_PIOLINK /* kernel module에서 메시지를 구별하기 위한 식별자 */ , odp_to_u32(20 ) /* kernel module에 전달할 메시지 body */ ); break; } } } … 파일명 : ~/ofproto/ofproto-dpif-xlate.c 2. Vendor Action을 OVS datapath로 전송
  • 16. © PIOLINK, Inc. SDN No.1 Implementation(openvswitch.ko: Vendor Action)  openvswitch.ko(Vendor Action) … enum ovs_piolink_attr{ OVS_PIOLINK_ATTR_UNSPEC, OVS_PIOLINK_ATTR_NOMAL, __OVS_PIOLINK_ATTR_MAX, }; #define OVS_PIOLINK_ATTR_MAX (__OVS_PIOLINK_ATTR_MAX – 1) … enum ovs_action_attr { OVS_ACTION_ATTR_UNSPEC, … OVS_ACTION_ATTR_PIOLINK, … __OVS_ACTION_ATTR_MAX }; … 파일명 : ~/datapath/linux/compat/include/linux/openvswitch.h Vendor Action 추가 Vendor Action의 subtype
  • 17. © PIOLINK, Inc. SDN No.1 Implementation(openvswitch.ko: Vendor Action)  openvswitch.ko(Vendor Action) … static int __ovs_nla_copy_actions(…){ … nla_for_each_nested(a, attr, rem) { static const u32 action_lens[OVS_ACTION_ATTR_MAX + 1] = { [OVS_ACTION_ATTR_OUTPUT] = sizeof(u32), … [OVS_ACTION_ATTR_PIOLINK] = (u32)-1 }; … switch(type) { … case OVS_ACTION_ATTR_PIOLINK: /* action 유효 체크 */ pr_info(“Vendor Action Receiven"); break; … } … } … } … 파일명 : ~/datapath/flow_netlink.c 3. Vendor Action을 OVS datapath가 수신
  • 18. © PIOLINK, Inc. SDN No.1 Implementation(openvswitch.ko: Vendor Action)  openvswitch.ko(Vendor Action) … static int do_execute_actions(…){ … for(a = attr, rem = len; rem > 0; a = nla_next(a, &rem)){ … switch(nla_type(a)) { … case OVS_ACTION_ATTR_PIOLINK: /* packet에 대한 action !! THE END!!*/ pr_info(“Vendor Action Processingn"); err = 0; break; … } … } … } 파일명 : ~/datapath/actions.c 4. 매칭되는 packet에 Vendor Action을 수행
  • 19. © PIOLINK, Inc. SDN No.1 Implementation(ovs-ofctl: Vendor Message & Vendor Action)  ovs-ofctl(Vendor Message & Vendor Action) ~> *수정 후 테스트 프로그램으로 사용 … static void piolink_vendor_test(int argc OVS_UNUSED, char* argv[]); static const struct command all_commands[] = { {"show", "switch", 1, 1, ofctl_show }, … {"piolink", NULL, 1, 1, piolink_vendor_test }, { NULL, NULL, 0, 0, NULL }, }; … static struct piolink_action { ovs_be16 type; ovs_be16 len; ovs_be32 vendor; ovs_be16 subtype; ovs_be16 nop; ovs_be32 body; }; static void piolink_vendor_test(int argc OVS_UNUSED, char* argv[]){ struct vconn* vconn; struct ofpbuf* request; enum ofputil_protocol protocol; enum ofp_version version;; struct ofpact_piolink* piolink; struct piolink_action pa = { 0xFFFF, htons(16), htonl(0xFF001021), htons(1), htons(0), htonl(2) }; protocol = open_vconn(argv[1], &vconn); protocol = set_protocol_for_flow_dump(vconn, protocol, OFPUTIL_P_OF10_STD); version = ofputil_protocol_to_ofp_version(protocol); request = ofpraw_alloc(OFPRAW_PIOLINK_FLOW_MOD, version, 0); piolink = ofpact_put(request, OFPACT_PIOLINK, 16); memcpy(piolink, &pa, sizeof(struct piolink_action)); transact_noreply(vconn, request); vconn_close(vconn); } 파일명 : ~/utilities/ovs-ofctl.c
  • 20. © PIOLINK, Inc. SDN No.1 Implementation(검증) 1) Mininet을 이용해 환경 구축 2) 수정한 ovs-ofctl을 이용해 Vendor Message 전송 • “sudo ovs-ofctl piolink s1” 3) Vendor Message 수신 확인 “Log 1” 4) “ovs-ofpctl dump-flows s1” 으로 OVS의 flow table에 Vendor Action 저장 확인 5) Mininet에서 h1(port 1)에서 h2(port 2)로 ping을 보냄 6) Vendor Action 전송 확인 “Log 2” 7) Vendor Action 수신 확인 “Log 3” 8) Vendor Action으로 packet을 처리하는 것 확인 “Log 4”
  • 21. © PIOLINK, Inc. SDN No.1 References  http://www.openvswitch.org/  https://github.com/openvswitch/ovs/  http://en.wikipedia.org/wiki/Open_vSwitch  http://www.slideshare.net/rajdeep/openvswitch-deep-dive  http://mininet.org/  http://flowgrammable.org/sdn/openflow/message-layer/  https://www.opennetworking.org/images/stories/downloads/sdn- resources/onf-specifications/openflow/openflow-spec-v1.3.0.pdf  http://dpdk.org/  http://www.apache.org/  http://www.xenproject.org/  https://www.openstack.org/  http://www.linux-kvm.org/page/Main_Page  https://www.opennetworking.org/sdn-resources/openflow
  • 22. 감사합니다. ㈜파이오링크 서울시 금천구 가산디지털2로 98 (가산동 550-1) IT캐슬 1동 401호 TEL: 02-2025-6900 FAX: 02-2025-6901 www.PIOLINK.com