Port Addressing

By default, Port Addressing is disabled, which means that the physical emulation ports operate like a network switch (or bridge). Therefore a device connected to Port 0 can be configured on the same subnet as Port 1.

Port pair example for port addressing in Eggplant Network

The Emulator can also be configured to operate like a network router with each physical port having its own IP address. In the following example, the client computer is now on a different subnet of 10.0.0.x with configured on Port 0. The client computer must set its default gateway to so that packets intended for other networks can be forwarded via Port 0. The server must be configured to use as its gateway so that it can send a response to the client.

Port pair with IP addresses shown in Eggplant Network

Important: The emulator responds to ping requests on the local network only, unless a suitable emulation is started. For example, if the client computer pings, the emulator responds to it, but the client does not get a response from, unless a suitable emulation is started.

Configuring Port Addressing

To configure Port Addressing click on the Port Addressing menu item for the ports you are using. Select Enable Port Addressing and enter the network settings for each port.

Port addressing panel in Eggplant Network

Click Update to update the IP settings. The ports now respond to ping requests.

To disable the Port Addressing, deselect Enable Port Addressing and click Update.

The Port Properties configuration is persistent and returns following a reboot.

  • The fields that must to be populated in the Port Addressing page are IP Address and Netmask.
  • The Gateway field (optional) is used to specify the IP address of a router in that network not the Emulator) in the event that the network is more complex and requires further routing.
  • The DHCP Server field (optional) is provided so that devices/clients requiring an IP address to be assigned by DHCP can have their DHCP requests relayed across the Emulator to the specified DHCP server even when no emulation is running. This is explained in more detail in the next section.
  • If the Update button is inactive, an emulation is already running. Port Addressing cannot be enabled or changed while this is the case. The Port pair that the emulation is running on is also highlighted in green in the menu sidebar. To make changes to Port Addressing, you must first stop any emulations that are running.

Once Port Addressing is enabled, the port IP addresses display on the Setup & Control page below the end points:

Port Addressing activated in Eggplant Network

DHCP Server / DHCP Relay

As discussed briefly in the section above, the purpose of the DHCP Server field is to specify a DHCP Server in that network (subnet) which provides IP addresses for the opposite network (subnet).

Suppose on Port 0 we have several devices (PCs, Macs, game consoles, mobile devices) that require an IP address to come from a DHCP Server attached to Port 1 and that the addressing of the Ports is per the example above. Enter the DHCP server’s address,, in the appropriate field. Click Update to save the changes. They persist if the Emulator is rebooted.

  • The IP address settings are the same as before, but we have added the address of the DHCP server to the port to which it is connected.
  • The Gateway is optional, but if the DHCP server were not in the network, then it would be required in order to route DHCP requests to it. In our example this is not the case.
  • You are not permitted to set up DHCP servers on both ports in a port pair. Relaying DHCP requests goes in one direction – from Port 0 to Port 1 to the DHCP server in this example.

How it Works

DHCP requests are broadcast messages and as soon as the DHCP server is defined for Port 1 (and update clicked), then Port 0 (the opposite port in the pair listens for these requests and relays them to Port 1 having first inserted its address ( in this case) into the DHCP requests Gateway field. This is done so the DHCP server knows which network is requesting addresses and can allocate an appropriate one for that subnet.

Port 1 now transmits the request as a DHCP relay directly (no broadcasting) to the DHCP server you specified, either directly (as in our example) or via the Gateway, if required.

The DHCP server responds with a suitable offer of address and sends this back to Port 1’s IP address. Port 1 forwards the packets back to Port 0 which sends them to the requesting host.

This meets the DHCP relay standard.

  • This process works even if no emulation is running – packets are sent directly between the Emulator’s ports. This means addresses can be obtained as soon as the DHCP setup is completed.
  • DHCP requests are not subject to link characteristics like Latency, Loss, and others, as they do not pass through the links.
  • Because the reply from the DHCP server is directly sent to the address on port 0 ( in our example, the DHCP server must have a route defined to the subnet that go via
  • Suitable DHCP ranges must be defined in the DHCP server for network, as by default they only usually allocate addresses for the networks they are in ( in our example).


This topic was last updated on August 19, 2021, at 03:30:51 PM.

Eggplant icon Eggplantsoftware.com | Documentation Home | User Forums | Support | Copyright © 2021 Eggplant