Unable to setup WAN from CLI

Hi,
I am having a bit of problems setting up a new installation.
I am setting on x86_64 (actually a Virtual Machine, it shouldn't matter for my problem but I can provide details if deemed useful) with 3 NICs: LAN, WAN and DMZ.
I changed default address of LAN directly editing /etc/config/network and I'm able to correctly access firewall through ssh.

My current /etc/config/network is:

root@OpenWrt:/# cat /etc/config/network 

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd6a:f194:a931::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.7.253'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option device 'eth1'
        option proto 'static'
        option ipaddr '192.168.2.353'
        option netmask '255.255.255.0'
        option gateway '192.168.2.1'
        option dns '192.168.2.1'

config interface 'wan6'
        option device 'eth1'
        option proto 'dhcpv6'

All other files are at their default value on latest build (i.e.: no editing).

System does not seem to attempt bringing up eth1/wan (which is needed for Internet access).

My current net status is:

root@OpenWrt:/# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br-lan state UP qlen 1000
    link/ether 00:16:3e:21:61:f9 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 00:16:3e:1b:38:11 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::216:3eff:fe1b:3811/64 scope link 
       valid_lft forever preferred_lft forever
4: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:16:3e:63:c2:06 brd ff:ff:ff:ff:ff:ff
5: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 00:16:3e:21:61:f9 brd ff:ff:ff:ff:ff:ff
    inet 192.168.7.253/24 brd 192.168.7.255 scope global br-lan
       valid_lft forever preferred_lft forever
    inet6 fd6a:f194:a931::1/60 scope global noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 fe80::216:3eff:fe21:61f9/64 scope link 
       valid_lft forever preferred_lft forever
root@OpenWrt:/# ip r
192.168.7.0/24 dev br-lan scope link  src 192.168.7.253 

As you see there's no default gateway and no way to access modem/router.

I have a modem/router on 192.168.2.1 with a working (tested) DHCP server (I tried using that but I got no connection, so I tried fixed address with identical results).

Where should I enable eth1?

I was unable to find relevant documentation, any pointer welcome.

... fail ?

2 Likes

Thanks @frolic,
good catch.
I was staring at that file since yesterday and I couldn't see it.

Unfortunately nowI can get an IP address, but it doesn't really seem to work.
I need to cross-check my setup again.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.