modify-interface

modify-interface.pl


name="modify-interface.pl"
>modify-interface.pl

Changes the IP or MAC address of an interface on some system.

This changes a virtual interface on some system,
selected with the --host parameter.
The interface to modify is set either with the --address flag followed by an IP,
or the --name flag followed by an name like eth0:1.

The new IP address can be set with the --new-address flag,
the new MAC with the --new-ether flag,
or the new netmask with the --new-netmask parameter.
Alternately you can have Cloudmin tell the system to generate a MAC address automatically with the --no-ether flag.

Xen,
KVM and physical systems running Linux can also have IPv6 addresses added and removed using this command.
To add an address,
use the --add-address6 flag followed by an IPv6 address or address/netmask.
To delete an existing v6 address,
use the --remove-address6 flag.

For real network interfaces on KVM or Xen systems using HVM,
you can set the type of network card that is emulated on the virtual system with the --new-model flag followed by a model name.
Or you can revert to the default with the --no-model flag.

For real network interfaces on Xen or KVM systems,
you can change the host network bridge the interface is connected to with the --new-bridge flag,
followed by a bridge name like br1 or xenbr1.
Alternately the --no-bridge flag can be used to revert the interface to the host's default bridge.

name="Example_usage"
>Example usage

  cloudmin modify-interface --host vvirtualmin.home --address 193.9.101.250 --new-mac 02:54:00:50:DE:44
  Modified interface eth0

Command Line Help

Changes the IP or MAC address of an interface on some system.

cloudmin modify-interface --host hostname
                          --address ip.address | --name ethN
                         [--new-address ip.address]
                         [--new-netmask mask]
                         [--new-ether mac-address | --no-ether]
                         [--new-model type | --no-model]
                         [--new-bridge interface]
                         [--add-address6 ipv6-address]*
                         [--remove-address6 ipv6-address]*