2 OVERVIEW
2.1 Hardware
Normally a Local Control Unit (LCU) has only one ethernet connection over which it boots and later exchanges messages with other environments. However, several LCUs exist in the VLT that shall be connected to more than one ethernet LAN. Up to three connections must be supported per system.
While the default port is provided by the CPU on-board, each additional interface must be added by installing a NET01 board into the system.
The NET01 board provides one ethernet port with a hardware-selectable interface, either for AUI (10base5, Transceivers) or Thin Ethernet (10base2) connectors. A LED at the front-panel displays the VMEbus access to the board, whereby its brightness corresponds to the access frequency.
Several jumpers have to be set before the board is physically installed, see section 5.1.
2.2 Driver Functions
Only the function natAttach is specific to the driver, see Installation chapter. After that the driver is fully integrated into VxWorks, so that all further configuration and accesses to the ethernet port are done with the normal system calls ifMaskSet, ifAddrSet, respectively socket, connect, accept, read, write, etc.
2.3 Interrupts
Each board uses one interrupt vector, which is programmable by the user. It must be assigned exclusively to the board, no other requester in the system must use the same vector.
The interrupt level must be selected with jumpers. Several requesters can share the same level.
3 INSTALLATION
3.1 Hardware and Software Requirements
The following hardware and software is required to run the net01 driver:
The NET01 jumper settings must be prepared according to the description in section 5.1 and [1].
3.2 Building the Software
The make procedure follows VLT standards:
The following files will be stored under $INTROOT (if defined) or $VLTROOT:
3.3 Configuration and Loading
Three function calls per board are necessary to install it, namely natAttach, ifMaskSet, and ifAddrSet. While the first two can always take default parameters, the setting of the address is system-specific. It is therefore recommended to use an environment-specific configuration by the following steps:
After that the LCU can be rebooted, and all ports should be installed.
3.4 Installation Verification
If the new ethernet ports are correctly installed can be checked from the VxWorks shell with ifShow. The installed number of nat ports (unit number 0, 1, ...) should appear in the output:
lte21->ifShow
nat (unit number 0):
Flags: (0x63) UP BROADCAST ARP RUNNING
Internet address: 134.171.198.3
Broadcast address: 134.171.198.255
Netmask 0xffff0000 Subnetmask 0xffffff00
Ethernet address is 00:80:31:00:f0:5f
Metric is 0
Maximum Transfer Unit size is 1500
0 packets received; 1 packets sent
0 input errors; 0 output errors
0 collisions
4 DIAGNOSTICS
This chapter describes the most useful networking diagnostic facilities under the VxWorks shell [2]. They are not specifically related to this driver, but of general use.
4.1 ifShow
This function displays the parameters with which each port has been installed, and informs about the number of packets sent and received so far. It is similar to the Unix command `netstat -i'.
lte21-> ifShow "nat1"
nat (unit number 1):
Flags: (0x63) UP BROADCAST ARP RUNNING
Internet address: 134.171.199.3
Broadcast address: 134.171.199.255
Netmask 0xffff0000 Subnetmask 0xffffff00
Ethernet address is 00:80:31:00:f1:cf
Metric is 0
Maximum Transfer Unit size is 1500
7670 packets received; 15380 packets sent
0 input errors; 0 output errors
0 collisions
4.2 routeShow
This function displays the routing table that the system uses to distribute packets to their destinations. It is similar to the Unix command `netstat -r'. Note that VxWorks does not have a routing daemon, all entries in this table must be added by the user. However, the local ports appear here automatically, so that for normal application no further call to routeAdd is needed.
lte21-> routeShow
ROUTE NET TABLE
destination gateway flags Refcnt Use Interface
------------------------------------------------------------------------
134.171.198.0 134.171.198.3 1 0 140 nat0
134.171.199.0 134.171.199.3 1 0 0 nat1
134.171.200.0 134.171.200.1 1 1 4500 sm0
134.171.12.0 134.171.12.230 1 6 3937 ei0
------------------------------------------------------------------------
ROUTE HOST TABLE
destination gateway flags Refcnt Use Interface
------------------------------------------------------------------------
127.0.0.1 127.0.0.1 5 0 0 lo0
------------------------------------------------------------------------
4.3 inetstatShow
This function displays a list with all existing sockets. It is similar to the Unix command `netstat'.
lte21-> inetstatShow
Active Internet connections (including servers)
PCB Proto Recv-Q Send-Q Local Address Foreign Address (state)
-------- ----- ------ ------ ------------------ ------------------ -------
7e188c TCP 0 0 134.171.198.3.1027 134.171.198.9.5000 ESTABLISHED
79650c TCP 0 0 134.171.198.3.1026 134.171.198.9.5000 TIME_WAIT
7e240c TCP 0 0 134.171.12.230.513 134.171.12.87.967 ESTABLISHED
6be20c TCP 0 0 134.171.12.230.216 134.171.12.87.2744 ESTABLISHED
79620c TCP 0 0 0.0.0.0.2160 0.0.0.0.0 LISTEN
7e218c TCP 0 0 0.0.0.0.111 0.0.0.0.0 LISTEN
7e220c TCP 0 0 0.0.0.0.21 0.0.0.0.0 LISTEN
5 REFERENCE
5.1 Man Pages
This allows automatic installation.
net01N = lcubootAutoProbe(0xf0d00000,0xf0d80000)
lcubootAutoLoad net01N>0,"net01"
This integrates the driver into the VxWorks system.
lcubootAutoExec net01N>0, "natAttach",0,0xf0d00000,0xc0,3
lcubootAutoExec net01N>1, "natAttach",1,0xf0d80000,0xc1,3
The default value is good for whole ESO, elsewhere it may be different.
lcubootAutoExec net01N>0, "ifMaskSet","nat0",0xffffff00
lcubootAutoExec net01N>1, "ifMaskSet","nat1",0xffffff00
The IP addresses are environment-specific, no default is possible!
The lines are therefore commented in the default script,
and should be set in the environment-specific net01.boot.
#lcubootAutoExec net01N>0, "ifAddrSet","nat0","134.171.xxx.yyy"
#lcubootAutoExec net01N>1, "ifAddrSet","nat1","134.171.xxx.yyy"
This page describes the hardware-specific configuration options of
the NAT NET01 Ethernet I/F board in the VLT environment.
One VMEbus board corresponds to one ethernet port,
with a selectable interface (AUI or thin ethernet).
Each board must be installed by the function natAttach.
The following standard VLT base-addresses, interrupt-vectors and
interrupt-levels are foreseen for net01 boards:
unitNr baseAddr intrNr intrLevel
------- --------------- ------- ---------
0 0xf0d00000 0xc0 3
1 0xf0d80000 0xc1 3
The board has form-factor 3U, and is only connected to P1.
User-configurable elements are located on the board as follows:
|---------------------------------------+
| +-+
LED {| ... |=|
| LK3 |=|
[| . |=|
AUI [| =====T2 :LK3 |=|
[| =====T1 LK1 |=|P1
[| LK2 ::::: |=|
| ... ::: .. |=|
BNC <| LK4 :: |=|
<| .... LK7 :: |=|
| LK6 :: +-+
|---------------------------------------+
For their location on the board see BOARD LAYOUT.
They must be set as follows:
Jumper Description Selection Setting
----------------------- --------------- -------
LK1 Base Address for nat0: ::0:0
for nat1: ::0::
LK2 Interrupt Level Level3 #0+1 set
LK7 Interrupt Level Level3 #3 set
LK3 AUI Grounding to 0V left set
LK4 SQE Test enabled left set
LK5 Tx Mode Select idle-high lower set
LK6 Collision Detect Tx detect middle set
T1/2 Interface Type AUI (transcv.) T2 set (upper)
BNC (thin eth.) T1 set (lower)
:/0 = empty/SET
LK1,2,7 must be consistent with the natAttach arguments,
the remaining jumpers affect only the hardware.
Note that LK2 and LK7 must be set equally!
The transformer module must be put in either socket T1 or T2,
corresponding to the selected interface type.
Quadralay Corporation http://www.webworks.com Voice: (512) 719-3399 Fax: (512) 719-3606 sales@webworks.com |