Note, that this recipe is not updated long time and could be outdated!
Got it.

IPv6 protokola iestatīšana

IPv6, jeb īsāk IP6, ir apzīmējums Interneta protokola jaunākajai, 6. versijai.
Linux datoros iedarbināt IPv6 var darbināt paralēli IPv4 protokolam. Tad Linux dators paralēli sazinās divās IP valodās.
Tālāk ir aprakstīta IPv6 protokola iestatījumu uzstādīšana un pārbaude, izmantojot fiksētu adresi.
Kā iestatīt 4. versijas (standarta, jeb IPv4) protokolu, skatiet šeit.

Jūsu dators izmanto IPv4 protokolu. Pieprasījums nāk no IP adreses 3.147.89.85.

Lokālā IPv6 adrese

  1. Visi Linux datori (ja vien tie nav speciāli pārkonfigurēti) darbojas ar IPv6 jau labu laiku atpakaļ. Visām Ethernet tīkla saskarnēm tiek automātiski piešķirta lokāla IPv6 adrese, kas sākas ar FE... un beidzas ar unikālu numuru, ko nosaka no Ethernet plates MAC adreses.
  2. Piemēram, ievadot komandu ifconfig, parādās sekojoša izdruka:

    valdis@studio:~$ ifconfig
    eth0      Link encap:Ethernet  HWaddr 00:21:70:6d:54:5d
              inet addr:10.0.0.6  Bcast:10.0.0.255  Mask:255.255.255.0
              inet6 addr: fe80::221:70ff:fe6d:545d/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:91528 errors:0 dropped:0 overruns:0 frame:0
              TX packets:80461 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:86246206 (86.2 MB)  TX bytes:11028796 (11.0 MB)
              Interrupt:17

    kur fe80::221:70ff:fe6d:545d ir datora lokālā IP6 adrese

  3. Uzzinot citu datoru IP6 adreses, lokālajā tīklā tiem var pieslēgties, izmantojot IP6 protokolu, piemēram, sekojoši:

    ping6 fe80::221:70ff:fe6d:545d

    var pingot savu datoru, izmantojot IP6 protokolu

  4. Ja datoram ir vairāk par vienu saskarni (daudzmāju mītne), tad nepieciešams norādīt, caur kuru saskarni šī adrese ir pieejama, piemēram, sekojoši:

    ping6 fe80::221:70ff:fe6d:545d -I eth0

Publiskā IPv6 adrese

Adreses piešķiršana ar komandu

  1. Lai izmantotu IP6 protokolu publiskajā tīklā, ir nepieciešams izmantot publisku IP6 adresi. Publisku fiksētu adresi piešķir sekojoši:

    ip -6 addr add 2a02:500:3330:101::ff/64 dev eth0

    kur 2a02:500:3330:101::ff ir IP6 publiskā adrese

  2. Lai norādītu, kuru IP6 adresi izmantot kā vārteju, ievada, piemēram, sekojošu komandu:

    ip -6 route add default via 2a02:500:3330:101::fe

    kur 2a02:500:3330:101::fe ir vārtejas adrese

Adreses piešķiršana konfigurācijas failā

  1. Atver failu /etc/netwerk/interfaces un pievieno tajā sekojošas rindas:

    iface eth0 inet6 static
    address 2a02:500:3330:101::ff
    netmask 64
    gateway 2a02:500:3330:101::fe

DNS serveris

  1. Lai norādītu DNS ierakstu noteikšanu IP6 adresēm, jānorāda IP6 DNS serveris, piemēram, sekojoši:

    echo "nameserver 2a02:500:4400:400::4">>/etc/resolv.conf

    kur 2a02:500:4400:400::4 ir DNS servera adrese

Pārbaude

  1. Lai pārbaudītu, kā IPv6 protokols strādā, pārbauda maršruta tabulas:

    ip -6 ro

    būtu jārāda  sekojošu:

    2a02:500:3330:101::/64 dev eth0  metric 256  expires -6082sec mtu 1500 advmss 1440 hoplimit 4294967295
    fe80::/64 dev eth0  metric 256  expires -2299694sec mtu 1500 advmss 1440 hoplimit 4294967295
    default via 2a02:500:3330:101::fe dev eth0  metric 1024  expires -6081sec mtu 1500 advmss 1440 hoplimit 4294967295
  2. Nopingo datora, vārtejas un DNS serveri:

    ping6 2a02:500:3330:101::ff
    ping6 2a02:500:3330:101::fe
    ping6 2a02:500:4400:400::4

    Visām norādītajām adresēm būtu jāpingojas

  3. Atver kādu publiski pieejamu IPv6 vietni:

    w3m http://ipv6.whatismyv6.com/

    parāda sekojošu

                          This page shows your IPv6 and/or IPv4 address

                           You are connecting with an IPv6 Address of:

                                      2a02:500:3330:101::ff

      IPv4 only Test                       Normal Test                        IPv6 only Test

      If the IPv6 only test shows "The page cannot be displayed" (Internet Explorer),
      "Server not found" (Firefox), any error or search page then you do not have working
      IPv6 connectivity. "Normal Test" shows which protocol your browser preferrs when you
      have both IPv4 and IPv6 connectivity. This page should work even on computers with
      IPv6 only connectivity.

      You can access this page with any of these easy to remember url's:

      ip4.me (defaults to IPv4 only test)
      ip6.me
      whatismyv6.com
      whatismyipv6address.com

    ≪ ↑ ↓ Viewing <what is my ipv6 address>

Saites


  
Tags Linux Pārvaldība Tīkls
Created by Valdis Vītoliņš on 2010-08-21 10:06
Last modified by Valdis Vītoliņš on 2021-04-13 14:30
 
Xwiki Powered
Creative Commons Attribution 3.0 Unported License