Код: Выделить всё
root@OpenWrt:/# ping ya.ru
PING ya.ru (87.250.251.3): 56 data bytes
64 bytes from 87.250.251.3: seq=0 ttl=56 time=35.407 ms
64 bytes from 87.250.251.3: seq=1 ttl=56 time=34.511 ms
64 bytes from 87.250.251.3: seq=2 ttl=56 time=34.001 ms
^C
--- ya.ru ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 34.001/34.639/35.407 ms
root@OpenWrt:/# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
81.30.199.94 10.161.158.1 255.255.255.255 UGH 0 0 0 eth0.1
10.8.0.1 10.161.158.1 255.255.255.255 UGH 0 0 0 eth0.1
81.30.199.5 10.161.158.1 255.255.255.255 UGH 0 0 0 eth0.1
92.50.189.132 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 br-lan
10.161.158.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0.1
0.0.0.0 92.50.189.132 0.0.0.0 UG 0 0 0 ppp0
root@OpenWrt:/# ifconfig
br-lan Link encap:Ethernet HWaddr 1C:AF:F7:2C:EF:7E
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:489 errors:0 dropped:0 overruns:0 frame:0
TX packets:243 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:33954 (33.1 KiB) TX bytes:20991 (20.4 KiB)
eth0 Link encap:Ethernet HWaddr 1C:AF:F7:2C:EF:80
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:517 errors:0 dropped:0 overruns:0 frame:0
TX packets:419 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:44998 (43.9 KiB) TX bytes:39799 (38.8 KiB)
Interrupt:4
eth0.0 Link encap:Ethernet HWaddr 1C:AF:F7:2C:EF:80
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:263 errors:0 dropped:0 overruns:0 frame:0
TX packets:202 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:18688 (18.2 KiB) TX bytes:20785 (20.2 KiB)
eth0.1 Link encap:Ethernet HWaddr 1C:AF:F7:2C:EF:80
inet addr:10.161.158.57 Bcast:10.161.158.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:253 errors:0 dropped:0 overruns:0 frame:0
TX packets:217 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:16958 (16.5 KiB) TX bytes:16187 (15.8 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:904 (904.0 B) TX bytes:904 (904.0 B)
mon.wlan0 Link encap:UNSPEC HWaddr 1C-AF-F7-2C-EF-7E-00-00-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:28 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1889 (1.8 KiB) TX bytes:0 (0.0 B)
ppp0 Link encap:Point-to-Point Protocol
inet addr:94.41.221.148 P-t-P:92.50.189.132 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1460 Metric:1
RX packets:7 errors:0 dropped:0 overruns:0 frame:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:292 (292.0 B) TX bytes:402 (402.0 B)
wlan0 Link encap:Ethernet HWaddr 1C:AF:F7:2C:EF:7E
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:224 errors:0 dropped:0 overruns:0 frame:0
TX packets:191 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:19442 (18.9 KiB) TX bytes:26137 (25.5 KiB)
root@OpenWrt:/# cat /etc/config/network
#### VLAN configuration
config switch eth0
option enable 1
config switch_vlan eth0_0
option device "eth0"
option vlan 0
option ports "1 2 3 4 5"
config switch_vlan eth0_1
option device "eth0"
option vlan 1
option ports "0 5"
#### Loopback configuration
config interface loopback
option ifname "lo"
option proto static
option ipaddr 127.0.0.1
option netmask 255.0.0.0
#### LAN configuration
config interface lan
option type bridge
option ifname "eth0.0"
option proto static
option ipaddr 192.168.1.1
option netmask 255.255.255.0
#### WAN configuration
config interface wan
option ifname "eth0.1"
option proto dhcp
root@OpenWrt:/# cat /etc/config/wireless
config wifi-device radio0
option type mac80211
option channel 7
option macaddr 1c:af:f7:2c:ef:7e
option hwmode 11g
# REMOVE THIS LINE TO ENABLE WIFI:
#option disabled 1
config wifi-iface
option device radio0
option network lan
option mode ap
option ssid OpenWrt
option encryption none