System Administration Guide: Network Interfaces and Network Virtualization

ProcedureHow to Rename a Data Link

Use this procedure if you want to change a data link name, for example, to assign a meaningful name that would easily identify the link's role within your network setup.

Before You Begin

Make sure that you have studied and prepared for other steps you need to perform on associated configurations that might be affected by the change of link names. For more information, see Considerations for Working With Link Names.

  1. On the system on which you want to rename a data link, assume the System Administrator role.

    The System Administrator role includes the Network Management profile. To create the role and assign the role to a user, see Chapter 9, Using Role-Based Access Control (Tasks), in System Administration Guide: Security Services.

  2. Unplumb the IP interface.


    # ifconfig interface unplumb
    
  3. Change the link's current link name.


    # dladm rename-link old-linkname new-linkname
    
    old-linkname

    Refers to the current name of the data link. By default, the link name is hardware-based, such as bge0.

    new-linkname

    Refers to any name that you want to assign to the data link. For rules for assigning link names, refer to Rules for Valid Link Names. See also Considerations for Working With Link Names for further information about renaming data links.

    If you do not want the new link name to persist across a system reboot, then use the -t option immediately after the subcommand. The option renames a link temporarily. The original link name reverts when the system is rebooted.


    Note –

    You can use dladm rename-link to transfer link configurations from one data link to another. For an example, see How to Replace a Network Interface Card With Dynamic Reconfiguration. When you rename a link for this purpose, make sure that the link that is inheriting the configuration does not have any prior existing configurations. Otherwise, the transfer fails.



Example 2–4 Changing a Link Name

The following example shows how a link name is changed from a hardware-based name to a customized name.


# dladm rename-link bge0 net0