Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Announcement: Try the Ask AI chatbot for answers to your technical questions about Juniper products and solutions.

close
header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

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

date_range 27-May-23

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.

    content_copy zoom_out_map
    <network>
     <name>mgmt</name>
     <bridge name=”vbr1” />
     <forward mode=”nat” />
     <ip address=”10.10.10.1” netmask=”255.255.255.0” >
      <dhcp>
    <range start=”10.10.10.2” end=”10.10.10.99” />
      </dhcp>
     </ip>
    </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.

    content_copy zoom_out_map
    HostOS# # virsh net-list --all
     Name                 State      Autostart     Persistent
    ----------------------------------------------------------
     mgmt                 active     yes           yes
     default              active     yes           yes
footer-navigation