WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: eth0 does not have global IPv6 address  (Read 2973 times)

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1453
eth0 does not have global IPv6 address
« on: May 10, 2023, 12:33:13 AM »
My wireless router is a repurposed laptop running TCL14 x86_64, plugged in to a Netgear modem with ethernet cable. ISP is Comcast Xfinity.

Recently I decided to explore IPv6 and noticed that eth0 has only a "Scope:Link" IPv6 address:

Code: [Select]
$ ifconfig eth0
eth0      Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX 
          inet addr:XX.XXX.XXX.XX  Bcast:255.255.255.255  Mask:XXX.XXX.XXX.0
          inet6 addr: fe80::XXXXXXXXXX/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:82933 errors:0 dropped:0 overruns:0 frame:0
          TX packets:26103 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:119110575 (113.5 MiB)  TX bytes:4263496 (4.0 MiB)
          Interrupt:16 Memory:e1a00000-e1a20000
eth0's addresses are obtained automatically at boot by /etc/init.d/dhcp.sh.

Why don't I have a "Scope:Global" IPv6 address as well? Without a global scope IPv6 address, I can't reach IPv6 websites or ping IPv6 addresses (e.g., ping ipv6.google.com fails).

I'm trying to figure out where there the problem is. Comcast supposedly fully supports IPv6.  Modem is Netgear CM400 (its box says "supports IPv6"). If I ssh into router and manually run sudo udhcpc -S -i eth0 I still cannot obtain a global IPv6 address.

Any ideas what I need to do to get a global IPv6 address for my router's eth0 interface?
« Last Edit: May 10, 2023, 12:42:07 AM by GNUser »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11027
Re: eth0 does not have global IPv6 address
« Reply #1 on: May 10, 2023, 02:40:40 AM »
Busybox may not be fully ipv6 compliant, most users are still ipv4. So first thing to try would be another dhcp client.
The only barriers that can stop you are the ones you create yourself.

Offline gadget42

  • Hero Member
  • *****
  • Posts: 719
Re: eth0 does not have global IPv6 address
« Reply #2 on: May 10, 2023, 05:34:00 AM »
previously while troubleshooting some firewall and network issues we used a LiveUSB *nix distro on laptop cabled directly(testing purposes only) to our comcast cable modem and it did provide ipv6(a cold-boot reset of the cable modem might have been necessary to get rid of any old ipv4 lease on comcast's end of things?-don't quite remember.)
The fluctuation theorem has long been known for a sudden switch of the Hamiltonian of a classical system Z54 . For a quantum system with a Hamiltonian changing from... https://forum.tinycorelinux.net/index.php/topic,25972.msg166580.html#msg166580

Online patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 693
Re: eth0 does not have global IPv6 address
« Reply #3 on: May 10, 2023, 06:44:02 AM »
Do you also flashed the Netgear router to the latest firmware ?

Maybe like lots of ISP's don't lease out more than one ip at the time to one mac address.
If so you have to release the ip from the old mac address, or wait the lease time out.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1453
Re: eth0 does not have global IPv6 address
« Reply #4 on: May 10, 2023, 07:41:42 AM »
Hi, curaga. I just tried sudo dhclient -6 eth0 and the result was the same, unfortunately (the laptop/router only gets a link scope IPv6 address).

gadget42 and patrikg, the "router" is a laptop connected to the modem by ethernet cable. It runs TCL14 so it does have the latest "firmware" :) Rebooting the router/laptop and modem has no effect.

I will try contacting Comcast next.

Online patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 693
Re: eth0 does not have global IPv6 address
« Reply #5 on: May 10, 2023, 01:20:21 PM »
Sorry my bad, don't read the hole story..that Netgear was your Cable modem. :(
Yes contact your ISP, maybe you have to tell them to get the IPV6 address.
That's not default of all there customers.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1453
Re: eth0 does not have global IPv6 address
« Reply #6 on: May 10, 2023, 04:20:38 PM »
I think the problem is Comcast in my area.
I ended up getting a free IPv6 tunnel from Hurricane Electric. Now my router's IPv4-only eth0 has a tunnel between it an the IPv6 world.

I followed the directions here:
https://wiki.gentoo.org/wiki/IPv6_router_guide

There was some trial and error. Also, radvd was required (I will create an official radvd extension soon). If anyone ever needs help setting up such a tunnel between a TCL router and Hurricane Electric, just send me a PM.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1453
Re: eth0 does not have global IPv6 address
« Reply #7 on: May 10, 2023, 07:00:25 PM »
I put all the necessary steps to create the tunnel into this shell script (I substituted some digits for my privacy). Hopefully it helps someone someday. All I need to do after booting the router is to run this script as root (e.g., by putting it into /opt/bootlocal.sh):

Code: [Select]
#!/bin/sh

# Run this script as root or with sudo
# Deps: iproute2.tcz (for ip command), ipv6-netfilter-KERNEL.tcz (for ipv6 and sit kernel modules), radvd.tcz
# Ref: https://wiki.gentoo.org/wiki/IPv6_router_guide#Configure_routing

# router variables
wan_if=eth0
lan_if=wlan1

# tunnel settings provided by tunnel broker
server_ipv4_addr=216.XX.XX.X
server_ipv6_addr=2001:XXX:X:XXX::1/64
client_ipv6_addr=2001:XXX:X:XXX::2/64
routed_ipv6_prefix=2001:XXX:X:XXX

# 0. Wait for wan_if to have a public ipv4 address
while true; do
    client_ipv4_addr=$(ip addr show $wan_if | grep -Eo 'inet [A-Za-z0-9.:]+' | grep -Eo '[0-9.]+')
    [ -n "$client_ipv4_addr" ] && break
    sleep 1
done


# I. Create tunnel and set it as the route for all ipv6 addresses
modprobe ipv6
modprobe sit
ip tunnel add he6 mode sit remote $server_ipv4_addr local $client_ipv4_addr ttl 64 dev $wan_if
ip link set he6 mtu 1280
ip link set he6 up
ip addr add $client_ipv6_addr dev he6
ip route add 2000::/3 dev he6

# II. Assign a global address to wlan1 (see broquea's post here: https://forums.he.net/index.php?topic=3051.0)
ip -6 addr add ${routed_ipv6_prefix}::1/64 dev $lan_if

# III. Advertise our routed prefix to lan
echo "
interface $lan_if
{
        ## (Send advertisement messages to other hosts)
        AdvSendAdvert on;
        ## (Fragmentation is bad(tm))
        AdvLinkMTU 1280;
        MaxRtrAdvInterval 300;
        ## (IPv6 subnet prefix we've been assigned by our PoP)
        prefix ${routed_ipv6_prefix}::/64
        {
                AdvOnLink on;
                AdvAutonomous on;
        };
};
" >/etc/radvd.conf
radvd

# IV. Enable ipv6 forwarding
echo 1 >/proc/sys/net/ipv6/conf/all/forwarding

After that, clients in my LAN automatically get link scope and global scope IPv6 addresses, and have access to IPv6 addresses 8)

Code: [Select]
bruno@x230:~$ ping ipv6.google.com
PING ipv6.google.com (2607:f8b0:4006:822::200e): 56 data bytes
64 bytes from 2607:f8b0:4006:822::200e: seq=0 ttl=118 time=24.839 ms
64 bytes from 2607:f8b0:4006:822::200e: seq=1 ttl=118 time=24.289 ms
64 bytes from 2607:f8b0:4006:822::200e: seq=2 ttl=118 time=25.904 ms
^C
--- ipv6.google.com ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 24.289/25.010/25.904 ms