wiki:set_up_ipv6_host_vm
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| wiki:set_up_ipv6_host_vm [2025/10/09 12:05] – created antisa | wiki:set_up_ipv6_host_vm [2025/10/09 12:21] (current) – [See also] add Add additional ip address on interface antisa | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ====== Set up IPv6 on host and VM ====== | ====== Set up IPv6 on host and VM ====== | ||
| + | Prerequisites: | ||
| + | - host with ipv6 subnet assigned | ||
| + | - kvm/qemu virtal machines | ||
| - | Prerequisites: | + | ===== Host machine ===== |
| - | - host with ipv6 subnet assigned | + | |
| - | - kvm/qemu virtal machines | + | |
| Identify the interface to which to assign the ipv6. In case you are using a bridge you need to use the bridge interface. | Identify the interface to which to assign the ipv6. In case you are using a bridge you need to use the bridge interface. | ||
| - | Set up bridge | + | Set up bridge |
| brctl addbr br0 | brctl addbr br0 | ||
| ip link set up dev br0 | ip link set up dev br0 | ||
| Line 35: | Line 36: | ||
| <WRAP center round tip 60%> | <WRAP center round tip 60%> | ||
| - | If you just want to use the v6 address on the interface itself you have to remove it from the bridge | + | If you just want to use the v6 address on the interface itself you have to remove it from the bridge. |
| </ | </ | ||
| We add the IP: | We add the IP: | ||
| ip -6 addr add 2607: | ip -6 addr add 2607: | ||
| - | This is subnet so you can choose an ip like 2607: | + | This is subnet so you can choose an ip like 2607: |
| - | Add route to the v6 gateway itself | + | Add route to the v6 gateway itself |
| ip -6 route add 2607: | ip -6 route add 2607: | ||
| Line 49: | Line 50: | ||
| Check | Check | ||
| - | </code> | + | < |
| # ip -6 r | # ip -6 r | ||
| ::1 dev lo proto kernel metric 256 pref medium | ::1 dev lo proto kernel metric 256 pref medium | ||
| Line 68: | Line 69: | ||
| ===== Inside of VM ===== | ===== Inside of VM ===== | ||
| - | assign | + | Assign |
| < | < | ||
| - | [root@zz1 ~]# ip -6 addr add 2607: | + | # ip -6 addr add 2607: |
| - | [root@zz1 ~]# ip a | + | # ip a |
| 1: lo: < | 1: lo: < | ||
| link/ | link/ | ||
| Line 87: | Line 88: | ||
| inet6 fe80:: | inet6 fe80:: | ||
| | | ||
| + | </ | ||
| + | |||
| + | Now add default route. " | ||
| + | < | ||
| + | # ip -6 route add default via 2607: | ||
| - | Now add default route | + | # ping6 2001: |
| - | [root@zz1 ~]# ip -6 route add default via 2607: | + | |
| - | [root@zz1 ~]# ping6 2001: | + | |
| PING 2001: | PING 2001: | ||
| 64 bytes from 2001: | 64 bytes from 2001: | ||
| Line 96: | Line 100: | ||
| 64 bytes from 2001: | 64 bytes from 2001: | ||
| 64 bytes from 2001: | 64 bytes from 2001: | ||
| + | </ | ||
| - | via is the IPv6 of the host interface br0 | + | If any of the pings aren't working make sure to check if the firewall is blocking and you have ipv6 forwarding enabled on host. |
| ====== Tested on ====== | ====== Tested on ====== | ||
| - | * | + | * AlmaLinux 9 |
| + | * KVM/Qemu VMs | ||
| ====== See also ====== | ====== See also ====== | ||
| + | * [[add_additional_ip_address_interface|Add additional ip address on interface]] | ||
| ====== References ====== | ====== References ====== | ||
| + | * https:// | ||
| + | * [[https:// | ||
wiki/set_up_ipv6_host_vm.1760011514.txt.gz · Last modified: by antisa
