Configuring Windows for TOR
NOTE: TOR only works on Windows XP
and earlier versions.
ARP Table Entries
IP ROUTE
Table Entries
HOSTS File
Entries
Ping Test
Diagnosing Routing Problems
Windows has three internal tables which it uses to direct TCP/IP data to the
correct network adapter and to the correct remote computer:
- The ARP (Address Resolution Protocol)
table
associates an IP address with the physical address, or a callsign, of a remote computer.
- The
IP Routing Table
directs TCP/IP packets to a particular gateway/network interface card
in your computer.
- The
HOSTS Table can be used to associate an IP address
with its more commonly known domain
name and vice versa.
The ARP Table entries are probably
the most critical for TCP/IP
over radio (TOR) clients and gateways, but entries in the other two tables can be useful in
some situations.
Routing and ARP are somewhat complex subjects and complete
explanations are beyond the scope of this
Help section. If you want more information, do a web
search for information about "IP Routing Table" and "understanding
ARP table".
|
AGWPE's TOR feature uses Windows' ARP entries to associate a station's IP
address with that station's ham radio callsign.
For example, let's assume the remote station you want to contact
has an IP address of 44.1.1.8 and a callsign of SV2AGW-8. Let's say you
want to send an email via SV2AGW-8's gateway. You've already told Window
to use SV2AGW-8 as your internet gateway when you
configured the TOR adapter, but the
configuration process required you to use SV2AGW-8's IP address,
44.1.1.8, not his callsign. However, AGWPE can't send a packet to
an IP address; it needs to send it to a ham radio callsign. To determine
the callsign for 44.1.1.8. AGWPE will look in the Windows's ARP table to
see if there is an entry that translates that IP address to a callsign.
The problem is that when Windows first
boots up, the ARP table is always cleared and empty. Windows begins to rebuild a
fresh table of
IP address=callsign entries based on network exchanges
it observes,
If AGWPE finds there is not yet an ARP entry for an IP address it
needs, AGWPE sends out request packet to "QST" asking for the station using the destination
IP address, 44.1.1.8, to respond with its ham callsign. If a response comes back (it might
not! ), the IP address=callsign entry is put in the
Windows ARP table. From then on during that computer session, AGWPE
knows which callsign to use when addressing packets to 44.1.1.8 .
To speed-up the ARP table re-building process, you can enter
IP address=callsign
information in the ARP table as part of the computer boot-up process or when you
first start AGWPE. You can do that with a DOS batch file.
a. Determining the Correct ARP Entry Format for the Batch
File
Each ARP entry includes an internet address and a hex physical address (call
sign and radioport). In order to
calculate the correct hex address for a station,
use the free AGWsoft utility AGWARP.EXE
You can download this in zip format from: the
AGW Programs page on this site.
Unzip the utility and run it. It will ask you to:
- Enter a callsign (for example
SV2AGW-8)
- Enter the AGWPE radioport to use to connect to that station
(e.g. 2)
- Enter the IP address used by that callsign (e.g. 44.1.1.8)
The utility will then return a hex physical address. For the example above it
would be ab:ac:0d:2c:44:86 . Finally it returns a closing message, such as "Type now <ARP -s 41.1.1.8 ab:ac:0d:2c:44:86>".
Rather than typing that, write down everything in between the brackets
< > and then press
the Return key to close the utility. If you need physical addresses for
any other stations, you will need to re-run the utility .
Note: The ARP entry can also be used to tell AGWPE to use particular radioport
to contact this callsign. Normally AGWPE uses the default port that you
specified on the
TOR configuration screen under
Setup Routes. The ability
to specify a different port can be useful if a contact should be made on
alternative an radioport / frequency.
Open a DOS-prompt box (Start: Run: CMD)
and type EDIT ARPROUTE.BAT (or another
.bat name of your choice). If there is no
existing file with that name, the edit program will create a new file named
ARPROUTE.BAT with no data in it.
On a blank line in the edit window, enter an ARP entry, i.e. the information you wrote down
from the AGWARP utility, except replace any colons (:) in the physical IP address with
dashes (-). For example:
ARP -s 41.1.1.8 ab-ac-0d-2c-44-86
If you have other ARP entries, add each on a separate line. When done, save
the file to a folder of your choice, making note of the path. Test the file
by double clicking on its icon and make sure no error messages occur.
You can
also see the ARP table and your new entry by opening a DOS-prompt box (Start:
Run: CMD) and at the DOS prompt enter:
ARP -a [You can also manually
enter ARP entries from the DOS prompt instead of a batch file.]
c. Add the Batch File to AGWPE's Auto Start Feature.
From the AGWPE's menu, select Startup Programs.
Use the ADD button to
navigate to and select the ARPROUTE.BAT file you created.
Once entered into the auto start application list, the file will run
each time AGWPE starts up and it will put your ARP entries into the Windows ARP
table.
Alternatively, you could have it run each time Windows boots by
placing it in the Startup Folder (
C:\Windows\Start Menu\Programs\Startup in Windows 95, 98, or ME,
or C:\Documents and Settings\All Users\Start
Menu\Programs\Startup in Windows XP).
The IP Routing Table helps Windows decide which network adapter to use to
send a TCP/IP packet. Its choices might be the SV2AGW TOR virtual adapter, the
hardware network interface card (if one exists), or back to your own computer via a loop back port.
For many users, no additions to the IP Routing table will be necessary, however,
in some cases, Routing Table additions will help your TOR communications.
By default, Windows will build the
Routing Table anew at each reboot. Its primary source of information is the
Internet Protocol (TCP/IP) property settings of your
network adapters, including the SV2AGW TOR adapter. The key information is the
IP address assigned to the adapter. If you also have a hardware
network card installed, Windows will make that IP address the
default gateway
adapter, but
the IP address of your SV2AGW TOR adapter will create a special route for your ham
radio network (those would be addresses that begin with 44, assuming you are
using an IP address yourself that begins with 44).
For example, say your
settings for the SV2AGW TOR adapter looked like this example ...
<-- Click for larger image
An entry is automatically placed in the IP Routing table indicating that any IP packet
with a destination IP addresses beginning with 44 should be routed to
your SV2AGW TOR adapter at IP address 44.128.34.2 (and then onto your gateway
station at 44.128.6.1).
Why 44? That's determined by the subnet mask
values under the four octets (44, 128, 34, and 2) in the
IP Address. A subnet mask
value of 255 means "match all the binary digits of the octet above"; a value
of 0 means "no need to match any of these digits". In our
example, only the first octet, 44, has a subnet mask value of 255.
The other octets have a mask value of 0. So the Routing table will
contain an entry that says, in essence, send all destination IP addresses
beginning with 44 to the 44.128.34.2 adapter.
[For addresses that don't begin with 44, Windows will use the
Routing Table to
determine the correct routing. For example, if you also have a network
card in your computer, then the Routing Table will suggest that packets
for all non-44 addresses should be routed to that network card
and directly to the internet or wired network and not to the SV2AGW TOR adapter.
(If you don't
have a network card installed, then the Routing Table will
send packets go to
the SV2AGW TOR adapter.)]
Communicating with
radio stations that don't use a "44" address
If your computer has both a network card
and the TOR adapter installed and
you will contact stations using TOR that don't have an IP
address beginning with 44, then you should add them to the
Routing Table so that
packets are sent to them via the SV2AGW TOR adapter and not the network card. The easiest way to do this
is to add those routes into the batch file created for ARP entries (see above,
Create an ARP Entry Batch File) or create a
batch file as above if one doesn't exit.
To add a route to the IP Routing Table using
your ARP Entry Batch file, enter a new line that begins with ROUTE ADD followed by
the full IP address of the remote station followed by the IP address chosen for
your SV2AGW TOR adapter (your IP address), for example:
ROUTE ADD 133.275.12.6
44.128.34.2
This tells windows to route any IP packets addressed to
133.275.12.6 to the SV2AGW TOR adapter at 44.128.34.2. Of course you would
replace the number in green with the address of
your distant station and replace the number in red with your SV2AGW TOR adapter's
address (your ham radio IP address).
To add a route without using a batch file, open a DOS-prompt box (Start:
Run: CMD) and enter your ROUTE ADD
sentence as above.
To see your complete IP Route Table, enter ROUTE
PRINT at a DOS prompt
(Start:
Run: CMD)
|
The HOSTS file can be used to help translate
an IP address to a name and vice versa. For example, if you had a
HOSTS table entry that said 44.0.0.2 is the
same as "My Web Page", you could enter "My Web Page" as a URL address in your
browser and Windows would know to go to 44.0.0.2 to find it.
This same IP Address-Name translation can be performed by a domain name server,
but the HOSTS files is especially useful
when a domain name service (DNS) server is not available (common on many amateur
radio networks) or when you want to use an easily remembered name in place of a
hard to remember IP address or lengthy domain name.
Location of the
HOSTS file on your computer:
Windows 98/Me
|
c:\windows\hosts
|
Windows 2000/XP Pro
|
c:\winnt\system32\drivers\etc\hosts
|
Windows XP Home
|
c:\windows\system32\drivers\etc\host
|
Note: the
HOSTS file has no extension to its name.
You can open the existing HOSTS file with
a text editor. Instructions for adding entries to file are included in the file.
[In some cases you may find only a HOSTS.SAM
(sample) file
and not a HOSTS file. If you do, make a copy
of the HOSTS.SAM file calling it
HOSTS (no extension).]
Usually the HOSTS file already has one
entry in it: 127.0.0.1 localhost
Any new entries would follow the same simple format: IP address, a space, name.
For examples:
41.1.1.8 SV2AGW-8
41.1.1.8 mail.sv2agw.net
After you make your HOST, ROUTE and
ARP entries, you can test them by using the
Windows PING command.
PING simply sends four packets to the destination station asking
it to respond. PING then reports how long
each response takes or, if no response is heard within a given length of time,
PING reports the "request timed out".
To send the PING
command, open a
DOS-prompt window (Start: Run: CMD) and
enter the command in this format:
PING <destination IP>
<--- substitute actual IP address for
<destination IP>
You can use the -w option on the ping command to increase the time PING
waits for a response (default is 1 second). For example, to wait for each
response for 5 seconds (5000 milliseconds), use -w 5000. e.g.
PING
44.0.0.1 -w 5000
If you get
a reply with a response time, then all Windows applications using TCP/IP, i.e. Internet Explorer,
Outlook Express, will also be able to communicate with the
PING-ed destination. If all four requests time out, then Windows is not hearing a response from
the destination IP and it is useless to try any other TOR applications.
Download and use the
AGWTerminal program and watch
the packets that AGWPE is sending when you execute the
PING command. They should look like this:
2:Fm SV2AGW To SV2BBO <UI pid=CC Len=60 >[21:59:26]
IP:len:60 44.0.0.2->44.0.0.1 ihl:20 ttl:128 prot ICMP
ICMP:type Echo Request id:768 seq:7680 abcdefghijklmnopqrstuvwabcdefghi
- If you don't see anything, then the
ROUTE
table is not configured to route packets to the SV2AGW TOR adapter for
this destination IP address.
- If the packet is addressed to QST instead of the
expected callsign, then the ARP table entry
associating the destination IP address with the destination callsign is
missing or incorrect. Add or correct it.
- If the number that begins the packet (e.g. 2:) is
not the correct radioport for TOR, then the ARP table has a
hex address with the wrong radioport. Rerun the AGWARP.EXE program to get
the correct hex address.
If the PING command
reports the the request timed out:
- The response time may have been too short. Increase it by
using PING's " -w " parameter described above.
- The radioport number may be incorrect so you are
transmitting on the wrong frequency. Either the default radioport in
AGWPE's TOR settings is incorrect; or the
ARP table entry for this callsign has a hex address
with the wrong radioport (rerun the AGWARP.EXE program and re-enter the
correct hex address in the ARP table).
- You are using the wrong callsign and/or SSID number for
the destination station.
- There may be a transmission problem at your station (no
power, cables not connected to TNC or radio, etc); the other
station simply can not hear your packets (poor signal); or the other station
is not working properly or it is off the air. [In that case,
try to
successfully exchange a standard packet before trying a TOR packet exchange
or PING test.]
- The other station can not respond to PING requests because its AGWPE
configuration and/or its SV2AGW TOR adapter configuration is incorrect.
- A firewall program/router may be blocking
access to the target computer. Make sure the firewall/router is set
to allow PING responses.
Go to:
TOR: Overview
TOR: Install TOR Virtual
Adapter
TOR: AGWPE Settings
TOR: Gateway Setup
TOR: Application Settings
|