[BACK to ip page]

FAQ for IP Lab #1

Send questions to Adnan El-Nasan elnasan@rpi.edu



The makefiles don't work on rcs-ibm1.rpi.edu but they work
on rcs-ibm2.rpi.edu.

I think it is because the directory
/usr/local/X11 does not exist on rcs-ibm1.rpi.edu
- Gregory Van Bard <bardg@rpi.edu>



In the FragmentPacketAndSendToDLC function, I do not understand what the variable called dataoffset is.  What do you mean by "app packet"?  I guess you mean the original packet that came from the application layer, input_pdu.  But what is the difference between dataoffset and offset_in_datagram?

The code says:

>>
 dataoffset,    /* offset within app packet for next fragment */
 offset_in_datagram; /* fragment offset to be written in new fragment header */
>>
       /* dataoffset: offset within app packet for next fragment. 16 bits */
          dataoffset = 0;

       /* frag offset in datagram: consider old fragment offset too. 16 bits. */
          offset_in_datagram =  (old_fragoff & IP_FRAGOFF) << 3;

To minimize confusion, the above is the correct code for the
initialization of these two variables - to help you get
started.  Basically dataoffset refers to a running pointer into the
datagram or application packet which is being fragmented. You have to
increment it by the maximum possible fragment size (calculate this from
the MTU size) to get the next chunk of payload to be packaged into the
next fragment.

offset_in_datagram should consider old fragment offset too because you can
fragment an already fragmented datagram further in the middle of the
network. You should not increment it by 1 as you suggest below -- this
variable has the units of "bytes" -- which means that you should increment
it by the appropriate number of bytes you have put into each fragment.


The demo will output the following:
Time:   37.221 ms. Node net2. Received 329 pkts, 1856 fragments. Max
Partially Reass pkts =7
which contains the info needed to do most of the calculations for the
deliverables.

This does not show up in my implementation when I increase the debug level.
Is this something that I need to implement aswell?

I think you need to uncomment the debug statements in the code template
you have - doesnt the lab handout talk about this ? 



For Part 1, frag1.config and frag5.config do not give any output even after increasing the debug level. How do I find the average fragmentation per packet in those cases?

frag1 and frag5 packets do not get fragmented!!!!


Q: I do not have enough diskspace in RCS for executing the program! What should I do?
A: In RCS, set your disk allocation to 10 MB. There will be a charge of  $0.25 per extra MB per month (normal allocation is 5 MB).

Q. I run out of disk space whenever my program dumps core!

use the command
$ ulimit -c 0

Core file size will be limited to 0 bytes.


How do you display back from a remote workstation ?

First on the local workstation type:
xhost [ Remote Hostname ]
Then on the remote workstation type:
setenv DISPLAY [ Local Hostname ]:0.0
This will allow you to display the GUI on you local workstation.

The makefile can not locate X11 in cisePort.h ?

Are you using an AIX machine? Remember to login only to the known AIX machines in RCS (The command uname will give you what OS you are on).
 


How do I capture an image ?

Use the  xv utility.
When the little fish appear click the right mouse button in the window. Then you will see a button on the bottom named "Grab" click that and follow the directions. After clicking Grap use the middle mouse button to draw a rectangle around the area you want to capture.



Am I calculating maxdlen correctly:    maxdlen = (mtu-20)/8;

> No. we do not want to divide the data into 1/8th the mtu size.  We just
> want it to satisfy the constraint that it should be the highest multiple
> of 8 (its lower 3 bits should be 0) less than mtu. This can be done for eg. by
> (mtu-IPMHLEN)&~7



The graphics code:  In ipreass, for example, you have some graphics code that you say should not be removed.  Should this code be in the part of the if statement I create for no reassembly needed?  If so, does it matter where?

You are righ - it should be part of the "no reassebly reqd" part.

In general, keep in mind that we have provided comments almost each and every line of the code at its appropriate position. We basically wrote the code + comments and removed the code ... I would recommend that you do not move the graphics code from its current position and simply "fill in the blanks" for the remaining code. 



Do we ever have to call ipftimer?  If so, when?

No. It is called by a section of code that is transparent to you.
We provided the description for completeness.



What is bcopy?  I can't find it as a standard C command.  I'm guessing it's something like byte copy.

Yes. The order of source/destination in the argument list differs from strcpy(). A man page exists:
Try:

man bcopy


Do all of the given functions get used at one point or another in the code we have to write?

Usually - sometimes it might be transparent to you - like ipftimer. I cant
recall another case ...



It's been a while since I did any serious C coding, so let me know if this is right:  "->" is used for pointers that point to structures, right?

Yes. You might do well to have a C reference book handy.



I hear a lot of people are having trouble with the following error in lab1:

Empty n_pdu
IOT/Abort trap (core dumped)

These answers were sugested by students!!



 My program works perfectly except for one thing: in fmr2 through fmr5,
after around 52 packets have been reconstructed, I get a segmentation
fault and a core dump every time I run it.  I'm wondering if I'm not
releasing some resource that I've overlooked.  In ipfcons, I have at the
end:

/* Release resources in fragment table: ordered list, state variables */

FreeOrderedList(iq->ipf_q);
 

As Ana states below, I forgot state variable:

iq->ipf_state = IPFF_FREE;



 
 

RSVP FAQ - Getting it to run remotely ...

Ports to offcampus AIX and Solaris .


Poor image quality of node2 in the Frag_demo program
 --------  Michael D'Amour <damoum@cs.rpi.edu>
> I have solved the poor image quality of node2 in the Frag_demo program.  I
> tried several things...
>
> I am working from home (with RoadRunner) using both my Linux machine and
> my Win98 machine.
>
> I telnet to the Linux machine and use ssh to login to an IBM AIX
> machine at RPI.  Using eXceed (X-Server for windows) I can bring the
> display to the Win98 machine.  Using this method the node2 appears as a
> red wire mesh of the planet earth.
>
> >From the console of the Linux machine the planet earth on node2 appears as
> a nice blue wire mesh.
>
> I rebooted Win98 machine to Linux.  Nice blue wire mesh.  I decided to
> monkey with the color depth.  Initially it was at 32 bpp yielding blue
> mesh.  Then went down to 8 bpp yielding a perfect planet earth.
>
> It turns out that in Win98 I was running at 24 bpp.
>
> If you are going to qualitatively assess the performance for each of the
> fragX.config make sure that your display is set down to 8 bpp.
>
> For on campus this is probably not an issue as 8 bpp is default on most of
> the UNIX machines.
>
> Hope this helps others, besides myself.  This is good to know for future
> reference & for FAQ as it is a limitation of the Frag_demo application.
>
> -M.D'Amour



I  have problems using ssh version 2
Please do not use ssh version 2.
SSH 1.1 should work
- Shiv

>Try to see if you can get an older version of F-Secure's SSH, or at least not ssh2. Good luck.
> -- Umair Hoodbhoy



 
 
 



I have solved the Firewall connectivity problem  --- Phil Phoenix  pphoenix@together.net

I have solved the firewall connectivity problem. At least for myself here
at IBM Burlington.  Hopefully this info may help the other sites with
firewalls. I was able run Frag_demo with little trouble.

Problem: exporting the DISPLAY does not work. X packets are not allowed to
traverse the firewall.

Solution: encapsulate the X packets with ssh which creates a virtual
tunnel for packets between the client and server.  It does this by
encryping the X packets and returning them allong the same port as the ssh
session. it sets DISPLAY=cortez.sss.rpi:3.0 for example. ("proxy Xserver")

1. install ssh client on an internal machine. (as root)
2. use ssh-keygen to create private/public key pair. (as user)
3. copy the contents of $HOME/.ssh/identity.pub (on local acct) to
$HOME/.ssh/authorized_keys in RCS acct (via rftp)
4. ssh -l <RCSuserName> cortez.sss.rpi.edu   (add -v to debug)

Phil Phoenix  pphoenix@together.net



P. Instructions on how to run the lab if you are using Windows NT
           ---- by Kumar Mani ,  IBM Corporation, Poughkeepsie    kmani@us.ibm.com

S. I got the GUI for Lab 1 working on my PC at IBM Poughkeepsie - perhaps
it will be of use to other students as well.

     To get X Windows DISPLAY (for Lab 1) from RPI rcs machines onto my PC
running Windows95, I did the following things:

     1. Download & install SecureCRT (evaluation, free for 30 days) from
www.vandyke.com
     2. Download & install Starnet X-Win32v4.1.1 (evaluation, free) from
www.starnet.com
     3. Set up SecureCRT to connect to port 22 (ssh) of the desired machine
(rcs.rpi.edu)
     3.1 In the Port Forwarding tab of the Advanced screen in the Session
parameters in SecureCRT, ensure that:
          The local and remote ports are numbered 6000
          The remote server (e.g. rcs AIX machine) IP address (NOT
hostname) is specified.
     4. Start the X-Win32 package
     5. Restart SecureCRT and log into the AIX machine.
     6. Obtain Lab1 as indicated, and start the GUI.

     Hope this helps.

Kumar Mani



Q. Though itseems that most of the remote access problems will be solved with the porting
of the frag demo to RCS, I am still confused as to how I will be able to run
the GUI that requires AIX. I do NOT have access to an AIX machine at IBM since
I work in S/390 (mainframes).
   I don't know if it helps any, but I have Red Hat Linux 5.1 on my home
machine (but only have dial-up access around 28.8k). Please let me know what I
can do to help resolve this situation.
 

The problem is not which version of UNIX you have, but more of whether your firewall allows you to export display. If it does, then it  doesn't matter if your local machine is any flavor of UNIX or any architecture as long as it has X-Windows.

Do you have firewall restrictions to your connection from home? If not, you can ssh to rcs machines and work from there.

IF you do have a firewall from your home connection, so that you can't connect from home either, you will have to get an account on a AIX or Solaris machine at IBM. You can then install the lab in that account and telnet/ssh from your existing machine. There shouldn't be any firewall problems intra-domain and hence you can run the GUI display.

Ken Lerner (klerner@us.ibm.com) at IBM-Poughkeepsie and Eric Johnson <eric.mj.johnson@lmco.com> at Lockheed Martin - Nashua NH have succeeded in using the distribution for their sites. So if you are from the same site, you may ask them any details.


Q. Can I have details of connecting to a remote machine and running the program?

This is information on establishing a connection to the Rensselaer
Computing System (RCS) that will allow students to use X (graphical)
applications from off campus.

In order to use an RCS X application you will need to have a
high speed connection. Generally, Internet speeds are required.

If you have (or can get) the ability to telnet to rcs.rpi.edu
and your system has xhost or ssh programs, you will be able to establish
a connection that will allow you to run X based applications. If you are
not sure if you have access to these programs or if you have internet
access you will need to check with your local system administrators.

If you have a PC that is running an X emulator such as eXceed or
X-Win32. You still need Internet access and eXceed or X-Win32
will allow the X setup.
Using a telephone line and dialing a local ISP will not work.
Your PC needs to be attached  directly to a high speed Internet connection.
If you can telnet directly from your PC to rcs.rpi.edu you will probably be successful.
To try this go to the (using MS windows) Start menu and then to run.
Enter telnet rcs.rpi.edu
and if a connection opens you will need your RCS userid and some setup
instructions which I can provide.

Contact me at valiqp@rpi.edu or
518-276-6723.

If you are using an X capable device here are the instructions for
connecting to rcs.rpi.edu.

Method one - using xhost:
Log onto your local UNIX client and setup xhost in the following
way by entering: xhost +rcs.rpi.edu - there is usually positive notification
about the xhost server being added to the access control list.
The next step is to telnet to rcs.rpi.edu. You will need your
RCS userid and password to log into RCS.

Once logged into RCS you need to tell the RCS remote access machine
where to send the screen images. This is done using the export command:
"export DISPLAY=your_machine_name:0.0"
example: export DISPLAY=consult.its.rpi.edu:0.0 - consult is the name of
a desktop workstation
Now, when a X-based application is started on the RCS remote server
both the server and the client know where to display the images.

Method two - using ssh
ssh is a program that maybe installed on your local system. If so, it
is designed to automatically handle the configuration outlined in method one.

>From your system prompt enter "ssh rcs.rpi.edu" and if should be
prompted for your RCS userid. If the address rcs.rpi.edu does not work
try rcs-ibm.rpi.edu. rcs-ibm is one of the servers in the the
rcs.rpi.edu group. After logging in (contact me is you need your
RCS userid access) you can run any of the RCS X applications.
============
Patrick Valiquette, Academic Computing Services
e-mail - valiqp@rpi.edu, voice (518) 276-6723



Q. How do I get it to run on my own machine (Solaris or AIX )?

Check out http://poisson.ecse.rpi.edu/~amit/ip/lab1-rsvp.html



 
 
 



Amit