Network configuration

From ElphelWiki
Revision as of 14:59, 7 May 2008 by Polto (talk | contribs) (Your PC network configuration)
Jump to: navigation, search

Network camera and especially RTP/RTSP network streaming require a proper network configuration. Here is the list of default settings and some hacks you can do.

Elphel 353 network config

Serial Number/Ethernet Address

The ethernet address of the unit is the same as its serial number. The serial number is found on the label on the bottom of the camera. You can also type

ifconfig

on the camera and look on the HWaddr address.

Default config

By default the camera start with preconfigured IP address:

192.168.0.9 netmask 255.255.255.0 broadcast 192.168.0.255 gateway 192.1668.0.15

The default streamer configuration is to multicast on:

232.8.1.33 port 20000

MDI_MODE

By default the camera is configured in auto MDI_MODE, so it can negotiate with the switch or the computer and use both normal and crossover ethernet cables. Sometimes the auto negotiation does not work for some reason, starting from 7.1.7.19 firmware you can set the MDI_MODE manually by adding:

MDI_MODE=mdi

or

MDI_MODE=mdix

or

MDI_MODE=auto

at the end of /etc/conf.d/net.eth0 configuration file.

ipsetd

If a static IP address is needed, e.g. locating the unit or assigning it a temporary address later on intended to be made permanent, it can then be configured by using a combination of ARP and ping command. This is handled by an application called ipsetd that runs as a daemon making it possible during a certain period of time after power up to set the ip address. Note, to do so requires an unique IP address (contact the local network administrator). Once a IP temporary address has been configured the script exits and thus needs to be restarted if the address is to be reconfigured.

ARP and ping from Windows or MS-DOS:

1) Start a DOS prompt window 2) Type the following:

arp -s <IP address> <Ethernet address>
ping -l <length> <IP address>

Example:

arp -s 123.45.67.89 00-40-8c-12-34-56
ping -l 408 123.45.67.89 

ARP and ping from UNIX or GNU/Linux:

1) Start a shell 2) Type the following:

sudo arp -s <IP address> <Ethernet address>
sudo ping -s <length> <IP address>

Example:

arp -s 123.45.67.89 00:40:8c:12:34:56
ping -s 408*) 123.45.67.89

The unit responds to the ping in the examples above if the new address was configured. Note, this method(ARP/ping mehtod above) only sets the IP address temporarily (while the unit is powered). To make the change permanent the ip paramters (IP address, subnet mask and gateway address) must be set in a file on the camera, otherwise the default network settings will be restored again when the board is rebooted and you will have to start all over again.

Your PC network configuration

Your PC/Mac should be configured by default as:

192.168.0.15 netmask 255.255.255.0 broadcast 192.168.0.255

Attention! Check your firewall! Before spending hours trying to understand why multicast does not work check if your firewall do not block it.

You need to add route to the multicast address. Both commands can be resumed like:

sudo ifconfig eth1 192.168.0.15 netmask 255.255.255.0
sudo route add -net 232.0.0.0 netmask 255.0.0.0 dev eth1

This suppose what your camera is connected on eth1. (eth0 is my wifi)

Some special hacks

My wifi network is in 192.168.0.0/24 network

If your internet connection trough wifi is in 192.168.0.0/24 you can connect the camera restricting by the subnetwork.

sudo ifconfig eth1 192.168.0.15 netmask 255.255.255.248
sudo route add -net 232.0.0.0 netmask 255.0.0.0 dev eth1

So my routes are:

192.168.0.8     0.0.0.0         255.255.255.248 U     0      0        0 eth1
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
232.8.1.0       0.0.0.0         255.255.255.0   U     0      0        0 eth1
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0