[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel Extensions and Device Support Programming Concepts

Forum-Compliant ATM LAN Emulation Device Driver

Note: The ATM LAN Emulation device driver is available for systems running AIX Version 4.1.5 (or later).

The Forum-Compliant ATM LAN Emulation (LANE) device driver allows communications applications and access methods that would normally operate over local area network (LAN) attachments to operate over high-speed ATM networks. This ATM LANE function supports LAN Emulation Client (LEC) as specified in The ATM Forum Technical Committee LAN Emulation Over ATM Version 1.0.

The ATM LANE device driver emulates the operation of Standard Ethernet, IEEE 802.3 Ethernet, and IEEE 802.5 Token Ring LANs. It encapsulates each LAN packet and transfers its LAN data over an ATM network at up to 155 megabits per second. This data can also be bridged transparently to a traditional LAN with ATM/LAN bridges such as the IBM 8281. (See the System Environment illustration.)

Each LEC participates in an emulated LAN containing additional functions such as:

There is always at least one ATM switch and a possibility of additional switches, bridges, or concentrators. An example of a typical network topology is shown in the following illustration.

The ATM LANE device driver is a dynamically loadable device driver that operates on a system running AIX Version 4.1.5 (or later). Each LE Client is configurable by the operator, and the LANE driver is loaded into the system as part of that configuration process. If an LE Client has already been configured, the LANE driver is automatically reloaded at reboot time as part of the system configuration process.

The interface to the ATM LANE device driver is through kernel services known as Network Services.

Interfacing to the ATM LANE device driver is achieved by calling the device driver's entry points for opening the device, closing the device, transmitting data, and issuing device control commands, just as you would interface to any of the AIX Common Data Link Interface (CDLI) LAN device drivers.

The ATM LANE device driver interfaces with all hardware-level ATM device drivers that support AIX CDLI, AIX ATM Call Management, and AIX ATM Signaling.

Adding ATM LANE Clients

At least one ATM LAN Emulation client must be added to the system to communicate over an ATM network using the ATM Forum LANE protocol. A user with root authority can add Ethernet or Token-Ring clients using the smit atmle_panel fast path.

Entries are required for the Local LE Client's LAN MAC Address field and possibly the LES ATM Address or LECS ATM Address fields, depending on the support provided at the server. If the server accepts the "well-known ATM address" for LECS, the value of the Automatic Configuration via LECS field can be set to Yes, and the LES and LECS ATM Address fields can be left blank. If the server does not support the "well-known ATM address" for LECS, an ATM address must be entered for either LES (manual configuration) or LECS (automatic configuration). All other configuration attribute values are optional. If used, you can accept the defaults for ease-of-use.

Configuration help text is also available within the SMIT LE Client add and change menus.

Configuration Parameters for the ATM LANE Device Driver

The ATM LANE device driver supports the following configuration parameters for each LE Client:

addl_drvr Specifies the CDLI demuxer being used by the LE Client. The value set by the ATM LANE device driver is /usr/lib/methods/cfgdmxtok for Token Ring emulation and /usr/lib/methods/cfgdmxeth for Ethernet. This is not an operator-configurable attribute.
addl_stat Specifies the routine being used by the LE client to generate device-specific statistics for the entstat and tokstat commands. The values set by the ATM LANE device driver are:
  • /usr/sbin/atmle_ent_stat
  • /usr/sbin/atmle_tok_stat

The addl_stat attribute is not operator-configurable.

arp_aging_time Specifies the maximum timeout period (in seconds) that the LE Client will maintain an LE_ARP cache entry without verification (ATM Forum LE Client parameter C17). The default value is 300 seconds.
arp_cache_size Specifies the maximum number of LE_ARP cache entries that will be held by the LE Client before removing the least recently used entry. The default value is 32 entries.
arp_response_timeout Specifies the maximum timeout period (in seconds) for LE_ARP request/response exchanges (ATM Forum LE Client parameter C20). The default value is 1 second.
atm_device Specifies the logical name of the physical ATM device driver that this LE Client is to operate with, as specified in the CuDv database (for example, atm0, atm1, atm2, ...). The default is atm0.
auto_cfg Specifies whether the LE Client is to be automatically configured. Select Yes if the LAN Emulation Configuration Server (LECS) will be used by the LE Client to obtain the ATM address of the LE ARP Server, as well as any additional configuration parameters provided by the LECS. The default value is No (manual configuration). The attribute values are:
Yes auto configuration
No manual configuration
Note: Configuration parameters provided by LECS override configuration values provided by the operator.
control_timeout Specifies the maximum timeout period (in seconds) for most request/response control frame interactions (ATM Forum LE Client parameter C7). The default value is 120 seconds (2 minutes).
elan_name Specifies the name of the Emulated LAN this LE Client wishes to join (ATM Forum LE Client parameter C5). This is an SNMPv2 DisplayString of 1-32 characters, or may be left blank (unused). See RFC1213 for a definition of an SNMPv2 DisplayString.
failsafe_time Specifies the maximum timeout period (in seconds) that the LE Client will attempt to recover from a network outage. A value of zero indicates that attempts to recover should not stop unless a nonrecoverable error is encountered. The default value is 0 (unlimited).
flush_timeout Specifies the maximum timeout period (in seconds) for FLUSH request/response exchanges (ATM Forum LE Client parameter C21). The default value is 4 seconds.
fwd_delay_time Specifies the maximum timeout period (in seconds) that the LE Client will maintain an entry for a non-local MAC address in its LE_ARP cache without verification, when the Topology Change flag is true (ATM Forum LE Client parameter C18). The default value is 15 seconds.
lan_type Identifies the type of local area network being emulated (ATM Forum LE Client parameter C2). Both Ethernet/IEEE 802.3 and Token Ring LANs can be emulated using ATM Forum LANE. The attribute values are:
Ethernet/IEEE802.3
TokenRing
lecs_atm_addr If you are doing auto configuration using the LE Configuration Server (LECS), this field specifies the ATM address of LECS. It can remain blank if the address of LECS is not known and the LECS is connected using PVC (VPI=0, VCI=17) or the well-known address. If the 20-byte address of the LECS is known, it must be entered as hexadecimal numbers using a . (period) as the delimiter between bytes. Leading zeros of each byte may be omitted, for example:
47.0.79.0.0.0.0.0.0.0.0.0.0.0.0.a0.3.0.0.1

(the LECS well-known address)
les_atm_addr If you are doing manual configuration (without the aid of an LECS), this field specifies the ATM address of the LE ARP Server (LES) (ATM Forum LE Client parameter C9). This 20-byte address must be entered as hexadecimal numbers using a . (period) as the delimiter between bytes. Leading zeros of each byte may be omitted, for example:
39.11.ff.22.99.99.99.0.0.0.0.1.49.10.0.5a.68.0.a.1
local_lan_addrs Specifies the local unicast LAN MAC address that will be represented by this LE Client and registered with the LE Server (ATM Forum LE Client parameter C6). This 6-byte address must be entered as hexadecimal numbers using a . (period) as the delimiter between bytes. Leading zeros of each byte may be omitted.
Ethernet Example: 2.60.8C.2C.D2.DC
Token Ring Example: 10.0.5A.4F.4B.C4
max_arp_retries Specifies the maximum number of times an LE_ARP request can be retried (ATM Forum LE Client parameter C13). The default value is 1.
max_config_retries Specifies the number of times a configuration control frame such as LE_JOIN_REQUEST should be retried, using a duration of control_timeout seconds between retries. The default is 1.
max_frame_size Specifies the maximum AAL-5 send data-unit size of data frames for this LE Client. In general, this value should coincide with the LAN type and speed as follows:
Unspecified for auto LECS configuration
1516 bytes for Ethernet and IEEE 802.3 networks
4544 bytes for 4 Mbps Token Rings
18190 bytes for 16 Mbps Token Rings
max_queued_frames Specifies the maximum number of outbound packets that will be held for transmission per LE_ARP cache entry. This queueing occurs when the Maximum Unknown Frame Count (max_unknown_fct) has been reached, or when flushing previously transmitted packets while switching to a new virtual channel. The default value is 60 packets.
max_rdy_retries Specifies the maximum number of READY_QUERY packets sent in response to an incoming call that has not yet received data or a READY_IND packet. The default value is 2 retries.
max_unknown_fct Specifies the maximum number of frames for a given unicast LAN MAC address that may be sent to the Broadcast and Unknown Server (BUS) within time period Maximum Unknown Frame Time (max_unknown_ftm) (ATM Forum LE Client parameter C10). The default value is 1.
max_unknown_ftm Specifies the maximum timeout period (in seconds) that a given unicast LAN address may be sent to the Broadcast and Unknown Server (BUS). The LE Client will send no more than Maximum Unknown Frame Count (max_unknown_fct) packets to a given unicast LAN destination within this timeout period (ATM Forum LE Client parameter C11). The default value is 1 second.
path_sw_delay Specifies the maximum timeout period (in seconds) that frames sent on any path in the network will take to be delivered (ATM Forum LE Client parameter C22). The default value is 6 seconds.
peak_rate Specifies the forward and backward peak bit rate in K-bits per second that will be used by this LE Client to set up virtual channels. It is generally best to specify a value that is compatible with the lowest speed remote device that you expect this LE Client to be communicating with. Higher values may cause congestion in the network. The default value is 25600 K-bits per second.
ready_timeout Specifies the maximum timeout period (in seconds) in which data or a READY_IND message is expected from a calling party (ATM Forum LE Client parameter C28). The default value is 4 seconds.
ring_speed Specifies the Token Ring speed as viewed by the ifnet layer. The value set by the ATM LANE device driver is 16 Mbps for Token Ring emulation and ignored for Ethernet. This is not an operator-configurable attribute.
vcc_activity_timeout Specifies the maximum timeout period (in seconds) for inactive Data Direct VCCs. Any switched Data Direct VCC that does not transmit or receive data frames in this timeout period is terminated (ATM Forum LE Client parameter C12). The default value is 1200 seconds (20 minutes).

Device Driver Configuration and Unconfiguration

The atmle_config entry point performs configuration functions for the ATM LANE device driver.

Device Driver Open

The atmle_open function is called to open the specified network device.

The LANE device driver does an asynchronous open. It starts the process of attaching the device to the network, sets the NDD_UP flag in the ndd_flags field, and returns 0. The network attachment will continue in the background where it is driven by network activity and system timers.

Note: The Network Services ns_alloc routine which calls this open routine causes the open to be synchronous. It waits until the NDD_RUNNING or the NDD_LIMBO flag is set in the ndd_flags field or 15 seconds have passed.

If the connection is successful, the NDD_RUNNING flag will be set in the ndd_flags field, and an NDD_CONNECTED status block will be sent. The ns_alloc routine will return at this time.

If the device connection fails, the NDD_LIMBO flag will be set in the ndd_flags field, and an NDD_LIMBO_ENTRY status block will be sent.

If the device is eventually connected, the NDD_LIMBO flag will be turned off, and the NDD_RUNNING flag will be set in the ndd_flags field. Both NDD_CONNECTED and NDD_LIMBO_EXIT status blocks will be sent.

Device Driver Close

The atmle_close function is called by the Network Services ns_free routine to close the specified network device. This function resets the device to a known state and frees system resources associated with the device.

The device will not be detached from the network until the device's transmit queue is allowed to drain.

Data Transmission

The atmle_output function transmits data using the network device.

If the destination address in the packet is a broadcast address, the M_BCAST flag in the p_mbuf->m_flags field should be set prior to entering this routine. A broadcast address is defined as FF.FF.FF.FF.FF.FF (hex) for both Ethernet and Token Ring and C0.00.FF.FF.FF.FF (hex) for Token Ring.

If the destination address in the packet is a multicast or group address, the M_MCAST flag in the p_mbuf->m_flags field should be set prior to entering this routine. A multicast or group address is defined as any nonindividual address other than a broadcast address.

The device driver will keep statistics based on the M_BCAST and M_MCAST flags.

AIX Token Ring LANE emulates a duplex device. If a Token Ring packet is transmitted with a destination address that matches the LAN MAC address of the local LE Client, the packet is received. This is also true for Token Ring packets transmitted to a broadcast address, enabled functional address, or an enabled group address. AIX Ethernet LANE, on the other hand, emulates a simplex device and does not receive its own broadcast or multicast transmit packets.

Data Reception

When the LANE device driver receives a valid packet from a network ATM device driver, the LANE device driver calls the nd_receive function that is specified in the ndd_t structure of the network device. The nd_receive function is part of a CDLI network demuxer. The packet is passed to the nd_receive function in mbufs.

The LANE device driver passes one packet to the nd_receive function at a time.

The device driver sets the M_BCAST flag in the p_mbuf->m_flags field when a packet is received which has an all-stations broadcast destination address. This address value is defined as FF.FF.FF.FF.FF.FF (hex) for both Token Ring and Ethernet and is defined as C0.00.FF.FF.FF.FF (hex) for Token Ring.

The device driver sets the M_MCAST flag in the p_mbuf->m_flags field when a packet is received which has a nonindividual address that is different than an all-stations broadcast address.

Any packets received from the network are discarded if they do not fit the currently emulated LAN protocol and frame format are discarded.

Asynchronous Status

When a status event occurs on the device, the LANE device driver builds the appropriate status block and calls the nd_status function that is specified in the ndd_t structure of the network device. The nd_status function is part of a CDLI network demuxer.

The following Status Blocks are defined for the LANE device driver:

Hard Failure

When an error occurs within the internal operation of the ATM LANE device driver, it is considered unrecoverable. If the device was operational at the time of the error, the NDD_LIMBO and NDD_RUNNING flags are turned off, and the NDD_DEAD flag is set in the ndd_flags field, and a hard failure status block is generated.

code Set to NDD_HARD_FAIL
option[0] Set to NDD_UCODE_FAIL

Enter Network Recovery Mode

When the device driver detects an error which requires initiating recovery logic to make the device temporarily unavailable, the following status block is returned by the device driver:

code Set to NDD_LIMBO_ENTER
option[0] Set to NDD_UCODE_FAIL
Note: While the device driver is in this recovery logic, the network connections may not be fully functional. The device driver will notify users when the device is fully functional by way of an NDD_LIMBO_EXIT asynchronous status block.

When a general error occurs during operation of the device, this status block is generated.

Exit Network Recovery Mode

When the device driver has successfully completed recovery logic from the error that made the device temporarily unavailable, the following status block is returned by the device driver. This status block means the device is now fully functional.

code Set to NDD_LIMBO_EXIT
option[0] The option field is not used.

Device Control Operations

The atmle_ctl function is used to provide device control functions.

ATMLE_MIB_GET

This control requests the LANE device driver's current ATM LAN Emulation MIB statistics.

The user should pass in the address of an atmle_mibs_t structure as defined in usr/include/sys/atmle_mibs.h. The driver will return EINVAL if the buffer area is smaller than the required structure.

The ndd_flags field can be checked to determine the current state of the LANE device.

ATMLE_MIB_QUERY

This control requests the LANE device driver's ATM LAN Emulation MIB support structure.

The user should pass in the address of an atmle_mibs_t structure as defined in usr/include/sys/atmle_mibs.h. The driver will return EINVAL if the buffer area is smaller than the required structure.

The device driver does not support any variables for read_write or write only. If the syntax of a member of the structure is some integer type, the level of support flag will be stored in the whole field, regardless of the size of the field. For those fields which are defined as character arrays, the value will be returned only in the first byte in the field.

NDD_CLEAR_STATS

This control requests all the statistics counters kept by the LANE device driver to be zeroed.

NDD_DISABLE_ADDRESS

This command disables the receipt of packets destined for a multicast/group address; and for Token Ring, it disables the receipt of packets destined for a functional address. For Token Ring, the functional address indicator (bit 0 "the MSB" of byte 2) indicates whether the address is a functional address (the bit is a 0) or a group address (the bit is a 1).

In all cases, the length field value is required to be 6. Any other value will cause the LANE device driver to return EINVAL.

Functional Address

The reference counts are decremented for those bits in the functional address that are enabled (set to 1). If the reference count for a bit goes to zero, the bit will be "turned off" in the functional address mask for this LE Client.

If no functional addresses are active after receipt of this command, the TOK_RECEIVE_FUNC flag in the ndd_flags field is reset. If no functional or multicast/group addresses are active after receipt of this command, the NDD_ALTADDRS flag in the ndd_flags field is reset.

Multicast/Group Address

If a multicast/group address which is currently enabled is specified, receipt of packets destined for that group address is disabled. If an address is specified that is not currently enabled, EINVAL is returned.

If no functional or multicast/group addresses are active after receipt of this command, the NDD_ALTADDRS flag in the ndd_flags field is reset. Additionally for Token Ring, if no multicast/group address is active after receipt of this command, the TOK_RECEIVE_GROUP flag in the ndd_flags field is reset.

NDD_DISABLE_MULTICAST

The NDD_DISABLE_MULTICAST command disables the receipt of all packets with unregistered multicast addresses, and only receives those packets whose multicast addresses were registered using the NDD_ENABLE_ADDRESS command. The arg and length parameters are not used. The NDD_MULTICAST flag in the ndd_flags field is reset only after the reference count for multicast addresses has reached zero.

NDD_ENABLE_ADDRESS

This command enables the receipt of packets destined for a multicast/group address; and additionally for Token Ring, it enables the receipt of packets destined for a functional address. For Ethernet, the address is entered in canonical format which is left-to-right byte order with the I/G (Individual/Group) indicator as the least significant bit of the first byte. For Token Ring, the address format is entered in noncanonical format which is left-to-right bit and byte order and has a functional address indicator. The functional address indicator (the most significant bit of byte 2) indicates whether the address is a functional address (the bit value is 0) or a group address (the bit value is 1).

In all cases, the length field value is required to be 6. Any other length value will cause the LANE device driver to return EINVAL.

Functional Address

The Token-Ring network architecture provides bit-specific functional addresses for widely used functions, such as Ring Parameter Server or Configuration Report Server. Ring stations use functional address "masks" to identify these functions. The specified address is "or'ed" with the currently specified functional addresses, and the resultant address is set as the functional address for the device. Functional addresses are encoded in a bit-significant format, thereby allowing multiple individual groups to be designated by a single address.

For example, if function G is assigned a functional address of C0.00.00.08.00.00 (hex), and function M is assigned a functional address of C0.00.00.00.00.40 (hex), then ring station Y, whose node contains function G and M, would have a mask of C0.00.00.08.00.40 (hex). Ring station Y would receive packets addressed to either function G or M or to an address like C0.00.00.08.00.48 (hex) since that address contains bits specified in the "mask."

Note: The LANE device driver forces the first 2 bytes of the functional address to be C0.00 (hex). In addition, bits 6 and 7 of byte 5 of the functional address are forced to 0.

The NDD_ALTADDRS and TOK_RECEIVE_FUNC flags in the ndd_flags field are set.

Since functional addresses are encoded in a bit-significant format, reference counts are kept on each of the 31 least significant bits of the address. Reference counts are not kept on the 17 most significant bits (the C0.00 (hex) of the functional address and the functional address indicator bit).

Multicast/Group Address

A multicast/group address table is used by the LANE device driver to store address filters for incoming multicast/group packets. If the LANE device driver is unable to allocate kernel memory when attempting to add a multicast/group address to the table, the address is not added and ENOMEM is returned.

If the LANE device driver is successful in adding a multicast/group address, the NDD_ALTADDRS flag in the ndd_flags field is set. Additionally for Token Ring, the TOK_RECEIVE_GROUP flag is set, and the first 2 bytes of the group address are forced to be C0.00 (hex).

NDD_ENABLE_MULTICAST

The NDD_ENABLE_MULTICAST command enables the receipt of packets with any multicast (or group) address. The arg and length parameters are not used. The NDD_MULTICAST flag in the ndd_flags field is set.

NDD_GET_ALL_STATS

This control requests all current LANE statistics, based on both the generic LAN statistics and the ATM LANE protocol in progress.

For Ethernet, you should pass in the address of an ent_ndd_stats_t structure as defined in file /usr/include/sys/cdli_entuser.h.

For Token Ring, you should pass in the address of a tok_ndd_stats_t structure as defined in file /usr/include/sys/cdli_tokuser.h.

The driver will return EINVAL if the buffer area is smaller than the required structure.

The ndd_flags field can be checked to determine the current state of the LANE device.

NDD_GET_STATS

This control requests the current generic LAN statistics based on the LAN protocol being emulated.

For Ethernet, you should pass in the address of an ent_ndd_stats_t structure as defined in file /usr/include/sys/cdli_entuser.h.

For Token Ring, you should pass in the address of a tok_ndd_stats_t structure as defined in file /usr/include/sys/cdli_tokuser.h.

The ndd_flags field can be checked to determine the current state of the LANE device.

NDD_MIB_ADDR

This control requests the current receive addresses that are enabled on the LANE device driver. The following address types are returned, up to the amount of memory specified to accept the address list:

Each address is 6-bytes in length.

NDD_MIB_GET

This control requests the current MIB statistics based on whether the LAN being emulated is Ethernet or Token Ring.

If Ethernet, you should pass in the address of an ethernet_all_mib_t structure as defined in file /usr/include/sys/ethernet_mibs.h.

If Token Ring, you should pass in the address of a token_ring_all_mib_t structure as defined in file /usr/include/sys/tokenring_mibs.h.

The driver will return EINVAL if the buffer area is smaller than the required structure.

The ndd_flags field can be checked to determine the current state of the LANE device.

NDD_MIB_QUERY

This control requests LANE device driver's MIB support structure based on whether the LAN being emulated is Ethernet or Token Ring.

If Ethernet, you should pass in the address of an ethernet_all_mib_t structure as defined in file /usr/include/sys/ethernet_mibs.h.

If Token Ring, you should pass in the address of a token_ring_all_mib_t structure as defined in file /usr/include/sys/tokenring_mibs.h.

The driver will return EINVAL if the buffer area is smaller than the required structure.

The device driver does not support any variables for read_write or write only. If the syntax of a member of the structure is some integer type, the level of support flag will be stored in the whole field, regardless of the size of the field. For those fields which are defined as character arrays, the value will be returned only in the first byte in the field.

Tracing and Error Logging in the ATM LANE Device Driver

The LANE device driver has two trace points:

Tracing can be enabled through SMIT or with the trace command.

trace -a -j 3a1,3a2

Tracing can be disabled through SMIT or with the trcstop command. Once trace is stopped, the results can be formatted into readable text with the trcrpt command.

trcrpt > /tmp/trc.out

The LANE error log templates are:

ERRID_ATMLE_MEM_ERR An error occurred while attempting to allocate memory or pin the code. This error log entry accompanies return code ENOMEM on an open or control operation.
ERRID_ATMLE_LOST_SW The LANE device driver lost contact with the ATM switch. The device driver will enter Network Recovery Mode in an attempt to recover from the error and will be temporarily unavailable during the recovery procedure. This generally occurs when the cable is unplugged from the switch or ATM adapter.
ERRID_ATMLE_REGAIN_SW Contact with the ATM switch has been re-established (for example, the cable has been plugged back in).
ERRID_ATMLE_NET_FAIL The device driver has gone into Network Recovery Mode in an attempt to recover from a network error and is temporarily unavailable during the recovery procedure. User intervention is not required for this error unless the problem persists.
ERRID_ATMLE_RCVRY_CMPLETE The network error which caused the LANE device driver to go into error recovery mode has been corrected.

[ Previous | Next | Contents | Home | Search ]