chgif Method

Purpose

Reconfigures an instance of a network interface.

Syntax

chgif-d  | -T ] -l InterfaceInstance -a "Attribute=Value ..."

Description

The chgif method first modifies the database and then reconfigures the specified network interface instance (InterfaceInstance) by issuing a call to the ifconfig command. Only one interface can be changed per command invocation, and at least one attribute must be specified. This method is not normally used on the command line. Rather, it is called by high-level commands.

Note: The chgif method is a programming tool and it must not be run from the command line. The chdev command must be used to change the network interface, which invokes the chgif method internally.

Flags

Item Description
-a"Attribute=Value ..." Specifies pairs of attributes and values that configure the Interface instance. The AttributeValue pairs must be surrounded by quotes.

Valid attribute values are as follows:

netaddr
Specifies the Internet address of the network interface.
netaddr6
Specifies the IPv6 Internet address of the network interface.
prefixlen
Specifies the prefix length of the IPv6 Internet address of the network interface.
alias4
Specifies the IPv4 Internet address alias of the network interface
alias6
Specifies the IPv6 Internet address alias of the network interface.
delalias4
Deletes the IPv4 Internet address alias of the network interface.
delalias6
Deletes the IPv6 Internet address alias of the network interface.
state (up/down)
Marks the interface as up or down.
trailers (on/off)
Turns the trailer link-level encapsulation on or off.
 
arp (on/off)
Enables or disables the use of the Address Resolution Protocol.
allcast (on/off)
Specifies whether to broadcast packets to all token-ring networks or just the local token-ring network. This attribute applies only to token-ring networks.
hwloop (on/off)
Enables or disables hardware loopback mode.
 
netmask
Specifies the network mask in dotted-decimal format.
security SecurityLevelKeyword
(inet only) Specifies the security level associated with the interface. The value of the SecurityLevelKeyword variable can be one of the following:
  • none
  • unclassified
  • confidential
  • secret
  • top_secret

When the level of security is defined as none or unclassified, no IP Option header is added to the IP header.

 
authority AuthorityLevelKeyword
(inet only) Specifies the security authority level associated with the interface. The value of the AuthorityLevelKeyword variable can be one or more of the following:
genser
Defense Communications Agency
siop
Department of Defense Organization of the Joint Chiefs of Staff
 
dsccs-spintcom
Defense Intelligence Agency
dsccs-criticom
National Security Agency

When more than one level of authority is specified, the values are separated by commas without embedded spaces.

 
mtu
Maximum IP packet size for this system.
broadcast
Specifies the address to use for representing broadcasts to networks.
dest
Specifies the destination address on a point-to-point link.
-d Specifies that changes are made only in the configuration database. Changes take effect at the next system restart.
-l InterfaceInstance Specifies the instance of the network interface to be reconfigured.
-T Makes a temporary change in the device without the change being reflected in the database. It is temporary in that the device reverts to the characteristics described in the database when the system is restarted.

Examples

  1. To add the netaddr=10.3.4.2 Object Data Manager (ODM) entry to the en2 standard Ethernet network interface with netmask=255.255.255.0, enter the following command:
    chdev -l en2 -a netaddr=10.3.4.2 -a netmask=255.255.255.0
    A message that is similar to the following example is displayed:
    en2 changed
  2. To add the alias4=10.3.4.3 ODM entry to the en2 standard Ethernet network interface, enter the following command:
    chdev -l en2 -a alias4=10.3.4.3,255.255.255.0
    A message that is similar to the following example is displayed:
    en2 changed
    
  3. To delete the alias4=10.3.4.3 ODMentry from the en2 standard Ethernet network interface, enter the following command:
    chdev -l en2 -a delalias4=10.3.4.3
    A message that is similar to the following example is displayed:
    en2 changed
  4. To add the netaddr6=fe80::20b4:40ff:fe00:f012 ODM entry to the en2 standard Ethernet network interface with prefixlen=64, enter the following command:
    chdev -l en2 -a netaddr6=fe80::20b4:40ff:fe00:f012 -a prefixlen=64
    A message that is similar to the following example is displayed:
    en2 changed
  5. To add the alias6=fe80::20b4:40ff:fe00:f016/64 ODM entry to the en3 standard Ethernet network interface, enter the following command:
    chdev -l en3 -a alias6=fe80::20b4:40ff:fe00:f016/64
    A message that is similar to the following example is displayed:
    en3 changed
  6. To delete the alias6=fe80::20b4:40ff:fe00:f016/64 ODM entry from the en3 standard Ethernet network interface, enter the following command:
    chdev -l en3 -a delalias6=fe80::20b4:40ff:fe00:f016/64
    A message that is similar to the following example is displayed:
    en3 changed