Skip to content

Network Configuration (GigE Cameras)#

This topic tells you how to configure a Basler camera with a GigE interface in a network.

The pylon Software Suite for Windows or Linux must be installed.

Info

  • The following network architectures also apply to the use of 5GigE cameras, provided that adapters and switches are appropiate for 5GigE.
  • If you are using your 5GigE or GigE camera in a wireless LAN, also read the Using Basler GigE Cameras in a Wireless LAN topic.

Peer-to-Peer Network Architecture#

One option is to establish a direct peer-to-peer connection between your cameras and your host computer.

The cameras can be connected to individual GigE network adapters or to a multiport adapter in the host computer.

Peer-to-peer Network Architecture

  • Advantage: Each camera has an individual connection to the host computer. Thus, each camera has the full connection bandwidth available for transmitting acquired images. This means that you can operate each camera at its full acquisition rate.
  • Disadvantage: The number of cameras that can be connected to a single computer is limited.

Connecting via Network Switches#

As an alternative, you can establish a connection between your cameras and your host computer via network switches.

The example below shows a 1-port GigE network adapter connected to a 5-port network switch. You can also use multiport network adapters or multiple switches.

Connecting Via Network Switches

  • Advantage: Allows you to connect many cameras to a single host computer.
  • Advantage: Allows longer overall cable lengths because the cables between devices can each be up to 100 meters long.
  • Disadvantage: The switch only has a single GigE connection to the computer. The cameras must share the bandwidth available on this single path.

Info

  • The switch must be able to handle large packets (known as "jumbo packets" or "jumbo frames"). With jumbo frame-capable devices, the maximum packet size can be up to 16 kB (earlier Ethernet devices: 1.5 kB).
  • Basler 5GigE or GigE cameras and the recommended network adapters can both handle jumbo frames. For maximum network efficiency, your camera should be configured to use the largest packet size that your network can handle.
  • When multiple cameras are attached to a switch, the switch must have sufficient buffer capacity. This allows the switch to hold incoming data from the cameras while it transmits data on the single outgoing line.

Configuring Network Adapters Using the Filter or Socket Driver#

For best usability, performance, and reliability, Basler recommends using the pylon GigE Configurator, delivered with the pylon Software Suite (version 7.1 or higher). The tool optimizes the parameters and settings of your network adapters and cameras for your operating system (Windows or Linux). You can use the GigE Configurator either via pylon Viewer (under Tools) for standard use cases, or via its command line interface (CLI) for advanced use cases.

When using the pylon GigE Configurator with recommended Basler hardware, no additional configuration is needed.

Otherwise, you must configure the network adapters manually as described in the following sections.

Changing the Network Adapter Connections (Windows)#

For all network adapters using the pylon GigE Vision filter or socket driver, Basler recommends disabling protocols or services that may interfere with the pylon driver.

To disable protocols or services:

  1. Open the Network Connections window in the Windows Control Panel.
    For quick access, press Win+R , type ncpa.cpl, and press Enter.
  2. Right-click the network adapter connection that is used with your camera and then click Properties.
    The Properties window opens.
  3. Clear all check boxes except the pylon GigE Vision Driver and the Internet Protocol Version 4 (TCP/IPv4) check boxes:

    Network Adapter Properties Window

  4. Repeat steps 2 and 3 for all applicable network adapters.

Changing the Network Adapter Properties (Windows)#

For all network adapters using the pylon GigE Vision filter driver, Basler recommends optimizing the adapter properties.

To optimize the adapter properties:

  1. Open the Network Connections window in the Windows Control Panel.
    For quick access, press Win+R , type ncpa.cpl, and press Enter.
  2. Right-click the network adapter connection that is used with your camera and then click Properties.
    The Properties window opens.
  3. Click Configure.
    The configuration window of the network driver opens.
  4. Click Advanced.
  5. Adjust the following properties (see note below):
    1. Set the Jumbo Framesa property to its maximum value.
      If there is no Jumbo Frames property, select the parameter that relates to frame size and set it to its maximum value.
    2. Select the parameter that relates to the receive (Rx) ring buffer or number of receive descriptorsb (e.g., Receive Descriptors) and set it to its maximum value.
    3. Select the parameter that relates to the interrupt moderation rate or number of CPU interruptsc (e.g., Interrupt Moderation Rate) and set it to a low value, e.g., 1000. The way to set the number of CPU interrupts may differ for your network adapter. You may have to use a separate parameter to enable the interrupt moderation.
    4. Select the parameter that relates to speed and duplex mode (e.g., Speed and Duplex Mode) and set it to automatic (e.g., Auto Negotiation).
  6. Repeat steps 2 to 5 for all applicable network adapters.

Info

Depending on the network adapter model, the parameter names of your network adapter may differ from the ones used above. Also, the way to set the parameters may differ, and some parameters may not be available.

Changing the Network Adapter Properties (Linux)#

For all network adapters using the pylon GigE Vision socket driver, Basler recommends optimizing the adapter properties.

To optimize the adapter properties:

  1. Open a shell.
  2. Enable jumbo frames by setting the maximum transmission unit (MTU)a to its maximum value of 9000 using the ifconfig command.
    Example: To set the MTU for the eth0 network interface to 9000, enter: sudo ifconfig eth0 mtu 9000.
  3. Increase the ring buffer sizeb using the ethtool command.
    Example: To set the receive (Rx) and transmission (Tx) ring buffer size for the eth0 network interface to 4096, enter: sudo ethtool -G ethX rx 4096 tx 4096.
  4. Configure the interrupt moderation ratec using the ethtool command.
    Example: To apply the recommended settings for the eth0 network interface, enter: sudo ethtool -C ethX adaptive-rx off adaptive-tx off rx-usecs 62 tx-usecs 62.
  5. Repeat steps 2 to 4 for all applicable network interfaces.

  1. Using jumbo frames is important for reducing the overhead and the CPU load. The bigger the frame size, the less CPU interrupts are generated and thus, the lower the CPU load.

  2. The receive (Rx) ring buffer defines the number of buffers used by the NIC driver to receive and process received image data from the camera. Usually, the ring buffer is set rather small and might need to be increased on systems that are receiving a high volume of network traffic.

  3. The interrupt moderation rate (IMR) defines the trade-off between latency and performance. The IMR controls the interrupt throttle rate (ITR), the rate at which the controller moderates interrupts. The lower the ITR, the more responsive the driver will be, but also the higher the CPU load, because more interrupts will be generated. On the other side, the higher the ITR, the higher the latency for processing interrupts, but the lower the CPU load. So, for most applications, Basler recommends using higher values for IMR, e.g., Extreme or 3600. If you need lower latency, use a lower value.

Turning off the Firewall#

Info

With pylon 6.3, a Firewall Traversal feature has been added, which allows to bypass a firewall for GVSP packets. When using this feature, the following measures may be skipped.

You don't necessarily need to turn the firewall off. If you leave the firewall on, the camera is fully operational, with the following exceptions:

  • The Event Notification feature will not work.
  • On Windows, whenever a program addresses a camera for the first time, a Windows Security Alert will open asking you to allow incoming requests.
  • Image streaming may be instable.

Therefore, Basler recommends turning off the firewall for connections with Basler cameras. Alternatively, you can set up inbound rules for specific applications so that they aren't blocked by the firewall.

Turning off Windows Firewall via Windows Control Panel#

This option allows you to turn off the firewall for all connections.

To turn off the firewall via Windows Control Panel:

  1. Open the Windows Firewall window in the Windows Control Panel.
    For quick access, press Win+R, type firewall.cpl, and press Enter.
  2. In the left pane, click Turn Windows Firewall on or off.
    The Customize Settings window opens.
  3. In the Customize Settings window, find the network location section where you want to turn off firewall protection.
    Typically, this will be the Public network location settings section. However, if you use a dedicated network card, Basler recommends also disabling firewall protection for the other network locations.
  4. In the desired sections, click Turn off Windows Firewall (not recommended).

    Windows Firewall Settings

Turning off Windows Firewall via Command Prompt#

This option allows you to turn off the firewall for all connections.

To turn off the firewall via command prompt:

  1. Press Win+R and type cmd.
  2. In the Run window, type cmd.
    Make sure that the message This task will be created with administrative privileges is displayed.

    Windows Run Dialog

  3. Press Enter.
    The command prompt window opens.

  4. Type netsh advfirewall set allprofiles state off.
  5. Press Enter.

The firewall is turned off for all profiles. It is not possible to use netsh to turn off the firewall for selected connections only.

Turning off Windows Firewall via Advanced Security Settings#

This option allows you to turn off the firewall for selected connections.

To turn off the firewall on selected network adapters:

  1. Press Win+R, type wf.msc, and press the Enter key.
    The Windows Firewall with Advanced Security window opens.
  2. Click Windows Firewall Properties.

    Windows Firewall with Advanced Security Window

    The Windows Firewall with Advanced Security on Local Computer Properties… window opens.

  3. Click the tab of the profile where you want to turn off firewall protection.
    Typically, this will be the Public Profile tab. However, if you use a dedicated network card, Basler recommends also disabling firewall protection for the other profiles.

  4. Click Customize.

    Windows Firewall with Advanced Security Settings

    The Protected Network Connections for the Public Profile window opens. The window lists connections where the firewall is turned on.

    Protected Network Connections Window

  5. Clear the connections where cameras are attached. This turns off their firewall protection.

  6. Repeat steps 3 to 5 for all profiles where you want to turn off firewall protection.

Turning off the Firewall via Shell (Linux)#

On Linux, you can configure the firewall using ufw, which is included in many distributions by default.

To turn off the firewall:

  1. Open a shell.
  2. Enter sudo ufw disable.

Info

  • To check the current status of the firewall, enter sudo ufw status.
  • To re-enable the firewall, enter sudo ufw enable.

Setting Up Inbound Firewall Rules#

Instead of turning the Windows Firewall off completely, you can set up inbound rules for specific applications so that they won't be blocked by the firewall.

To set up inbound rules:

  1. Press Win+R, type wf.msc, and press the Enter key.
    The Windows Firewall with Advanced Security window opens.

    Windows Firewall with Advanced Security Window

  2. In the left pane, click Inbound Rules.

  3. In the Actions pane under Inbound Rules, click New Rule.
    The ++New Inbound Rule Wizard++ opens.
  4. On the Rule Type page, select Program.

    New Inbound Rule Wizard - Rule Type Page

  5. On the Program page, select This program path.

    New Inbound Rule Wizard - Program Page

  6. Click Browse and navigate to the program executable for which you want to set up a rule.
    Example: To set up a rule for the 64-bit pylon Viewer, go to Program Files\Basler\
    pylon x\Applications\x64\bin\pylonviewer.exe
    .

  7. Click Next.
  8. On the Action page, select Allow the connection.

    New Inbound Rule Wizard - Action Page

  9. Click Next.

  10. On the Profile page, select the profile that you want the rule to apply to.
    If you're unsure which profile to choose, select all three options. (This is safe as cameras don't carry viruses.)

    New Inbound Rule Wizard - Profile Page

  11. Click Next.

  12. On the Name page, enter a name for the rule and, if required, a description.

    New Inbound Rule Wizard - Name Page

  13. Click Finish.
    The new rule now appears in the Inbound Rules pane.

    Windows Firewall with Advanced Security Window

Network Adapter IP Configuration#

Info

You can use the pylon GigE Configurator to automatically configure the IP addresses of your network adapters and cameras. For best usability, Basler recommends using the pylon GigE Configurator.

These are the two most common ways to configure the IP addresses of network adapters:

  • Assigning a fixed (also "static" or "persistent") address
  • Configuring automatic addressing via DHCP (Dynamic Host Configuration Protocol) or Auto IP (Automatic Private IP Addressing, based on link-local addresses (LLA)).

Assigning a Fixed IP Address#

To assign a fixed IP address to a network adapter:

  1. Open the Network Connections window in the Windows Control Panel.
    For quick access, press Win+R, type ncpa.cpl, and press Enter.
  2. Right-click the network adapter connection that is used with your camera and then click Properties.
    The Properties window opens.
  3. Double-click Internet Protocol Version 4 (TCP/IPv4).
    The Internet Protocol Version 4 (TCP/IPv4) Properties window opens.
  4. Click Use the following IP address.
  5. In the IP address, Subnet mask, and Default gateway fields, type the IP address, subnet mask, and default gateway addresses.
  6. In the Preferred DNS server and Alternate DNS server fields, type the primary and secondary DNS server addresses. (Normally, a domain name server is not needed.)

    Internet Protocol Version 4 Properties

  7. Repeat steps 2 to 6 for all applicable network adapters.

Info

  • During camera design-in, you can use the following settings to establish a network connection very quickly:
  • Configure a fixed address for your network adapter in the automatic IP address range (169.254.0.1 to 169.254.255.254) with a subnet mask of 255.255.0.0.
  • Configure Auto IP address assignment for your cameras.
  • If your computer has multiple network adapters, each adapter must be in a different subnet.
  • The recommended range for fixed IP addresses is from 172.16.0.1 to 172.32.255.254 with a subnet mask of 255.255.0.0 and from 192.168.0.1 to 192.168.255.254 with a subnet mask of 255.255.255.0. These address ranges have been reserved for private use according to IP standards.
  • If you are assigning fixed IP addresses to your cameras, keep in mind that for a camera to communicate properly with a network adapter, it must be in the same subnet as the adapter to which it is attached.

Assigning an IP Address via DHCP / Auto IP#

When an adapter is configured to receive its IP address via DHCP / Auto IP, it operates as follows:

  • The adapter tries to obtain an IP address from a DHCP server. If a DHCP server is available, it receives an IP address from the server and uses it.
  • If no DHCP server is available, the adapter uses the Auto IP routine to assign itself an IP address.

The default setting for most network adapters is DHCP / Auto IP. In most cases, the adapter used with your cameras will not have a DHCP server available. So with the default settings, the adapter will end up using automatic IP addressing to assign itself an IP address.

Info

Only one adapter can be set to use Auto IP. If DHCP / Auto IP is configured on more than one adapter, the Auto IP assignment will not work correctly and the cameras will not be able to connect to the network via Auto IP.

If you have multiple network adapters in your computer, Basler recommends installing a DHCP server in your network or assigning static IP addresses to the adapters and to the cameras.

To assign an IP address using DHCP / Auto IP:

  1. Open the Network Connections window in the Windows Control Panel.
    For quick access, press Win+R, type ncpa.cpl, and press Enter.
  2. Right-click the network adapter connection that is used with your camera and then click Properties.
    The Properties window opens.
  3. Double-click Internet Protocol Version 4 (TCP/IPv4).
    The Internet Protocol Version 4 (TCP/IPv4) Properties window opens.
  4. Make sure that Obtain an IP address automatically is selected.
    This makes the adapter check for a DHCP server as its first choice.
  5. Click on the Alternate Configuration tab.
    The settings on this tab are used to configure the Auto IP address assignment that the adapter will use if no DHCP server is found.
  6. Make sure that Automatic private IP address is selected.

    Internet Protocol Version 4 Properties (Alternate Configuration)

Next Steps#