Network - Ip v6

1 - About

IPv6 IP address

Example: 2001:41d0:1:1b00:213:186:33:18

3 - IPv4 vs IPv6

The main difference between IPv4 and IPv6 is the number of possible addresses. IPv6 was introduced in 1995 to ensure that the world would not run out anytime soon of IP number.

IP Version Bit Address Space Possible addresses
IPv4 32 4 billion
IPv6 128 <math>3.4 \times 10^{38}</math>

4 - Command

4.1 - Ping

  • Linux

ping6 <IP|hostName>

  • Windows

ping -6 example.com

4.2 - Curl

  • Ping

curl -gkvLI6 -H 'User-Agent: myProgram' -H 'Accept: */*' -H 'Connection: Close' -H 'Accept-Language: en' -m 30 --connect-timeout 10 https://example.com

4.3 - Ip

Network - IP Address (Unique network IDentifier)


ip a
ip -6 addr
ip -6 addr show eth0
ip -6 addr | grep inet6


inet6 ::1/128 scope host 
inet6 2001:123:456:55f::1/64 scope global 
inet6 fe80::62eb:69ff:fed2:d2a6/64 scope link 

5 - Configuration

Without configuration, you would not see the scope global ipv6.

5.1 - CentOS

  • To check if IPv6 is enabled on the system, run the command:

sysctl -a | grep ipv6.*disable

  • In the output, the value of:
    • 0 indicates that IPv6 is enabled
    • 1 shows that IPv6 is disabled.

The output below shows that IPv6 is enabled.


net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
net.ipv6.conf.eth0.disable_ipv6 = 0
net.ipv6.conf.lo.disable_ipv6 = 0

  • Add the following lines to define the ip and its gateway to the eth0 interface. Replace the IPV6ADDR with you IPv6 value and IPV6_DEFAULTGW with your gateway value

IPV6INIT=yes
IPV6ADDR=2607:5300:201:3100::85b
IPV6_DEFAULTGW=2607:5300:201:3100::1

  • Add a route that goes through the gateway, Replace 2607:5300:201:3100::1 with your gateway

2607:5300:201:3100::1 dev eth0
default via 2607:5300:201:3100::1

  • Restart

service network restart

6 - Documentation / Reference


Data Science
Data Analysis
Statistics
Data Science
Linear Algebra Mathematics
Trigonometry

Powered by ComboStrap