Subnetting with NicheLite

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Subnetting with NicheLite

1,704件の閲覧回数
Dave_the_K
Contributor I

I'm using the NicheLite networking stack on a Coldfire 52233 processor.

 

If the subnet mask is set to 0.0.0.0, then everything works fine, I can communicate with the Coldfire by adding a route table entry to the workstation.  Coldfire and workstation are on different subnets.

 

However, if I set any subnetmask, and DHCP is not in use, then the device does not respond to pings or any other requests to it.  The ARP who-has/tell communication looks good, but the device won't answer the ping.

 

It seems like the device just won't respond to activity off its subnet, with a subnetmask set.  Other tcp/ip implementations I'm familiar with work fine with just the entry in the workstation routing table.  Is there some reason the NicheLite stack is so picky?

ラベル(1)
0 件の賞賛
返信
4 返答(返信)

831件の閲覧回数
bkatt
Contributor IV

 


Dave_the_K wrote:

I'm using the NicheLite networking stack on a Coldfire 52233 processor.

 

If the subnet mask is set to 0.0.0.0, then everything works fine, I can communicate with the Coldfire by adding a route table entry to the workstation.  Coldfire and workstation are on different subnets.

 

However, if I set any subnetmask, and DHCP is not in use, then the device does not respond to pings or any other requests to it.  The ARP who-has/tell communication looks good, but the device won't answer the ping.

 

It seems like the device just won't respond to activity off its subnet, with a subnetmask set.  Other tcp/ip implementations I'm familiar with work fine with just the entry in the workstation routing table.  Is there some reason the NicheLite stack is so picky?


 

 

When you use DHCP, it automatically gets a default gateway. Otherwise, there is no default gateway, thus no place to send to destinations outside the subnet.

 

If you can arrange to set a default gateway any time you set a subnet mask, that should fix it without changing the code. Note that setting an IP via the console interface sets a non-zero mask according to the old class A/B/C rules, but leaves the gateway alone.

 

Otherwise, you could change the code to recognize default gateway 0 as a special case, and attempt to route through arp anyway instead of dropping the packet (this is all in the arp module).

 

0 件の賞賛
返信

831件の閲覧回数
Dave_the_K
Contributor I

Bkatt,

 

Thanks for the quick reply.  I'm away from the system for the weekend.  However, I had previously tried setting a gateway address on the Coldfire's subnet, along with a mask.  I saw no attempt at communication with the gateway.

 

It just seems strange that the Coldfire responds to the ARP who-has/tell packet appropriately, but won't respond to the ping request.  Other products I've tested do work when configured the same way.  Perhaps NicheLite doesn't intend to support subnetting as delivered?  I'm just taking over this project from somebody else, not familiar with all the background.

 

I haven't found much discussion on the net on the subject, just a development board using NicheLite that says a fixed IP must be on the same subnet as the workstation.  Seems overly restrictive to me.

 

Dave

0 件の賞賛
返信

831件の閲覧回数
bkatt
Contributor IV

 


...

However, I had previously tried setting a gateway address on the Coldfire's subnet, along with a mask.  I saw no attempt at communication with the gateway.

 ,,,


 

 

I think you are mistaken about that. The code in queation is actually at the start of the ip_write() function in the m_ip module. You could get what you want by simply adding "else firsthop = p->fhost;" in place of the error phrase, but I would call that an enhancement, not a bug fix.

 

The main flaw in this area is that there is no easy way to configure the default gateway (or a non-standard mask) unless DHCP is used.

 

There are serious problems with the way broadcasts are handled, resulting in only the all-bits set broadcast working as a side effect of buggy code that fails to handle the subnet broadcast.

 

0 件の賞賛
返信

831件の閲覧回数
Dave_the_K
Contributor I

 


 

bkatt wrote:

 

> You could get what you want by simply adding "else firsthop = p->fhost;" in place of the error

> phrase,  but I would call that an enhancement, not a bug fix.

 

 

That code change did change the behavior as expected, but routing with a router is still dead, with or without DHCP turned on.  The comment at the top of the file, "no real routing", says a lot, I had more expectations for NicheLite than it's going to deliver.  I'm going to drop back, document the limitation to the end users, and maybe lock out the ability for them to set a subnetmask and gateway.

 

 

0 件の賞賛
返信