환경 변수 추가와 권한 문제로 root에서 실행하는 것을 추천합니다.
1. 초기화
pkill -9 ovs rm -rf /usr/local/var/run/openvswitch/ rm -rf /usr/local/etc/openvswitch/ rm -f /usr/local/etc/openvswitch/conf.db mkdir -p /usr/local/var/run/openvswitch/ mkdir -p /usr/local/etc/openvswitch/ rm -f /tmp/conf.db
2. 환경변수 추가 및 ovsdb 설정
export PATH=$PATH:/usr/local/share/openvswitch/scripts export DB_SOCK=/usr/local/var/run/openvswitch/db.sock ovsdb-tool create /usr/local/etc/openvswitch/conf.db /usr/local/share/openvswitch/vswitch.ovsschema ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock --remote=db:Open_vSwitch,Open_vSwitch,manager_options --pidfile --detach
3. DPDK 사용을 위한 OVS 설정 및 시작
ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true ovs-ctl --no-ovsdb-server --db-sock="$DB_SOCK" start
4. Bridge 생성 및 DPDK Port 연결
ovs-vsctl add-port [bridge] [portname] -- set Interface [portname] type=dpdk options:dpdk-devargs=[dpdk를 bind 한 NIC]
ovs-vsctl add-br br0 -- set bridge br0 datapath_type=netdev ovs-vsctl add-port br0 dpdk0 -- set Interface dpdk0 type=dpdk options:dpdk-devargs=0000:05:00 ovs-vsctl add-port br0 dpdk1 -- set Interface dpdk1 type=dpdk options:dpdk-devargs=0000:05:01
5. Flow Rule
ovs-vsctl add-flow br0 in_port=dpdk0,action=output:dpdk1
6. 오류 해결
configure: WARNING: Cannot find openssl: sudo apt-get install libssl-dev checking whether /usr/bin/python2 has six library... configure: error: Missing Python six library or version too old. sudo apt-get install python-pip pip install six
'Dev > OVS(DPDK)' 카테고리의 다른 글
[OVS] OVS-DPDK 설치 (0) | 2018.04.10 |
---|---|
[DPDK] Pktgen 설치 및 실행 (0) | 2018.04.09 |
[DPDK] DPDK 실행 및 예제 (0) | 2018.04.06 |
[DPDK] DPDK 설치 (Ubuntu 16.04.1) (0) | 2018.04.05 |
[DPDK] DPDK-PKTGEN 사용하기 (0) | 2017.09.16 |