Cov txheej txheem:

Fifty Meters Range Wireless Access Point Nrog TP Txuas WN7200ND USB Wireless Adapter ntawm Raspbian Stretch: 6 Kauj Ruam
Fifty Meters Range Wireless Access Point Nrog TP Txuas WN7200ND USB Wireless Adapter ntawm Raspbian Stretch: 6 Kauj Ruam

Video: Fifty Meters Range Wireless Access Point Nrog TP Txuas WN7200ND USB Wireless Adapter ntawm Raspbian Stretch: 6 Kauj Ruam

Video: Fifty Meters Range Wireless Access Point Nrog TP Txuas WN7200ND USB Wireless Adapter ntawm Raspbian Stretch: 6 Kauj Ruam
Video: Night 2024, Kaum ib hlis
Anonim
Fifty Meters Range Wireless Access Point Nrog TP Txuas WN7200ND USB Wireless Adapter ntawm Raspbian Stretch
Fifty Meters Range Wireless Access Point Nrog TP Txuas WN7200ND USB Wireless Adapter ntawm Raspbian Stretch

Raspberry Pi yog qhov zoo los tsim Kev Ruaj Ntseg Wireless Access Points tab sis nws tsis muaj qhov zoo, Kuv tau siv TP Txuas WN7200ND USB Wireless Adapter los txuas ntxiv nws. Kuv xav qhia yuav ua li cas

Vim li cas kuv thiaj xav siv raspberry pi siv lub router?

Cov lus teb yog yooj yim tiag tiag, NTSEEG. Router cov neeg tsim khoom tsuas yog xav muag cov cuab yeej, lawv tsis quav ntsej yog tias muaj qhov tsis raug cai uas yuav cuam tshuam rau koj. Koj raspberry pi yuav hloov kho tshiab nrog thaj ua haujlwm ruaj ntseg kawg.

Kauj Ruam 1: Nruab Raspbian Stretch Lite Image ntawm SD Card

Rub tawm Raspbian los ntawm Rapsberry Pi Rub lub xaib thiab teeb tsa nws ntawm SD Card. Yog tias koj xav tau qhov yooj yim siv Program los ua nws. Kuv pom zoo Etcher.

Txuas TP Txuas WN7200ND Adapter mus rau ib qho ntawm USB chaw nres nkoj, xyuas kom tseeb tias lub hwj chim muab hluav taws xob txaus. Lub zog siv hluav taws xob uas muab 1 Ampere yuav tsum txaus. Lub interface yuav yog wlan1, sab hauv R Pi Wifi adapter yog wlan0.

Kauj ruam 2: Kho DHCP Configuration

Peb tsis xav tau tus IP hloov pauv rau WN7200ND adapter yog li peb yuav tsum hloov kho cov ntaub ntawv teeb tsa ntawm dhcpd. Siv cov ntawv sau kho kom raug kho cov ntaub ntawv teeb tsa /etc/dhcpcd.conf thiab ntxiv kab hauv qab no

tsis lees paub qhov chaw wlan1

Tam sim no peb yuav tsum rov pib dua qhov kev pabcuam DHCP los ntawm kev siv cov lus txib

sudo kev pabcuam dhcpcd rov pib dua

Kauj Ruam 3: Teeb Network Kev Sib Txuas

Ethernet chaw nres nkoj eth0 yuav ua haujlwm ib txwm muaj (Nws yuav tau txais IP chaw nyob zoo thaum koj txuas nws), tab sis peb yuav tsum teeb tsa tus Choj interface br0 uas txuas tus TP Txuas adapter wlan1 thiab Ethernet chaw nres nkoj eth0. Nruab tus choj siv nrog cov lus txib hauv qab no

sudo apt-tau nruab bridge-utils

Teeb cov cuam tshuam los ntawm kev tsim cov ntawv sau tshiab /etc/network/interfaces.d/ap nrog cov ntawv hauv qab no:

pib eth0allow-hotplug eth0 iface eth0 inet phau ntawv pib wlan1 tso cai-hotplug wlan1 iface wlan1 inet phau ntawv ua ntej-kev pabcuam hostapd pib tshaj tawm brctl addif br0 wlan1 pib br0 iface br0 inet dhcp bridge_ports eth0 wlan1

Kauj ruam 4: Nruab thiab teeb Hostapd

Hostapd siv qhov Wireless Access Point. Nruab nws nrog cov lus txib hauv qab no

sudo apt-tau nruab hostapd

Txhawm rau teeb tsa lub chaw nkag peb yuav tsum teeb tsa hostapd. Tsim cov ntawv sau tshiab /etc/hostapd/hostapd.conf nrog cov ntawv hauv qab no:

interface = wlan1 #wlan yog WN7200ND adapterdriver = nl80211 # qhov no yog tus tsav tsheb xav tau los ntawm WN7200ND hw_mode = g # g txhais tau tias 2.4GHz band channel = 11 # qhov no yog cov channel peb yuav siv, koj tuaj yeem xaiv cov channel ntawm 1 txog 13 ieee80211n = 1 # txwv cov zaus rau cov uas tau tso cai hauv koj lub tebchaws wmm_enabled = 1 # ht_capab = [HT40] [SHORT-GI-20] # teeb tsa lub peev xwm ntawm WN7200ND macaddr_acl = 0 # tawm lus kab no txwv cov cuab yeej uas tuaj yeem txuas # macaddr_acl = 1 # tsis txaus siab qhov no txwv cov cuab yeej uas tuaj yeem txuas # lees txais _mac_file =/etc/hostapd/lees txais # cov ntaub ntawv no muaj cov npe mac chaw nyob ntawm cov khoom siv uas hostapd yuav lees txais tsis lees paub_broadcast_ssid = 0 # yuav tshaj tawm SSID # Siv WPA2 auth_algs = 1 wpa = 2 # Siv WPA v2 tsuas yog wpa_key_mgmt = WPA-PSK rsn_pairwise = CCMP ssid = MyNetwork # siv lub npe ntawm koj lub network wpa_passphrase = MyUniquePassword # cov lus zais rau koj lub network

Txhawm rau txwv cov cuab yeej uas yuav txuas rau Access Point tsim cov ntaub ntawv/etc/hostapd/lees txais thiab sau cov npe mac chaw nyob zoo li cov hauv qab no:

14: 1a: 93: eb: 31: 55 #mac chaw nyob ntawm koj lub cuab yeej

Txhawm rau thauj cov ntawv teeb tsa thaum hostapd pib kho cov ntaub ntawv/etc/default/hostapd, tsis pom zoo DAEMON_CONF kab thiab hloov nws mus

DAEMON_CONF = "/etc/hostapd/hostapd.conf"

Kauj ruam 5: Pab kom IP Forwarding

Peb yuav tsum pab kom IP xa mus rau tus choj kom ua haujlwm tau zoo. Txhawm rau kom nws hloov kho cov ntaub ntawv /etc/sysctl.conf thiab tsis suav nrog kab net.ipv4.ip_forward = 1

Kauj Ruam 6: Nruab thiab teeb tsa DHCP Relay

Nruab thiab teeb tsa DHCP Relay
Nruab thiab teeb tsa DHCP Relay

Txhawm rau ua kom tiav teeb tsa thiab muaj txhua lub cuab yeej ntawm tib lub network (nws yog lub tswv yim zoo kom muaj txhua yam hauv tib lub network yog tias koj xav siv Chromecast lossis xa cov vis dis aus mus rau youtube ntawm koj lub TV ntse). Txhawm rau xa DHCP thov mus rau ISP router peb yuav tsum teeb tsa isc dhcp relay thiab teeb Pi xa cov lus thov mus rau lub server ntawd. Txhawm rau nruab nws siv cov lus txib hauv qab no:

sudo apt-tau nruab isc-dhcp-relay

Nkag mus rau Router IP ntawm kev xa xov server teeb tsa

192.168.100.1

Txhawm rau txheeb xyuas yog tias txhua yam tau teeb tsa kom raug koj tuaj yeem khiav cov lus txib

sudo hostapd /etc/hostapd/hostapd.conf

Tom qab txuas ua tiav mus rau Qhov Chaw Nkag Siab tshiab koj tuaj yeem rov pib dua

Pom zoo: