Než začneme

Nainstalovat balíček quagga-ospf6d 

root@debian10a:~# apt install quagga-ospf6d


Zapnout IPv6 a forwarding

Poeditovat sysctl.conf

root@debian10a:~# nano /etc/sysctl.conf

Najít net.ipv6.conf.all.forwarding  a nastavit 1. (projeví se po rebootu)

# Uncomment the next line to enable packet forwarding for IPv6
#  Enabling this option disables Stateless Address Autoconfiguration
#  based on Router Advertisements for this host
net.ipv6.conf.all.forwarding=1

Spustit sysctl (projeví se hned)

root@debian10a:~# sysctl net.ipv6.conf.all.forwarding=1

Kontrola (musí tam bejt 1)

root@debian10a:~# sysctl net.ipv6.conf.all.forwarding
net.ipv6.conf.all.forwarding = 1


Nastavit vlastní adresu pro router

Poeditovat /etc/network/interfaces

před (pouze IPv4)po (oboje IPv4 a IPv6)
# The loopback network interface
auto lo
iface lo inet loopback
 


# Spoj -> PMV, uplink
auto enp0s8
iface enp0s8 inet static
 address 10.107.99.130/30
 

# AP Example-DB8, tady jsou pripojenci
auto enp0s9
iface enp0s9 inet static
 address 10.107.184.1/24


# The loopback network interface
auto lo
iface lo inet loopback
iface lo inet6 static
 address 2a01:16d:b800::/64

# Spoj -> PMV, uplink
auto enp0s8
iface enp0s8 inet static
 address 10.107.99.130/30
# tady nepotřebuješ inet6, stačí ti link-local adresa (fe80::)

# AP Example-DB8, tady jsou pripojenci
auto enp0s9
iface enp0s9 inet static
 address 10.107.184.1/24
iface enp0s9 inet6 static
 address 2a01:16d:b810::/64


Shodit a nahodit interface (bacha na ostrý síti!)

root@debian10a:~# ifdown lo; ifup lo
root@debian10a:~# ifdown enp0s9; ifup enp0s9

Kontrola

root@debian10a:~# ip address show

Routování - co budeme šířit ven?

Zadat 1x agregovanou routu pro tento router. Velikost bude mezi /40 - /48, záleží na správci. Doporučuju /48.

/etc/quagga/zebra.conf

před (pouze IPv4)po (oboje IPv4 a IPv6)
!
! Vzorovy router, oblast DB8, router 1
!
hostname oblastDB8-router1
log syslog
password free
enable password ch80hv7836so20dh235f

ip route 224.0.0.5/32 127.0.0.1
ip route 224.0.0.6/32 127.0.0.1

! Verejky
ip route 89.200.200.16/28 eth0




ip forwarding


!
! Vzorovy router, oblast DB8, router 1
!
hostname oblastDB8-router1
log syslog
password free
enable password ch80hv7836so20dh235f

ip route 224.0.0.5/32 127.0.0.1
ip route 224.0.0.6/32 127.0.0.1

! Verejky
ip route 89.200.200.16/28 eth0

! IPv6: Agregovana routa pro cely tento router (jde ven pres OSPF)
ipv6 route 2a01:16d:b810::/44 lo

ip forwarding
ipv6 forwarding



/etc/quagga/ospf6d.conf

!
! Vzorovy router, oblast DB8, router 1
!
hostname oblastDB8-router1
log syslog
password free
enable password ch80hv7836so20dh235f
!
interface enp0s8
 description Spoj -> PMV, uplink
 ipv6 ospf6 cost 10
 ipv6 ospf6 hello-interval 2
 ipv6 ospf6 dead-interval 6
 ipv6 ospf6 network point-to-point
!
router ospf6
 router-id 10.107.184.1
 redistribute static
 interface enp0s8 area 0.0.0.0
!