How to setup static ip using USB ethernet under Angstrom(always fail using /etc/init.d/networing restart)

hi,all
   Now my beagleboard has a USB ethernet which has been supported by
kernel(version 2.6.29).
   I got ip via dhcp.
   just
   #vim /etc/network/interfaces
   iface eth0 inet dhcp.

   it works and can access internet.

   but i need to get static ip address. I don't want beagleboard get
different ip every time.

   So I change /etc/network/interface as follows:

   iface eth0 inet static
   address 192.168.1.105
   netmask 255.255.255.0
   gateway 192.168.1.1
   nameserver *.*.*.*

   and vim /etc/resolv.conf
   add a line
   'nameserver *.*.*.*'

   After do '/etc/init.d/networking restart', it does not work. ip
didn't change.

   Any one could give some clue about this?

   Thanks very much

   Best Regards

Alex.

you should be using tabs, try this:

iface eth0 inet static
<tab>address 192.168.1.105
<tab>netmask 255.255.255.0
<tab>gateway 192.168.1.1
<tab>nameserver *.*.*.*

Regards,
Amit Pundir

many thanks
it works well now
tab is important:)

Best Regards
alex

I had a problem with reaching the Internet. I was using DHCP and could
access devices on the LAN. But I could not get through the gateway to
the Internet. If I tried to ping a WAN IP address I got "Network is
unreachable".

So I added just this gateway line to /etc/network/interface

iface eth0 inet dhcp
<tab>gateway 192.168.1.1

then entered:

/etc/init.d/networking restart

and it worked. I could reach the Internet.

It completely ignores what I have set in /etc/network/interfaces.
Check /etc/resolv.conf for the correct DNS server. If not,
echo "nameserver <IPADDRESS> >> /etc/resolv.conf
or better still add the line to /etc/profile so it's permanently set.

Regards
Sid.