[195] in linux-net channel archive

home help back first fref pref prev next nref lref last post

comments/questions on Token Ring

daemon@ATHENA.MIT.EDU (Alvin Starr)
Tue Apr 11 17:20:23 1995

From: Alvin Starr <alvin@eyepoint.com>
To: linux-net@vger.rutgers.edu
Date: 	Tue, 11 Apr 1995 09:31:44 -0400

After a whole lot of fun with getting token ring up and running locally.
I had the unfortunate task of getting TR running over a Netronics router/bridge.
Conciderable time and not a few hairs later I think I have found some points
that may be of use to the rest of the TR users. 
1) The Netronics TokenMaster 4000 seems to not like having the 0x80 bit in the
   source address set if the route is to be handled in a non-source routing
   format. If the 0x80 bit is set the router will not even respond to pings.
2) from one of the people at Netronics it was made quite clear that if the 
   0x80 bit is set then the message is to be source routed independant of
   any information in the rcf field.
3) in tr_source_route I removed the last "trh->saddr[0]|=TR_RII" statement
   and things started to work across teh bridge.


My question is: Am what I am doing and suggesting correct?

Please respond directly I am not a part of this group normaly.

My suggested changes are:
static void tr_source_route(struct trh_hdr *trh,struct device *dev) {

       int i;
       unsigned int hash;
       rif_cache entry;

       /* Broadcasts are single route as stated in RFC 1042 */
       if(!memcmp(&(trh->daddr[0]),&(dev->broadcast[0]),TR_ALEN)) {
               trh->rcf=htons((((sizeof(trh->rcf)) << 8) & TR_RCF_LEN_MASK)
                              | TR_RCF_FRAME2K | TR_RCF_LIMITED_BROADCAST);
               trh->saddr[0]|=TR_RII;
---------------^^^^^^^^^^^^^^^^^^^^^
I am not sure but I think this line should be removed?
       }
       else {
               for(i=0,hash=0;i<TR_ALEN;hash+=trh->daddr[i++]);
               hash&=RIF_TABLE_SIZE-1;
               for(entry=rif_table[hash];entry && memcmp(&(entry->addr[0]),&(trh->daddr[0]),TR_ALEN);entry=entry->next);

               if(entry) {
#if 0
printk("source routing for %02X %02X %02X %02X %02X %02X\n",trh->daddr[0],
                 trh->daddr[1],trh->daddr[2],trh->daddr[3],trh->daddr[4],trh->daddr[5]);
#endif
                       if((ntohs(entry->rcf) & TR_RCF_LEN_MASK) >> 8) {
                               trh->rcf=entry->rcf;
                               memcpy(&trh->rseg[0],&entry->rseg[0],8*sizeof(un
signed short));
                               trh->rcf^=htons(TR_RCF_DIR_BIT);
                               trh->rcf&=htons(0x1fff);        /* Issam Chehab<ichehab@madge1.demon.co.uk> */

                               trh->saddr[0]|=TR_RII;
                               entry->last_used=jiffies;
                       }
               }
               else {
                       trh->rcf=htons((((sizeof(trh->rcf)) << 8) & TR_RCF_LEN_MASK)
                                      | TR_RCF_FRAME2K | TR_RCF_LIMITED_BROADCAST);
                       trh->saddr[0]|=TR_RII;
-----------------------^^^^^^^^^^^^^^^^^^^^^
removing this line seems to make thing work.
               }
       }

}


-- 
Alvin Starr                   ||   voice: (905)513-6717
Eyepoint Inc.                 ||   fax:   (905)513-6718
alvin@eyepoint.com            ||

home help back first fref pref prev next nref lref last post