Hi,
I have a Qualcomm AP152 reference board, with Openwrt installed, I am unable to get DHCP Client IP address on the WAN interface. I have tried a set static IP address, I can assign IP address, but I am unable to have traffic pass through.
The WAN is on eth0.2, the ISP default gateway is on 192.168.1.1.
Please find the details of the network configuration below:
root@OpenWrt:~# cat /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.1'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.254.1'
option netmask '255.255.255.0'
config interface 'wan'
option ifname 'eth0.2'
option proto 'dhcp'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0t 2 3 4 5'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '0t 1'
root@OpenWrt:~#
root@OpenWrt:~# cat /etc/config/firewall
config defaults
option syn_flood '1'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
option disabled '0'
config zone
option name 'lan'
option network 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
config zone
option name 'wan'
option network 'wan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
config forwarding
option src 'lan'
option dest 'wan'
config rule
option name 'Allow-DHCP-Renew'
option src 'wan'
option proto 'udp'
option dest_port '68'
option target 'ACCEPT'
option family 'ipv4'
config rule
option name 'Allow-Ping'
option src 'wan'
option proto 'icmp'
option icmp_type 'echo-request'
option family 'ipv4'
option target 'ACCEPT'
config rule
option name 'Allow-DHCPv6'
option src 'wan'
option proto 'udp'
option src_ip 'fe80::/10'
option src_port '547'
option dest_ip 'fe80::/10'
option dest_port '546'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-ICMPv6-Input'
option src 'wan'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
list icmp_type 'router-solicitation'
list icmp_type 'neighbour-solicitation'
list icmp_type 'router-advertisement'
list icmp_type 'neighbour-advertisement'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-ICMPv6-Forward'
option src 'wan'
option dest '*'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'
config include
option path '/etc/firewall.user'
config include 'miniupnpd'
option type 'script'
option path '/usr/share/miniupnpd/firewall.include'
option family 'IPv4'
option reload '1'
root@OpenWrt:~#
root@OpenWrt:~# cat /etc/config/dhcp
config dnsmasq
option domainneeded 1
option boguspriv 1
option filterwin2k 0 # enable for dial on demand
option localise_queries 1
option rebind_protection 1 # disable if upstream must serve RFC1918 addresses
option rebind_localhost 1 # enable for RBL checking and similar services
#list rebind_domain example.lan # whitelist RFC1918 responses for domains
option local '/lan/'
option domain 'lan'
option expandhosts 1
option nonegcache 0
option authoritative 1
option readethers 1
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.auto'
#list server '/mycompany.local/1.2.3.4'
#option nonwildcard 1
#list interface br-lan
#list notinterface lo
#list bogusnxdomain '64.94.110.11'
config dhcp lan
option interface lan
option start 100
option limit 150
option leasetime 12h
config dhcp wan
option interface wan
option ignore 1
root@OpenWrt:~#
root@OpenWrt:~# swconfig list; swconfig dev switch0 show
swconfig dev [port |vlan ] (help|set |get |load |show)
Global attributes:
enable_vlan: 1
max_frame_size: 1528
dump_arl: MAC: e0:cc:7a:68:f0:03 PORTMAP: 0x08
MAC: d4:25:8b:99:7c:f3 PORTMAP: 0x08
MAC: a4:4c:c8:6c:cd:9c PORTMAP: 0x04
MAC: 00:17:7c:9e:48:aa PORTMAP: 0x01
igmp_snooping: ???
Port 0:
mib: Port 0 MIB counters
RxBroad : 70
RxPause : 0
RxMulti : 24
RxFcsErr : 0
RxAlignErr : 0
RxRunt : 0
RxFragment : 0
Rx64Byte : 22
Rx128Byte : 2278
Rx256Byte : 225
Rx512Byte : 46
Rx1024Byte : 87
Rx1518Byte : 69
RxMaxByte : 153
RxTooLong : 0
RxGoodByte : 669780
RxBadByte : 0
RxOverFlow : 0
Filtered : 14
TxBroad : 55
TxPause : 0
TxMulti : 265
TxUnderRun : 0
Tx64Byte : 1
Tx128Byte : 2865
Tx256Byte : 223
Tx512Byte : 25
Tx1024Byte : 251
Tx1518Byte : 6
TxMaxByte : 4
TxOverSize : 0
TxByte : 445654
TxCollision : 0
TxAbortCol : 0
TxMultiCol : 0
TxSingleCol : 0
TxExcDefer : 0
TxDefer : 0
TxLateCol : 0
pvid: 0
link: port:0 link:up speed:1000baseT full-duplex txflow rxflow
Port 1:
mib: Port 1 MIB counters
RxBroad : 0
RxPause : 0
RxMulti : 0
RxFcsErr : 0
RxAlignErr : 0
RxRunt : 0
RxFragment : 0
Rx64Byte : 0
Rx128Byte : 0
Rx256Byte : 0
Rx512Byte : 0
Rx1024Byte : 0
Rx1518Byte : 0
RxMaxByte : 0
RxTooLong : 0
RxGoodByte : 0
RxBadByte : 0
RxOverFlow : 0
Filtered : 0
TxBroad : 0
TxPause : 0
TxMulti : 0
TxUnderRun : 0
Tx64Byte : 0
Tx128Byte : 0
Tx256Byte : 0
Tx512Byte : 0
Tx1024Byte : 0
Tx1518Byte : 0
TxMaxByte : 0
TxOverSize : 0
TxByte : 0
TxCollision : 0
TxAbortCol : 0
TxMultiCol : 0
TxSingleCol : 0
TxExcDefer : 0
TxDefer : 0
TxLateCol : 0
pvid: 2
link: port:1 link:down
Port 2:
mib: Port 2 MIB counters
RxBroad : 39
RxPause : 0
RxMulti : 180
RxFcsErr : 0
RxAlignErr : 0
RxRunt : 0
RxFragment : 0
Rx64Byte : 52
Rx128Byte : 2822
Rx256Byte : 134
Rx512Byte : 16
Rx1024Byte : 250
Rx1518Byte : 10
RxMaxByte : 0
RxTooLong : 0
RxGoodByte : 415268
RxBadByte : 0
RxOverFlow : 0
Filtered : 39
TxBroad : 89
TxPause : 0
TxMulti : 90
TxUnderRun : 0
Tx64Byte : 56
Tx128Byte : 2292
Tx256Byte : 313
Tx512Byte : 35
Tx1024Byte : 92
Tx1518Byte : 222
TxMaxByte : 0
TxOverSize : 0
TxByte : 679576
TxCollision : 0
TxAbortCol : 0
TxMultiCol : 0
TxSingleCol : 0
TxExcDefer : 0
TxDefer : 0
TxLateCol : 0
pvid: 1
link: port:2 link:up speed:1000baseT full-duplex auto
Port 3:
mib: Port 3 MIB counters
RxBroad : 22
RxPause : 0
RxMulti : 118
RxFcsErr : 0
RxAlignErr : 0
RxRunt : 0
RxFragment : 0
Rx64Byte : 48
Rx128Byte : 30
Rx256Byte : 105
Rx512Byte : 0
Rx1024Byte : 14
Rx1518Byte : 0
RxMaxByte : 0
RxTooLong : 0
RxGoodByte : 33738
RxBadByte : 0
RxOverFlow : 0
Filtered : 1
TxBroad : 50
TxPause : 0
TxMulti : 97
TxUnderRun : 0
Tx64Byte : 19
Tx128Byte : 51
Tx256Byte : 81
Tx512Byte : 15
Tx1024Byte : 15
Tx1518Byte : 0
TxMaxByte : 0
TxOverSize : 0
TxByte : 38035
TxCollision : 0
TxAbortCol : 0
TxMultiCol : 0
TxSingleCol : 0
TxExcDefer : 0
TxDefer : 0
TxLateCol : 0
pvid: 1
link: port:3 link:up speed:1000baseT full-duplex auto
Port 4:
mib: Port 4 MIB counters
RxBroad : 0
RxPause : 0
RxMulti : 0
RxFcsErr : 0
RxAlignErr : 0
RxRunt : 0
RxFragment : 0
Rx64Byte : 0
Rx128Byte : 0
Rx256Byte : 0
Rx512Byte : 0
Rx1024Byte : 0
Rx1518Byte : 0
RxMaxByte : 0
RxTooLong : 0
RxGoodByte : 0
RxBadByte : 0
RxOverFlow : 0
Filtered : 0
TxBroad : 0
TxPause : 0
TxMulti : 0
TxUnderRun : 0
Tx64Byte : 0
Tx128Byte : 0
Tx256Byte : 0
Tx512Byte : 0
Tx1024Byte : 0
Tx1518Byte : 0
TxMaxByte : 0
TxOverSize : 0
TxByte : 0
TxCollision : 0
TxAbortCol : 0
TxMultiCol : 0
TxSingleCol : 0
TxExcDefer : 0
TxDefer : 0
TxLateCol : 0
pvid: 1
link: port:4 link:down
Port 5:
mib: Port 5 MIB counters
RxBroad : 0
RxPause : 0
RxMulti : 0
RxFcsErr : 0
RxAlignErr : 0
RxRunt : 0
RxFragment : 0
Rx64Byte : 0
Rx128Byte : 0
Rx256Byte : 0
Rx512Byte : 0
Rx1024Byte : 0
Rx1518Byte : 0
RxMaxByte : 0
RxTooLong : 0
RxGoodByte : 0
RxBadByte : 0
RxOverFlow : 0
Filtered : 0
TxBroad : 0
TxPause : 0
TxMulti : 0
TxUnderRun : 0
Tx64Byte : 0
Tx128Byte : 0
Tx256Byte : 0
Tx512Byte : 0
Tx1024Byte : 0
Tx1518Byte : 0
TxMaxByte : 0
TxOverSize : 0
TxByte : 0
TxCollision : 0
TxAbortCol : 0
TxMultiCol : 0
TxSingleCol : 0
TxExcDefer : 0
TxDefer : 0
TxLateCol : 0
pvid: 1
link: port:5 link:down
Port 6:
mib: Port 6 MIB counters
RxBroad : 0
RxPause : 0
RxMulti : 0
RxFcsErr : 0
RxAlignErr : 0
RxRunt : 0
RxFragment : 0
Rx64Byte : 0
Rx128Byte : 0
Rx256Byte : 0
Rx512Byte : 0
Rx1024Byte : 0
Rx1518Byte : 0
RxMaxByte : 0
RxTooLong : 0
RxGoodByte : 0
RxBadByte : 0
RxOverFlow : 0
Filtered : 0
TxBroad : 0
TxPause : 0
TxMulti : 0
TxUnderRun : 0
Tx64Byte : 0
Tx128Byte : 0
Tx256Byte : 0
Tx512Byte : 0
Tx1024Byte : 0
Tx1518Byte : 0
TxMaxByte : 0
TxOverSize : 0
TxByte : 0
TxCollision : 0
TxAbortCol : 0
TxMultiCol : 0
TxSingleCol : 0
TxExcDefer : 0
TxDefer : 0
TxLateCol : 0
pvid: 0
link: port:6 link:up speed:1000baseT full-duplex
VLAN 1:
vid: 1
ports: 0t 2 3 4 5
VLAN 2:
vid: 2
ports: 0t 1
root@OpenWrt:~#