美文网首页
DPDK的L2FWD实践

DPDK的L2FWD实践

作者: 严炎2016 | 来源:发表于2018-03-14 10:48 被阅读0次

    10.5.39.242充当l2fwd转发器

    用10.5.39.241的1口发包,2口收包

    10.5.39.241的intel X520-DA2

    90:e2:ba:88:35:40

    90:e2:ba:88:35:41

    10.5.39.242的intel X520-DA2

    90:e2:ba:88:3f:6c

    90:e2:ba:88:3f:6d

    按以下端口的mac进行连接

    90:e2:ba:88:35:40----90:e2:ba:88:3f:6c

    90:e2:ba:88:35:41----90:e2:ba:88:3f:6d

    在10.5.39.242上

    export DPDK_DIR=/root/dpdk/dpdk-17.11

    export DPDK_TARGET=x86_64-native-linuxapp-gcc

    export DPDK_BUILD=$DPDK_DIR/$DPDK_TARGET

    mkdir -p /dev/hugepages

    mount -t hugetlbfs hugetlbfs /dev/hugepages

    modprobe uio

    insmod $DPDK_BUILD/kmod/igb_uio.ko

    export RTE_SDK=$DPDK_DIR

    export RTE_TARGET=$DPDK_TARGET

    $DPDK_DIR/usertools/dpdk-devbind.py -b igb_uio 0000:84:00.0 0000:84:00.1

    cd /root/dpdk/

    ./l2fwd -c 3 -n 2 --socket-mem 1024,1024 --huge-dir /dev/hugepages -- -p 3

    在10.5.39.241上

    export DPDK_DIR=/root/dpdk/dpdk-17.11

    export DPDK_TARGET=x86_64-native-linuxapp-gcc

    export DPDK_BUILD=$DPDK_DIR/$DPDK_TARGET

    mkdir -p /dev/hugepages

    mount -t hugetlbfs hugetlbfs /dev/hugepages

    modprobe uio

    insmod $DPDK_BUILD/kmod/igb_uio.ko

    export RTE_SDK=$DPDK_DIR

    export RTE_TARGET=$DPDK_TARGET

    $DPDK_DIR/usertools/dpdk-devbind.py -b igb_uio 0000:84:00.0 0000:84:00.1

    cd /root/pktgen-3.4.9/

    ./pktgen  -l 0,2,3,4,5  -n 4 --proc-type auto --socket-mem 1024,1024  --huge-dir /dev/hugepages  --file-prefix pg1  -b 00:09.0 -- -P -T -m '[2:3].0,[4:5].1'

    set 0 src ip  192.168.10.241/24

    set 0 src mac 90:e2:ba:88:35:40

    set 0 dst ip  192.168.10.242

    set 0 dst mac 90:e2:ba:88:3f:6c

    start 0

    REF:

    http://dannykim.me/danny/openflow/86577?ckattempt=1

    相关文章

      网友评论

          本文标题:DPDK的L2FWD实践

          本文链接:https://www.haomeiwen.com/subject/dfzxqftx.html