summaryrefslogtreecommitdiffstats
path: root/doc/networking/testing.t
blob: af1460ad2dd049bb55b5ae302670fab3a2fb0ea4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
@c
@c  Written by Eric Norum
@c
@c  COPYRIGHT (c) 1988-1998.
@c  On-Line Applications Research Corporation (OAR).
@c  All rights reserved.
@c
@c  $Id$
@c


@chapter Testing the Driver

@section Preliminary Setup

The network used to test the driver should include at least:

@itemize @bullet

@item The hardware on which the driver is to run.
It makes testing much easier if you can run a debugger to control
the operation of the target machine.

@item An Ethernet network analyzer or a workstation with an
`Ethernet snoop' program such as @code{ethersnoop} or
@code{tcpdump}.

@item A workstation.

@end itemize

During early debug, you should consider putting the target, workstation, 
and snooper on a small network by themselves.  This offers a few 
advantages:

@itemize @bullet

@item There is less traffic to look at on the snooper and for the target
to process while bringing the driver up.

@item Any serious errors will impact only your small network not a building
or campus network.  You want to avoid causing any unnecessary problems.

@item Test traffic is easier to repeatably generate.

@item Performance measurements are not impacted by other systems on
the network.

@end itemize

@section Driver basic operation

The network demonstration program @code{netdemo} may be used for these tests.

@itemize @bullet

@item Edit @code{networkconfig.h} to reflect the values for your network.

@item Start with @code{RTEMS_USE_BOOTP} not defined.

@item Edit @code{networkconfig.h} to configure the driver
with an
explicit Ethernet and Internet address and with reception of
broadcast packets disabled:

Verify that the program continues to run once the driver has been attached.

@item Issue a @samp{u} command to send UDP
packets to the `discard' port.
Verify that the packets appear on the network.

@item Issue a @samp{s} command to print the network and driver statistics.

@item On a workstation, add a static route to the target system.

@item On that same workstation try to `ping' the target system.
Verify that the ICMP echo request and reply packets appear on the net.

@item Remove the static route to the target system.
Modify @code{networkconfig.h} to attach the driver
with reception of broadcast packets enabled.
Try to `ping' the target system again.
Verify that ARP request/reply and ICMP echo request/reply packets appear
on the net.

@item Issue a @samp{t} command to send TCP
packets to the `discard' port.
Verify that the packets appear on the network.

@item Issue a @samp{s} command to print the network and driver statistics.

@item Verify that you can telnet to ports 24742
and 24743 on the target system from one or more
workstations on your network.

@end itemize

@section BOOTP operation

Set up a BOOTP server on the network.
Set define @code{RTEMS USE_BOOT} in @code{networkconfig.h}.
Run the @code{netdemo} test program.
Verify that the target system configures itself from the BOOTP server and
that all the above tests succeed.

@section Stress Tests

Once the driver passes the tests described in the previous section it should
be subjected to conditions which exercise it more
thoroughly and which test its error handling routines.

@subsection Giant packets

@itemize @bullet
@item Recompile the driver with @code{MAXIMUM_FRAME_SIZE} set to
a smaller value, say 514.

@item `Ping' the driver from another workstation and verify
that frames larger than 514 bytes are correctly rejected.

@item Recompile the driver with @code{MAXIMUM_FRAME_SIZE} restored  to 1518.
@end itemize

@subsection Resource Exhaustion

@itemize @bullet
@item Edit  @code{networkconfig.h}
so that the driver is configured with just two receive and transmit descriptors.

@item Compile and run the @code{netdemo} program.

@item Verify that the program operates properly and that you can
still telnet to both the ports.

@item Display the driver statistics (Console `@code{s}' command or telnet
`control-G' character) and verify that:

@enumerate

@item The number of transmit interrupts is non-zero.
This indicates that all transmit descriptors have been in use at some time.

@item The number of missed packets is non-zero.
This indicates that all receive descriptors have been in use at some time.

@end enumerate

@end itemize

@subsection Cable Faults

@itemize @bullet
@item Run the @code{netdemo} program.

@item Issue a `@code{u}' console command to make the target machine transmit
a bunch of UDP packets.

@item While the packets are being transmitted, disconnect and reconnect the
network cable.

@item Display the network statistics and verify that the driver has
detected the loss of carrier.

@item Verify that you can still telnet to both ports on the target machine.

@end itemize

@subsection Throughput

Run the @code{ttcp} network benchmark program.
Transfer large amounts of data (100's of megabytes) to and from the target
system.