-
Notifications
You must be signed in to change notification settings - Fork 67
Quick Start
justinc1 edited this page Apr 5, 2018
·
9 revisions
git clone https://github.com/libos-nuse/net-next-nuse.git
cd net-next-nuse
make defconfig ARCH=lib
make library ARCH=lib
you should see libnuse-linux.so in the directory 'arch/lib/tools'.
A wrapper script called nuse takes your application running with NUSE.
cd arch/lib/tools
cp nuse.conf.sample nuse.conf
(edit nuse.conf with your preference)
sudo NUSECONF=nuse.conf ./nuse ping www.google.com
And, iperf
sudo NUSECONF=nuse.conf ./nuse iperf -c 192.168.209.1 -u
should just work fine !
since the LD_PRELOAD with sudo technique requires additional copy and permission changes to the library, the script will automatically conduct such an operation.
Please write a configuration file for nuse nuse.conf. Example of nuse.conf is shown below.
# Interface definition.
interface eth0
address 192.168.0.10
netmask 255.255.255.0
macaddr 00:01:01:01:01:01
viftype TAP
interface p1p1
address 172.16.0.1
netmask 255.255.255.0
macaddr 00:01:01:01:01:02
# route entry definition.
route
network 0.0.0.0
netmask 0.0.0.0
gateway 192.168.0.1
When viftype is TAP and PIPE, the interface name attached to nuse process is not restricted to be same as physical interfaces of host stack. However, viftype RAW, NETMAP, and DPDK require an interface name must be same as a physical interface of host stack.
The default interface will be raw socket based network i/o.
- Fedora 19 64bits
- Ubuntu 13.04 64bits
- Ubuntu 14.04 64bits
- Debian 8.0 64bits