CentOS7 adds virtual network card

Today I learned about CentOS7 to increase the virtual network card, record it, there is a link to the article for reference at the end
ip -4 addr view
modinfo tun 
sudo yum install tunctl -y (CentOS7 does not seem to work)

Will fail, this time sudo vim /etc/yum.repos.d/nux-misc.repo 
Add to:
[nux-misc]
name=Nux Misc
baseurl=http://li.nux.ro/download/nux/misc/el7/x86_64/
enabled=0
gpgcheck=1
gpgkey=http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
然后 sudo yum --enablerepo=nux-misc install tunctl
tunctl -t XXX-u root                        
XXX is the name of the virtual network card
ifconfig tap0 172.168.10.10 netmask 255.255.255.0 promisc
172.168.10.10 is the ip address
All of the above use non-root users
Reference article address: https://www.cnblogs.com/mhc-fly/p/10041782.html

Guess you like

Origin blog.csdn.net/qq_40210804/article/details/104542651