Cov txheej txheem:

Siv Raspberry Pi 3 Raws li Router: 10 Kauj Ruam (nrog Duab)
Siv Raspberry Pi 3 Raws li Router: 10 Kauj Ruam (nrog Duab)

Video: Siv Raspberry Pi 3 Raws li Router: 10 Kauj Ruam (nrog Duab)

Video: Siv Raspberry Pi 3 Raws li Router: 10 Kauj Ruam (nrog Duab)
Video: Different types of people: Are you 1, 2 or 3?馃槀 2024, Kaum ib hlis
Anonim
Siv Raspberry Pi 3 Raws li Router
Siv Raspberry Pi 3 Raws li Router
Siv Raspberry Pi 3 Raws li Router
Siv Raspberry Pi 3 Raws li Router

Raws li Wikipedia, tus router yog lub cuab yeej sib txuas uas xa cov ntaub ntawv sib txuas ntawm cov khoos phis tawj computer. Yog tias peb rhuav tshem lub wireless router, peb yuav zaum pom daim ntawv thov tshwj xeeb uas ua haujlwm cov ntaub ntawv ntim khoom thiab ntu RF uas ua haujlwm sib txuas wireless.

Koj paub dab tsi ntxiv muaj tus txheej txheem thiab ntu RF.

TUS TSEEM CEEB yog tus qauv raspberry pi 3. Yog li hauv qhov MiniProject no, peb yuav hloov pauv raspberry pi los ua tus router.

Kauj ruam 1: Yees duab

Image
Image

Ua tibzoo saib cov vis dis aus rau cov lus qhia dav dav hauv 3 feeb.

Kauj ruam 2: Pib-up Raspberry Pi

Hloov kho Raspberry Pi
Hloov kho Raspberry Pi

Thawj kauj ruam yog kom tau txais koj cov raspberry pi nce thiab khiav. Kev ua haujlwm pib qhia hauv Raspberry pi lub vev xaib yog cov peev txheej zoo tshaj plaws rau qhov no.

Nov yog qhov txuas.

Mus rau theem tom ntej thaum koj muaj koj tus raspberry pi nce thiab khiav.

Kauj Ruam 3: Hloov Kho Raspberry Pi

Ua ntej peb yuav hloov kho daim ntawv teev npe muaj los ntawm cov chaw cia khoom siv

sudo apt-tau hloov tshiab

Thaum ua tiav, peb tuaj yeem teeb tsa cov pob khoom kawg no siv

sudo apt-tau hloov tshiab

Qhov no yuav siv sijhawm ib ntus nyob ntawm koj qhov internet txuas ceev.

Kauj Ruam 4: Txhim Kho Hostadp thiab Bridge-utils

Txhim kho Hostadp thiab Choj-utils
Txhim kho Hostadp thiab Choj-utils
Txhim kho Hostadp thiab Choj-utils
Txhim kho Hostadp thiab Choj-utils

Thaum raspberry pi tau hloov kho.

peb xav tau los teeb tsa tus neeg siv chaw keeb kwm yav dhau los hu ua hostapd, siv rau cov ntsiab lus nkag tau wireless thiab kev lees paub cov servers. Peb tseem yuav xav tau pob hu ua choj-siv rau kev tswj cov khoom siv choj.

sudo apt-tau nruab hostapd choj-siv

Peb yuav tsum kaw qee qhov kev pabcuam tshiab uas peb nyuam qhuav teeb tsa ua nws siv

sudo systemctl nres hostapd

Debug- Qee lub sij hawm raspbian yuav tso tawm cov lus hais hostapd thiab choj-cov khoom siv tsis pom rau nruab hais kom ua. Tsis txhob txhawj. Khiav 'sudo apt-tau hloov tshiab' ib zaug ntxiv thiab nws yuav tsum tau daws.

Kauj ruam 5: Lov tes taw DHCP Config rau Wlan0 thiab Eth0

Lov tes taw DHCP Config rau Wlan0 thiab Eth0
Lov tes taw DHCP Config rau Wlan0 thiab Eth0
Lov tes taw DHCP Config rau Wlan0 thiab Eth0
Lov tes taw DHCP Config rau Wlan0 thiab Eth0

Tam sim no, peb teeb tsa txheej txheem keeb kwm yav dhau dhcp tsis txhob cia li teeb tsa wlan0 thiab eth0 cuam tshuam. Peb ua qhov no los ntawm kev ua raws ob kab

tsis lees paub qhov chaw wlan0

rejectinterfaces eth0

qhov kawg ntawm /etc/dhcpcd.conf cov ntaub ntawv, qhib nws siv.

sudo nano /etc/dhcpcd.conf

Kauj Ruam 6: Tsim Choj Br0

Tsim Choj Br0
Tsim Choj Br0

Tom ntej no, peb tsim tus choj br0 siv brctl hais kom ua uas yog tus tswj hwm choj Ethernet

sudo brctl ntxiv br0

thiab siv

sudo brctl addif br0 eth0

hais kom peb ntxiv eth0 ua ib qho ntawm cov chaw nres nkoj rau choj br0.

Kauj ruam 7: Kho kom raug/etc/network/interfaces

Kho kom raug/etc/network/interfaces
Kho kom raug/etc/network/interfaces
Kho kom raug/etc/network/interfaces
Kho kom raug/etc/network/interfaces

Tam sim no qhib cov ntaub ntawv hu ua cuam tshuam hauv /etc /network directory

sudo nano/etc/network/interfaces

thiab ntxiv tsib kab no.

pub-hotplug wlan0

iface wlan0 inet phau ntawv pib br0 iface br0 inet dhcp bridge_ports eth0 wlan0

Thawj kab pib wlan0 interface ntawm qhov xwm txheej kub. Kab thib ob tsim lub network sib txuas yam tsis muaj IP chaw nyob uas ib txwm ua tiav rau cov khoom sib txuas. Kab thib peb pib br0 interface ntawm khau raj. Forth kab pab ua haujlwm tsis siv neeg tus IP chaw rau br0 interface siv DHCP server thiab thaum kawg kab thib tsib txuas eth0 interface nrog wlan0. Txuag cov ntawv no thiab kaw nws.

Kauj ruam 8: Kho kom raug /etc/hostapd/hostapd.conf

Kho kom raug /etc/hostapd/hostapd.conf
Kho kom raug /etc/hostapd/hostapd.conf
Kho kom raug /etc/hostapd/hostapd.conf
Kho kom raug /etc/hostapd/hostapd.conf

Tom ntej no, peb yuav teeb tsa peb lub ntsiab lus siv wireless, peb tuaj yeem ua qhov no siv cov ntawv hu ua hostapd.conf hauv /etc /hostapd nplaub tshev. Qhib nws

sudo nano /etc/hostapd/hostapd.conf

thiab muab cov kab no tso.

interface = wlan0

choj = br0 ssid = miniProjects hw_mode = g channel = 7 wmm_enabled = 0 macaddr_acl = 0 auth_algs = 1 ignore_broadcast_ssid = 0 wpa = 2 wpa_passphrase = subscribe wpa_key_mgmt = WPA-PSK wpa_pairwise = TKIP rsn_pairwise =

Tus nqi uas tau muab rau ssid yog lub npe uas nkag mus siv tau yuav tshaj tawm nws lub neej. Tsib txoj kab kawg tau tsom mus rau kev txheeb xyuas qhov tseeb thiab kev nyab xeeb ntawm kev nkag mus. Tus nqi ntawm wpa_passsphrase tau siv los ua tus lej nkag nkag uas tau sau npe hauv peb kis. Nov yog qhov txuas rau daim ntawv, qhov twg koj tuaj yeem pom cov ntsiab lus ntawm txhua qhov sib txawv uas peb tau siv ntawm no.

Kauj ruam 9: Hloov Kho zaum kawg/etc/default/hostapd

Hloov Kho zaum kawg/etc/default/hostapd
Hloov Kho zaum kawg/etc/default/hostapd
Hloov Kho zaum kawg/etc/default/hostapd
Hloov Kho zaum kawg/etc/default/hostapd

Thaum kawg, qhib hostapd cov ntaub ntawv hauv /etc /default directory

sudo nano/etc/default/hostapd

tsis pom zoo DAEMON_CONF kab thiab muab txoj hauv kev rau cov ntaub ntawv peb nyuam qhuav tsim.

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

Qhov no ua tiav teeb tsa rau raspberry pi los ua lub router.

Kauj ruam 10: Ua tiav

Ua tiav
Ua tiav
Ua tiav
Ua tiav

Tam sim no, lub zog-ntawm koj tus raspberry pi nrog Ethernet cable txuas.

Koj yuav tsum pom raspberry pi tshaj tawm ssid thiab siv internet.

Ua tsaug rau kev nyeem ntawv.

Qhia rau kuv paub yog tias koj ntsib teeb meem thaum tsim koj tus kheej router.

Thov pov npav rau cov lus qhia no, yog tias koj nyiam.

Pom zoo: