Go Down

Topic: Ethernet shield - webClient example (Read 6 times) previous topic - next topic

Ray Andrews

Yes, but you cannot assume the default subnet is the correct subnet. For instance, I have a fixed range of static IP addresses available, its a class A network, but I cannot use  A workplace network might have multiple departments all running on a 192.168.*.* network, but each department could be limited to 16 or 32 addresses.

Again, you almost always can assume the subnet or gateway, but it shouldn't be coded, it should be up to the programmer to make that assumption


Again, you almost always can assume the subnet or gateway, but it shouldn't be coded

The default netmask is defined by the IPv4 standard.  It can and should be coded.  Every single network capable operating system I have ever encountered allows one to use the default subnet mask.  Why would you remove this from the arduino?

You're on a network that does not use a default netmask; big deal. I've been on a network where the netmask changes depending on which subnet you're on.  If the user is on such a network they will likely be assigned an address anyway (which will come with subnet and router data!), instead of being allowed to run amok and chose an IP configuration by rectal extraction.

The simple fact is that most arduino users will be on a network where the default netmask is correct and the default router is .1.  The arduino is meant to be easy to use.  connect the dots...


Ray Andrews

I'm not in any way suggesting that any functionality be removed.

Again, yes, you can determine the "default" subnet, but that doesn't make it the correct subnet for the programmer/user.  Programming should be a codified set of rules, not assumptions. Carrying the assumption out a little:  Most arduino tinkerers are probably starting out on a home router, most home routers come shipped as 192.168.(1 or 2).1  so should this address be assumed to be the default gateway.

I'm not inferring either that programmers should just randomly choose an IP configuration by "rectal extraction" (I like that one), in fact I'm saying just the opposite, that if the programmer doesn't know the correct settings, then the library should not help him by making assumptions.


Programming should be a codified set of rules, not assumptions.

There are codified assumptions all over the place in the software world.  We call 'em "defaults".

In another thread it looks like the DHCP client is making progress, so hopefully this will all be a moot point soon.



check CIDR!

classless IP is with us.  stop thinking in pure class A B C things.  this isn't 10-15 yrs ago, mate.

I can't believe that this is still an open issue.

you have broken code and proven examples of how it screwed over a user.  you think that's a Good Thing(tm)?

go talk to a routing company and suggest they put dot1 in their last octet as a router.  go see what kind of laughter you get from them.

(I used to work for cisco, juniper and many other networking companies.  and I, too, would laugh in your face if you suggested that dot-1 was anything more than some dumb convention that SOME HOME USERS have.)

this shouldn't even be DEBATED.  its butt-obvious to anyone who plays in the IP world.

I need to step away, again, it seems.  this is too frustrating having to argue about basic IP topology issues to THIS length.

go read a book on ip networking.  see how 'frequent' it is that they recommend you just automatically assume a router's ip address.  show me some citations - if you can find any.

Go Up