RU/2: Форум. Общение пользователей и разработчиков OS/2 (eCS). : The parameters of the IFCONFIG statement in SETUP.CMD(MPTN)


Список сообщений | Написать новое | Ответить на сообщение | Домой Поиск:
Предыдущее сообщение | Следующее сообщение
From : GA
To : Roman Popov
Subj : The parameters of the IFCONFIG statement in SETUP.CMD(MPTN)

> ifconfig lan1 10.0.0.241 netmask 255.255.0.0 metric 1 mtu 1492 - пишет
>
> Invalid argument.


The IFCONFIG command assigns an address to a network interface and also configures network interface
parameters. You must use the IFCONFIG command to define the network address of each interface present on
the machine. You can also use the IFCONFIG command to redefine an interface address or other operating
parameters.


Warning: Do not attempt to modify the configuration of a network interface unless you are an experienced
TCP/IP user.


The following example shows the format of the IFCONFIG command.

IFCONFIG interface [[af] [address [dest_address]] [up | down]
[netmask mask]] [metric n] [mtu n] [trailers | -trailers]
[arp | -arp] [bridge | -bridge] [snap | -snap] [-allrs]
[broadcast broadcast_address] [802.3 | -802.3]
[icmpred | -icmpred] [canonical | -canonical]

The parameters of the IFCONFIG command are:

Parameter Description

interface The name of the interface you are configuring (lan0, lan1, lan2, lan3, sl, x25, or lo).

Note: The lo parameter creates a software local loopback interface. The local loopback
interface bypasses the network interface drivers to provide a direct internal connection back
to the local internet protocol support. For example, if you type ifconfig lo 2.2.2.2, you can
use the address 2.2.2.2 as a software loopback.

af Name of the address family supported.

You must specify the address family (af), because an interface can receive transmissions in
different protocols, and each protocol requires a separate naming scheme. However,
specifying the address family can change the interpretation of the remaining parameters.
Specify only inet, which is the default.

address The address assigned to a particular interface in the standard dotted-decimal notation.

dest_address Specifies the address of the correspondent on the receiving end of a point-to-point link.

up Enables an interface after the interface has been marked down with an IFCONFIG statement.

Interfaces are automatically marked up when the first address is set on an interface.

down Marks an interface down. When an interface is marked down, the system does not attempt
to transmit messages through that interface. In some cases, the reception of messages is also
disabled.

This action does not automatically disable routes using the interface.

netmask mask This parameter is used for networks only. The mask value specifies how much of the
internet address to reserve for use as a subnetwork address.

For example, the subnetwork capability of TCP/IP divides a single network into multiple
logical networks. An organization can have a single internet network address that is known
to users outside the organization, yet configure its internal network into different
departmental subnets.

The subnet, or local address, portion of an internet address is then divided into a subnet
number and a host number, for example:

network_number subnet_number host_number

where:

network_number is the network portion of the internet address.

subnet_number is the subnet number portion of the local address.

host_number is the host number portion of the local address.

The mask value includes the network portion of the local address and the subnet portion,
which is taken from the host field of the address. The mask can be specified as a single
hexadecimal number with a leading 0x, or with a dotted-decimal notation address.

The mask contains 1s for the bit positions in the 32-bit address that are to be used for the
network and subnet parts and 0s for the host part. The mask should contain at least the
standard network portion, but the bits of the netmask do not have to be contiguous. The
subnet field should be contiguous with the network portion.

For an example of the ROUTE command with the subnet parameter, see ROUTE - Modifying
Routing Tables.

metric n Sets the metric for the interface to n. The value n represents a number and should be
between 0 and 15. The default is 0 (directly connected). The routing metric is used by the
Routing Information Protocol (RIP).

Metrics that are greater in value make a route less favorable. Metrics are counted as the
number of hops to the destination network or host.

mtu n Sets the maximum transmission unit (MTU) of the interface to n. The value n represents a
number. The default MTU value is 1500.

Notes:

1. When using a PCNet adapter, the MTU should be set to a maximum of 1462.

2. When using an Ethernet adapter on an IEEE 802.3 network, the MTU should be set to a
maximum of 1492.

3. When using an IBM Token Ring 16/4 Adapter/A card on a 16 megabyte token ring, the
MTU should be set to a maximum of 4400.

4. When using an X.25 co-processor adapter, the MTU should be set to a maximum of 576.

trailers Requests the use of a trailer link level encapsulation when sending.

For example, if a network interface supports trailers, the system, when possible, encapsulates
outgoing messages, which minimizes the number of memory-to-memory copy operations that
the receiver must perform.

On networks that support the Address Resolution Protocol (ARP), this parameter indicates
that the system should request that other systems use trailers when sending to this host.
Trailer encapsulations are sent to other hosts that have made such requests.

-trailers Disables trailer link level encapsulation. This is the default.

arp Enables ARP in mapping between network level addresses and physical, or station addresses.

ARP is currently implemented for mapping between internet addresses and Ethernet addresses
or IBM Token-Ring addresses.

-arp Disables Address Resolution Protocol.

bridge Enables routing field support.

-bridge Disables routing field support.

snap Sends token-ring headers with the extended snap format. This is the Institute of Electrical
and Electronic Engineers (IEEE) standard and is necessary to communicate with machines
using the extended snap format, such as AIX. The snap parameter is the configuration
default.

-snap Does not send token-ring headers with the extended snap format.

-allrs Sets the token-ring broadcast indicator to Single-Route Broadcast. The default is All-Routes
Broadcast. See IBM OS/2 LAN Technical Reference for more information.

broadcast broadcast_address
Specifies the address to use to represent broadcasts to the network. The default broadcast
address is an internet address with a local address that has a value of all 1s.

802.3 Enables Ethernet 802.3.

-802.3 Disables Ethernet 802.3. Enables Ethernet DIX 2. This is the default.

icmpred Allows TCP/IP to add routes obtained by the ICMP redirects. This is the default.

-icmpred Prevents TCP/IP from adding routes obtained by ICMP redirects.

canonical Media Access Control (MAC) addresses in Address Resolution Protocol (ARP) packets on this
Token-Ring network are in the canonical IEEE 802.5 form.

-canonical MAC addresses in ARP packets on this Token-Ring network are in the more common
non-canonical format. This is the default.

The IFCONFIG command displays the current configuration for a network interface when only an interface is
supplied. If a protocol family is specified using af, IFCONFIG reports only the details specific to that protocol
family.

To receive help for the command syntax, use the IFCONFIG command alone, without specifying an interface,
address, or parameter.




Tue 21 Jan 2003 17:23 Mozilla/4.61 [en] (OS/2; U)




Programmed by Dmitri Maximovich, Dmitry I. Platonoff, Eugen Kuleshov.
25.09.99 (c) 1999, RU/2. All rights reserved.
Rewritten by Dmitry Ban. All rights ignored.