getLMS-Multi-MikroTik-StatsByLMS        syncLMS-Multi-MikroTik-DHCP        syncLMS-Multi-MikroTik-PPPoE        getLMS-Multi-MikroTik-LastOnline       

sieć

 

mikrotik

 

ubiquiti

 

RB333 jako router WiFi

   27-07-2011 20:00:00       Odwiedziny: 1253

    Przyjmujemy, że naszym RouterBOARD`em jest RB333, gdzie wykorzystujemy ether1 jako WAN, ether2 oraz ether3 jako LAN, a wlan1 będzie naszym interfejsem radiowym. Wlan2 oraz wlan3 pozostają nieużywane, wyłączone.

#### Kod: zmiana nazwy interfejsów
############################################################################################

/interface 
set ether1 name=ether1_WAN disabled=no
set wlan1 name=wlan1_wifi disabled=no
#### Kod: tworzenie bridgów
############################################################################################

/interface bridge 
add name=bridge_LAN disabled=no
add name=bridge_WAN disabled=no
#### Kod: dodawanie interfejsów do bridgów
############################################################################################

/interface bridge port 
add interface=ether1_WAN bridge=bridge_WAN disabled=no
add interface=ether2 bridge=bridge_LAN disabled=no
add interface=ether3 bridge=bridge_LAN disabled=no
add interface=wlan1 bridge=bridge_LAN disabled=no
#### Kod: dodawanie adresu IP dla RB333 na LANie (192.168.2.1)
############################################################################################

/ip address
add address=192.168.2.1/24 broadcast=192.168.2.255 disabled=no interface=bridge_LAN \
    network=192.168.2.0 disabled=no
#### Kod: server DHCP
############################################################################################

## póla adresów IP dostępnych przez server DHCP (192.168.2.100-192.168.2.200):
/ip pool
add name=pool_LAN ranges=192.168.2.100-192.168.2.200

## server DHCP:
/ip dhcp-server
add address-pool=pool_LAN bootp-support=static disabled=no interface=bridge_LAN \
    lease-time=1d name=server_LAN disabled=no
/ip dhcp-server network
add address=192.168.2.0/24 dns-server=192.168.2.1 gateway=192.168.2.1 netmask=24 \
    ntp-server=212.244.36.227,212.244.36.228
#### Kod: konfiguracja WANu
############################################################################################

## gdy adres IP jest ustawiany na sztywno (10.0.2.122):
/ip address
add address=10.0.2.122/24 broadcast=10.0.2.255 network=10.0.2.0 interface=bridge_WAN

# dodawanie bramy:
/ip route
add gateway=10.0.2.1 disabled=no

# DNSy:
/ip dns
set allow-remote-requests=yes servers=194.204.152.34,194.204.154.1,8.8.8.8


###### lub


## gdy adres IP jest pobierany automatycznie:
/ip dhcp-client
add interface=bridge_WAN disabled=no

# DNSy:
/ip dns
set allow-remote-requests=yes servers=194.204.152.34,194.204.154.1,8.8.8.8


###### lub


## gdy połączenie nawiązywane jest przez PPPoE, gdzie login: xxxxx i hasło: yyyyyy
/interface pppoe-client
add interface=bridge_WAN user=xxxxx password=yyyyyy disabled=no

# DNSy:
/ip dns
set allow-remote-requests=yes servers=194.204.152.34,194.204.154.1,8.8.8.8
#### Kod: masquerade
############################################################################################

/ip firewall nat
add action=masquerade chain=srcnat disabled=no
#### Kod: WiFi 
############################################################################################

## połączenie bezprzewodowe wykorzystujące szyfrowania WPA PSK oraz WPA2 PSK 
## (klucz: bylejakiehaslo minimum 8-zanków):
/interface wireless security-profiles
add authentication-types=wpa-psk,wpa2-psk group-ciphers=tkip management-protection=allowed \
    mode=dynamic-keys name=profile1_wifi unicast-ciphers=tkip wpa-pre-shared-key="bylejakiehaslo" \
    wpa2-pre-shared-key="bylejakiehaslo"


###### lub


## połączenie bezprzewodowe wykorzystujące szyfrowanie WEP (słabe)
## (klucz: 1234567890 10-zanków od 0-9 i/lub ABCDEF):
/interface wireless security-profiles
add mode=static-keys-required name=profile1_wifi static-algo-0=40bit-wep static-key-0="1234567890"




## konfiguracja interfejsu wlan1_wifi (nazwa sieci: nasze_wifi):
/interface wireless
set wlan1_wifi ack-timeout=dynamic adaptive-noise-immunity=ap-and-client-mode allow-sharedkey=no \
    antenna-gain=0 antenna-mode="ant-a" area="" arp=enabled band="2.4ghz-b" basic-rates-a/g=6Mbps \
    basic-rates-b=1Mbps burst-time=disabled compression=no country=poland \
    default-ap-tx-limit=0 default-authentication="yes" default-client-tx-limit=0 \
    default-forwarding="yes" dfs-mode=none disable-running-check=no disabled=no disconnect-timeout=\
    3s frame-lifetime=0 frequency="2447" frequency-mode=manual-txpower frequency-offset=0 \
    hide-ssid=no hw-fragmentation-threshold=disabled hw-protection-mode=none \
    hw-protection-threshold=0 hw-retries=4 l2mtu=2290 \
    max-station-count=2007 mode="ap-bridge" mtu=1500 name=wlan1_wifi noise-floor-threshold=default \
    on-fail-retry-time=100ms periodic-calibration=default periodic-calibration-interval=60 \
    preamble-mode=both proprietary-extensions=post-2.9.25 rate-set=\
    default scan-list=default security-profile="profile1_wifi" ssid="nasze_wifi" \
    station-bridge-clone-mac=00:00:00:00:00:00 supported-rates-a/g=\
    6Mbps,9Mbps,12Mbps,18Mbps,24Mbps,36Mbps,48Mbps,54Mbps supported-rates-b=\
    1Mbps,2Mbps,5.5Mbps,11Mbps tx-power-mode=default update-stats-interval=10s wds-cost-range=\
    50-150 wds-default-bridge=none wds-default-cost=100 wds-ignore-ssid=no wds-mode=disabled \
    wmm-support=disabled

# Legenda:
## default-authentication=yes - domyślne uwierzytelnianie
## default-forwarding=no - odseparujesz klientów


Copyright seszu © 30.10.2010-2024.