Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Add a Virtual Network to a vSRX Virtual Firewall VM with KVM

You can extend an existing vSRX Virtual Firewall VM to use additional virtual networks.

To create a virtual network with virt-manager:

  1. Launch virt-manager and select Edit>Connection Details. The Connection details dialog box appears.
  2. Select Virtual Networks. The list of existing virtual networks appears.
  3. Click + to create a new virtual network for the control link. The Create a new virtual network wizard appears.
  4. Set the subnet for this virtual network and click Forward.
  5. Optionally, select Enable DHCP and click Forward.
  6. Select the network type from the list and click Forward.
  7. Verify the settings and click Finish to create the virtual network.

To create a virtual network with virsh:

  1. Use the virsh net-define command on the host OS to create an XML file that defines the new virtual network. Include the XML fields described in Table 1 to define this network.

    Note:

    See the official virsh documentation for a complete description of available options, including how to configure IPv6 networks.

    Table 1: virsh net-define XML Fields

    Field

    Description

    <network>...</network>

    Use this XML wrapper element to define a virtual network.

    <name>net-name</name>

    Specify the virtual network name.

    <bridge name=”bridge-name” />

    Specify the name of the host bridge used for this virtual network.

    <forward mode=”forward-option” />

    Specify routed or nat. Do not use the <forward> element for isolated mode.

    <ip address=”ip-address” netmask=”net-mask

    <dhcp range start=”start” end=”end” </dhcp> </ip>

    Specify the IP address and subnet mask used by this virtual network, along with the DHCP address range.

    The following example shows a sample XML file that defines a new virtual network.

  2. Use the virsh net-start command in the host OS to start the new virtual network.

    hostOS# virsh net-start mgmt

  3. Use the virsh net-autostart command in the host OS to automatically start the new virtual network when the host OS boots.

    hostOS# virsh net-autostart mgmt

  4. Optionally, use the virsh net-list –all command in the host OS to verify the new virtual network.