路由AP openwrt

路由AP openwrt

我正在尝试使用 Alice Gate2 作为路由客户端,通过以太网为智能电视提供互联网连接。网络拓扑应如下:

互联网-->(有线)-->[R1]---> (无线)----> [R2(openwrt)]--(有线)---> 智能电视

R1 在 192.168.1.0 上,R2 在 192.168.2.0 上

我已按照 wiki 上的指南操作,但我觉得有些地方我遗漏了。我已成功将 R2 连接到 R1 的 wifi AP,但无法从 R2 局域网上的任何主机 ping 192.168.1.1。此外,R2 局域网上的 dhcp 未为我分配 IP。

有人能帮助我了解我所缺少的吗?

配置如下:

/etc/config/网络

config interface 'loopback'
    option ifname 'lo'
    option proto 'static'
    option ipaddr '127.0.0.1'
    option netmask '255.0.0.0'
config switch 'eth1'
    option enable '1'
    option enable_vlan '1'
    option reset '1'
config interface 'lan'
    option ifname 'eth1'
    option force_link '1'
    option type 'bridge'
    option proto 'static'
    option ipaddr '192.168.2.1'
    option netmask '255.255.255.0'
config interface 'wwan'
    option ifname 'wwan'
    option proto 'static'
    option ipaddr '192.168.1.2'
    option gateway '192.168.1.1'
    option dns '8.8.8.8'
    option netmask '255.255.255.0'

/etc/config/无线

config wifi-device 'radio0'
    option type 'mac80211'
    option mode '11'
    option txpower '13'
    option disabled '0'
    option channel '3'
    option macaddr 'xx:xx:xx:xx:xx:xx'
    option hwmode '11g'
config wifi-iface
    option device 'radio0'
    option network 'wwan'
    option ssid 'SSID'
    option encryption 'psk2+aes'
    option mode 'sta'
    option key 'PASSWORD'

/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 0  # disable if upstream must serve RFC1918 address
    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

/etc/config/防火墙

config defaults
    option syn_flood        1
    option input            ACCEPT
    option output           ACCEPT 
    option forward          REJECT
    option disable_ipv6     1
config zone
    option name             lan
    option network          'lan'
    option input            ACCEPT 
    option output           ACCEPT 
    option forward          REJECT

config zone
    option name             wan
    list network wan
    list network wan6
    list network wwan
    option input            REJECT
    option output           ACCEPT 
    option forward          REJECT
    option masq 1
    option mtu_fix
    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 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          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
    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          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

相关内容