Comments on: A Beginner’s Guide to Configuring IPv4 and IPv6 Addresses in Linux https://www.tecmint.com/linux-ip-address/ Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks. Thu, 29 Jun 2023 05:12:51 +0000 hourly 1 By: haraldfourtytwo https://www.tecmint.com/linux-ip-address/comment-page-1/#comment-2028472 Thu, 22 Jun 2023 16:08:45 +0000 https://www.tecmint.com/?p=51765#comment-2028472 Ah, it is working like this:

#!/bin/bash
IPInterface="enp0s31f6"
IPv6postfix="1234:5d78:1356:c234"
IPv6address=$(nslookup service01.mydomainddd.myfritz.net | grep "$IPv6postfix" | sed "s/Address: //")
IPv6address="${IPv6address}/64"
echo "$IPv6address"
sudo ip addr add ${IPv6address} dev $IPInterface

I only have to put into an init script.

]]>
By: haraldfourtytwo https://www.tecmint.com/linux-ip-address/comment-page-1/#comment-2028456 Thu, 22 Jun 2023 15:14:47 +0000 https://www.tecmint.com/?p=51765#comment-2028456 Hi,

I face the following situation: The Internet provider has switched to IPv6.

This means the first 4 blocks, e.g., a02:560:4c19:cd00……. are changing time by time.

The Internet router is able to configure “port forwarding” for IPv6. Indeed, it is not port forwarding, but routing to an IPv6 address in my network.

Unfortunately, the Internet router is not able to route the dynamic part of the IPv6 address of my internal server. I can only configure a fix postfix of the IPv6 address:

let it be: …….. 2001:db8:1234:abcd

While the prefix is changing by the internet provider, the postfix I set it to fix.

To make a service from my internal address available to the internet, I must configure the IPv6 address of my server with the dynamic prefix of the router and the fix postfix configured for routing.

Is it possible to configure it?

Clear, it is a bug in my internet router.

Another way, maybe I will try at the weekend, while the server is getting up, I can call via IPv4 DNS to get the current IPv6 address, put it into the configuration, and restart the network stack.

]]>
By: Ravi Saive https://www.tecmint.com/linux-ip-address/comment-page-1/#comment-2026948 Fri, 16 Jun 2023 08:36:38 +0000 https://www.tecmint.com/?p=51765#comment-2026948 In reply to Thomas Schäfer.

@Thomas,

I don’t think the gateway6 parameter is deprecated in the netplan configuration. Any source you have please share…

]]>
By: Thomas Schäfer https://www.tecmint.com/linux-ip-address/comment-page-1/#comment-2026940 Fri, 16 Jun 2023 07:48:50 +0000 https://www.tecmint.com/?p=51765#comment-2026940 In reply to Ravi Saive.

Thank you, it may help users with old Ubuntu versions.

In newer versions, gateway6 is deprecated.

]]>
By: Ravi Saive https://www.tecmint.com/linux-ip-address/comment-page-1/#comment-2026922 Fri, 16 Jun 2023 06:31:31 +0000 https://www.tecmint.com/?p=51765#comment-2026922 In reply to Thomas Schäfer.

@Thomas,

To configure an IPv6 address using Netplan, you can follow these steps:

1. Open the Netplan configuration file using a text editor.

$ sudo nano /etc/netplan/01-netcfg.yaml

Add the following network configuration to configure an IPv6 address.

network:
  version: 2
  renderer: networkd
  eth0:
    addresses:
      - 2001:db8:1234:abcd::1/64
    gateway6: 2001:db8:1234:abcd::a

In the above example, the interface eth0 is configured with the static IPv6 address 2001:db8:1234:abcd::1 with a prefix length of /64. The IPv6 gateway is set to 2001:db8:1234:abcd::a.

2. Apply the changes by running the following command:

$ sudo netplan apply
]]>