Vim lub fact tias Ubuntu neeg khiav dej num operating system tsis muaj graphical interface, cov neeg siv raug teeb meem thaum sim teeb ib qho kev twb kev txuas hauv Internet. Tsab ntawv xov xwm no yuav qhia rau koj tias cov lus txib koj yuav tsum tau siv thiab cov ntaub ntawv kho kom haum raws li qhov xav tau.
Saib kuj: Qhia txog kev txhim kho Internet txuas hauv Ubuntu
Configuring lub network nyob rau hauv Ubuntu neeg rau zaub mov
Ua ntej pib taug txoj kev qhia ntawm kauj ruam, nws yog ib qho tsim nyog los qhia txog qee qhov ntawm cov xwm txheej uas yuav tsum tau ua.
- Koj yuav tsum tau nrog koj tag nrho cov ntaub ntawv tau txais los ntawm tus kws kho mob. Nws yuav tsum muaj tus ID nkag mus, lo lus zais, subnet daim npog ntsej muag, qhov chaw nyob ntawm qhov rooj thiab qhov ntaus nqi ntawm DNS neeg rau zaub mov.
- Tsav tsheb hauv daim card card yuav tsum yog qhov tseeb version.
- Tus neeg zov me nyuam lub xov tooj kab yuav tsum yog kom txuas nrog lub computer.
- Lub tshuab lim yuav tsum tsis txhob cuam tshuam nrog lub network. Yog tias qhov no tsis yog qhov teeb meem, xyuas nws cov chaw thiab, yog tias tsim nyog, hloov lawv.
Tsis tas li ntawd, koj tuaj yeem tsis txuas rau hauv Internet yog tias koj tsis paub lub npe ntawm koj daim npav network. Yuav kom paub tias nws yog qhov yooj yim heev, koj yuav tsum khiav cov lus txib nram qab no:
sudo lshw -C network
Saib kuj: Nquag Siv Commands hauv Linux
Hauv kev soj ntsuam, nco cov kab "lub npe loj", tus nqi txawv nws yuav yog lub npe ntawm koj lub network interface.
Hauv qhov no, lub npe "eth0"koj tuaj yeem sib txawv.
Ceebtoom: koj tuaj yeem pom ntau yam hauv cov kab tawm, qhov no txhais tau hais tias koj muaj ntau lub network cards nyob hauv koj lub computer. Thaum xub thawj, txiav txim siab seb cov chaw twg koj yuav thov thiab siv nws txhua txoj kev qhia.
Wired network
Yog tias koj tus kws kho mob siv lub xov kab hauv xov tooj mus txuas rau Internet, ces koj yuav tsum hloov cov ntaub ntawv txhawm rau tsim kom muaj kev sib txuas. "interfaces". Tab sis cov ntaub ntawv yuav raug ntaus nyob ntawm seb hom IP tus neeg zov me nyuam. Hauv qab no yuav tau muab cov lus qhia rau ob qho kev xaiv: rau kev ua haujlwm IP thiab qhov qub.
Dynamic IP
Qhov teeb meem zoo li no yog qhov yooj yim zoo nkauj: ntawm no yog yam koj yuav tsum ua:
- Qhib cov ntaub ntawv qhib "interfaces" siv cov ntawv nyeem nano.
sudo nano / etc / network / interfaces
Saib kuj: Cov phau ntawv kho kom nrov dua rau Linux
Yog tias koj tsis tau hloov qhov ntaub ntawv no ua ntej, ces nws yuav tsum zoo li qhov no:
Tsis li, tshem tag nrho cov ntaub ntawv tsis tseem ceeb los ntawm daim ntawv.
- Muaj hle ib kab, nkag mus rau cov nram qab no tsis:
iface [network interface lub npe] inet dhcp
pib [network interface lub npe] - Txuag cov kev hloov los ntawm nias lub keyboard shortcut Ctrl + O thiab lees tias qhov kev txiav txim nrog tus yuam sij Sau.
- Txiav ntawv luam tawm los ntawm txhaj Ctrl + X.
Yog li ntawd, cov ntaub ntawv tsim yuav tsum muaj daim ntawv nram qab no:
Qhov no ua tiav qhov kev sib txuas ntawm lub wired network nrog dynamic IP. Yog hais tias lub vas sab tseem tsis tshwm, ces rov qab qhib lub tshuab computer, qee qhov nws yuav pab.
Muaj lwm txoj hau kev, yooj yim dua los tsim kev sib txuas lus hauv Internet.
sudo ip addr ntxiv [network card chaw nyob] / [muaj pes tsawg ntawm cov khoom nyob hauv qhov prefix ntawm qhov chaw nyob] dev [lub npe ntawm lub network interface]
Lus Cim: Qhov chaw nyob ntawm daim npav hauv network yuav muab tau los ntawm khiav cov lus qhia ifconfig. Hauv kev tshwm sim, tus nqi yuav tsum yog tom qab "inet addr".
Tom qab ua raws li cov lus txib, Internet yuav tsum tshwm sim sai sai hauv lub computer, yog tias tag nrho cov ntaub ntawv raug teev meej lawm. Lub ntsiab lus tseem ceeb ntawm txoj kev no yog tias tom qab lub computer rov qab pib lawm, nws yuav ploj mus, thiab koj yuav tsum tau ua raws li cov lus txib no dua.
Static IP
Configuring static IP ntawm dynamic txawv hauv cov xov tooj ntawm cov ntaub ntawv uas yuav tsum tau nkag mus rau hauv cov ntaub ntawv "interfaces". Txhawm rau kom muaj kev sib raug zoo network, koj yuav tsum paub:
- lub npe ntawm koj daim npav rau network;
- IP qhov ncauj qhov ntswg;
- rooj vag chaw nyob;
- DNS chaw nyob;
Raws li hais saum toj no, tag nrho cov ntaub ntawv koj yuav tsum muab rau tus neeg zov me nyuam. Yog tias koj muaj tag nrho cov ntaub ntawv tsim nyog, ua cov hauv qab no:
- Qhib cov ntaub ntawv tawm tswv yim.
sudo nano / etc / network / interfaces
- Thaum twg ib pawg lus raug muab rho tawm, sau tag nrho cov tsis raws li hauv qab no:
iface [network interface npe] inet zoo li qub
chaw nyob [chaw nyob] (network card chaw nyob)
netmask [chaw nyob] (subnet mask)
rooj vag [chaw nyob] (rooj vag chaw nyob)
dns-nameservers [chaw nyob] (DNS chaw nyob)
pib [network interface lub npe] - Txuag qhov kev hloov.
- Kaw phau ntawv sau.
Yog li ntawd, tag nrho cov ntaub ntawv hauv cov ntaub ntawv yuav tsum zoo li qhov no:
Tam sim no tus configuration ntawm lub wired network nrog ib tus IP zoo li qub tau pom tias ua tiav. Nyob rau tib txoj kev raws li nrog dynamic, nws yog pom zoo kom rov qab qhib lub tshuab computer rau cov kev hloov rau kev siv.
PPPoE
Yog tias koj tus kws kho mob muab kev pabcuam PPPoE rau koj, qhov kev txhim kho yuav tsum tau ua los ntawm ib lub chaw ua haujlwm tshwj xeeb uas muaj ua ntej rau Ubuntu tus neeg siv. Nws hu ua pppoeconf. Kom txuas koj lub computer mus rau hauv Internet, ua cov hauv qab no:
- Khiav cov lus txib:
sudo pppoeconf
- Hauv pseudo-graphical interface uas tshwm sim, tos kom txog thaum cov khoom siv network tau muab luam tawm lawm.
- Hauv daim ntawv, nyem Sau hla lub network interface koj yuav mus configure.
- Nyob rau hauv lub qhov rais "POPULAR OPTIONS" nyem rau "Muaj".
- Hauv lub qhov rais ntxiv, koj yuav tau nug koj tus ID nkag mus thiab tus password - nkag mus rau lawv thiab paub meej tias yog txhaj "OK". Yog tias koj tsis muaj cov ntaub ntawv nrog koj, hu rau tus kws kho mob thiab tau cov ntaub ntawv no ntawm nws.
- Nyob rau hauv lub qhov rais "SIV PEER DNS" nyem rau "Tsis muaj"yog tias IP chaw nyob yog static, thiab "Muaj"yog hais tias dynamic. Nyob rau hauv rooj plaub thawj, koj yuav raug hais kom nkag mus rau DNS neeg rau zaub mov manually.
- Cov kauj ruam tom ntej yog los txo qhov loj ntawm MSS rau 1,452 bytes. Koj yuav tsum tso cai, nws yuav tshem tawm tau qhov yuam kev tseem ceeb thaum nkag mus rau hauv qee qhov chaw.
- Tom ntej, xaiv lo lus teb "Muaj"yog tias koj xav kom koj lub computer mus txuas rau lub network tom qab tso tawm. "Tsis muaj" - Yog tias koj tsis xav tau.
- Nyob rau hauv lub qhov rais "TSIS TAU TXAIS"los ntawm txhaj "Muaj", koj muab kev tso cai rau lub chaw tso dej los tsim kom muaj txoj hauv kev txuas tam sim no.
Lus cim: Yog tias koj tsuas muaj ib lub network interface, ces qhov no yuav raug xa tawm.
Yog tias xaiv "Tsis muaj", ces koj tuaj yeem txuas mus rau Internet tom qab los ntawm khiav qhov kev hais kom ua:
sudo pon dsl-provider
Koj tuaj yeem siv cov PPPoE kev txuas tau txhua lub sij hawm los ntawm kev sau cov lus txib nram qab no:
sudo poff dsl-provider
DIAL-UP
Nws muaj ob txoj kev los sib tham txog DIAL-UP: siv lub chaw tso dej pppconfig thiab ua qhov chaw nyob hauv cov ntaub ntawv tawm tswv yim "wvdial.conf". Thawj txoj kev hauv tsab xov xwm yuav tsis tham txog nyob rau hauv kev nthuav dav, vim cov kev qhia zoo li cov nqe lus dhau los. Txhua yam koj xav paub yuav ua li cas khiav cov dej taws. Ua li no, cia li khiav:
sudo pppconfig
Tom qab tua, pseudo-graphic interface yuav tshwm. Teb cov lus nug uas yuav tau nug hauv tus txheej txheem, koj tuaj yeem tsim kom muaj kev sib txuas nrog DIAL-UP.
Lus cim: Yog tias koj pom tias nws tsis yooj yim los teb koj cov lus nug, nws raug nquahu kom hu rau koj tus kws kho mob rau kev sib tham.
Nrog rau ob txoj kev, txhua yam yog me ntsis nyuab dua. Qhov tseeb yog hais tias cov ntaub ntawv configuration "wvdial.conf" Yog tsis muaj qhov system, thiab los tsim nws, koj yuav tsum tau nruab ib lub chaw ua haujlwm tshwj xeeb, thaum nws ua haujlwm, yuav nyeem tag nrho cov ntaub ntawv tsim nyog ntawm lub modem thiab nkag mus rau hauv cov ntaub ntawv no.
- Nruab cov dej los ntawm kev khiav cov lus txib:
sudo apt nruab wvdial
- Khiav cov ntaub ntawv executable nrog cov lus txib:
sudo wvdialconf
Nyob rau theem no, lub chaw tsim hluav taws xob tsim ib qho qauv ntaub ntawv thiab nkag mus rau hauv nws tag nrho cov kev tsim nyog. Tam sim no koj yuav tsum sau cov ntaub ntawv los ntawm tus neeg zov me nyuam kom qhov kev sib txuas yog tsim.
- Qhib cov ntaub ntawv "wvdial.conf" ntawm cov ntawv nyeem editor nano:
sudo nano /etc/wvdial.conf
- Sau cov ntaub ntawv hauv cov kab Xov tooj, Lub npe thiab Lo lus zais. Tag nrho cov ntaub ntawv koj tuaj yeem tau txais los ntawm tus kws kho mob.
- Txuag cov kev hloov thiab tawm ntawm cov ntawv nyeem.
Tom qab ua tiav cov kev ua, kom txuas mus rau hauv Internet, koj tsuas yog yuav tsum tau ua raws li cov lus txib nram qab no:
sudo wvdial
Raws li koj tau pom, qhov thib ob hom yog qhov nyuaj rau piv rau thawj tus thawj, tab sis nws yog nrog nws cov kev pab cuam uas koj tuaj yeem teev txhua yam kev sib txuas tsis tau thiab txhawb ntxiv rau hauv cov txheej txheem ntawm kev siv Internet.
Xaus
Neeg Ubuntu muaj tag nrho cov cuab yeej tsim nyog los tsim kho txhua hom kev twb kev txuas hauv Internet. Qee zaum, txawm tias muaj ob peb txoj hau kev. Qhov loj tshaj plaws yog kom paub tag nrho cov tsim nyog commands thiab cov ntaub ntawv uas koj yuav tsum nkag mus rau hauv cov ntaub ntawv configuration.