Re: How to access a ethernet device behind a ADSL modem?

"Ricardo Raupp" <[email protected]> Fri, 14 Nov 2008 09:37:58 -0200
Newsgroups gmane.comp.hardware.motorola.microcontrollers.coldfire
Message-ID <002c01c9464d$71992da0$c705050a@ricardo>
----- Original Message ----- 
From: "David Brown" <[email protected]>
To: "Ricardo" <[email protected]>
Sent: Monday, October 27, 2008 7:37 AM
Subject: Re: [ColdFire] How to access a ethernet device behind a ADSL modem?

> Ricardo Raupp wrote:
>> Hi Folks
>> I developped a board with ethernet and some relays to home automation.
>> Till now, I know that the only way to connect with this board is:
>> - know the modem IP
>> - set a Port Forwarding (NAT?) feature in the modem web browser.
>> Well, ok...
>> But, imagine the modem has been replaced by a new one....the NAT settings 
>> disappeared !!therefore the board is now unreachable!
>> I read about a  protocol (?) / feature(?) called uPnP : Universal Plug 
>> and Play and I understood the
>> own device connected to a switch could ask for Port Fowarfing.
>> It is a very important feature for people who wants to connect devices 
>> wich are behind switchers / modensa etc..
>>
>> Has anyone done it?
>>
>> Will it be what MSN and others do to be able to receive external 
>> connections?
>>
>
> uPnP is certainly a way for devices to ask a router to enable port 
> forwarding.  However, not every NAT router supports it, and many have it 
> disabled (either by default, or intentionally by the user).  It is an 
> insanely insecure concept which allows any software or hardware to bypass 
> your firewall.  It's a typical MS idea - in order to make it as easy as 
> possible for legitimate software or hardware to open incoming connections 
> (a laudable aim in itself), you allow *any* software or hardware to open 
> incoming connections.
>
> Even if you use uPnP to open connections (or ask users to manually 
> configure a port forward), you also have to consider how you are going to 
> find the modem's IP - try a dynamic dns service.
>
> An alternative is for the board to initiate contact - it could regularly 
> contact a server somewhere looking for new orders.  That way you have no 
> issues regarding connectivity or addressing.  Remember also that there is 
> no need for this communication to follow web-style request then immediate 
> answer - your board could open a connection and leave it open. The server 
> can then send commands as and when it wants to (such as in response to the 
> user connecting to a web interface on the server).  The only two 
> disadvantages here are that open connections require some resources on 
> your server, which could be an issue if you have many thousands of boards 
> installed (consider regular polling, and only hold the connection open if 
> it is needed), and that the user's Internet connection must be open all 
> the time (not a problem for most people).
>

Thanks for your points David
In fact such procedure has the power to help and to "crash" at same sime.
I tried it in some modems and it worked at first time.
In a more sophisticated one I needed to enable de uPNP feature.
Currently I´m using pooling server approaching....works perfectly, despite I 
loose real time action from server to device....I built a commands queue 
scheme into server...
Thanks !
Ricardo Raupp


> ---
> [email protected]              Send a post to the list.
> [email protected]        Join the list.
> [email protected]    Join the list in digest mode.
> [email protected]     Leave the list.
>
>
>
> __________ NOD32 3559 (20081027) Information __________
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
> 

---
[email protected]              Send a post to the list.
[email protected]        Join the list.
[email protected]    Join the list in digest mode.
[email protected]     Leave the list.