This shows you the differences between two versions of the page.
|
rl:labs:06:contents:09 [2023/11/10 17:12] laura.ruse [09. [BONUS - 10p] Configurare persistentă] |
rl:labs:06:contents:09 [2025/11/09 16:40] (current) laura.ruse |
||
|---|---|---|---|
| Line 20: | Line 20: | ||
| </code> | </code> | ||
| Observați că la executarea comenzii ''ifup'' interfața a preluat configurările din fișier. | Observați că la executarea comenzii ''ifup'' interfața a preluat configurările din fișier. | ||
| + | |||
| + | <hidden> | ||
| + | <solution> | ||
| + | Pe host: | ||
| + | <code> | ||
| + | root@host:~# vim /etc/network/interfaces | ||
| + | auto veth-red | ||
| + | iface veth-red inet6 static | ||
| + | address 2201::1/64 | ||
| + | |||
| + | auto veth-blue | ||
| + | iface veth-blue inet6 static | ||
| + | address 2202::1/64 | ||
| + | |||
| + | root@host:~# ifdown veth-red | ||
| + | root@host:~# ifup veth-red | ||
| + | root@host:~# ifdown veth-blue | ||
| + | root@host:~# ifup veth-blue | ||
| + | </code> | ||
| + | |||
| + | Pe red: | ||
| + | <code> | ||
| + | root@red:~# vim /etc/network/interfaces | ||
| + | auto red-eth0 | ||
| + | iface red-eth0 inet6 static | ||
| + | address 2201::2/64 | ||
| + | gateway 2201::1 | ||
| + | |||
| + | root@red:~# ifdown red-eth0 | ||
| + | root@red:~# ifup red-eth0 | ||
| + | </code> | ||
| + | |||
| + | Pe blue: | ||
| + | <code> | ||
| + | root@blue:~# vim /etc/network/interfaces | ||
| + | auto blue-eth0 | ||
| + | iface blue-eth0 inet6 static | ||
| + | address 2202::2/64 | ||
| + | gateway 2202::1 | ||
| + | |||
| + | root@blue:~# ifdown blue-eth0 | ||
| + | root@blue:~# ifup blue-eth0 | ||
| + | </code> | ||
| + | </solution> | ||
| + | </hidden> | ||
| Configurați sistemul astfel încât rutarea să fie activată la pornirea sistemului. | Configurați sistemul astfel încât rutarea să fie activată la pornirea sistemului. | ||
| <note tip> | <note tip> | ||
| - | Pentru informații legate de activarea rutării, consultați [[http://linuxpoison.blogspot.ro/2008/01/how-to-enable-ip-forwarding.html|această pagină]]. | + | Pentru informații legate de activarea rutării, consultați [[https://docs.frrouting.org/projects/dev-guide/en/latest/building-frr-for-debian13.html#enable-ip-ipv6-forwarding|această pagină]]. |
| </note> | </note> | ||
| + | |||
| + | <hidden> | ||
| + | <solution> | ||
| + | Pe host: | ||
| + | <code> | ||
| + | root@host:~# vim /etc/sysctl.d/frr.conf | ||
| + | net.ipv6.conf.all.forwarding=1 | ||
| + | |||
| + | root@host:~# systemctl restart systemd-sysctl | ||
| + | </code> | ||
| + | </solution> | ||
| + | </hidden> | ||
| Reporniți mașina virtuală (stația ''host''), folosind comanda:<code bash> | Reporniți mașina virtuală (stația ''host''), folosind comanda:<code bash> | ||
| root@host:~# reboot | root@host:~# reboot | ||
| </code> | </code> | ||
| - | După repornire ar trebui să aveți configurațiile activate și conectivitate completă la nivelul topologiei. | + | După repornire, e posibil să nu aveți adresele IPv6 pe stația host. Dați ''ifup'' pentru interfețele ''veth-red'', ''veth-blue'' și ''veth-green''. |
| + | |||
| + | Acum ar trebui să aveți configurațiile activate și conectivitate completă la nivelul topologiei. | ||