This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Making IPv6 device available on the internet

Hei

I've gotten the ipv6_coap_server example to run on the nRF51-dongle. I got the bt0 interface after connecting to the device and I am able to ping the device.

My LAN has native IPv6 delivered from my ISP. The gateway router (broadband router) is getting its IPv6 with DHCP-PD and is allocated a /60 range, but is using stateless address configuration on the LAN. My desktop is getting a globally routable IPv6 address and can I can connect to and from the desktop from remote machines.

If I run radvd on my desktop I can give the device a global address, but as far as I know it shouldn't be necessary as my LAN already has a router.

I have tried to bridge the two interfaces with brctl but that fails when adding the bt0 interface.

My setup looks like this:

(nrf51)  <-- BT --> (BT dongle) <- USB -> Linux Host <- ethernet -> DSL router

What do I need to do to get the device to be available on the internet too?

  • I have a similar setup. But instead of using eth0 i am using wlan0. So in all commands I replaced eth0 to wlan0.

    But my ping6 from bt0 to wlan0 is failing. 

    Any suggestion what can be the issue and where can be the mistake?

    Thanks in advance for your help. 

    Here are the details of the steps:

    platform: Raspberry Pi 3 Model B+ and Raspbian Stretch


    My Setup is exactly like this:


    Bluetooth Node <-- BT --> Raspberry Pi <-- Wifi --> 4G Wireless Router --> Internet

    RPI Wifi gets 2405:204:1290:3eb1:ab2c:9c70:7c27:xxxx/64 address from 4G Wireless Router.

    My etc/radvd.conf

    interface bt0
    {
    AdvSendAdvert on;
    AdvSourceLLAddress on;
    prefix 2002::/64
    {
    AdvOnLink off;
    AdvAutonomous on;
    AdvRouterAddr on;
    }; # End of prefix definition
    };

    I added a static IPv6 address to bt0
    #Ip address add 2002::1/64 dev bt0

    My “ip -6 addr show” gives:
    # ip -6 addr show
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 state UNKNOWN qlen 1000
    inet6 ::1/128 scope host
    valid_lft forever preferred_lft forever
    3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
    inet6 2405:204:1290:3eb1:ab2c:9c70:7c27:xxxx/64 scope global mngtmpaddr noprefixroute
    valid_lft forever preferred_lft forever
    inet6 fe80::9ed1:3e80:de2a:e601/64 scope link
    valid_lft forever preferred_lft forever
    4: bt0: <MULTICAST,UP,LOWER_UP> mtu 1280 state UNKNOWN qlen 1000
    inet6 2002::1/64 scope global
    valid_lft forever preferred_lft forever
    inet6 fe80::b827:ebff:fe3d:4f70/64 scope link
    valid_lft forever preferred_lft forever

    Other commands I have run:
    #echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
    #ip route add 2002::/64 dev bt0
    #ip6tables -A FORWARD -i bt0 -o wlan0 -j ACCEPT
    #ip6tables -A FORWARD -i wlan0 -o bt0 -j ACCEPT
    #ip6tables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
    #service radvd restart

    #My “ip -6 route show” gives:
    2002::/64 dev bt0 proto kernel metric 256 pref medium
    2002::/64 dev bt0 metric 1024 pref medium
    2405:204:1290:3eb1::/64 dev wlan0 proto kernel metric 303 mtu 1500 pref medium
    fe80::/64 dev wlan0 proto kernel metric 256 pref medium
    fe80::/64 dev bt0 proto kernel metric 256 pref medium
    default via fe80::8bf:4ace:e70a:xxxx dev wlan0 metric 303 mtu 1500 pref medium

    My ping6 from bt0 to wlan0 global address returns:
    #ping6 -I bt0 2405:204:1290:3eb1:ab2c:9c70:7c27:xxxx
    connect: Network is unreachable
    My ping6 from bt0 to wlan0 Link Local address returns:
    #ping6 -I bt0 fe80::9ed1:3e80:de2a:e601
    PING fe80::9ed1:3e80:de2a:e601(fe80::9ed1:3e80:de2a:e601) from fe80::b827:ebff:fe3d:4f70%bt0 bt0: 56 data bytes
    ^C
    --- fe80::9ed1:3e80:de2a:e601 ping statistics ---
    2 packets transmitted, 0 received, 100% packet loss, time 1071ms

Related