bridge pppoe openwrt

860阅读 0评论2017-05-10 sometimeixpub
分类:LINUX

使用vim编辑器编辑/etc/config/network. 命令如下:

 

  1. vim /etc/config/network  

 

  1. config interface 'loopback'  
  2.         option ifname 'lo'  
  3.         option proto 'static'  
  4.         option ipaddr '127.0.0.1'  
  5.         option netmask '255.0.0.0'  
  6.   
  7. config interface 'lan'  
  8. #       option ifname 'eth0'  
  9.         option type 'bridge'  
  10.         option proto 'static'  
  11.         option ipaddr '192.168.1.1'  
  12.         option netmask '255.255.255.0'  
  13.   
  14. config interface 'wan'  
  15.         option ifname 'eth0'  
  16.         option proto  'pppoe'  
  17.         option username '宽带账号'  
  18.         option password '宽带密码'  


在这里你要自己注释掉lan中对于eth0的声明。然后在自行定义一个wan,作为上行的通道。

 

配置完毕之后进行无线WIFI的配置。

 

  1. vim /etc/config/wireless  
  1. config wifi-device  radio0  
  2.         option type     mac80211  
  3.         option channel  11  
  4.         option hwmode   11ng  
  5.         option path     'platform/ar933x_wmac'  
  6.         option htmode   HT20  
  7.         list ht_capab   SHORT-GI-20  
  8.         list ht_capab   SHORT-GI-40  
  9.         list ht_capab   RX-STBC1  
  10.         list ht_capab   DSSS_CCK-40  
  11.         # REMOVE THIS LINE TO ENABLE WIFI:  
  12. #       option disabled 1  
  13.   
  14. config wifi-iface  
  15.         option device   radio0  
  16.         option network  lan  
  17.         option mode     ap  
  18.         option ssid     xxxxxxxWIFI名称  
  19.         option encryption psk2  
  20.         option key      xxxxxxxxx密码  

在wifi的配置界面我们首先要注释掉对wifi禁用的功能--option disabled 1

上一篇:busybox mdev使用 自动创建设备节点
下一篇:LVS集群DR模式下arp_ignore和arp_annonuce参数配置的含义