Crow314 / xdp-navt

NAVT(Network Address Vlan Translation) with XDP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

XDP-NAVT

NAVT(Network Address Vlan Translation) with XDP

VID:100, 192.168.0.1(inside) <=> VID:98, 10.10.0.1 (outside)
VID:1500, 192.168.0.1(inside0 <=> VID:98, 10.15.0.1(outside)

Build

In today's Linux, bpf_helper_defs.h is supposed to build. If you hit this script accordingly, it will fetch the kernel code and build it. Please use according to your kernel version. There is no problem with the first execution.

./gen_bpf_helper.sh

dev packages install

sudo apt install clang llvm libelf-dev build-essential linux-headers-$(uname -r) linux-libc-dev libbpf-dev gcc-multilib clang-format

Let's build go & ebpf

make

Run

./bin/xdp-navt

# use option
./bin/xdp-navt --device eth2

Test

make test

About

NAVT(Network Address Vlan Translation) with XDP

License:MIT License


Languages

Language:Go 47.2%Language:C 44.6%Language:Makefile 4.6%Language:Shell 3.6%