4

I'm running CentOS 7.

First I created a tap device:

ip tuntap add dev tap2 mode tap

Then I assigned ipv6 address to it:

ip -6 addr add dev tap2 fd00:4::1/64
ip link set tap2 up

Its state generated from ip addr shows:

tap2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT qlen 500
link/ether fe:ea:2b:e0:c3:08 brd ff:ff:ff:ff:ff:ff

However, ping6 fd00:4::1 receives nothing. tcpdump -i tap2 also outputs nothing.

Is tap device ready for running in ipv6? Should I add configuration somewhere?

3

If your version of ip supports it, you could use the confflag nodad to tell the device to skip Duplicate Address Detection (DAD) when assigning the address:

# ip -6 addr add dev tap2 fd00:4::1/64 nodad

Probably the DAD cannot be done since the tap device is not connected to any medium. When assigning the address without the confflag, an ip addr shows me (Ubuntu, kernel 3.13, iproute2 version 3.12.0) that the address is in tentative state, i.e. it is waiting for DAD to finish:

3: tap2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 500
    link/ether 6a:fe:48:a1:b2:1d brd ff:ff:ff:ff:ff:ff
    inet6 fd00:4::1/64 scope global tentative
       valid_lft forever preferred_lft forever

Assigning with the confflag nodad shows a different result:

3: tap2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 500
    link/ether 6a:fe:48:a1:b2:1d brd ff:ff:ff:ff:ff:ff
    inet6 fd00:4::1/64 scope global nodad 
       valid_lft forever preferred_lft forever

Ping works then:

# ping6 fd00:4::1
PING fd00:4::1(fd00:4::1) 56 data bytes
64 bytes from fd00:4::1: icmp_seq=1 ttl=64 time=0.050 ms
64 bytes from fd00:4::1: icmp_seq=2 ttl=64 time=0.056 ms
...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.