Software Event Broker Host Interface Configuration
The default behavior for a Solace PubSub+ software event broker machine image in a hypervisor is to dynamically receive its IP address configuration from the host. Alternatively, you can also manually associate an IP interface with a host OS physical interface through Solace CLI or configuration keys. However, before any host OS physical interface can be used by the event broker, it first must be configured on the host.
The following sections provide examples that show how host interfaces can be configured for eventual use by a PubSub+ software event broker.
: In the examples that follow, it is assumed that you are logged into the host as
To configure an interface with a static IP address on the software event broker host, for eventual use in software event broker configuration, specify the following environment variables in the
For example, to assign the interface
eth0 an IP address of
192.168.40.220 and a mask of
255.255.255.0, edit the
/etc/sysconfig/network-scripts/ifcfg-eth0 file as follows.
DEVICE=eth0 BOOTPROTO=none ONBOOT=yes IPADDR=192.168.40.220 NETMASK=255.255.255.0
Optionally, you may wish to add an IPv6 address for use by clients connecting in using the IPv6 address space. Note that IPv6 is only supported for client messaging protocols and is not supported in for other broker administrative or control type connections.
To add an IPv6 address of
XXXX::XXXX and a mask of
XXXX::XXXX, edit the
/etc/sysconfig/network-scripts/ifcfg-eth0file as follows.
After saving the changes to the
ifcfg-eth0 file, the interfaces, or the network service, needs to be restarted for the changes to take effect.
Also, you must disable the cloud-init network module. To do so, confirm that the
/etc/cloud/cloud.cfg.d/99_network.cfg file contains the following content:
network: config: disabled
- If the
/etc/cloud/cloud.cfg.d/99_network.cfgfile does not exist, you must create it.
- Spacing is important. Do not remove or add any additional spaces in the
To configure a gateway as the default for use by all interfaces, add the gateway to
/etc/sysconfig/network by editing the file with
After making the above change, the network service, needs to be restarted for the changes to take effect.
Static routes associated with an interface
<intf> are stored in the file
Optionally, a default gateway can be defined on the first line of the
route-<intf> file. For example, consider the construction of the file for
<intf> = eth0. If the IP address of the default gateway is
192.168.40.1, and the interface that can reach the default gateway is also
eth0, then the first line of
default 192.168.40.1 dev eth0
Static routes are defined by adding lines to
/etc/sysconfig/network-scripts/route-<intf> that are of the form,
X.X.X.X/X via Y.Y.Y.Y dev interface
X.X.X.X/X is the destination address, and
interface are the address and interface respectively through which
X.X.X.X/X can be reached.
Continuing with the example, if
10.10.10.0/24 can be reached through the
eth0 interface, assigned
10.10.10.1, in the
10.10.10.0/24 subnet, then add this line for the static route to
10.10.10.0/24 via 10.10.10.1 dev eth0
So, in this example, the complete static route file
/etc/sysconfig/network-scripts/route-eth0 file is,
default 192.168.40.1 dev eth0 10.10.10.0/24 via 10.10.10.1 dev eth0
After making the above change, the interfaces, or the network service, needs to be restarted for the changes to take effect.
To specify the use of alternative DNS servers, edit the host's
/etc/resolv.conf file. For example, to add the DNS server
22.214.171.124, add the following line to the host's
If your situation involves having static DNS when using DHCP, you'll need to append the following to
/etc/dhcp/dhclient-enter-hooks to disable DHCP from overwriting DNS.
chmod +x /etc/dhcp/dhclient-enter-hooks
The event broker must be restarted to pick up changes to the host's
/etc/resolv.conf file. After editing the file, the event broker can be restarted as follows:
solacectl service restart