标签:
config interface ‘lan‘ option ifname ‘eth0.1‘ option type ‘bridge‘ option proto ‘static‘ option ipaddr ‘192.168.1.1‘ option netmask ‘255.255.255.0‘ option ip6assign ‘60‘ config interface ‘wan‘ option ifname ‘eth0.2‘ option proto ‘dhcp‘
查看网口信息
[root@OpenWrt]ifconfig br-lan Link encap:Ethernet HWaddr 00:0C:43:76:20:77 inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::20c:43ff:fe76:2077/64 Scope:Link inet6 addr: fd16:4e5b:1ca2::1/60 Scope:Global UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:14 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:1764 (1.7 KiB) eth0 Link encap:Ethernet HWaddr 00:0C:43:76:20:77 inet6 addr: fe80::20c:43ff:fe76:2077/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:10 errors:0 dropped:0 overruns:0 frame:0 TX packets:240 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:786 (786.0 B) TX bytes:89596 (87.4 KiB) Interrupt:3 eth0.1 Link encap:Ethernet HWaddr 00:0C:43:76:20:77 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:5 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:526 (526.0 B) eth0.2 Link encap:Ethernet HWaddr 00:0C:43:76:20:77 inet6 addr: fe80::20c:43ff:fe76:2077/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:226 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:87291 (85.2 KiB)
值得注意的是LAN口名称是‘eth0.1‘,WAN口名称是‘eth0.2‘。这种eth0.x是啥意思呢?
标签:
原文地址:http://www.cnblogs.com/siikee/p/4194259.html