[openwrt]网络配置

时间:2022-01-16 04:52:19

Network:

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

config globals 'globals'
    option ula_prefix 'fd2d:2d66:2d0c::/48'

config interface 'lan'
    option force_link '1'
    option type 'bridge'
    option proto 'static'
    option ipaddr '192.168.1.1'
    option netmask '255.255.255.0'
    option ip6assign '60'
#    option _orig_ifname 'eth1'
#    option _orig_bridge 'true'
    option ifname 'eth1'

config interface 'wan'
    option ifname 'eth0'
    option proto 'dhcp'

config interface 'wan6'
    option ifname '@wan'
    option proto 'dhcpv6'

config interface 'HP_TencentG'
    option proto 'dhcp'
    option hostname 'HPClient'
#    option _orig_ifname 'wlan0'
#    option _orig_bridge 'true'

config interface 'HP_WIFI'
    option proto 'static'
    option ipaddr '192.168.2.2'
    option netmask '255.255.255.0'
#    option _orig_ifname 'wlan0-1'
#    option _orig_bridge 'true'
#    option type 'bridge'
#    option ifname 'eth1'

Wireless

config wifi-device 'radio0'
    option type 'mac80211'
    option hwmode '11g'
    option path 'platform/ar933x_wmac'
    option htmode 'HT20'
    option disabled '0'
    option channel '1'
    option txpower '30'
    option country 'US'

config wifi-iface
    option ssid 'Tencent-GuestWiFi'
    option encryption 'psk2'
    option device 'radio0'
    option mode 'sta'
    option bssid '68:BC:0C:F6:58:83'
    option key 'Huoying58'
    option network 'HP_TencentG'

config wifi-iface
    option device 'radio0'
    option mode 'ap'
    option ssid 'HPWIFI'
    option wmm '0'
    option network 'HP_WIFI lan'
#    option network 'HP_WIFI'
    option encryption 'psk2'
    option key 'dapenghuang'