Subnet mask, and pinging


#1
  1. Can we use any subnet mask (classless IP) with 5300? Will it be able to compute its network and respond to pings and send data out in case of outbound traffic correctly ? Will the following work without any problem ?

a. IP = 10.10.10.10, Mask 255.255.255.254
b. IP =22.10.10.2 , Mask = 255.255.252.0
c. IP = 10.96.209.18 Mask =255.255.255.224

  1. If Wiznet 5300 always replies for the ping once, and if the rest of the ping times out, then what could be the general causes ?

  2. In one case, I set IP = 10.96.209.10 Mask =255.255.255.224 to my wiznet 5300 (setting works correctly, registers reflect the settings). I connect my laptop to wiznet through a switch or directly, and my laptop IP = 10.96.209.13 Mask =255.255.255.224. Now if I ping, 5300 is unreachable. But If I change my laptop subnet mask to 255.255.255.0, then w5300 pings correctly. what could be the problem?

  3. Is there a possibility that large number of broadcasts arriving at my wiz5300 port overwhelms the chip and makes it behave abnormally? Can this cause the chip to stop responding to pings? Or can there be any other adverse effect?

  4. If I connect wiznet5300 to a dumb switch where multiple neworks are connected without a VLAN (say devices with IPs 192.168.1.x and 192.168.2.x with subnet masks of 255.255.255.0 connected to same dumb unmanaged switch) , then broadcasts from other networks also would reach wiznet chip. Would this cause any confusion / problems ?

  5. If I send a UDP packet to destination IP of 0.0.0.0, will it cause any problems? There is an errata where it says sending data to 0.0.0.0 can cause abnormal behaviour. Is it so? Is it recommended to check the destination IP and make sure that it is not 0.0.0.0?

  6. If gateway address configured in wiz5300 does not exist, then would it cause any issues? wiz5300 will arp for the gateway, and if it doesn’t get a reply, it would not attempt to send the packet, that is all - Is this correct? (we do not face any problems in this case, but the idea is to know if there is something that we should know or take care of). Similarly, if I send UDP data to a non-existing IP in the network, the same should happen, right?

Please reply.


#2
  1. Can we use any subnet mask (classless IP) with 5300?
    ==> Yes, you can. W5300 have some problem of subnetting(For more detail, refer to W5300 errata sheet.)
    But your case is not.

Will it be able to compute its network and respond to pings and send data out in case of outbound traffic correctly ?
==> No problem.

Will the following work without any problem ?
a. IP = 10.10.10.10, Mask 255.255.255.254
b. IP =22.10.10.2 , Mask = 255.255.252.0
c. IP = 10.96.209.18 Mask =255.255.255.224
==>
In case a, It is not impossible, but it is non-sense. Because Available IPs are only both 10.10.10.1 and 10.10.10.255.
In case b, It is possible, Available IPs are 22.10.10.1 ~ 22.10.10.255
In case c. It is possible, Available IPs are 22.10.10.1 ~ 22.10.10.31.

  1. If Wiznet 5300 always replies for the ping once, and if the rest of the ping times out, then what could be the general causes ?
    I don’t know how to test ping where environment.
    If you test it in direct connection(that is, without any switch and hub). It should not be lost.
    If you test it in indirect connection(that is, with any switch and hub). It is likely to be lost.
    Because Ping-request maybe be lost caused by network traffic and vice versa.

  2. In one case, I set IP = 10.96.209.10 Mask =255.255.255.224 to my wiznet 5300
    (setting works correctly, registers reflect the settings).
    I connect my laptop to wiznet through a switch or directly, and my laptop IP = 10.96.209.13 Mask =255.255.255.224.
    Now if I ping, 5300 is unreachable.
    But If I change my laptop subnet mask to 255.255.255.0, then w5300 pings correctly. what could be the problem?
    ==> I tested it same as your IP configuration.
    It was very well work.
    Maybe you mistake?

  3. Is there a possibility that large number of broadcasts arriving at my wiz5300 port overwhelms the chip and makes it behave abnormally?
    ==> If you said what to broadcast on UDP port number, No problem.
    If you said what to broadcast on ethernet port, No problem and don’t care unless you use macraw mode.
    Can this cause the chip to stop responding to pings? Or can there be any other adverse effect?
    ==> If Broadcast traffic is heavy, It maybe be lost for reasons such as the above 2.
    There is no adverse effect.
    If you need the broadcast data, the data maybe dropped by socket buffer full or the heavy traffic.

  4. If I connect wiznet5300 to a dumb switch where multiple neworks are connected without a VLAN (say devices with IPs 192.168.1.x and 192.168.2.x with subnet masks of 255.255.255.0 connected to same dumb unmanaged switch) , then broadcasts from other networks also would reach wiznet chip. Would this cause any confusion / problems ?
    ==> No problem. W5300 discards no need all packet. W5300 can only receive data to be sent to W5300 and broadcasting packet (eg. 255.255.255.255 Broadcast IP). Broadcasting packet is also discard if there is no socket with the same port number.

  5. If I send a UDP packet to destination IP of 0.0.0.0, will it cause any problems? There is an errata where it says sending data to 0.0.0.0 can cause abnormal behaviour. Is it so? Is it recommended to check the destination IP and make sure that it is not 0.0.0.0?
    As you known already, It maybe some problem. If you don’t need send to 0.0.0.0, don’t care. To check 0.0.0.0, compare Sn_DIPR regsiter to 0.0.0.0.

  6. If gateway address configured in wiz5300 does not exist, then would it cause any issues?
    ==> No problem when it communicate the same network within same subnet mask.
    wiz5300 will arp for the gateway, and if it doesn’t get a reply, it would not attempt to send the packet, that is all - Is this correct?
    ==> Yes, correct.
    (we do not face any problems in this case, but the idea is to know if there is something that we should know or take care of).
    ==> It is abnormal case or configuration what you said. I will recommend that you make no abnormal case or configruation.
    Similarly, if I send UDP data to a non-existing IP in the network, the same should happen, right?
    ==> Right. The same as no gateway. Just, ARP-timeout occurrs.

Thank you.


#3

Just want to mention that, I am asking thin in the context of a working product. It works fine with all standard classes of IP addresses, masks and gateways. I can access the card from outside the router, and from internet (from internet by static ip router + port-forwarding). Data also goes out to external network through router and internet, again through port forwarding. Multiple ports are open, and port 80 webserver also works fine. But we find issues in certain network, which we have been testing only of late. Of late, we are testing more of classless networks with subnets etc.


#4

Thanks a lot for for the reply! Appreciate the gesture.

As regards to errata, we will not be trying to connect from a normal node with IP= 0.0.0.0. That case doesn’t arise. But, some times, the gateway entered in w5300 seems to get advertised as having the same mac as w5300, which some one else suggested was because of arp poisoning.

But something seems to be happening. Will post again today. Can I send you my code privately ( :slight_smile: )?


#5

Hi,
It worked well in normal case. I think that you have no problem of your driver source code.
Most of all, You find a abnormal case… If you found, Let me know that more detail.

If you want to send mail, send to support@wiznet.co.kr and it will be forwarded to me.

Thanks.