With the setup I have now, thanks to PSherman, DHCP is working to give out the correct address ranges for four vlans. I'm using an MR8300 as router with a cell modem upstream set to bridge mode, so it passes an ip to the openwrt MR8300. I'm confused about how the default gateway got set with four vlans vlan10 192.168.10.x vlan20 192.168.20.x, etc.
Somehow 192.168.10.1 is pingable even though it does not have a dhcp lease.
Also address from the cell modem upstream are pingable, and I had thought with bridge mode that ip addr would be the default gateway, but maybe it's 192.168.10.1
From openwrt MR8300
# ip addr show
.
.
7: wan@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
link/ether xxxxx brd ff:ff:ff:ff:ff:ff
inet 10.128.209.108/24 brd 10.128.209.255 scope global wan
wan has a /24 instead of a single address for a gateway...
If I do a traceroute from a computer on the vlan10 192.168.10.x
the first hop is the openwrt MR8300. So that is the gateway, 192.168.10.1, right?
What made 192.168.10.1 the gateway instead of 192.168.20.1?
traceroute openwrt.org
traceroute to openwrt.org (64.226.122.113), 30 hops max, 60 byte packets
1 OpenWrt.lan (192.168.10.1) 0.543 ms 0.670 ms 0.603 ms
2 10.128.209.1 (10.128.209.1) 1.999 ms 1.746 ms 2.251 ms
My /etc/config/network is below:
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 'fdbf:e732:f1cc::/48'
config device
option name 'br-lan'
option type 'bridge'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
config bridge-vlan
option device 'br-lan'
option vlan '10'
list ports 'lan1:u*'
list ports 'lan2:u*'
list ports 'lan3:u*'
config bridge-vlan
option device 'br-lan'
option vlan '20'
list ports 'lan4:t'
config bridge-vlan
option device 'br-lan'
option vlan '30'
list ports 'lan4:t'
config bridge-vlan
option device 'br-lan'
option vlan '60'
list ports 'lan4:t'
config interface 'vlan10'
option device 'br-lan.10'
option proto 'static'
option ipaddr '192.168.10.1'
option netmask '255.255.255.0'
option ip6assign '60'
config interface 'vlan20'
option device 'br-lan.20'
option proto 'static'
option ipaddr '192.168.20.1'
option netmask '255.255.255.0'
config interface 'vlan30'
option device 'br-lan.30'
option proto 'static'
option ipaddr '192.168.30.1'
option netmask '255.255.255.0'
config interface 'vlan60'
option device 'br-lan.60'
option proto 'static'
option ipaddr '192.168.60.1'
option netmask '255.255.255.0'
config device
option name 'lan1'
option macaddr 'xx'
config device
option name 'lan2'
option macaddr 'xx'
config device
option name 'lan3'
option macaddr 'xx'
config device
option name 'lan4'
option macaddr 'xx'
config device
option name 'wan'
option macaddr 'xx'
config interface 'wan'
option device 'wan'
option proto 'dhcp'
config interface 'wan6'
option device 'wan'
option proto 'dhcpv6'