Este conteúdo não está disponível no idioma selecionado.
Chapter 5. Network and Port Configuration
5.1. Interfaces Copiar o linkLink copiado para a área de transferência!
5.1.1. About Interfaces Copiar o linkLink copiado para a área de transferência!
management and public interface names. The management interface name can be used for all components and services that require the management layer, including the HTTP Management Endpoint. The public interface name can be used for all application-related network communications, including Web and Messaging.
domain.xml, host.xml and standalone.xml configuration files all include interface declarations. The declaration criteria can reference a wildcard address or specify a set of one or more characteristics that an interface or address must have in order to be a valid match.
standalone.xml or host.xml configuration files. Using these files allow remote host groups to maintain specific interface attributes, while still allowing references to domain controller interfaces.
inet-address value specified for both the management and public relative name groups.
Example 5.1. An interface group created with an inet-address value
any-address element to declare a wildcard address.
Example 5.2. A global group created with a wildcard declaration
<interface name="global"> <!-- Use the wild-card address --> <any-address/> </interface>
<interface name="global">
<!-- Use the wild-card address -->
<any-address/>
</interface>
external.
Example 5.3. An external group created with an NIC value
<interface name="external"> <nic name="eth0"/> </interface>
<interface name="external">
<nic name="eth0"/>
</interface>
Example 5.4. A default group created with specific conditional values
5.1.2. Configure Interfaces Copiar o linkLink copiado para a área de transferência!
standalone.xml and host.xml configuration files offer three named interfaces with relative interface tokens for each. Use the Management Console or Management CLI to configure additional attributes and values, as listed in the table below. The relative interface bindings can be replaced with specific values as required but note that if you do so, you will be unable to pass an interface value at server runtime, as the -b switch can only override a relative value.
Example 5.5. Default Interface Configurations
host.xml files. For example:
Note
| Interface Element | Description |
|---|---|
any | Element indicating that part of the selection criteria for an interface should be that it meets at least one, but not necessarily all, of the nested set of criteria. |
any-address |
Empty element indicating that sockets using this interface should be bound to a wildcard address.
The IPv6 wildcard address (::) will be used unless the java.net.preferIpV4Stack system property is set to true, in which case the IPv4 wildcard address (0.0.0.0) will be used.
If a socket is bound to an IPv6 anylocal address on a dual-stack machine, it can accept both IPv6 and IPv4 traffic; if it is bound to an IPv4 (IPv4-mapped) anylocal address, it can only accept IPv4 traffic.
|
any-ipv4-address | Empty element indicating that sockets using this interface should be bound to the IPv4 wildcard address (0.0.0.0). |
any-ipv6-address | Empty element indicating that sockets using this interface should be bound to the IPv6 wildcard address (::). |
inet-address | Either an IP address in IPv6 or IPv4 dotted decimal notation, or a hostname that can be resolved to an IP address. |
link-local-address | Empty element indicating that part of the selection criteria for an interface should be whether or not an address associated with it is link-local. |
loopback | Empty element indicating that part of the selection criteria for an interface should be whether or not it is a loopback interface. |
loopback-address | A loopback address that may not actually be configured on the machine's loopback interface. Differs from inet-address type in that the given value will be used even if no NIC can be found that has the IP address associated with it. |
multicast | Empty element indicating that part of the selection criteria for an interface should be whether or not it supports multicast. |
nic | The name of a network interface (e.g. eth0, eth1, lo). |
nic-match | A regular expression against which the names of the network interfaces available on the machine can be matched to find an acceptable interface. |
not | Element indicating that part of the selection criteria for an interface should be that it does not meet any of the nested set of criteria. |
point-to-point | Empty element indicating that part of the selection criteria for an interface should be whether or not it is a point-to-point interface. |
public-address | Empty element indicating that part of the selection criteria for an interface should be whether or not it has a publicly routable address. |
site-local-address | Empty element indicating that part of the selection criteria for an interface should be whether or not an address associated with it is site-local. |
subnet-match | A network IP address and the number of bits in the address' network prefix, written in "slash notation"; e.g. "192.168.0.0/16". |
up | Empty element indicating that part of the selection criteria for an interface should be whether or not it is currently up. |
virtual | Empty element indicating that part of the selection criteria for an interface should be whether or not it is a virtual interface. |
Configure Interface Attributes
Configure Interface Attributes with the Management CLI
You can use tab completion to complete the command string as you type, as well as to expose the available attributes.Use the Management CLI to add a new server and configure instances to it, effectively adding the same piece of configuration to the XML. Substitute server-name with your actual server name and substitute ip-address with your actual IP address./host=master/server-config=server-name:add(group=main-server-group) /host=master/server-config=server-name/interface=public:add(inet-address=ip-address)
/host=master/server-config=server-name:add(group=main-server-group) /host=master/server-config=server-name/interface=public:add(inet-address=ip-address)Copy to Clipboard Copied! Toggle word wrap Toggle overflow Use the Management CLI to add new interfaces and write new values to the interface attributes.Add a New Interface
Theaddoperation creates new interfaces as required. Theaddcommand runs from the root of the Management CLI session, and in the following example it creates a new interface name title interfacename, with aninet-addressdeclared as 12.0.0.2./interface=interfacename/:add(inet-address=12.0.0.2)
/interface=interfacename/:add(inet-address=12.0.0.2)Copy to Clipboard Copied! Toggle word wrap Toggle overflow Edit Interface Attributes
Thewrite-attributeoperation writes new values to an attribute. The following example updates theinet-addressvalue to 12.0.0.8./interface=interfacename/:write-attribute(name=inet-address, value=12.0.0.8)
/interface=interfacename/:write-attribute(name=inet-address, value=12.0.0.8)Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify Interface Attributes
Confirm that the attribute values have changed by running theread-resourceoperation with theinclude-runtime=trueparameter to expose all current values active in the server model. For example:[standalone@localhost:9999 interface=public] :read-resource(include-runtime=true)
[standalone@localhost:9999 interface=public] :read-resource(include-runtime=true)Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Configure Interface Attributes with the Management Console
Log into the Management Console.
Log into the Management Console of your Managed Domain or Standalone Server instance.Navigate to Configuration tab
Select the Configuration tab from the top of the screen.Note
For Domain Mode, select a profile from the Profile drop-down menu at the top left of the screen.Select Interfaces from the Navigation Menu.
Select the Interfaces menu item from the navigation menu.Add a New Interface
- Click .
- Enter required values for Name, Inet Address and Address Wildcard.
- Click .
Edit Interface Attributes
- Select the interface that you need to edit from the Available Interfaces list and click .
- Enter required values for Name, Inet Address and Address Wildcard.
- Click .