network


Nuelectronics Ethernet Shield for Arduino

Connecting Arduino to a network need a bit of hardware - a shield in Arduino terms. http://www.nuelectronics.com/ makes some nice hardware for Arduino, including an ethernet shield. Unfortunately software and libraries that does come with their ethernet shield are weak.

Internet and open source comes to rescue again. Much more useful library can be found at http://blog.thiseldo.co.uk/?cat=14. works much, much better.

Only one big issue - it does not now nothing about MTU. If you want to send data that is longer than MTU (usually 1500 bytes) then you are out of luck.


Multiple internet connections in one box

Sometimes it is needed to have multiple internet connections in one Linux box. To distinguish it from a more common scenario - it means that multiple default routes are specified. Multiple default routes is a bit of a dilemma - default route is loosely defined as 'if everything else fails send packets there'. By definition there can not be two or more last resort options. One of those internet connections therefore should be designed as default, and configured normally, giving it IP address, default gateway and so on. The rest should have its IP addresses configured.

SSH Port Forwarding

It is actually really simple and well documented. You have a host You want to connect to, but it is behind a linux (anything that has ssh server running on should do) box. What You need to run is something like this ssh -L 3387:192.168.0.10:3389 -l user -N ssh_box on Your local client machine. 3387 - local port to use 192.168.0.10 - remote server where that service is running You need to connect to 3389 - the TCP port that remote service is running on user - ssh username of course ssh_box - ssh server Your service is behind of.

SSH Keepalive

Isn't it frustrating when You start up a SSH session and it times out. Usually at the worst possible moment. Using screen is good, but it comes to ones mind always after that dreadful timeout. OpenSSH supports a thng called keepalive - a keepalive packet is sent after a predetermined interval of inactivity so SSH sessions should not time out. Keepalive can be set on server side or client side. Client side is usually better because then all possible connections are kept alive. Client side: edit /etc/ssh/ssh_config and enable