Removing IP addresses from a network interface
This topic describes how to remove one or more IP addresses from a network interface.
Removing all IP addresses
Procedure
-
Log in to the Delphix Engine as the sysadmin user and switch to the network interface context. Then use the
list
command to view the available network interfaces, and select the interface.Copydelphix> network interface
delphix network interface> list
NAME MACADDRESS MTU
ens160 02:dc:02:00:7f:06 1500
delphix network interface> select ens160
delphix network interface 'ens160'> get
type: NetworkInterface
name: ens160
addresses:
0:
type: InterfaceAddress
address: 10.43.70.135/16
addressType: DHCP
enableSSH: true
sessionInUse: false
state: OK
device: ens160
macAddress: 02:dc:02:00:7f:06
mtu: 1500
mtuRange: 68-9000
reference: NETWORK_INTERFACE-ens160
state: OK -
Run the
update
command and unset the addresses property to remove all addresses. Note that in this example, we only had one address to remove, but this procedure removes all addresses even if more than one were configured.Copydelphix network interface 'ens160'> update
delphix network interface 'ens160' update *> unset addresses
delphix network interface 'ens160' update *> get
type: NetworkInterface
name: ens160
addresses: (unset) (*)
mtu: 1500 -
Commit
the operation.Copydelphix network interface 'ens160' update *> commit
delphix network interface 'ens160'> get
type: NetworkInterface
name: ens160
addresses: (empty)
device: ens160
macAddress: 02:dc:02:00:7f:06
mtu: 1500
mtuRange: 68-9000
reference: NETWORK_INTERFACE-ens160
state: OK
Removing a specific IP address
-
Log in to the Delphix Engine as the sysadmin user and switch to the network interface context. Then use the
list
command to view the available network interfaces, and select the interface. Note that in this example, there are two addresses, a static address, and a DHCP address.Copydelphix> network interface
delphix network interface> list
NAME MACADDRESS MTU
ens160 02:dc:02:00:7f:06 1500
delphix network interface> select ens160
delphix network interface 'ens160'> get
type: NetworkInterface
name: ens160
addresses:
0:
type: InterfaceAddress
address: 10.11.12.13/24
addressType: STATIC
enableSSH: true
sessionInUse: false
state: OK
1:
type: InterfaceAddress
address: 10.43.70.135/16
addressType: DHCP
enableSSH: true
sessionInUse: false
state: OK
device: ens160
macAddress: 02:dc:02:00:7f:06
mtu: 1500
mtuRange: 68-9000
reference: NETWORK_INTERFACE-ens160
state: OK -
Run the
update
command and unset one of the addresses. In this example, only the static address is removed, retaining the DHCP address.Copydelphix network interface 'ens160'> update
delphix network interface 'ens160' update *> get
type: NetworkInterface
name: ens160
addresses:
0:
type: InterfaceAddress
address: 10.11.12.13/24
addressType: STATIC
enableSSH: true
1:
type: InterfaceAddress
address: 10.43.70.135/16
addressType: DHCP
enableSSH: true
mtu: 1500
delphix network interface 'ens160' update *> unset addresses.0
delphix network interface 'ens160' update *> get
type: NetworkInterface
name: ens160
addresses:
0:
type: InterfaceAddress (*)
address: 10.43.70.135/16 (*)
addressType: DHCP (*)
enableSSH: true (*)
mtu: 1500 -
Commit
the operation.Copydelphix network interface 'ens160' update *> commit
delphix network interface 'ens160'> get
type: NetworkInterface
name: ens160
addresses:
0:
type: InterfaceAddress
address: 10.43.70.135/16
addressType: DHCP
enableSSH: true
sessionInUse: false
state: OK
device: ens160
macAddress: 02:dc:02:00:7f:06
mtu: 1500
mtuRange: 68-9000
reference: NETWORK_INTERFACE-ens160
state: OK