Creation TUN/TAP interface

Hello,

I’ve been searching online but I didn’t find an enough clear answer to some doubts so I’m posting it here.

I’m trying to create a TUN or TAP interface and then it’s been told to me to give these commands:

  1. I create the TUN or TAP interface called tap1

  2. sudo ip a a [192.168.1.1/24](http://192.168.1.1/24) dev tap1

  3. sudo ip link set up dev tap1

4.ifconfig 6 add 192.168.1.2/24

At the end the 192.168.1.1 is the server and 192.168.1.2 is the client.

I don't understand what do exactly do the command 2, 3 and 4. Looking online I got something but I guess I'm doing confusion.

Thanks.

Mark

Hi Mark, you are using IPv4 addresses. RIOT does not have any IPv4 support, only IPv6 support.

Cheers, Martine

Hi martine.

Thank you for your answer. Let’s say it’s in this way:

  1. I create the TUN or TAP interface called tap1
  2. sudo ip a a 2001:db8:a0b:12f0::1/64 dev tap1
  3. sudo ip link set up dev tap1 4.ifconfig 6 add 2001:db8:a0b:12f0::2/64

The questions are the same what do they do?

I hope someone can help me.

Thanks.

Mark

Hi Mark,

The questions are the same what do they do? I hope someone can help me.

  1. On Linux: adds the address 2001:db8:a0b:12f0::1/64 to the interface tap1
  2. On Linux: enables interface tap1
  3. On RIOT: adds the address 2001:db8:a0b:12f0::2/64 to the interface 6.

For the Linux commands (2. and 3.) you can refer to ip(8) in your machines manpages (just type man 8 ip into your Linux terminal). For the RIOT command (4.) you can use the online help of the command (which is ATM not the best to be honest), by typing e.g. ifconfig help in the RIOT terminal.

Cheers, Martine

Thank you Martine :slight_smile:

Cheers.

Mark