47
IPv6 Hrvoje Popovski i Ivan Rako Sveučilišni računski centar (Srce)

IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

IPv6

Hrvoje Popovski i Ivan Rako

Sveučilišni računski centar (Srce)

Page 2: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

Sadržaj

Uvod

Osnove mreža

Usporedba IPv4 – IPv6

IPv6 adresiranje

Autokonfiguracija

Tranzicijski mehanizmi

Dual-stack

IPv6 i Linux

Page 3: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

Uvod

1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”,

izjavljuje – „32 bits should be enough address space for Internet”

1981 RFC791 definira 32 bitni IPv4 protokol, svjetska populacija

broji oko 4,5 milijarde

1998 RFC 2460 definira 128 bitni IPv6 protokol, svjetska populacija

broji oko 6 milijardi

1999 RFC-om 2663 definiran je NAT i postaje popularan zbog

iscrpljenosti IPv4 adresnog prostora

2001 3G mobilna telefonija

2004 native IPv6 link CARNet – GEANT

Page 4: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

Osnove mreža

Osi model

Page 5: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

Osnove mreža

EtherType – 16 bitno polje koje označava koji je protokol

enkapsuliran kao korisni sadržaj u Ethernet frame-u

Npr. 0x0800 za IPv4 sadržaj

MAC adresa – 48 bitna jedinstvena oznaka mrežnog adaptera

Npr. 90:e2:ba:19:29:a8

IPv4 adresa – jedinstvena 32 bitna oznaka internet hosta

Npr. 161.53.255.123

IPv4 mrežna maska – 32 bitna oznaka mreže

Npr. 255.255.255.0 ili po CIDR notaciji /24

Page 6: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

Usporedba IPv4 – IPv6

Broj raspoloživih adresa

IPv4 – 32 bita - 4,3 milijarde adresa

IPv6 – 128 bita – 4.8×10^28 adresa per živi Homo sapiens

Multicast

IPv4 – broadcast vs multicast

IPv6 – ne postoji tradicionalni broadcast, sve je multicast

Autokonfiguracija hostova

IPv4 – putem dhcp-a, potrebna konfiguracija dhcp servera

IPv6 – automatska konfiguracija krajnjih hostova na mreži

Usmjeravanje

IPv4 – prevelike tablice usmjeravanja

IPv6 – pojednostavljeno i brže usmjeravanje

Page 7: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

Usporedba IPv4 – IPv6 Moblinost

IPv4 – postoji, ali nema dovoljno mehanizama

IPv6 – ugrađeno u samom protokolu, efikasno kao i samo IPv6

usmjeravanje

Sigurnost

IPv4 – nema podršku u samom protokolu

IPv6 – ima podršku za IPSEC

Dodatna zaglavlja

IPv4 – postoje, ali ih nije jednstavno implementirati

IPv6 – implementiranje jednostavno

Zaglavlje paketa

IPv4 – sastoji se od 14 polja od kojih su 13 obavezna

IPv6 – pojednostavljeno, manje polja, fiksna duljina od 40 okteta

Page 8: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

IPv4 format zaglavlja

Page 9: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

IPv6 format zaglavlja

Page 10: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

IPv6 adresiranje

IPv6 koristi 128 bitova za adresiranje – 2^128 adresa

Adresa je podijeljena u 8 grupa, svaka po 16 bitova odijeljenih

dvotočkom „:”

Grupe su heksadecimalni zapisi od 4 znamenke

2001:0db8:000e:face:7d46:c954:388a:069d

| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | - 8 grupa

| 16| 16| 16| 16| 16| 16| 16| 16| - 128 bita

Page 11: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

IPv6 adresiranje

IPv6 adrese imaju dodatni routing prefix koji označava mrežni i

računalni dio

Prefiks je od IPv6 adrese odvojen je slash-om „/” i zapis je

decimalan

Mrežni dio označava bitove koji su uvijek isti za zadanu mrežu i

može se odmah pročitati iz prefixa

IPv6 adresa i prefix 2001:0db8:000e:2341:7d46:c954:388a:069d/48

16 16 16 = 48

Adresa se nalazi unutar IPv6 mreže koja počinje adresom 2001:0db8:000e:0000:0000:0000:0000:0000

I završava IPv6 adresom 2001:0db8:000e:ffff:ffff:ffff:ffff:ffff

Page 12: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

IPv6 adresiranje

Računalni dio označava broj hostova koje sadrži mreža

IPv6 mreža

2001:0db8:000e:0000:0000:0000:0000:0000/48

16 16 16 16 16 = 80

Navedena mreža ima 5 grupa po 16 bitova za računalni dio što iznosi

80 bitova ili 2^(128-48) = 2^80 raspoloživih adresa

Što je mrežni prefix manji, to je računalni dio veći

Page 13: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

Prezentacija IPv6 adresa

Cijelu IPv6 adresu poprilično je nezgodno pisati, zato postoji

sažimanje

Puni zapis IPv6 adrese - 2001:0db8:1230:0000:0000:0000:0000:0001

Jednostavniji zapis IPv6 adrese - 2001:db8:1230:0:0:0:0:1

Preporuka je izbaciti 16 bitne grupe koje sadrže samo nule

Potpuno sažeta IPv6 adresa 2001:db8:1230::1

U ovom primjeru izbacili smo adresni prostor od 2^64 hostova

Sažimanje grupa koje imaju samo :0000:

:0000:0000: ::

:0000:0000:0001: ::1

Page 14: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

Prezentacija IPv6 adresa

Ako u adresi postoji samo jedna grupa :0000:, ona se ne sažima

2001:db8:0000:1:1:1:1:1 -> 2001:db8:0:1:1:1:1:1

U IPv6 adresi grupe se mogu sažeti samo jednom

Ako postoji mogućnost sažeti više 16 bitnih grupa, tada se sažima

prva lijevo

2001:db8:0:0:1:0:0:1 može se zapisati kao

2001:db8:0:0:1::1 – nije preporučeno

2001:db8::1:0:0:1 – preporučeno

Preporuka je koristiti mala slova u heksadecimalnom zapisu

Page 15: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

Prezentacija IPv6 adresa

Primjer punih IPv6 adresa

2001:db8:0:0:8:800:200c:417a - unicast adresa

ff01:0:0:0:0:0:0:101 - multicast adresa

0:0:0:0:0:0:0:1 - loopback adresa

0:0:0:0:0:0:0:0 - unspecified adresa

Primjer sažetih IPv6 adresa

2001:db8::8:800:200c:417a - unicast adresa

ff01::101 - multicast adresa

::1 - loopback adresa

:: - unspecified adresa

Page 16: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

Delegacija IPv6 adresa

IANA delegira IPv6 adresni prostor na svjetskoj razini

Trenutno je u upotrebi 2000::/3 mreža

Od 2000:0000:0000:0000:0000:0000:0000:0000

Do 3fff:ffff:ffff:ffff:ffff:ffff:ffff:ffff

IANA dodjeljuje RIR-evima /12 ili /23 mreže

RIR dodjeljuje LIR-evima ili ISP-ovima /19 ili /32

IPv6 adresni prostor CARNet-a je 2001:b68::/32

LIR-evi ili ISP-ovi krajnjim korisnicima dodjeljuju /48 ili /56 mreže

Mreži administratori na ustanovama dodjeljuju /64 mreže po VLAN-u

Page 17: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

Delegacija IPv6 adresa

Primjer:

RIPE je CARNet-u dodjelio /32 mrežu - /32 je 2^96 hostova

/32 je 65 536 /48 mreža

CARNet dodjeli ustanovi /48 mrežu - /48 je 2^80 hostova

/48 je 65 536 /64 mreža

Administrator na ustanovi dodjeljuje /64 po VLAN-u - /64 je 2^64

hostova

Cijeli IPv4 adresni prostor je 2^32 ili 4 294 967 296 hostova

Jedna dodijeljena IPv6 mreža po VLAN-u ima 2^64 ili

18 446 744 073 709 551 616 hostova

Page 18: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

Posebne IPv6 adrese

Unspecified address - ::/128 i – IPv4 0.0.0.0/32

Default route - ::/0 – IPv4 0.0.0.0/0

Unique Local address – fc00::/7 – IPv4 10/8, 172.16/12,

192.168/16

Documentation – 2001:db8::/32

Local address

::1/128 – loopback – IPv4 127.0.0.1/32

fe80::/10 – link-local unicast

Pošto se IPv6 još razvija, za detalje je najbolje pratiti RFC-ove i Wiki

Page 19: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

Posebne IPv6 adrese

Primjer link-local adrese bge1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500

lladdr 00:13:21:ae:08:a6

priority: 0

media: Ethernet autoselect (1000baseT full-duplex)

status: active

inet 193.192.15.124 netmask 0xffffffc0 broadcast 193.192.15.127

inet6 fe80::213:21ff:feae:8a6%bge1 prefixlen 64 scopeid 0x2

inet6 2001:7f8:28::1 prefixlen 48

Iako je za link-local određena mreža fe80::/10, nekonfigurirano

mrežno sučelje dobije /64 mrežu jer 54 bita moraju biti 0 (RFC 4291)

Page 20: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

Autokonfiguracija

Stateless address autoconfiguration (SLAAC)

IPv6 hostovi se mogu autokonfigurirati čim se spoje na mrežu

Tu autokonfiguraciju omogućuje Neighbor Discovery Protocol (NDP)

putem ICMPv6 protokola

NDP – radi na link layer-u po TCP/IP modelu i odgovoran je za:

• Autokonfiguraciju hostova

• Pronalazak link layer adresa ostalih hostova

• Detektiranje dupliciranih adresa

• Pronalazak usmjernika i DNS-ova

• Održavanje vidljivosti na mreži

ICMPv6 – ima sličnu funkciju kao ARP u IPv4

Page 21: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

Autokonfiguracija

Linux

eth0 Link encap:Ethernet HWaddr 00:0f:fe:68:71:b7

inet addr:10.53.255.70 Bcast:10.53.255.255 Mask:255.255.255.0

inet6 addr: fe80::20f:feff:fe68:71b7/64 Scope:Link

inet6 addr: 2001:b68:e:face:20f:feff:fe68:71b7/64 Scope:Global

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:53593595 errors:0 dropped:0 overruns:0 frame:0

TX packets:79642837 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:18309760839 (18.3 GB) TX bytes:108422156200 (108.4 GB)

Interrupt:19 Memory:f0400000-f0420000

Page 22: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

Autokonfiguracija

Windows 7

Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . :

Description . . . . . . . . . . . : Intel(R) 82566DM-2 Gigabit Network Connection

Physical Address. . . . . . . . . : 00-1E-37-48-40-AC

DHCP Enabled. . . . . . . . . . . : No

Autoconfiguration Enabled . . . . : Yes

IPv6 Address. . . . . . . . . . . : 2001:b68:e:face:7d46:c954:388a:69d(Preferred)

Temporary IPv6 Address. . . . . . : 2001:b68:e:face:ed8f:7d1a:20f0:b5f2(Preferred)

Link-local IPv6 Address . . . . . : fe80::7d46:c954:388a:69d%11(Preferred)

IPv4 Address. . . . . . . . . . . : 161.53.255.123(Preferred)

Subnet Mask . . . . . . . . . . . : 255.255.255.192

Default Gateway . . . . . . . . . : fe80::5:73ff:fea0:a28%11

161.53.255.65

DNS Servers . . . . . . . . . . . : 161.53.255.4

161.53.2.69

NetBIOS over Tcpip. . . . . . . . : Enabled

Page 23: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

Autokonfiguracija

DHCPv6 se koristi:

ako je potreban centralni management dodjeljivanja adresa

kada je potrebno dodjeliti više informacija hostovima od IPv6 adresa,

DNS servera, npr. NTP, TFTP i sl.

ako iz nekog razloga nije moguće koristiti SLAAC

DHCPv6 koristi protokol UDP, port 564 za klijente i 547 za

poslužitelje

Certificirane verzije DHCPv6 servera od strane ipv6foruma

http://tinyurl.com/mcvdsj3

Page 24: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

Tranzicijski mehanizmi

IPv4 i IPv6 nisu kompatibilni protokoli

IPv6 je zastupljen oko 1% na internetu i dok u potpunosti ne zamjeni

IPv4 protokol, postojat će razni tranzicijski mehanizmi za uspostavu

IPv6 konekcija

Na primjer, tuneliranja IPv6 prometa kroz IPv4 su jedna od rješenja

koja se baš nisu pokazala najboljim (problemi s MTU-om, kašnjenja)

Trenutni draftovi

IPv4 residual deployment (4RD)

Mapping of Address and Port (MAP)

Page 25: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

Tranzicijski mehanizmi

Tuneliranja

Teredo

ISATAP

Tunnel broker - 6in4

Translacijski mehanizmi

Stateless IP/ICMP Translation (SIIT)

IPv6 rapid deployment (6RD)

Transport Relay Translation (TRT)

NAT64

DNS64

Dual-Stack Lite (DS-Lite)

Page 26: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

Tranzicijski mehanizmi

Ispis Windows 7 Teredo tunela (tuneliranje)

Tunnel adapter Teredo Tunneling Pseudo-Interface:

Connection-specific DNS Suffix . :

Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface

Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0

DHCP Enabled. . . . . . . . . . . : No

Autoconfiguration Enabled . . . . : Yes

IPv6 Address. . . . . . . . . . . : 2001:0:5ef5:79fb:201a:b5d:5eca:84(Preferred)

Link-local IPv6 Address . . . . . : fe80::201a:b5d:5eca:84%14(Preferred)

Default Gateway . . . . . . . . . :

NetBIOS over Tcpip. . . . . . . . : Disabled

Page 27: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

Dual-stack

Dual-stack

IPv4 i IPv6 protokoli implementirani su na krajnjim hostovima

Svaki servis koji se oslanja na IP protokol odvojeno komunicira prema

IPv4 svijetu i prema IPv6 svijetu

Oba protokola koriste istu mrežnu infrastrukuru

Tuneliranje nije potrebno

OS podrška za dual-stack je dobra

Potrebna je IPv6 veza prema internetu

Page 28: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

Dual-stack

IPv4 vs Dual-stack host

Page 29: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

Dual-stack

Dual-stack konfiguracija usmjernika

interface Vlan123

ip address 161.53.1.1 255.255.255.0

ip access-group vl123ip4acl in/out

ipv6 address 2001:DB8:1:CAFE::1/64

ipv6 enable

ipv6 traffic-filter vl123ip6acl in/out

Page 30: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

IPv6 i Linux

Page 31: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

IPv6 i Linux

Podrška za IPv6 je na Linuxu podrazumno uključena

Svako mrežno sučelje može imati više IPv6 adresa

Moguće je svaki servis staviti na svoju IPv6 adresu

Ukoliko se koristi više IPv6 adresa, potrebno je svaki servis prilagoditi

da sluša na točno određenoj IPv6 adresi

Page 32: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

Debian IPv6 konfiguracija

[...]

auto eth0

iface eth0 inet static

address 161.53.2.76

netmask 255.255.255.192

network 161.53.2.64

broadcast 161.53.2.127

gateway 161.53.2.65

auto eth0:0

iface eth0:0 inet static

address 161.53.2.94

netmask 255.255.255.192

[...]

iface eth0 inet6 static

address 2001:b68:c:2::76:0

netmask 64

gateway 2001:b68:c:2::1

iface eth0:0 inet6 static

address 2001:b68:c:2::76:1

netmask 64

gateway 2001:b68:c:2::1

[...]

Page 33: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

# ifconfig eth0 [root@marun ~]# ifconfig eth0

eth0 Link encap:Ethernet HWaddr 00:50:56:9a:57:1f

inet addr:161.53.2.76 Bcast:161.53.2.127 Mask:255.255.255.192

inet6 addr: 2001:b68:c:2::101:0/64 Scope:Global

inet6 addr: 2001:b68:c:2::76:1/64 Scope:Global

inet6 addr: 2001:b68:c:2::98:0/64 Scope:Global

inet6 addr: 2001:b68:c:2::76:0/64 Scope:Global

inet6 addr: 2001:b68:c:2::103:0/64 Scope:Global

inet6 addr: 2001:b68:c:2::105:0/64 Scope:Global

inet6 addr: 2001:b68:c:2::104:0/64 Scope:Global

inet6 addr: 2001:b68:c:2::72:0/64 Scope:Global

inet6 addr: 2001:b68:c:2::116:0/64 Scope:Global

inet6 addr: 2001:b68:c:2::107:0/64 Scope:Global

inet6 addr: 2001:b68:c:2::117:0/64 Scope:Global

inet6 addr: 2001:b68:c:2::106:0/64 Scope:Global

inet6 addr: fe80::250:56ff:fe9a:571f/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:1376925868 errors:0 dropped:0 overruns:0 frame:0

TX packets:1976433897 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:706147100537 (657.6 GiB) TX bytes:2109709737001 (1.9 TiB)

Page 34: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

# nestat –rn6

[root@marun ~]# netstat -rn6

Kernel IPv6 routing table

Destination Next Hop Flag Met Ref Use If

2001:b68:c:2::/64 :: UA 256 0 13 eth0

fe80::/64 :: U 256 0 0 eth0

::/0 2001:b68:c:2::1 UG 1 0265587 eth0

::/0 :: !n -1 1327416 lo

::1/128 :: Un 0 33234964 lo

2001:b68:c:2::72:0/128 :: Un 0 1 94155 lo

2001:b68:c:2::76:0/128 :: Un 0 11823300 lo

2001:b68:c:2::76:1/128 :: Un 0 1 2445 lo

2001:b68:c:2::98:0/128 :: Un 0 1 60 lo

2001:b68:c:2::101:0/128 :: Un 0 1 43399 lo

2001:b68:c:2::103:0/128 :: Un 0 1 949 lo

2001:b68:c:2::104:0/128 :: Un 0 1 0 lo

2001:b68:c:2::105:0/128 :: Un 0 1 0 lo

2001:b68:c:2::106:0/128 :: Un 0 1 0 lo

2001:b68:c:2::107:0/128 :: Un 0 1 0 lo

2001:b68:c:2::116:0/128 :: Un 0 1187582 lo

2001:b68:c:2::117:0/128 :: Un 0 1303291 lo

fe80::250:56ff:fe9a:571f/128 :: Un 0 1100106 lo

ff00::/8 :: U 256 0 0 eth0

::/0 :: !n -1 1327416 lo

Page 35: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

# ping6 –n ipv6.google.com

[root@marun ~]# ping6 -n ipv6.google.com

PING ipv6.google.com(2001:4860:4002:800::1012) 56 data bytes

64 bytes from 2001:4860:4002:800::1012: icmp_seq=1 ttl=45 time=162 ms

64 bytes from 2001:4860:4002:800::1012: icmp_seq=2 ttl=45 time=162 ms

64 bytes from 2001:4860:4002:800::1012: icmp_seq=3 ttl=45 time=158 ms

64 bytes from 2001:4860:4002:800::1012: icmp_seq=4 ttl=45 time=162 ms

64 bytes from 2001:4860:4002:800::1012: icmp_seq=5 ttl=45 time=162 ms

64 bytes from 2001:4860:4002:800::1012: icmp_seq=6 ttl=45 time=162 ms

64 bytes from 2001:4860:4002:800::1012: icmp_seq=7 ttl=45 time=166 ms

64 bytes from 2001:4860:4002:800::1012: icmp_seq=8 ttl=45 time=159 ms

^C

--- ipv6.google.com ping statistics ---

8 packets transmitted, 8 received, 0% packet loss, time 7010ms

rtt min/avg/max/mdev = 158.741/162.182/166.758/2.256 ms

Page 36: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

# traceroute6 –n ipv6.google.com

[root@marun ~]# traceroute6 -n ipv6.google.com

traceroute to ipv6.google.com (2001:4860:4002:800::1012), 30 hops max, 80

byte packets

1 * * *

2 2001:b68:ff:ff:a2b:0:7:1 0.286 ms 0.352 ms 0.336 ms

3 2001:b68:ff:ff:a2b:0:4d:1 0.833 ms 1.023 ms 1.068 ms

4 2001:b68:ff:ff:a2b:0:20:1 3.063 ms 3.050 ms 3.039 ms

5 2001:798:10:10aa::9 0.535 ms 0.461 ms 0.445 ms

6 2001:798:cc:2d01:2d01::2 0.425 ms 0.448 ms 0.437 ms

7 2001:798:cc:3201:1001::9 8.451 ms 8.412 ms 8.442 ms

8 2001:798:cc:1001:1e01::6 19.833 ms 19.842 ms 19.816 ms

9 2001:798:cc:1201:1e01::5 32.099 ms 32.076 ms 31.965 ms

10 2001:798:cc:1201:1401::2 40.307 ms 40.355 ms 40.340 ms

[...]

20 2001:4860::8:0:3005 133.292 ms 133.565 ms 134.232 ms

21 2001:4860::8:0:464f 139.941 ms 140.025 ms 141.031 ms

22 2001:4860::8:0:2c9c 176.834 ms 162.109 ms 158.808 ms

23 2001:4860::1:0:57f 162.134 ms 161.714 ms 157.939 ms

24 2001:4860:0:1::175 165.853 ms 162.384 ms 165.901 ms

25 2001:4860:8000:1::6 158.116 ms 158.009 ms 161.656 ms

Page 37: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

# ip -6 neighbour show

[root@marun ~]# ip -6 neighbour show

fe80::250:56ff:feb0:1a dev eth0 lladdr 00:50:56:b0:00:1a STALE

fe80::207:b3ff:fea5:5c00 dev eth0 lladdr 00:07:b3:a5:5c:00 router REACHABLE

fe80::250:56ff:fea3:646c dev eth0 lladdr 00:50:56:a3:64:6c REACHABLE

2001:b68:c:2::69:0 dev eth0 lladdr 00:50:56:b0:00:1a STALE

2001:b68:c:2::70:0 dev eth0 lladdr 00:50:56:a3:64:6c REACHABLE

2001:b68:c:2::1 dev eth0 lladdr 00:07:b3:a5:5c:00 router STALE

Page 38: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

Osnovni servisi i IPv6

Većina osnovnih servisa će raditi out-of-the-box

OpenSSH, vsftpd, Dovecot, MySQL, OpenLDAP, AOSI, FreeRADIUS,

ntpd, …

U slučaju da se koristi ACL, potrebno je prilagoditi prava pristupa i na

IPv6 (TCP Wrappers, iptables, …)

Potrebne su dodatne konfiguracije za složenije servise

DNS (BIND)

HTTP (Apache)

SMTP (Postfix)

Page 39: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

DNS (BIND) i IPv6

BIND v9 podržava IPv6

Najprije CARNet treba ustanovama delegirati IPv6 reverzne zone

Konfiguracija je jednostavna

Page 40: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

Reverzne zone -

named.conf(.local) zone "c.0.0.0.8.6.b.0.1.0.0.2.ip6.arpa" {

type master;

file "Srce/public/revs/2001:b68:c";

allow-transfer { 161.53.2.70;161.53.2.69;161.53.2.108; };

};

zone "d.0.0.0.8.6.b.0.1.0.0.2.ip6.arpa" {

type master;

file "Srce/public/revs/2001:b68:d";

allow-transfer { 161.53.2.70;161.53.2.69;161.53.2.108; };

};

zone "e.0.0.0.8.6.b.0.1.0.0.2.ip6.arpa" {

type master;

file "Srce/public/revs/2001:b68:e";

allow-transfer { 161.53.2.70;161.53.2.69;161.53.2.108; };

};

zone "f.0.0.0.8.6.b.0.1.0.0.2.ip6.arpa" {

type master;

file "Srce/public/revs/2001:b68:f";

allow-transfer { 161.53.2.70;161.53.2.69;161.53.2.108; };

};

Page 41: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

Primjer jedne reverzne zone

$TTL 4h

;

; IPv6 reverse lookup zone for 2001:b68:c::/48

;

@ IN SOA regoc.srce.hr. root.regoc.srce.hr. (

2013041902

1H ; refresh

5M ; retry

1W ; expiry

1H ) ; minimum

IN NS regoc.srce.hr.

IN NS bjesomar.srce.hr.

;

; Set the origin to the pTLA prefix.

;

$ORIGIN c.0.0.0.8.6.b.0.1.0.0.2.ip6.arpa.

0.0.0.0.9.6.0.0.0.0.0.0.0.0.0.0.2.0.0.0 IN PTR regoc.srce.hr.

0.0.0.0.0.7.0.0.0.0.0.0.0.0.0.0.2.0.0.0 IN PTR bjesomar.srce.hr.

0.0.0.0.2.7.0.0.0.0.0.0.0.0.0.0.2.0.0.0 IN PTR ra.srce.hr.

0.0.0.0.6.7.0.0.0.0.0.0.0.0.0.0.2.0.0.0 IN PTR marun.srce.hr.

0.0.0.0.6.1.1.0.0.0.0.0.0.0.0.0.2.0.0.0 IN PTR www.cix.hr.

1.0.0.0.4.c.3.1.5.a.0.0.5.3.1.a.c.c.0.1 IN PTR ser-test2.srce.hr.

Page 42: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

AAAA zapis

Povezuje puno ime (FQDN) i IPv6 adresu

Ekvivalent A zapisu u IPv4

AAAA zapisi se upisuju u host.db gdje se nalaze i svi ostali zapisi

(A, CNAME, NS, MX, …)

Primjer:

marun.srce.hr. IN A 161.53.2.76

marun.srce.hr. IN AAAA 2001:b68:c:2::76:0

Page 43: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

Primjeri s naredbom host

[root@regoc ~bind]# host marun.srce.hr

marun.srce.hr has address 161.53.2.76

marun.srce.hr has IPv6 address 2001:b68:c:2::76:0

[root@regoc ~bind]# host 161.53.2.76

76.2.53.161.in-addr.arpa domain name pointer marun.srce.hr.

[root@regoc ~bind]# host 2001:b68:c:2::76:0

0.0.0.0.6.7.0.0.0.0.0.0.0.0.0.0.2.0.0.0.c.0.0.0.8.6.b.0.1.0.0.2.ip6.arpa

domain name pointer marun.srce.hr.

Page 44: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

Apache i IPv6

Prilagoditi /etc/apache2/ports.conf da Apache sluša i na IPv6 sučelju

Bitno je naglasiti da se IPv6 mora iskonfigurirati na SVIM virtualnim

hostovima

IPv6 adrese je potrebno stavljati u uglate zagrade

[2001:b68:c:2::76:0]

Page 45: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

Definicija jednog virtualnog hosta

<VirtualHost 161.53.2.76:80>

ServerName www.srce.hr

ServerAlias www.srce.unizg.hr

DocumentRoot /data/www/typo3/htdocs/srce

ErrorLog /var/log/apache2/typo_error_log

CustomLog /var/log/apache2/typo_access_log combined

</VirtualHost>

<VirtualHost [2001:b68:c:2::76:0]:80>

ServerName www.srce.hr

ServerAlias www.srce.unizg.hr

DocumentRoot /data/www/typo3/htdocs/srce

ErrorLog /var/log/apache2/typo_error_ip6_log

CustomLog /var/log/apache2/typo_access_ip6_log combined

</VirtualHost>

Page 46: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

Postfix i IPv6

Konfiguracija se nalazi u /etc/postfix/main.cf

Iskonfigurirati da Postfix sluša i na IPv4 i IPv6 inet_protocols = ipv4, ipv6

Iskonfigurirati na kojim IP adresama sluša Postfix inet_interfaces = 127.0.0.1, 161.53.2.69, [::1], [2001:b68:c:2::69:0]

Iskonfigurirati da se i klijenti iz IPv6 lokalne mreže mogu spajati bez

autentikacije mynetworks = 127.0.0.0/8, 161.53.0.0/22, [2001:b68:c::]/48

Page 47: IPv6 - unizg.hrUvod 1977 Dr. Vint Cerf, prepoznat kao „the fathers of the Internet”, izjavljuje – „32 bits should be enough address space for Internet” 1981 RFC791 definira

Kraj

Hvala na pažnji!