OpenWrt Forum Archive

Topic: Starting from scratch - separating networks, no bridge

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

Hi all!

after having tried a lot of os's (sveasoft, dd-wrt and others) i want to setup a clean OpenWrt system on my WRT54GS and start from scratch. I'm afraid that after all the nvram may be "dirty" and may cause unpredictable results. "nvram show | wc -l" counts more than 900 lines ....

It's anyway a good idea to start from scratch - its a good opportunity to catch on all the correlations in OpenWrt.

After having read lots of faqs and forum-messsages i'm finally somewhat confused how to start.

First question:  How to start from scratch. Is it enough to load OpenWrt and make a 'firstboot' ? Whats about "boot wait" in that case - has it to be set before a 'firstboot' or afterwards? Before rebooting or after rebooting? Is a telnet-capability a build-in in the OpenWrt-baseimage? I don't want to brick my box ....

Second question: i want to separate the WAN/LAN/WIFI-networks. WAN goes dsl, LAN will be the inhouse-network (192.168.22) and WIFI shall have a 10.64.40 segment. How can i set up such a configuration?

Third question: which nvram-variables have to be set AT LEAST?

All these postings and documentation spreaded over the internet -sometimes contradictory-  was simply to much for me ...

Your help is very much appreciated!
Edgar

(Last edited by emax on 28 Apr 2005, 10:38)

Hi,

mtd erase nvram
reboot

will erase the complete nvram - and all important variables are rebuilt with default values (192.168.1.1, etc.) when booting OpenWRT again.

Has worked for me (2x WRT54GSv1.1) - but don't blame me, when you brick your WRT.

HTH and Bye
Daniel

Thanks so far!

That  means: after flashing openwrt, i do not need to worry about boot=wait etc. Just rebooting will do everything necessary?

Could anybody confirm this?

Ok i tried this, and everything is fine.
Did set boot_wait=on after reboot.

I'm still hoping for some help with my

Second question: i want to separate the WAN/LAN/WIFI-networks. WAN goes dsl, LAN will be the inhouse-network (192.168.22) and WIFI shall have a 10.64.40 segment. How can i set up such a configuration?

My guess for the lan-side:

nvram set ....

lan_ipaddr=192.168.22.1
lan_netmask=255.255.255.0
lan_proto=dhcp                              # is that right if i want to dhcp all lan-clients?

lan_ifname= ???
lan_gateway=  ???                        # isnt the router his own gateway: 192.168.22.1 ?
lan_hwnames= ???

Need some help for the '???' - lines ...

(Last edited by emax on 28 Apr 2005, 18:43)

you need to "break the bridge". it's documented in the wiki. break the bridge, then set wifi_ vars for the wireless interface.

in wiki, look in "faq" and "openwrtnvram"

Thanks, i read the faq, but this not clear to me:

@OpenWrt:# nvram set wan_ifname=vlan1
@OpenWrt:# nvram set wan_ipaddr=192.168.0.99
@OpenWrt:# nvram set wan_netmask=255.255.255.0
@OpenWrt:# nvram set wan_proto=static

Why this? Isnt the WAN interface for my dsl-connection? I guess it should be dhcp?

Is there nobody out there who can help me a little?

Breaking the bridge is documented in the faq, yes. But whats about the "wan"-parameters? Am i wrong with my assumption, that these should be used to configure my dsl-connection? When they are set as described in "breaking the bridge", there is nothing that has to do with this ...

after breaking the bridge (either by brctl, or if you want it to be permanent, setting lan_ifname and lan_ifnames) you just have to configure your interfaces.

http://openwrt.org/OpenWrtNVRAM section explains how.

Ok, i followed your advice. Here is my configuration. Can somebody tell me, wether i missed something?

nvram in sorted order:

aa0=3
ag0=255
boardflags2=0
boardflags=0x0388
boardnum=42
boardrev=0x10
boardtype=0x0101
boot_ver=v3.2
boot_wait=on
ccode=0
cctl=0
clkfreq=200
dl_ram_addr=a0001000
et0macaddr=00:12:17:07:BA:27
et0mdcport=0
et0phyaddr=30
gpio2=adm_eecs
gpio3=adm_eesk
gpio5=adm_eedi
gpio6=adm_rc
il0macaddr=00:12:17:07:ba:29

# the inhouse-network: 192.168.37.xxx
lan_ifname=vlan0
lan_ipaddr=192.168.37.250
lan_netmask=255.255.255.0
lan_proto=static

os_flash_addr=bfc40000
os_ram_addr=80001000
pa0b0=0x170c
pa0b1=0xfa24
pa0b2=0xfe70
pa0itssit=62
pa0maxpwr=0x48
pmon_ver=CFE 3.61.13.0
scratch=a0180000
sdram_config=0x0022
sdram_init=0x0008
sdram_ncdl=0x20421
sdram_refresh=0x0000
security_mode=psk
sromrev=2

# where can i get more documentation for "static_route" ?
static_route=10.64.40.0:255.255.255.0:192.168.37.250:1:vlan1
vlan0hwname=et0
vlan0ports=1 2 3 4 5*
vlan1hwname=et0
vlan1ports=0 5
wan_dns=
wan_hostname=w64401a
wan_ifname=vlan1
wan_ipaddr=
wan_netmask=
wan_proto=pppoe
watchdog=5000

# my wireless part shall have netsegment 10.64.40.xxx
wifi_ifname=eth1
wifi_ipaddr=10.64.40.37
wifi_netmask=255.255.255.0
wifi_proto=static

wl0_afterburner=auto
wl0_antdiv=0
wl0_ap_isolate=0
wl0_auth=0
wl0_auth_mode=psk
wl0_bcn=100
wl0_channel=3
wl0_closed=0
wl0_corerev=7
wl0_country=Germany
wl0_country_code=DE
wl0_crypto=tkip
wl0_dtim=1
wl0_frag=2346
wl0_frameburst=off
wl0_gmode=6
wl0_gmode_protection=auto
wl0_hwaddr=00:12:17:07:BA:29
wl0_ifname=eth1
wl0_infra=1

# where will the keys be used? are they psk-relevant?
wl0_key1=
wl0_key2=
wl0_key3=
wl0_key4=
wl0_key=1
wl0_lazywds=0
wl0_maclist=
wl0_macmode=disabled
wl0_mode=sta
wl0_net_mode=mixed
wl0_phytype=g
wl0_phytypes=g
wl0_plcphdr=long
wl0_radio=0
wl0_radioids=BCM2050
wl0_radius_ipaddr=
wl0_radius_key=
wl0_radius_port=1812
wl0_rate=0
wl0_rateset=default
wl0_rts=2347
wl0_ssid=w64401a
wl0_unit=0
wl0_wds=
wl0_wep=disabled
wl0_wpa_gtk_rekey=3600
wl0_wpa_psk=testkey01
wl0gpio2=0
wl0gpio3=0
wl0id=0x4320
wl_country_code=AU

The discussion might have continued from here.