Re: How to create a simple tap0 interface using nmcli
On Mon, 2016-01-25 at 12:21 +, Vincent Fortier wrote: > Thnx. So lets say I previously created a bridge interface and linked > in my > eth0: > $ nmcli connection show > $ nmcli connection delete > $ 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 > a > écrit : > > > On Mon, Jan 25, 2016 at 02:46:54AM +, 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 ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: How to create a simple tap0 interface using nmcli
Thnx. So lets say I previously created a bridge interface and linked in my eth0: $ nmcli connection show $ nmcli connection delete $ 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 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 a écrit : > On Mon, Jan 25, 2016 at 02:46:54AM +, 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
Re: How to create a simple tap0 interface using nmcli
On Mon, Jan 25, 2016 at 02:46:54AM +, 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 signature.asc Description: PGP signature ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
How to create a simple tap0 interface using nmcli
I was wondering how can I create a tap interface using nmcli? Search again and again witouth luck... Otherwise I use currently: $ sudo openvpn --mktun --dev tap0 --user `id -un` $ sudo ip addr add 0.0.0.0/24 dev tap0 $ sudo ip link set tap0 up promisc on or simply: $ sudo tunctl -d tap0 Thnx in advance! - vin ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list