Dynamic routing IPv6

From Ilianko

IPv6

Ipv6.png

  • 48 бита Routing Prefix:
    • 23 бита Registry
    • 9 бита ISP Prefix
    • 16 бита Site Prefix
  • 16 бита Subnet Prefix
  • 64 бита Interface ID


Три вида адреси: unicast, multicast and anycast.

Unicast

Идентификатор на интерфейс. Пакет изпратен до unicast адрес се изпраща до интерфейса настроен с този адрес. Примерни адреси:

    • FEDC:BA98:7654:3210:FEDC:BA98:7654:3210
    • 1080:0:0:0:8:800:200C:417A ( 1080::800:200C:417A)


Anycast

Идентификатор на група интерфейси (най-често принадлежащи на различни комуникационни точки (нодове). Пакет изпратен към anycast адрес се доставя на един от интерфейсите от тази група ("най-близкия" според метриката рутиращия протокол). По структура не се различава от unicast адрес

неопределен адрес

  •  ::/128 — The address with all zero bits is called the unspecified address (corresponding to 0.0.0.0/32 in IPv4).

Default route

  •  ::/0 — The default unicast route address (corresponding to 0.0.0.0/0 in IPv4).

Локалнi адрес

  •  ::1/128 — looback адрес. (IPv4 127.0.0.0/8)
  • fe80::/10 — Addresses in the link-local prefix are only valid and unique on a single link. Within this prefix only one subnet is allocated (54 zero bits), yielding an effective format of fe80::/64. The least significant 64 bits are usually chosen as the interface hardware address constructed in modified EUI-64 format. A link-local address is required on every IPv6-enabled interface—in other words, applications may rely on the existence of a link-local address even when there is no IPv6 routing. These addresses are comparable to the auto-configuration addresses 169.254.0.0/16 of IPv4.

Уникални Локални адреси (Unique local addresses)

Template:Main

  • fc00::/7 — Unique local addresses (ULAs) are intended for local communication. They are routable only within a set of cooperating sites.<ref name=rfc1918>RFC 1918, Address Allocation for Private Internets, Y. Rekhter, B. Moskowitz, D. Karrenberg, G.J. De Groot, E. Lear (February 1996)</ref> The block is split into two halves, the upper half (fd00::/8) is used for "probabilistically unique" addresses in which a 40-bit pseudorandom number is used to obtain a /48 allocation. This means that there is only a small chance that two sites that wish to merge or communicate with each other will have conflicting addresses. No allocation method for the lower half of the block is currently defined.

Transition from IPv4

Template:Main

  •  ::ffff:0:0/96 — This prefix is designated as an IPv4-mapped IPv6 address. With a few exceptions, this address type allows the transparent use of the Transport Layer protocols over IPv4 through the IPv6 networking application programming interface. Server applications only need to open a single listening socket to handle connections from clients using IPv6 or IPv4 protocols. IPv6 clients will be handled natively by default, and IPv4 clients appear as IPv6 clients at their IPv4-mapped IPv6 address. Transmission is handled similarly; established sockets may be used to transmit IPv4 or IPv6 datagram, based on the binding to an IPv6 address, or an IPv4-mapped address. (See also Transition mechanisms.)
  •  ::ffff:0:0:0/96 — A prefix used for IPv4-translated addresses which are used by the Stateless IP/ICMP Translation (SIIT) protocol.
  • 64:ff9b::/96 — The "Well-Known" Prefix. Addresses with this prefix are used for automatic IPv4/IPv6 translation.<ref name=rfc6052>RFC 6052, "IPv6 Addressing of IPv4/IPv6 Translators", C. Bao, C. Huitema, M. Bagnulo, M. Boucadair, X. Li, (October 2010)</ref>

Template:Main

  • 2002::/16 — This prefix is used for 6to4 addressing. Here, an address from the IPv4 network 192.88.99.0/24 is also used.


Multicast адреси

Идентификатор на група интерфейси (най-често принадлежащи на различни комуникационни точки (нодове). Пакет изпратен до мултикаст адрес се доставя до всеки интерфейс, който се идентифицира с този адрес.

The multicast addresses ff00::0/8 are reserved (rfc4291) and should not be assigned to any multicast group. The Internet Assigned Numbers Authority manages address reservations.IANA Internet Protocol Version 6 Multicast Addresses.

Some common IPv6 multicast addresses are the following:

Address Description Available Scopes
ff0X::1 All nodes address, identify the group of all IPv6 nodes Available in scope 1 (interface-local) and 2 (link-local):
  • ff01::1 → All nodes in the interface-local
  • ff02::1 → All nodes in the link-local
ff0X::2 All routers Available in scope 1 (interface-local), 2 (link-local) and 5 (site-local):
  • ff01::2 → All routers in the interface-local
  • ff02::2 → All routers in the link-local
  • ff05::2 → All routers in the site-local
ff02::5 OSPFIGP 2 (link-local)
ff02::6 OSPFIGP Designated Routers 2 (link-local)
ff02::9 RIP Routers 2 (link-local)
ff02::a EIGRP Routers 2 (link-local)
ff02::d All PIM Routers 2 (link-local)
ff02::1a All RPL Routers 2 (link-local)
ff0X::fb mDNSv6 Available in all scopes
ff0X::101 All Network Time Protocol (NTP) servers Available in all scopes
ff02::1:1 Link Name 2 (link-local)
ff02::1:2 All-dhcp-agents 2 (link-local)
ff02::1:3 Link-local Multicast Name Resolution 2 (link-local)
ff05::1:3 All-dhcp-servers 5 (site-local)
ff02::1:ff00:0/104 Solicited-node multicast address. See below 2 (link-local)
ff02::2:ff00:0/104 Node Information Queries 2 (link-local)


Конфигуриране на локална мрежа с IPv6 и динамично рутиране

Създаване на машини

Да се импортират машини, които ще имат роля на рутерите integral, differential и bazhdar.

IPv6 за локална мрежа

Задeляне на адресно пространство за локална мрежа ( Unique Local IPv6 Unicast Addresses - IPv4 - 192.168.0.0).

| 7 bits |1|  40 bits   |  16 bits  |          64 bits           |
+--------+-+------------+-----------+----------------------------+
| Prefix |L| Global ID  | Subnet ID |        Interface ID        |
+--------+-+------------+-----------+----------------------------+
  • Prefix - FC00 :: / 7 префикс за идентифициране на локални IPv6 Unicast

aдреси;

  • Global ID - 40-битов глобален идентификатор, използван за създаване на

уникален префикс;

  • Subnet ID - 16-битов идентификатор на подмрежата;
  • Interface ID- 64-битов интерфейс ID.


RFC 4193 - Unique Local IPv6 Unicast Addresses

Мрежа на опитната постановка

Избор на GlobalID

Генератор на псевдослучаен адрес - http://www.simpledns.com/private-ipv6.aspx


Избор на адреси

Мрежа              Адрес             
МАТ
ЕМА
ТIКА
BAZH
DIFF
INTE
Интерфейси integral              bazhdar              differential             
eth1                          
eth2                                       
eth3                                       

Настройка на адреси

За всеки от рутерите да се промени файлът:

/etc/network/interfaces

Примерна конфигурация за рутер integral:

# This file describes the network interfaces available on your system

# and how to activate them. For more information, see interfaces(5).


# The loopback network interface

auto lo

iface lo inet loopback


# The primary network interface

auto eth0
iface eth0 inet6 static
address fd02:c9ec:8c17:4::1
netmask 64

auto eth1
iface eth1 inet6 static
address fd02:c9ec:8c17:1::1
netmask 64

auto eth2
iface eth2 inet6 static
address fd02:c9ec:8c17:2::1
netmask 64

Проверка настройки

Проверка свързаността между рутерите.

ping6 

Разглеждане на рутиращите таблици

route -6

Настройка на quagga

Добавяне на рутираните интерфейси

student@bazhdar$ telnet ::1 2606   %parola - "zebra"
ospf6d@plant# configure terminal 
ospf6d@plant(config)# router ospf6
ospf6d@plant(config-ospf6)# router-id 1.1.1.X   % X = 1,2,3... razlichno za vseki ruter
ospf6d@plant(config-ospf6)# interface eth0 area 0.0.0.0  
ospf6d@plant(config-ospf6)# interface eth1 area 0.0.0.0
ospf6d@plant(config-ospf6)# interface eth2 area 0.0.0.0
ospf6d@plant(config-ospf6)# exit
ospf6d@plant(config)# exit
ospf6d@plant# write file

Проверка настройки

Проверка свързаността между рутерите.

ping6 

Разглеждане на рутиращите таблици

route -6

Проверка динамичност

Наблюдение на hello пакети