Skip to content

Commit 34c3a70

Browse files
committed
quickstart: ia32-generic-qemu: Add IPv6 setup guide
JIRA: COG-42
1 parent 9acbb28 commit 34c3a70

File tree

1 file changed

+53
-3
lines changed

1 file changed

+53
-3
lines changed

quickstart/ia32-generic-qemu.md

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ The number of detected cores is presented during kernel initialization.
128128

129129
## Network setup on `ia32-generic-qemu`
130130

131-
- Note: This guide was tested on `Ubuntu 20.04 LTS` host OS.
131+
- Note: This guide was tested on `Ubuntu 24.04 LTS` host OS.
132132

133133
There are few steps to follow:
134134

@@ -137,8 +137,9 @@ There are few steps to follow:
137137
- Install the required package and ensure that `libvirtd` is running:
138138

139139
```bash
140-
sudo apt-get update
141-
sudo apt-get install qemu-system-common
140+
sudo apt update
141+
sudo apt install qemu-system-common
142+
sudo apt install libvirt-clients libvirt-daemon
142143
systemctl enable libvirtd.service
143144
systemctl start libvirtd.service
144145
```
@@ -150,6 +151,55 @@ There are few steps to follow:
150151
sudo virsh net-start --network default
151152
```
152153

154+
- If IPv6 is needed change the configuration of `virbr0`
155+
156+
```bash
157+
sudo virsh net-destroy default
158+
sudo virsh net-edit default
159+
```
160+
161+
The commands above open the editor of the configuration file of `virbr0`. There are two necessary changes:
162+
163+
- Add IPv6 address to the bridge interface:
164+
165+
```XML
166+
<ip family='ipv6' address='2001:db8:dead:beef:fe::2' prefix='64'/>
167+
```
168+
169+
- Enable NAT for IPv6:
170+
171+
```XML
172+
<forward mode='nat'>
173+
<nat ipv6='yes'/>
174+
</forward>
175+
```
176+
177+
The overall config should look something like this:
178+
179+
```XML
180+
<network>
181+
<name>default</name>
182+
<uuid>a9e032b7-e32f-4f91-a273-e6c6f15b8904</uuid>
183+
<forward mode='nat'>
184+
<nat ipv6='yes'/>
185+
</forward>
186+
<bridge name='virbr0' stp='on' delay='0'>
187+
<mac address='52:54:00:99:4d:c3'/>
188+
<ip address='192.168.122.1' netmask='255.255.255.0'>
189+
<dhcp>
190+
<range start='192.168.122.2' end='192.168.122.254'/>
191+
</dhcp>
192+
</ip>
193+
<ip family='ipv6' address='2001:db8:dead:beef:fe::2' prefix='64'/>
194+
</network>
195+
```
196+
197+
Save the config file and start the bridge by running:
198+
199+
```bash
200+
sudo virsh net-start default
201+
```
202+
153203
- After that verify that the IP range `192.168.122.1/24` is reported by the `vibr0` bridge:
154204

155205
```bash

0 commit comments

Comments
 (0)