[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Creating a tap device.



TL-DR.

On 3/14/2021 4:54 PM, peter@easthope.ca wrote:
From: "Alexander V. Makartsev" <avbetev@gmail.com>
Date: Sun, 14 Mar 2021 11:41:47 +0500
But it wasn't creating a device with chosen name anywhere under "/dev" or "/dev/net/".
I believe, "/dev/net/tun" device is created when "tun" kernel module is inserted.

Crucial tip.  Thanks Alexander.

Consequently I made these arrangements.

(1) Put "tun" in /etc/modules.

peter@joule:/home/peter$ grep tun /etc/modules
tun


Is the tun module also for the tap module?
I could be rong but I would not mix both of them.

(2) Put "@reboot ip tuntap add mode tap tap0" in /etc/crontab.

peter@joule:/home/peter$ grep tap  /etc/crontab
@reboot ip tuntap add mode tap tap0

(3) Reboot.

(4) Verify that tap0 is present.

peter@joule:/home/peter$ ip link show dev tap0
6: tap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mo
de DEFAULT group default qlen 1000
     link/ether 0a:c1:8e:81:78:aa brd ff:ff:ff:ff:ff:ff

Good.  Tomorrow will try a few more steps.


Note that with Libvirt and simply creating a bridge, makes guests
visible on the network.

--
John Doe


Reply to: