chginet Method

Purpose

Reconfigures the Internet instance.

Syntax

chginet [ -d] [ -a"Attribute=Value..."]

Description

The chginet method reconfigures the Internet instance, and can also change the HostName variable and any static routes that are defined. The chginet method calls the hostname command to change the host name. The chginet method also calls the route command to change any static routes. The chdev command calls method.

Note: The chginet method is a programming tool and should not be entered from the command line.

Flags

Item Description
-a"Attribute=Value ..." Specifies the customized attributes of the Internet instance. The following are valid attributes:
hostname
Specifies the name of the host.
gateway
Specifies the default gateway.
route
Specifies the route. The format of the Value variable of the route attribute is: route = type, [args,], destination, gateway, [metric] .

The value of the type parameter can be net or host.

delroute
Specifies the route to delete. The format of the Value variable of the delroute attribute is: delroute = type, [args,], destination, gateway, [metric] .

The value of the type parameter can be net or host.

rout6
Specifies the IPv6 route. The format of the Value variable of the rout6 attribute is: rout6 = type, [args,], destination, gateway, [metric] The value of the type parameter can be net or host.
delrout6
Specifies the IPv6 route to delete. The format of the Value variable of the delrout6 attribute is: delrout6 = type, [args,], destination, gateway, [metric] The value of the type parameter can be net or host.
-d Specifies that changes are made only in the configuration database. Changes take effect with the next IPL.

Examples

  1. To change an Internet instance and specify a route, enter a method in the following format:

    chginet -a"route=192.9.200.0,bcroom"

    This example specifies a new route. The new route is being set to network 192.9.200.0, the bcroom gateway.

  2. This example specifies a new route. The new route is being set to host 192.9.200.5 with hopcount 2, interface en0, and the bcroom gateway.

    chginet -a"route=host,-hopcount,2,-if,en0,192.9.200.5,bcroom"
  3. This example deletes the route added in the previous example.

    chginet -a"delroute=host,-hopcount,2,-if,en0,192.9.200.5,bcroom"
  4. This example specifies a new IPv6 route. The new route is being set to host 2001::1 with hopcount 2, interface en0, and the fe80::20b4:40ff:fe00:f016 gateway.
    chginet -a"rout6=host,-hopcount,2,-if,en0,2001::1,fe80::20b4:40ff:fe00:f016"
  5. This example deletes the IPv6 route added in the previous example.
    chginet -a"delrout6=host,-hopcount,2,-if,en0,2001::1,fe80::20b4:40ff:fe00:f016"