OpenWrt Forum Archive

Topic: Network configuration

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

The network config for Kamikaze/buildroot-ng now relies on configuration files instead of nvram settings. I'm trying to follow the logic from the init scripts to the /etc/config/network file which in turn incoprorates /sbin/ifup, /etc/functions.sh, /lib/network/config.sh, etc etc - and that's all before the hotplug scripts are called - and I'm getting lost! Is there any documentation for the format of the config files? The DEBUG statements don't seem complete which makes it difficult to debug (ifdown is always called without debug, so the interface never comes back up again)
Any help would be appreciated.

(Last edited by hwh on 3 Aug 2006, 09:23)

hwh wrote:

The network config for Kamikaze/buildroot-ng now relies on configuration files instead of nvram settings. I'm trying to follow the logic from the init scripts to the /etc/config/network file which in turn incoprorates /sbin/ifup, /etc/functions.sh, /lib/network/config.sh, etc etc - and that's all before the hotplug scripts are called - and I'm getting lost! Is there any documentation for the format of the config files? The DEBUG statements don't seem complete which makes it difficult to debug (ifdown is always called without debug, so the interface never comes back up again)
Any help would be appreciated.

Your pain is shared.

I just read the new interface scripts and my head REALLY HURTS now.  neutral

JS

I have a netgear wgt634u and used to have the wireless working in client mode with:

/etc/config/network
#### VLAN configuration
vlan0hwname=et0
vlan1hwname=et0
vlan0ports="0 1 2 3 5*"
vlan1ports="4 5"

#### LAN configuration
lan_proto="static"
lan_ifname="br0"
lan_ifnames="vlan0"
lan_ipaddr="192.168.2.98"
lan_netmask="255.255.255.0"
lan_gateway="192.168.2.1"

#### WAN configuration
wan_proto=static
wan_ifname=ath0
wan_ipaddr="192.168.1.2"
wan_netmask="255.255.255.0"
wan_gateway="192.168.1.1"


root@OpenWrt:/# cat /etc/init.d/S70wificlient
#!/bin/sh
wlanconfig ath0 create wlandev wifi0 wlanmode sta
ifconfig ath0 up
iwconfig ath0 essid "linux"



Now the new config uses:

#### VLAN configuration

config switch eth0
        option vlan0    "0 1 2 3 5*"
        option vlan1    "4 5"


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


#### WAN configuration
config interface        wan
        option ifnames  "eth0.1"
        option proto    dhcp


How do I get wireless client mode configured, I've tried many things but nothing seems to work.
I'm sure I'm missing something simple.

Please help.

I have a problem in getting WAN side access to work. Haven't even looked at the wireless side yet.

My router is Buffalo WHR-G54S-2 router, and I'm using buildroot-ng to build the OpenWrt image. From the beginning, LAN side access has been working great. Now I managed to setup the WAN side interface also - with vconfig. ifconfig shows it as interface eth0.1. eth0 is configured with the LAN side IP.

The problem is, when trying to ping a WAN address, the router just keeps sending ARP queries. Seems it just doesn't process the ARP replies (or drops them somewhere along the road). I've tried changing the /proc/sys/net/ipv4/.../arp_ignore values, but that doesn't seem to have any effect.

Ok. Maybe should have read the documentation shipped with buildroot-ng more carefully. By editing the file /etc/config/network according to instructions in /docs/network.txt I seem to have gotten a working WAN/LAN system.

But still it is a bit weird that I couldn't get the same result with vconfig and ifconfig. Anyway, now let's see about WLAN...

The discussion might have continued from here.