Network configuration

To configure the network connection, after you've verified that is not already activated automatically, is relevant to know the type of network yo're using, due to the variety of mode of connection offered by the ISPs.(Internet Service Providers).

LAN Connection
In that type the computer is connected to a local net regardless of the fact that in that network there is or not an internet access point.

Under that category there are:
 * Network access via Ethernet cable or Wireless to a local network where there is a DHCP server that provide a default gateway to exit on the Internet (for example FastWeb);
 * A connection to a ADSL router that provide a Ethernet o Wireless interface and that provide internally the support to the protocoll PPP over Ethernet;
 * A generic connection to a local network una qualunque connessione ad una rete locale di computer isolate from other networks.

Ethernet
The network interfaces detected by the system are preconfigured to obtain an IP address from a DHCP server. That configuration is enough as often as not of the situation. To configure a static IP address, the default gateway, the routing table and other network settings, click on openmamba control center, the choose network, and Configure. On the window that shows up you can choose every network interface and configure it. (tipically the network interface is called eth0)

Wireless
To configure the Wireless network the system has to know:


 * The network identify code (ESSID)
 * A pre-shared key (PSK)

To input that information click on Openmamba control center, choose Network, then click on Configure. Select the Wireless interface (tipically wlan0, wifi0 or ath0) and input the correct ESSID and WEP Key values.

Note: the WPA and WPA2 autentication mode is not actually supported by the system, but with the wpa_supplicant tool is possible to activate a connection of that type via command line. At the moment is advised to configure the Wireless card to do a WEP autentication and wait that the PSK and PSK2 support become available in openmamba

Due to the big variety of devices available, is possible that the wireless device is not recognized by the system. In that case is possible to use the ndiswrapper and the Microsoft Windows driver; the configuration il possible via the Openmamba menu -> Settings -> Windows wireless drivers. Major info are available looking the list available on the ndiswrapper site.

Configure the WPA-PSK with static IP on openmamba
Assuming that your wireless device is perfectly working both with native driver or with ndiswrapper.

First of all we need the wpa_supplicant installed in the system. To do that use synaptic or the command:

sudo apt-get install wpa_supplicant

Now with the command

wpa_passphrase "youressid" "router_key"

we obtain the psk key that we've to write in the  file /etc/wpa_supplicant.conf.

With a text editor make, as root, the file /etc/wpa_supplicant.conf as following:

ctrl_interface=/var/run/wpa_supplicant ap_scan=1

network={ ssid="youressid" #psk="router-key" psk=psk_key_obtained_from_the_command_wpa_passphrase key_mgmt=WPA-PSK pairwise=TKIP group=TKIP proto=WPA }

now, from the console and as root, we can end the setup of the wlan0 device, for example the router has the IP address 192.168.1.1, then we give to the wireless device an IP address, for example 192.168.2.1:

ifconfig wlan0 192.168.1.2 netmask 255.255.255.0

Now we link the router to wlan0:

route add default gw 192.168.1.1

and finally we launch the wpa_supplicant and consequently the wpa with:

wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -dd -B

if is all ok, now you can ping the router with: ping 192.168.1.1

and surf the internet; the command: iwlist wlan0 scan

will return the output of all the conenction setup.

To stop the connection you've to write: ifconfig wlan0 down

to restart it: ifconfig wlan0 up

Optionally to avoid the fact of writing all the command in the console every time, you can write a script that automatically launch the connection, that's the simply script that is used by me, and that is called wpa_start.sh; to launch it just write as root in the console: sh wpa_start.sh

Remember to make in executable with chmod a+x wpa_start.sh. That's the script:

#!/bin/sh

ifconfig wlan0 192.168.1.2 netmask 255.255.255.0 route add default gw 192.168.1.1 wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -dd -B

Note: You'ce to check that the provider DNS are in the /etc/resolv.conf file, or you can ping the router but you can't surf the internet.

WAN Connection
Under that case there are the connections between 2 or more points geographically far away, as:


 * ADSL connection via ADSL modem (with USB or Ethernet interface);
 * Dial-Up connection via analogic telephonic line using an analogic modem (maximum speed 56 Kbps);
 * ISDN Dial-Up connection with an ISDN modem (maximum speed 64 Kbps).

All that type of connections requires the configuration on the computer to wich is connected the WAN device, of the PPP protocol (point to point protocol). That protocol has to be configured in different ways to reflect the connection type.

PPP via telephonic line
Questo tipo di collegamento può avvenire:


 * Connecting the computer with the internal modem to the telephonic line using the RJ-11 plug;
 * Connecting an analogic modem or and ISDN modem to the computer serial port (RS232) and to the phone line via the RJ-11 plug.

Setup instruction:
 * 1) start KPPP from the openmamba Menu -> Internet
 * 2) click on Setup
 * 3) click on tab Modem
 * 4) if a modem is not available create a new one using the button New... else go to the next point
 * 5) Select the Modem device: normally the internal modem is identified by  /dev/modem, where the external one is /dev/ttyS0
 * 6) click on tab Modem
 * 7) uncheck the box Wait line tone before compose
 * 8) test the modem clicking on Query Modem
 * 9) If the test is successful click OK to exit, else try other devices or verify that the internal modem driver is available and working with slmodemd or hsfmodem
 * 10) Click on tab Account and Now..., select Manual setup, write your provider name and the phone number
 * 11) The setup is ended. Press OK to exit the setup window
 * 12) insert username and password of your internet connection and press Connect to start the connection

PPP over Ethernet
For that connection you've to use tkpppoe, from the openmamba menu -> Internet -> ADSL. Make a new connection writing username and password and click on Start or Stop to activate and deactivate the connection.

PPP over ATM
That protocol is normally used when you connect via a ADSL modem with USB port. In that case edit the file /etc/ppp/options-atm

and write your user info, for example:

user "silvan@myprovider.it" plugin pppoatm.so 8.35 logfile /var/log/pppd.log noipdefault usepeerdns defaultroute persist noauth nopcomp noccp novj holdoff 5 maxfail 25

Edit also the files

/etc/ppp/pap-secrets

and

/etc/ppp/chap-secrets

with autentication info, for example:

"silvan@myprovider.it"        *       "mypassword"                    *
 * 1) Secrets for authentication using PAP
 * 2) client        server  secret                  IP addresses

To activate the connection go in Openmamba menu -> Internet -> ADSL -> pppoatm start; to deactivate it use pppoatm stop.

Network problem diagnosys
If, after you've followed the instruction, the network don't works, for example using the browser konqueror and/or firefox, go to the page Network problems diagnosys after the setup.