Notes
Exercise 6-2: Define a NAT Virtual Network Using virsh
Content of the notes (1)
Page 1
In this exercise, you will use the virsh command to define a persistent NAT virtual network called rhnet_virsh with subnet 192.168.2.0/24, gateway 192.168.2.1, and DHCP range 192.168.2.2 to .254. You will use virbr2 as the bridge name and a range of ports between 1024 and 65535. You will activate this virtual network and set it to autostart at each system reboot.
1. List virtual networks
$ virsh net-list
2. Create a XML with informations about this Virtual Network
<network>
<name>virsh_bridge</name>
<bridge name='virbr0' stp='on' delay='0' />
<forward mode='nat'>
<nat>
<port start='1024' end='65535' />
</nat>
</forward>
<ip address='192.168.0.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.0.100' end='192.168.0.150' />
</dhcp>
</ip>
</network>
3. Define this network as persistent:
$ virsh net-define /root/rhnet_virsh.xml
4. Start automaticaly:
$ virsh net-autostart virsh_bridge
5. Start now
$ virsh net-start virsh_bridge
6. Informações sobre rede
virsh net-info virsh_bridge
Information
- Description
- RHCSA EX200 (06. Configuring Server Virtualization and Network Installing) Note on Exercise 6-2: Define a NAT Virtual Network Using virsh, created by Vagner Aragão on 25/01/2019.
- Created by
- Vagner Aragão
- Views
- 0
- Rating