Strony

czwartek, 4 kwietnia 2013

OpenWRT WAN as LAN on Asus WL500g Premium v1

Konfiguracja routera Asus WL500g Premium v1 pracującego jako serwer w sieci lokalnej z interfejsami sieciowymi WAN i LAN w trybie bridge oraz wyłączonym WIFI

/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 eth0.1"
        option proto    static
        option ipaddr   192.168.1.100
        option netmask  255.255.255.0
        option dns      192.168.1.1

config route
        option interface lan
        option target   0.0.0.0
        option netmask  0.0.0.0
        option gateway  192.168.1.1
 /etc/config/dhcp
 config dhcp lan
        option interface        lan
        option start    100
        option limit    150
        option leasetime        12h
        option ignore   1
 /etc/config/wireless
 config wifi-device  radio0
        option type     mac80211
        option channel  6
        option macaddr  00:00:00:00:00:00
        option hwmode   11g

        # REMOVE THIS LINE TO ENABLE WIFI:
        option disabled 1
 ifconfig
 br-lan    Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:15066 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18683 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1053743 (1.0 MiB)  TX bytes:20562640 (19.6 MiB)

eth0      Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:15065 errors:0 dropped:0 overruns:0 frame:0
          TX packets:23887 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1385077 (1.3 MiB)  TX bytes:21272740 (20.2 MiB)
          Interrupt:4

eth0.0    Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5200 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:521511 (509.2 KiB)

eth0.1    Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:15066 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18683 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1114007 (1.0 MiB)  TX bytes:20637372 (19.6 MiB)

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:21 errors:0 dropped:0 overruns:0 frame:0
          TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2088 (2.0 KiB)  TX bytes:2088 (2.0 KiB)
 

3 komentarze: