Re: How to create a simple tap0 interface using nmcli
- From: Dan Williams <dcbw redhat com>
- To: Vincent Fortier <th0ma7 gmail com>, Beniamino Galvani <bgalvani redhat com>
- Cc: networkmanager-list gnome org
- Subject: Re: How to create a simple tap0 interface using nmcli
- Date: Mon, 25 Jan 2016 10:17:53 -0600
On Mon, 2016-01-25 at 12:21 +0000, Vincent Fortier wrote:
Thnx. So lets say I previously created a bridge interface and linked
in my
eth0:
$ nmcli connection show
$ nmcli connection delete <eth0|eth0-UUID>
$ nmcli connection add type bridge \
ifname br0 con-name br0
$ nmcli connection add type bridge-slave \
ifname eth0 con-name eth0 master br0
Presumably I create tap0 then add it to my br0 such as the following:
$ nmcli connection add type tun \
ifname tap0 con-name tap0 \
mode tap owner `id -u` ip4 0.0.0.0/24
$ nmcli connection add type bridge-slave \
ifname tap0 con-name tap0 master br0
Here you're creating two separate network profiles. You only need to
create one profile for tap0 that includes the bridge-slave bits:
$ nmcli connection add type tun \
ifname tap0 con-name tap0 \
slave-type bridge master br0 \
mode tap owner `id -u` ip4 0.0.0.0/24
or:
$ nmcli connection add type tun \
ifname tap0 con-name tap0 \
mode tap owner `id -u` ip4 0.0.0.0/24
$ nmcli connection mod tap0 connection.slave-type bridge \
connection.master br0
'nmcli con add type <*-slave>' is just a short-cut to fill slave-type
for you. The major point is that whenever you use "nmcli con add" it
will create a *new* connection profile. You want to either put all
properties in one 'nmcli con add' or you can use 'nmcli con mod' to set
them after creation.
Dan
Then I would be good to go with qemu and be all-set "automagically"
at
every reboot as autoconnect=yes is set by default.
NM1.2 not yet available under Ubuntu 16.04 alpha (duno if planned to
be
included?) so can't test it unless I recompile from source.
Therefore in
the meantime it's more of a personnal knowledge thing than anything
else.
Thnx in advance!
- vin
Le lun. 25 janv. 2016 à 03:22, Beniamino Galvani <bgalvani redhat com
a
écrit :
On Mon, Jan 25, 2016 at 02:46:54AM +0000, Vincent Fortier wrote:
I was wondering how can I create a tap interface using nmcli?
Search
again
and again witouth luck...
Hi,
creation of tun/tap devices is supported only in NetworkManager
1.2.
On such version you can create a tap connection using the command:
$ nmcli connection add type tun ifname tap0 con-name mytap0 \
mode tap owner `id -u` ip4 x.x.x.x/24
The connection will have autoconnect=yes by default and so the
device
will be created automatically every time NM starts. You can
manually
enable or disable the connection with:
$ nmcli connection up mytap0
$ nmcli connection down mytap0
Beniamino
_______________________________________________
networkmanager-list mailing list
networkmanager-list gnome org
https://mail.gnome.org/mailman/listinfo/networkmanager-list
[
Date Prev][
Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]