Forum

Full Version: Setup Static IP via Config
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
When using XBian Config I can't set up a Static IP, just looking for a little help on what values I should be using. The error I get is after entering these values, I scan and find my Wifi, enter my password (correctly) it restarts my wlan0 and then tires to connect and i get the error 'Failed to connect to WIFI_NAME'.
  • I have version XBian 1.0Beta2
  • I've been trying with both ethernet and USB dongle is plugged in
  • The USB dongle is the only USB device plugged in and it's this device (http://www.jbhifi.com.au/computers/networking/d-link/wireless-n-nano-usb-adapter-sku-50637)
  • Within the config (COnfig > Settings > Network) the options I see are:
    IP Address*:
    Netmask*:
    Gateway*:
    Nameserver*:
    Nameserver*:

    I've been trying various versions of:
    IP Address*: 192.168.1.168
    Netmask*:255.255.255.0
    Gateway*:192.168.1.1 OR 127.0.0.1
    Nameserver*:192.168.1.1 OR [blank] OR [my ISP DNS IP Primary]
    Nameserver*: [blank] OR [my ISP DNS IP Primary]
  • I can't set the static IP via my Router (cheap Netcomm)
  • The output of ifconfig and netstat -nr are below if that helps, I've tweaked some of the details as I wasn't sure if they were sensitive.

Any ideas what I should be settings these values too?
Terminal

Last login: Sat Dec 14 22:20:27 on ttys001
DLDs-MacBook-Pro-3:~ DLD$ ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
options=3<RXCSUM,TXCSUM>
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=2b<RXCSUM,TXCSUM,VLAN_HWTAGGING,TSO4>
ether c7:2a:13:26Big Grin3:a2
media: autoselect (none)
status: inactive
en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether e3:ce:8e:02:e1:5c
inet6 fe80::e6ce:8fff:fe02:e25a%en1 prefixlen 64 scopeid 0x5
inet 192.168.1.168 netmask 0xffffff00 broadcast 192.168.1.255
media: autoselect
status: active
fw0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 4078
lladdr c4:2c:14:ee:ff:83:07:e5
media: autoselect <full-duplex>
status: inactive
p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304
ether 05:cc:8e:02:ee:5b
media: autoselect
status: inactive
Terminal

DLDs-MacBook-Pro-3:~ DLD$ netstat -nr
Routing tables

Internet:
Destination Gateway Flags Refs Use Netif Expire
default 192.168.1.1 UGSc 19 3 en1
127 127.0.0.1 UCS 0 0 lo0
127.0.0.1 127.0.0.1 UH 6 21954 lo0
169.254 link#5 UCS 0 0 en1
192.168.1 link#5 UCS 3 0 en1
192.168.1.1 0:60:64:41:2e:94 UHLWIir 20 2670 en1 1024
192.168.1.2 b8:27:ebBig Grin1:5:c8 UHLWIi 0 7846 en1 1000
192.168.1.168 127.0.0.1 UHS 0 3 lo0
192.168.1.255 ff:ff:ff:ff:ff:ff UHLWbI 0 10 en1

Internet6:
Destination Gateway Flags Netif Expire
::1 link#1 UHL lo0
fe80::%lo0/64 fe80::1%lo0 UcI lo0
fe80::1%lo0 link#1 UHLI lo0
fe80::%en1/64 link#5 UCI en1
fe80::e6cc:8eff:fe03:e25b%en1 e3:ce:8d:2:e1:3a UHLI lo0
ff01::%lo0/32 fe80::1%lo0 UmCI lo0
ff01::%en1/32 link#5 UmCI en1
ff02::%lo0/32 fe80::1%lo0 UmCI lo0
ff02::%en1/32 link#5 UmCI en1
according the output from your macosx

gateway is 192.168.1.1, netmask 255.255.255.0, nameserver 192.168.1.1 (or your isp or 8.8.8.8 or 8.8.4.4).
but why you want to set to your RPI the same ip address as your macos has ? give it something different. like 192.168.1.165 …

can you post your /etc/network/interfaces after edit ?
The easiest way to setup up static ip - is to do it via a ssh shell. Ssh to your RPi run xbian-config and then set the network values there.
(14th Dec, 2013 11:55 PM)mk01 Wrote: [ -> ]according the output from your macosx

gateway is 192.168.1.1, netmask 255.255.255.0, nameserver 192.168.1.1 (or your isp or 8.8.8.8 or 8.8.4.4).
but why you want to set to your RPI the same ip address as your macos has ? give it something different. like 192.168.1.165 …

can you post your /etc/network/interfaces after edit ?

Thanks for the advice, I will try some more combinations. Good pick up with the same IP as Macbook, fortunately, or unfortunately, it was one I tweaked just incase it was sensitive, I haven't actually been trying to set it to the same IP.

Do I need to set both Nameservers? Can I leave them both blank?

I've just changed it trying without the ethernet plugged in and the SSH got stuck on Restarting wlan0, now I can't even get SSH connected without the dongle plugged in and just ethernet:
IP Address*:192.168.1.192
Netmask*:255.255.255.0
Gateway*:192.168.1.1
Nameserver*:8.8.8.8
Nameserver*:8.8.4.4

(15th Dec, 2013 12:22 AM)IriDium Wrote: [ -> ]The easiest way to setup up static ip - is to do it via a ssh shell. Ssh to your RPi run xbian-config and then set the network values there.
Thanks IriDium, this is what I am doing. Just having trouble getting the right value for the 5 fields, and getting it to work.
@DLD as I asked already please post /etc/network/interfaces file
(15th Dec, 2013 11:27 AM)mk01 Wrote: [ -> ]@DLD as I asked already please post /etc/network/interfaces file

Thanks again for the reply mk01. I still haven't been able to get back into it via SSH. I've reinstalled XBian to the SD Card, taken out the USB Dongle and connected it directly via ethernet to the Router, but am still having issues. Hopefully I'll be able to report back soon.

Cheers.
issues having what actually - I mean on top of the first with wifi connect.

There should be no problem with static settings on adapter set "auto" on image.

btw: for network to work you just need IP and correct mask. others are not essentials (but xbian-config requires valid DNS (at least one) and default gw)

and interfaces file is asked again and again because you can report and describe and everything … without interfaces file to look at the other info is just … let's say nothing to review/check.
Reference URL's