OpenWrt Forum Archive

Topic: Totally Newbie: Problems with basic network setup

The content of this topic has been archived on 26 Feb 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello all,

i got some problem with my kamikaze installation. setup is a fonera 2200 connected to a avm fritzbox router via ethernet cable. ping to the fritzbox router is working but i do not get any connection to the outside world (neither www.google.de or its equivalent ip address is working).

this is my setup in etc/config/network

config interface loopback
        option ifname   lo
        option proto    static
        option ipaddr   127.0.0.1
        option netmask  255.0.0.0

config interface lan
        option ifname   eth0
        option proto    'static'
        option ipaddr   '192.168.1.23'
        option netmask  '255.255.255.0'
        option gateway  '192.168.1.1'
        option dns      '62.53.236.164'

before that i also tried to use my gateway (avm fritzbox) as dns server, without any positive results. im pretty sure that im just not familiar with the absolut basics of the setup. i read a lot of pages and howtos without getting any further hint to my problem.

hopefully someone of you is able to help me


regards
uli

I take it you can connect your laptop to your FRITZ!Box and successfully browse the internet.  Please confirm.

From the looks of your /etc/config/network file you have no WAN setting.

Did you try using the default /etc/config/network file with your FRITZ!Box using dhcp to serve LAN client connections, ie. making sure the FRITZ!Box is set up to give out IP addresses using dhcp and just plugging in the La Fonera 2200?  You may need to change the WAN interface settings to get this to work.  I'd suggest getting a connection to your FRITZ!Box with dhcp working first and then try changing to a static IP.

btw, in case you haven't done it already, if you're going to change OpenWRT's default config files, make sure you back them up first before you make your changes.  Either that or just comment out ("#") the lines you don't want rather than deleting them completely.

surely just changing lan to wan should make this work...
ie
config interface wan
        option ifname   eth0
        option proto    'static'
        option ipaddr   '192.168.1.23'
        option netmask  '255.255.255.0'
        option gateway  '192.168.1.1'
        option dns      '62.53.236.164'

Yeah, that should work.  I was at work so I couldn't check my /etc/config/network script - although he might want to change

option dns '62.53.236.164'

to

option dns 192.168.1.1

as I had problems with specifying the dns IP I got from my ISP in /etc/config/network.

While he's at it, he may want to remove the ' marks around the IP address (I'm not sure if they make a difference, I've just never seen them before).

Thank you all for your answers. The marks came with the installation. Means they were already there. I just changed ip from 192.168.1.1 to 192.168.1.23.
I got one more question, if i change "config interface lan" to "config interface wan" will i still be able to connect to the fonera via ssh on 192.168.1.23?

thank you all!!!

Not as far as I understand it.
You will need to set up both a config interface WAN and a config interface LAN.
The config interface WAN will be your La Fonera's interface with you FRITZ!Box.
The config interface LAN will be your La Fonera's interface with your laptop/desktop/whatever PC is attached to your La Fonera.
fwiw, here is my /etc/config/network (I have a Broadcom-powered WRT54GL, not a La Fonera, so your default /etc/config/network may be different):

root@kamikaze:~# cat /etc/config/network
#### VLAN configuration 
config switch eth0
        option vlan0    "0 1 2 3 5*"
        option vlan1    "4 5"

#### Loopback configuration
config interface loopback
        option ifname   "lo"
        option proto    static
        option ipaddr   127.0.0.1
        option netmask  255.0.0.0

#### LAN configuration
config interface lan
        option type     bridge
        option ifname   "eth0.0"
        option proto    static
        option ipaddr   192.168.1.1
        option netmask  255.255.255.0

#### WAN configuration
config interface        wan
        option ifname   "eth0.1"
#       option proto    dhcp
        option proto    static
        option ipaddr   192.168.0.7
        option netmask  255.255.255.0
        option gateway  192.168.0.1
        option dns      192.168.0.1
root@kamikaze:~#

From my laptop, I ssh into my WRT54GL on 192.168.1.1.
My WRT54GL is attached to my Netgear D834GT modem/router on 192.168.0.7 (I've set up the Netgear to give the WRT54GL a fixed IP of 192.168.0.7).
The DNS of 192.168.0.1 is my Netgear's DNS (my Netgear then DNSes to my ISP's DNS on a static IP I have with my ISP).
Hope that helps.

(Last edited by Shagbag on 26 Mar 2008, 09:39)

The discussion might have continued from here.