2. Hardware Manual, v1.0
RAMON (Rapid Mobility Emulator)
RAMON is a network emulator with two PCs and three embedded computers.
The “emulator machine” hast four Ethernet cards located at 192.168.1.1,
192.168.2.1, 192.168.3.1, and 192.168.4.2. Each card belongs to a subnetwork
with a netmask of 255.255.255.0. The gateway for each subnetwork :
192.168.1.0, 192.168.2.0, and 192.168.3.0 is the subnetwork .1. Ecah embedded
computer has an interface located at /dev/eth0 and with an IP address of
192.168.X.1, where X can go from 1 to 3.
The routing table for each embedded device should have a default gw it’s own
subnetwork .1.
The Home Agent has two Ethernet interfaces, the first interface is connected to
the Harris Lab Network. The interface is : 10.3.3.14. The other interface is
192.168.4.1.
Therefore the 192.168.X.Y addresses should only be used for management
purpouses and all the cards must use by default those addresses.
item description
Controller 8-portparallel to3/7-bitparallel port
Attenuator JFW Industries-50P-1320 7bit0-127dB 0-3GHz
Node 1 Cushcraft3dBi omni-directional
attenuator Antenna
Access
Access Point IEEE 802.11bAIRONET-350
Omni-directional Point
antenna Emulator Pentium II- 350 MHz 256MB ofRAM/10 GB Harddrive
Computer Computer Advantech 8251embeddedcomputer-Cyrix233MHz,
128 MB RAM/ 6GB Hard drive
controller
Node 2
attenuator Access lpt eth0 Home
Omni-directional
Point Agent
antenna
eth1 eth3
Internet
Computer Harris Lab
eth2
Emulator
Node 3
attenuator
Access
Omni-directional
Point
antenna
Computer
Mobile Host (MH) Mobile Host (MH)
Laptop PDA - iPAQ
Figure 1. RAMON topology and architecture.
USERNAME AND PASSWORD FOR RAMON
“ALL the users for all the mobile nodes, foreign agents, home agents and the
emulator is: root and password: ramon1”
3. Hardware Manual, v1.0
SOFTWARE REQUIRED FOR RAMON
Dynamics Mobile IP
In /root directory of HA and EMULATOR (192.168.3.1 or 192.168.1.1).There are
enough links for
http://www.cs.hut.fi/Research/Dynamics/Dynamics-HUT-Mobile-IP-HOWTO
Pay attention to the files dyn1.1, dyn2.1, and so on, which are used by the
$ dynfad --config dyn1.1
See the scripts (FA1, FA2, FA3), these scripts change the IP address of the /dev/
eth0 card at the FA and post a new configuration used by the FA for a brief
amount of time (depends on the speed of the mobile host).
Suggestion:
Make a diff of /etc/dynfa.conf with dyn1.1 to see the lines where is different
and
Those lines are to be changed once we have executed a ifconfig eth0
command.
Dynamics Mobile IP with ghost-FA and ghost-MN
Simply run the makefile (make g-fa), as well as make g-mn. To see the files
untar dynamics-0.8.1a2.tar.gz /home/root on “emulator”.
Suggestion:
The code is already commented, YOU MUST read the dynamics manual to
understand a little bit more for the debugging flags, change configuration
parameters and how to see the registration messages on ethereal
SIMPLE WIRELESS AND WIRED-NETWORK MODEL
(TOPOLOGY EXAMPLE)
192.168.4.1 10.3.3.14
HAgent
INTERNET
10Mb/
10ms
192.168.4.2
1 Mb/ FA2 1 Mb/ FA3 1 Mb/ FA4 1 Mb/ FA5 1 Mb/ FA6 1 Mb/ FA7 1 Mb/ FA8
FA1
10ms 10ms 10ms 10ms 10ms 10ms 10ms
10.0.1.0 10.0.2.0 10.0.3.0 10.0.4.0 10.0.5.0 10.0.6.0 10.0.7.0 10.0.8.0
0 1 2 3 4 5 6 7 8
Figure 2. Example to be emulated in the RAMON emulator
4. Hardware Manual, v1.0
SOFTWARE CONTENT ON HA (Home Agent).
By following the instructions on any IPCHAINS-HOWTO for WINDOWS we can
setup an internet NAT device on the HA and be hable to use the interface on
10.3.3.14 as a default internet route.
http://www.tldp.org/HOWTO/IPCHAINS-HOWTO-3.html#ss3.3
Additionally, the HA computer must include the module ip-in-ip, by running the
command modprobe ipip the module is loaded by the kernel. (same applyies for
all the Foreign Agents), except in the Mobile Node.
EMULATOR
Since cnistnet is an external package, I suggest you to go to the
www.nist.org/ or http://snad.ncsl.nist.gov/itg/nistnet/
to gather more information on how to setup the module for cnistnet
how to load it and how to stop/run the Xserver component.
Emulator scripts for the topology above.
#!/bin/bash
echo emulation to mobile node thru IPinIP
cnistnet -a 192.168.4.1:128.227.205.228.4 10.0.1.1:192.168.4.5.4 --delay 30 1
--
bandwidth 1000000
cnistnet -a 192.168.4.1:128.227.205.228.4 10.0.2.1:192.168.4.5.4 --delay 40 1
--
bandwidth 1000000
cnistnet -a 192.168.4.1:128.227.205.228.4 10.0.3.1:192.168.4.5.4 --delay 50 3
--
bandwidth 1000000
cnistnet -a 192.168.4.1:128.227.205.228.4 10.0.4.1:192.168.4.5.4 --delay 60 3
--
bandwidth 1000000
cnistnet -a 192.168.4.1:128.227.205.228.4 10.0.5.1:192.168.4.5.4 --delay 70 3
--
bandwidth 1000000
cnistnet -a 192.168.4.1:128.227.205.228.4 10.0.6.1:192.168.4.5.4 --delay 80 3
--
bandwidth 1000000
cnistnet -a 192.168.4.1:128.227.205.228.4 10.0.7.1:192.168.4.5.4 --delay 90 3
--
bandwidth 1000000
8. Hardware Manual, v1.0
74LS374
7 Attenuator 0
LD
74LS374
7 Attenuator 1
D0
D1
D2
D3 LD
D4
D5
D6
74LS374
7 Attenuator 2
D7
LD
74HC4051
SEL S0
LDi 0
Auto-
IN
feed
1
Line 14 LPT1 S1
74LS374 2
SEL
74HC4051
AB
2 2
LD
Pseudo Code
WriteLPT1(0xxx xxABb); // Select Attenuator <AB> address
WriteLPT1(1xxx xxxxb); // Write data to the attenuator
Figure 3. Controller for the Attenuator.
Timing is very important in this circuitry, observe that you have to use the code
bellow to select a port and write a value to the Attenuator.
Suggestion:
Go to http://www.jfwindustries.com/ and download the worksheet for the
Attenuatorl
Warning:
The Attenuator is VERY sensitive for static CURRENTS, please ground yourself
while manipulating the circuitl.
Code to Control the Atteunator.
/* control.c: very simple example of port I/O
*
* This code does nothing useful, just a port write, a pause,
* and a port read. Compile with `gcc -O2 -o example example.c',
* and run as root with `./example'.
*/
9. Hardware Manual, v1.0
#include <stdio.h>
#include <unistd.h>
#include <asm/io.h>
#define BASEPORT 0x378 /* lp1 */
#define STATUS BASEPORT+1
#define CONTROL BASEPORT+2
int writePort(int p){
outb(p, BASEPORT);
outb(0x00, CONTROL);
usleep(1000);
outb(0x01, CONTROL);
usleep(1000);
outb(0x00, CONTROL);
}
int main(int argc, char* argv[])
{
int i, j;
/* Get access to the ports */
if (ioperm(BASEPORT, 3, 1))
{
perror("ioperm"); exit(1);
}
j = atoi(argv[1]);
i = atoi(argv[2]);
writePort(j);
writePort(i);
printf(" port %d --> %d n", j, i);
}
This sample code allows you to select a port 128-255 (in fact only 0 to 2 can be
selected) and write a value to the attenuator. Remember that you are using 0-3
in decimal to first select the attenuator and 128-255 to write a value of
attenuation. Let’s say you want to select Port 1, and write 0 dB, you do:
writePort(1);
writePort(128);
If you see the circuit, Port 0 is directly connected to the Attenuator, whereas
Ports 1 and 2 are inverted. In other words, when selecting 128 will write 0 dB to
the Port 0 but will write 0xFF to the ports 1 and 2. It’s a little confusing but you
can fix that by adding another inverter to Port 0.
10. Hardware Manual, v1.0
DEALING WITH LEAKING SIGNALS
Hint.
You should be able to access the AP1, AP2, AP3 using the http
interface, be careful when selecting 100mW or 20dBm. ALL THE APs
should have the same CONFIGURATION.
If you see the emulation code, only two APs are turned on at the time, whenever
one is out of range is simply turned off. In fact, the algorithm in “emulator.c”
allows you to select a distance at which each attenuator will be turned off.
The program CURL is used as a system call thru the following scripts :
Turnoff_1
#!/bin/bash
/usr/sbin/curl -s -d "select_ifAdminStatus=2" http://192.168.1.3/cgi-
bin/cgiSetupNav?ifIndex=2&dot1dPort=2 >/dev/null 2>/dev/null
Turnon_1
#!/bin/bash
/usr/sbin/curl -s -d "select_ifAdminStatus=1" http://192.168.1.3/cgi-
bin/cgiSetupNav?ifIndex=2&dot1dPort=2 > /dev/null 2>/dev/null
We made match also AP1/ANTENNA1; AP2/ANTENNA2, and AP3/ANTENNA3 with
192.168.1.3, 192.168.2.3, and 192.168.3.3 are mapped to the Ethernet
interfaces of those access points. Although, these addresses correspond to the
IP-layer they are not used for the Layer-2 bridging provided by the AP between
the Wireless and the Wired channel. Those addresses are used for management
and configuration purposes.
Review: emulation.c
HOW TO RUN AN EXPERIMENT AND GATHER INFORMATION
Print this file as a reference :
http://www.cs.hut.fi/Research/Dynamics/dynamics_config_checklis
t
Also read:
http://www.iam.unibe.ch/~rvs/publications/Mobile_IP.pdf
1. Secure Shell to 10.3.3.14. Open 5 Ssh screens
2. Pick the one connected to the Home Agent. Run modprobe ipip.
Make sure that the module is loaded by running insmod.
3. Load dynhad
11. Hardware Manual, v1.0
4. In Home Agent run the script to load the firewall and the rules.
a. Should not block any port
b. NAT should be activated.
5. Go to the second 10.3.3.14 screen, ssh to emulator 192.168.3.1
(you can use 2.1 and 1.1) also.
a. Once here, it’s optional to run cnistnet. Load the module
first and then turn on cnistnet and the rules for delays and
emulation.
b. Go to emulation.c and change speed and range of cells.
c. Recompile emulation.c (follow the instructions in the
headers).
d. We are ready to go for emulation
e. Activate the routing information, in other words make sure
That all the 192.168.2.0, 192.168.1.0 and 192..168.3.0
subnets can see each other and they can see 10.3.3.14.
6. Go to third screen and ssh to 192.168.2.2
7. NOTE: For all the FA you MUST load modprobe ipip. BEFORE
running dynfad. CHANGE FA1, FA2, FA3, according to the speed
And cell size values that you chose on EMULATION.C
8. Go to fourth screen and ssh to 192.168.1.2
9. Load dynfad
10. Go to fifth screen and ssh to 192.168.3.2
11. Load dynfad
12. Go to the Mobile Node and load dynmd
13. Load dynfad
14. Now we have three FAs communicating with the HA.
15. you can use dynfa_status at the Foreign AGent
16. you can use dynmn_status at the Mobile Node
17. The screens can be refreshed at t-seconds, see man pages.
18. YOU SHOULD BE ABLE TO BE ASSOCIATED TO ONE OF THE
SSID=RAMON, you should have in your MOBILENODE The
following:
a. iwconfig eth0 essid RAMON
b. Ifconfig eth0 192.168.4.5 255.255.255.0 gw 192.168.4.1
c. You should load dynmnd
d. dynmn_status
19. Once you have confirmed association with AP1 or AP2 or AP3,
we can do the following;
20. Go to emulator screen on ssh:
a. Prepare to run “emulation”
b. You will have 10 seconds to synchronize all the other
nodes, so don’t run to FA1, FA2, FA3.
21. Go to each FA1, FA2, FA3 screens and respectively type FA1,
FA2 and FA3 WITHOUT running the scripts.
12. Hardware Manual, v1.0
22. After you are ready to go on FA1, FA2 and FA3 and the
emulator, YOU can see using --debug, whatever is going on at
the Home Agent.
23. Proceed to go to the MOBILE NODE
a. AT the Mobile Node, ?YOU MUST BE ABLE To
i. Browse
ii. Go to ssh to sand.cise.ufl.edu
iii. Run tcpdump and tcptrace.
READY TO RUN THE EXPERIMENT
Our experiment is useless without data:
- Proceed to find ethereal and be ready with
Tcpdump. (go to the man pages of tcpdump to run it).
A) Go to the emulator ssh screen : RUN EMULATION
B) Go to the FA1, FA2, FA3 ssh screens: Once the counter
has gone from 10 to 9, 8,… 1 run
FA1, FA2 and FA3, simultaneously.
C) You can sit on the mobile node and see how it handoffs
Use dynmn_status for this.
D) You can run an FTP file transfer from MN to SAND or
TAMPA. Simple from the mobile node run any command
Or anything thru RAMON and see how it behaves
While it handoffs from cell to cell.
E) Wait until the emulation has been completed.
F) Grab the file collected with TCPDUMP (a couple of
Megabytes) .You can analyze it with ethereal and gather
time-sequence plots and any other analysis.