8.5.4. Configuring an IP Address on a SEA
As with any other Ethernet adapter, an IP address can be configured on a shared Ethernet adapter. The IP address can be configured on the associated en (standard Ethernet) or et (IEEE802.3) interface. Untagged Ethernet frames are used, which means that the IP address belongs internally to the VLAN with the port VLAN ID of the default trunking adapter (pvid_adapter).
An IP address can be configured using the command “vios mktcpip” (make TCP / IP). In addition to the virtual I/O server, at least the interface to be configured and the IP address must be specified. Optionally, the network mask and gateway can also be specified for the interface:
$ vios mktcpip ms05-vio1 en42 22.214.171.124 255.255.255.0
The configured IP addresses can be displayed with the command “vios lstcpip” (list TCP/IP) and the option “-i” (interfaces):
$ vios lstcpip -i ms05-vio1
NAME ADDRESS NETMASK STATE MAC
en7 - - detach "a1:b5:8a:07:03:01"
en3 126.96.36.199 255.255.255.0 up "a1:b5:8a:07:5a:63"
et3 - - detach "a1:b5:8a:07:5a:63"
et7 - - detach "a1:b5:8a:07:03:01"
en15 - - detach "a1:b5:8a:07:03:02"
et15 - - detach "a1:b5:8a:07:03:02"
en42 188.8.131.52 255.255.255.0 up "a1:b5:8a:07:b3:05"
et42 - - detach "a1:b5:8a:07:b3:05"
If the IP address is no longer required, the interface can be deconfigured using the “vios rmtcpip” (remove TCP/IP) command:
$ vios rmtcpip ms05-vio1 en42
Each SEA has the attribute pvid, which indicates which VLAN untagged frames on the shared Ethernet adapter itself belong to. The attribute must always be set to the PVID of the default trunking adapter (pvid_adapter)!
If an IP address for one of the tagged VLANs is to be configured on a shared Ethernet adapter, this is also possible. To do this, a VLAN Ethernet adapter with the desired VLAN must first be created on the shared Ethernet adapter. This can be done with the command “vios mkvlan” (make VLAN):
$ vios mkvlan ms05-vio1 ent42 100
adapter ent36 created
In addition to the virtual I/O server, the SEA and the desired VLAN must be specified. A new Ethernet adapter is created as a child device of the SEA. All Ethernet frames from this adapter are tagged with the VLAN ID 100. The IP address can then be configured as above on the associated interface en36 with the command “vios mktcpip“:
$ vios mktcpip ms05-vio1 en36 184.108.40.206 255.255.255.0
If necessary, the IP address can be deconfigured as above with “vios rmtcpip“:
$ vios rmtcpip ms05-vio1 en36
In order to remove the VLAN Ethernet adapter completely, the command “vios rmdev” must be used, there is no command “vios rmvlan“:
$ vios rmdev -d ms05-vio1 ent36
The “-d” option ensures that the ODM entries are also removed.