How to configure IPv6 on Tiny Core Linux

I usually use Tiny Core Linux in GNS3 for testing network connectivity because it’s lightweight and boots quickly.

Here’s a guide on adding IPv6 addresses and routes on Tiny Core Linux.


1. Adding an IPv6 Address

There are two common ways to add an IPv6 address:

a. Using ip command

Usage:

# /sbin/ip -6 addr add <ipv6address>/<prefixlength> dev <interface>

Example:

# /sbin/ip -6 addr add 2001:0db8:0:f101::1/64 dev eth0

b. Using ifconfig

Usage:

# /sbin/ifconfig <interface> inet6 add <ipv6address>/<prefixlength>

Example:

# /sbin/ifconfig eth0 inet6 add 2001:0db8:0:f101::1/64

2. Show IPv6 Address

You can verify the IPv6 address assigned to an interface with either:

# /sbin/ifconfig eth0

or

# /sbin/ip -6 addr show dev eth0

3. Adding an IPv6 Route

To add an IPv6 route via a gateway, there are two options:

a. Using ip

Usage:

# /sbin/ip -6 route add <ipv6network>/<prefixlength> via <ipv6address> dev <device>

Example:

# /sbin/ip -6 route add 2000::/3 via 2001:0db8:0:f101::1

b. Using route

Usage:

# /sbin/route -A inet6 add <ipv6network>/<prefixlength> gw <ipv6address> dev <device>

Example:

# /sbin/route -A inet6 add 2000::/3 gw 2001:0db8:0:f101::1

⚠️ Note: If the gateway address is link-local, specifying the device is required.


4. Making Configuration Permanent

By default, the commands above are temporary. After reboot, they will be lost.

To make IPv6 configuration persistent on Tiny Core Linux:

  1. Open /opt/bootlocal.sh with a text editor, for example vi:
vi /opt/bootlocal.sh
  1. Add the following commands at the bottom of the file:
ip -6 addr add 2001:0db8:0:f101::1/64 dev eth0
pkill udhcpc
  1. Save the file and then run the backup script to save your configuration:
$ filetool.sh -b

This ensures your IPv6 settings are applied automatically when the VM starts.


References


Summary:

  • Use ip or ifconfig to add IPv6 addresses.
  • Use ip or route to add IPv6 routes.
  • Update /opt/bootlocal.sh and run filetool.sh -b to make settings persistent.
  • Tiny Core Linux is lightweight, ideal for testing IPv6 connectivity in GNS3.


Komentar

Postingan populer dari blog ini

Cara restart / stop windows service (services.msc) dengan bat / cmd

Learning Haproxy Load Balancer with Podman and Go Backends

Konfigurasi ITNSA OpenVPN auth LDAP