Skip to content

This is a software-simulated ETH network card device driver. After loading the driver, two devices, veth0 and veth1, will be generated. 一个软件模拟的ETH网卡设备驱动,加载驱动后,会产生veth0和veth1两个设备,不同的应用程序分别打开这两个网卡设备可以互相通信。该项目的姐妹篇:virts:https://github.com/QQxiaoming/virts

License

Notifications You must be signed in to change notification settings

QQxiaoming/virte

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CI CodeFactor License

virte

English | 简体中文

Introduction

This is a software-simulated ETH network card device driver. After loading the driver, two devices, veth0 and veth1, will be generated. Different applications can open these two network card devices to communicate with each other (note that the network namespace of linux should be used to isolate the two devices) device so as not to enter the local loop network device).

Install

make
make load

Config

Use the network namespace to configure two NICs separately, pay attention to replace veth0/veth1 with your NIC name

ip netns add veth0spaces
ip link set veth0 netns veth0spaces
ip netns exec veth0spaces ifconfig veth0 192.168.1.100 netmask 255.255.255.0 up

ip netns add veth1spaces
ip link set veth1 netns veth1spaces
ip netns exec veth1spaces ifconfig veth1 192.168.1.101 netmask 255.255.255.0 up

Example

The following is an example of a ping packet test:

ip netns exec veth0spaces ifconfig
ip netns exec veth1spaces ifconfig
ip netns exec veth1spaces ping 192.168.1.100
ip netns exec veth0spaces ping 192.168.1.101

Uninstall

make unload

delete network namespace

ip netns del veth0spaces
ip netns del veth1spaces

About

This is a software-simulated ETH network card device driver. After loading the driver, two devices, veth0 and veth1, will be generated. 一个软件模拟的ETH网卡设备驱动,加载驱动后,会产生veth0和veth1两个设备,不同的应用程序分别打开这两个网卡设备可以互相通信。该项目的姐妹篇:virts:https://github.com/QQxiaoming/virts

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published