Uqwalaselo lwenethiwekhi kunye noLawulo - iiNethiwekhi zeSME

Molweni zihlobo nabahlobo!

Isalathiso ngokubanzi sothotho: Iinethiwekhi zekhompyuter zee-SMEs: Intshayelelo

Asikanikezeli inqaku kwisihloko esivelisa isihloko sesi. Kwaye asizange sifunde naziphi na izimvo ezicela ukubhala ngaye. Sacinga ukuba iyaziwa ngumntu wonke kwaye mhlawumbi yayisisizathu sokuba singayinanzi kude kube namhlanje. Nangona kunjalo, siya kubhala isithuba esifutshane malunga nayo kwabo bafuna ukuhlaziya okanye ukufunda ngalo mbandela.

Inethiwekhi: inkcazo ebonakalayo

Ngeenjongo eziphathekayo, enye Umnatha - womnatha Iqukethe izixhobo ezimbini okanye ngaphezulu zothungelwano ezifana neekhompyutha, iiseva, abashicileli, iifowuni eziphathwayo, okanye ezinye izixhobo zothungelwano, ezidityaniswe ngeentambo eziphathekayo okanye iilinki ezingenazingcingo ngenjongo yokwabelana nokusasaza ulwazi phakathi kwezixhobo eziqhagamshelweyo.

Ngolwazi oluthe vetshe ndwendwela:

Khumbula ukuba sinika amakhonkco ngenjongo epheleleyo kungekhona ukuzonwabisa. 😉

Useto lwenethiwekhi

  • Ndincoma kwabo basebenzisa iinkqubo zokusebenza CentOS y Vula, khokelwa sisicatshulwa Ukucwangciswa kweServer ngeGNU / Linux, ngumbhali uJoel Barrios Dueñas. Kunzima kum ukubhala izihloko esiza kuzixoxa ngezantsi kwi-Debian, CentOS kunye nonikezelo lwe-openSUSE kwinqaku elifanayo, kuba ezimbini zokugqibela zahlukile kwezokuqala ngokukodwa ngamagama, indawo yeefayile zoqwalaselo, imixholo yazo, kunye nokunye. Iinkalo zefilosofi ezinxulumene nesihloko.

Iisistim ezisebenzayo esizisebenzisayo kulo lonke olu ngcelele zinezixhobo zomzobo zokuqwalasela izixhobo ezahlukeneyo zomsebenzi womnatha. Nangona kunjalo, esi sithuba siya kugxila ekusebenziseni i-console yomyalelo okanye i-terminal.

Njengoko sibonile kumanqaku angaphambili, kwiimeko ezininzi siqwalasela ujongano lwenethiwekhi - okanye ujongano - ngexesha lofakelo lokuqinisekisa ukuba, xa sele kufakwe inkqubo yokusebenza esisiseko, ikhomputha inonxibelelwano lwe-Intanethi olusebenzayo.

Uqwalaselo oluchanekileyo okungenani ujongano lokuqala lomsebenzi womnatha-ongundoqo- lubalulekile kumsebenzi olandelayo we Idesktop, Indawo yokusebenzat Umncedisi ukuba siyayiphumeza.

Asiyi kusebenzisa i-NetworkManager

Ukwenza lula ukubhalwa kweli nqaku, gxininisa kuqwalaselo lweseva, kwaye wenze kube lula ukufunda, siya kucinga ukuba hayi inkonzo enikezelwa yiphakheji iyasetyenziswa umphathi wenethiwekhi. Kungenjalo kufuneka senze la manyathelo alandelayo:

Kwi-Debian

buzz@sysadmin:~$ sudo systemctl yeka inethiwekhi-manager.service
buzz@sysadmin:~$ sudo systemctl status network-manager.service
buzz@sysadmin:~$ sudo systemctl khubaza inethiwekhi-manager.service
buzz@sysadmin:~$ sudo ifconfig

Ukuba ubumbeko lwamakhadi othungelwano oluxhomekeke kwinkonzo umphathi wenethiwekhi zichanekile, ngoko singaqhubeka nokusebenza. Nangona kunjalo, kunempilo ukwenza:

buzz@sysadmin:~$ sudo ifdown eth0 && sudo ifup eth0

ukujonga kabini ukuba yonke into isebenza kakuhle.

Kwi-CentOS

Kwincwadi ekwifomathi yePDF «Ukucwangciswa kweServer ngeGNU / Linux«, Ushicilelo lukaJulayi 2016, isahluko 48.2.2 sinikezelwe kwisihloko senkonzo InethiwekhiManager. Ndiyakuxelela ukuba umbhali wayo, uJoel Barrios Dueñas, akathandi konke konke-ukubona njengento engenangqondo-ukusetyenziswa InethiwekhiManager kwiiseva.

Ujongano lwe-Ethernet

Njengomgaqo jikelele, xa sisebenza kunye noomatshini virtual kwi Qemu-KVM, inkqubo yokusebenza ichonga i-Ethernet Interfaces enamagama afana I-ethX, apho ifayile ye- X imele ixabiso lamanani. I-interface yokuqala ye-Ethernet ichongiwe njenge-eth0, eyesibini njenge-eth1, njalo njalo.

Ukuba imalunga neenkqubo zokusebenza zeDebian - kunye nezinto eziphuma kuzo - ezenziwa koomatshini bomzimba, ubhalo lwangaphambili luzalisekile.

Ukuba sisebenza koomatshini bomzimba abaneenkqubo zokusebenza CentOS y Vula, inkqubo yokusebenza ibachonga njenge enoX. Ukufana okuninzi kunokwenzeka ngoomatshini benyani - ngezi nkqubo zokusebenza - kwiihypervisors ze VMware.

Kumatshini wenyani owenziwe kwinkqubo yokusebenza FreeBSD -ekwayiFree Software- zichongwa ngokubanzi njenge emX o vtnetX kuxhomekeke ekubeni zikwiQemu-KVM okanye kwiVMware ngokulandelelanayo. Ukuba zezomzimba, zichongwa njenge emX.

Chonga i-Ethernet Interfaces

Ukuchonga zonke iindawo zenethiwekhi ezikhoyo kwikhompyuter yam sysadmin.fromlinux.fan, senza:

buzz@sysadmin:~$ sudo ifconfig -a
eth0 Link encap:Ethernet HWaddr 70:54:d2:19:ad:65 inet addr:10.10.10.1 Bcast:10.10.10.255 Mask:255.255.255.0 inet6 addr: fe80::7254:d2ff:19:65 Unxulumano ... lo Link encap:Local Loopback inet addr:64 Mask:127.0.0.1 inet255.0.0.0 addr: ::6/1 Scope:Host ... virbr128 Link encap:Ethernet HWaddr 0:52:54:c00:8 :35e inet addr:5 Bcast:192.168.10.1 Mask:192.168.10.255 inet255.255.255.0 addr: fe6::80:ff:fec5054:8e/355 Scope:Link ... virbr64-nic Hdd0 :52:c54:00:8e BROADCAST MULTICAST MTU:35 Metric:5 ... vmnet1500 Link encap:Ethernet HWaddr 1:8:00:c50:56:0 inet addr:00 Bcast:08:192.168.20.1. .192.168.20.255 inet255.255.255.0 addr: fe6::80:250ff:fec56:0/8 Scope:Link ...
  • Ii-ellipses ezintathu kwiziphumo ezidlulileyo zithetha ukuba ulwazi oluninzi lubuyisiwe esingazibonakalisi ukugcina indawo.

Kuba ndineenkqubo ezimbini zokuxhasa umatshini ofakwe kwi-Debian 8 "Jessie" inkqubo yokusebenza, oko kukuthi, Qemu-KVM y Iseva ye-VMware Workstation 10.0.6, umyalelo ubuyisela lonke ujongano olukhoyo.

  • Irekhodi: isoftware yabucala yeVMware Workstation Server 10.0.6 yikopi esemthethweni ephiwe ngumhlobo wam kunye nogxa wam uNew Zealander, owayifumana nge-Intanethi kwilizwe lakhe lokuzalwa kwaye wayenobubele ngokwaneleyo ukuba ayithumele kum..

Makhe sibone ukuba loluphi ulwazi esinokulufumana kwimveliso yangaphambili:

  • I-eth0: Ujongano olungundoqo lwenethiwekhi enedilesi ye-IPv4 10.10.10.1. Idilesi ye-IPv6 nayo iyaboniswa.
  • lo: Loopback okanye basekuhlaleni nge IPv4 127.0.0.1 kunye ne-IPv6 -eqhelekileyo kuzo zonke ezi ndibano- ::1/128.
  • ivirbr0: Uhlobo lwebhulorho ujongano lwenethiwekhi -  Bumqolo nge IPv4 192.168.10.1 kunye nedilesi MAC 52:54:00:c8:35:5e. Olu jongano lwenyani yile siyenzayo kwaye siyiqwalasele sisebenzisa i Umphathi weVirtual yeQemu-KVM njengothungelwano «Engagqibekanga»yohlobo lwe-NAT.
  • virbr0-nic: Ujongano lomsebenzi womnatha owenza i Qemu-KVM, yohlobo lweBhulorho engaziwa- Ongaziwayo iblorho kunye nedilesi efanayo MAC 52:54:00:c8:35:5e que ivirbr0. Ayinayo idilesi ye-IP enikiweyo.
  • vmnet8: Uhlobo lomsebenzi womnatha NAT iqwalaselwe kwi VMware Umhleli Wothungelwano Olubonakalayo.

El Umncedisi weVMware Workstation ngeyakho Umhleli Wothungelwano Olubonakalayo, iqwalasela iiBridges ezizenzayo kunye nojongano lomzimba ngamnye loMamkeli ngokwahlukileyo - host. Ngaba ijagoni esetyenziswa kwi amanqaku angaphambili?.

Esinye isicelo - ayisiyiyo kuphela okanye eyokugqibela - ukufumana ulwazi malunga nojongano lwenethiwekhi lshw – Uluhlu Lwezixhobo. lshw sisixhobo esikhupha ulwazi oluneenkcukacha malunga noqwalaselo lomatshini. Ukuba siqhuba kwi-console:

buzz@sysadmin:~$ ukukhangela ubuchule lshw
p lshw - ulwazi malunga noqwalaselo lwehardware  
p lshw-gtk - ulwazi lomzobo malunga noqwalaselo lwehardware

Siqaphela ukuba inojongano lwayo lomzobo esikushiyela ukuba uzame. Masifake enye kwimowudi ye-console kwaye siqhube ngezantsi:

buzz@sysadmin:~$ sudo lshw -class network
[sudo] igama lokugqitha le buzz:
  Umsebenzi-womnatha               
       inkcazelo: Ethernet interface imveliso: 82579V Gigabit Network Connection umthengisi: Intel Corporation id ngokomzimba: 19 info ibhasi: pci@0000:00:19.0 igama elisengqiqweni: eth0 uguqulelo: 05 uthotho: 70:54:d2:19:ad:65 ubukhulu: 100Mbit/s umthamo: 1Gbit/s ububanzi: 32 bits clock: 33MHz amandla: pm msi bus_master ...
  *-inethiwekhi IYAKHUBAZWA
       inkcazelo: Ujongano lwe-Ethernet id ebonakalayo: 1 igama elinengqiqo: virbr0-nic serial: 52:54:00:c8:35:5e ubukhulu: 10Mbit/s amandla: ethernet ngokomzimba

Masilawule amagama anengqiqo ojongano

Ngamanye amaxesha, ngakumbi xa sitshintsha ikhadi lothungelwano ngokwaso nasiphi na isizathu, siyaqaphela ukuba inani X echonga ujongano olunyuswe ngo-1 kwaye siqaphele kuphela xa siphumeza ukuba ifconfig -a, phakathi la imeko kwenzeka ntoni emva kotshintsho. Inokwenzeka kwakhona xa sisusa ujongano lwenethiwekhi yenyani nangasiphi na isizathu, kwaye songeze enye kwakhona.

Oku kungasentla kunokucaphukisa xa siqwalasele kwaye siqhagamshele- bopha kwinkonzo enye okanye ezingaphezulu, igama elithile lojongano olunengqiqo, nokuba lilo I-eth0, eyo1 o em0. Eyona nto ingafanelekanga kukuba isoloko isenzeka emva kwexesha elide - iminyaka mhlawumbi - yoqwalaselo lokuqala. Emva koko ujongano olutsha luvela namagama anje I-eth1,I-eth2, eyo2, em1, njl., kwaye ezinye iinkonzo ziyeka ukusebenza ngokuchanekileyo. Abo baye badlula kwizinto ezifanayo iimeko Uyayazi ndithetha ukuthini. 😉

Amagama anengqiqo ojongano lomsebenzi womnatha kwi Debian - kunye nezinye izinto eziphuma kuyo- zifumaneka kwifayile. /etc/udev/rules.d/70-persistent-net.rules. Kwi-CentOS 7 ifumaneka kwifayile /etc/udev/rules.d/90-eno-fix.rules, ngelixa kwiinguqulelo zayo zangaphambili ikwifayile efanayo nakwiDebian.

Kwi-Debian, ukuba ufuna ukutshintsha igama elinengqiqo lojongano lwenethiwekhi ethile, khangela umgca ohambelana nedilesi yayo IMAC kwaye ulungise ixabiso NAME=ethX ngalo naliphi na ixabiso legama elivakalayo olidingayo. Ukuze utshintsho lwenzeke ngokuchanekileyo, kufuneka uqale kabusha ikhompyuter yakho.

Kwi-CentOS 7, jonga umsebenzi «Ukucwangciswa kweServer ngeGNU / Linux»nguJoel Barrios Dueñas, enika indlela eneenkcukacha.

  • Kubalulekile: Nangeyiphi ndlela, Qaphela! Ngenkonzo InethiwekhiManager ukuba uphatha imidibaniso.

Guqula iiparamitha zojongano lwenethiwekhi

Kwi-Debian, ukuba sifuna ukuguqula iiparameters zekhadi lenethiwekhi ngokusisigxina, kufuneka sihlele ifayile / njl / inethiwekhi / ujongano njengoko kuxoxwe ngezantsi.

Ukwazi ngokweenkcukacha-kunye nokunye- zonke iinketho onokuzisebenzisa, jongana ujongano lomntu. Sikwacebisa ukuba ufunde amaxwebhu akhoyo kwisiqulathi seefayili:

buzz@sysadmin:~$ ls -l /usr/share/doc/ifupdown/
iyonke 44 drwxr-xr-x 2 ingcambu ingcambu 4096 Aug 7 2016 umxholo
drwxr-xr-x 2 ingcambu ingcambu 4096 Aug 7 2016 mi zekelo
-rw-r-r- 1 ingcambu ingcambu 976 Jun 21 2012 copyright -rw-r--r-- 1 ingcambu ingcambu 18243 Mar 13 2015 changelog.gz -rw-r--r- 1 ingcambu ingcambu 297 Jun 21 2012 NEWS.Debian.gz -rw-r--r-- 1 ingcambu ingcambu 454 Nov 29 2014 README -rw-r--r-- 1 ingcambu ingcambu 946 Jun 21 2012 ZONKE

Inkqubo i-ethtool

Ngenkqubo i-ethtool Singabonisana, sidwelise kwaye silungise iiparameters zekhadi lenethiwekhi njengesantya soqhagamshelwano, uthethathethwano oluzenzekelayo, i-checksum yomthwalo - jonga isixa sokhuphelo, njl. Ifumaneka kwiindawo zokugcina phantse zonke izabelo.

buzz@sysadmin:~$ sudo ukufaneleka kokufaka i-ethtool
[sudo] igama lokugqitha le buzz:

buzz@sysadmin:~$ sudo ethtool eth0
Izicwangciso ze-eth0: Izibuko ezixhaswayo: [ TP ] Iimowudi zekhonkco ezixhaswayo: 10baseT/Isiqingatha 10baseT/Egcweleyo 100baseT/Isiqingatha 100baseT/Egcweleyo 1000baseT/Egcweleyo 10baseT/Egcweleyo Ukusetyenziswa kwesakhelo sokuphumza okuXhasiweyo: Hayi Ixhasa uthethwano oluzenzekelayo: Ewe Iindlela zekhonkco ezipapashiweyo/Half10TbaseT/Half100 I-100baseT epheleleyo/Isiqingatha se-1000baseT/Egcweleyo i-100baseT/Isibhengezo esipheleleyo sokumisa isakhelo sokusebenzisa isakhelo: Akukho uthethathethwano oluzenzekelayo olupapashiweyo: Ewe Isantya: 1Mb/s Duplex: Isibuko esiPheleleyo: I-Twisted Pair PHYAD: I-0 Transceiver: I-Auto-thethwano yangaphakathi: kwi-MDI-X: (auto) Ixhasa ukuVuka: ipumbg Vuse-on: g Inqanaba lomyalezo langoku: 00000007x7 (XNUMX) ikhonkco ledrv probe lichongiwe: ewe

Utshintsho esilwenzayo sisebenzisa esi sixhobo lolokwexeshana kwaye luya kulahleka ukuqalisa kwakhona kwekhompyutha elandelayo. Ukuba sifuna uhlengahlengiso olusisigxina olwenziwe i-ethtool, kufuneka songeze kwifayile / njl / inethiwekhi / ujongano umyalelokwangaphambili»okanye «phambi kokuphakamisa ujongano» ngolu hlobo lulandelayo:

ezenzekelayo eth1
Iface eth1 inet dhcp
pre-up / sbin/ethtool -s eth1 isantya 1000 duplex epheleleyo

Ngaloo ndlela, ikhadi lenethiwekhi I-eth1 efumana idilesi yayo ye-IP kwiseva ye-DHCP, iguqulwa ngokusisigxina ukuba isebenze ngesantya se-1000 Mb / s kwimodi. Duplex epheleleyo.

  • Indlela yangaphambili iyasebenza nakumakhadi ane-IP engatshintshiyo.

Idilesi ye-IP

Siza kubona ngezantsi indlela yokuqwalasela idilesi ye-IP yesixhobo, kunye nesango - isango ngokungagqibekanga, okuyimfuneko kunxibelelwano kunye nenethiwekhi yendawo kunye ngqo nge-Intanethi nge su isango.

  • xa sibhala "ngokuthe ngqo» sibhekisa kwiimeko zeenethiwekhi ze-SME apho ukufikelela kwi-Intanethi kuvunyelwe ngaphandle kokusebenzisa iseva proxy, yeyiphi ayikhuthazwanga, nangona kukho amandla Firewall kwisixhobo ngokwaso esisebenza njenge Gateway. Xa lifikile ixesha lakho siza kuthetha ngalo proxy.

Idilesi yethutyana

Ukusebenzisa imiyalelo esemgangathweni kuyo nakuphi na unikezelo lwe Linux njenge ip, ifconfig kunye nendlela, singaqwalasela okwethutyana ujongano lomsebenzi womnatha njengoko siza kubona ngezantsi.

Ukwabela idilesi ye-IP kunye ne-subnet mask yayo kwaye emva koko siqinisekise ukusebenza, masiphumeze:

buzz@sysadmin:~$ sudo ifconfig eth0 172.16.10.2 netmask 255.255.0.0
buzz@sysadmin:~$ sudo ifconfig
eth0 Link encap:Ethernet HWaddr 70:54:d2:19:ad:65 inet addr:172.16.10.2 Bcast:172.16.255.255 Mask:255.255.0.0 inet6 addr: fe80::7254:d2:adpe:19 Ikhonkco I-UP BROADCAST EBALULEKILEYO I-MULTICAST MTU:65 Metric:Iipakethi ze-RX:Iimpazamo ze-64:i-1500 eyehlisiwe:i-1 overruns:ifreyimu engu-0:Iipakethi ze-TX:iimpazamo ze-0:i-0 eyehlisiwe:i-0 eyongeziweyo: i-0 carrier:659 ukungqubana:0 txqueuelen:0 RX iibhayithi: 0 (0 B) TX iibhayithi:0 (1000 KB) Ukuphazamisa:0 Inkumbulo:fe0.0-fe115601

Sisanda kunikwa ikhadi okwethutyana I-eth0 Idilesi ye-IP engatshintshiyo 172.16.10.2 nge-subnet mask 255.255.0.0 okwiKlasi "B" Inethiwekhi ye-Intanethi yaBucala.

  • Qaphela ukuba silulungisile ubumbeko lwe-eth0 yojongano lomsebenzi womnatha we-sysadmin./255.255.255.0 eyeKlasi "A" Inethiwekhi ye-Intanethi yaBucala, nangona inokusingatha kuphela iikhompyuter ezingama-254 ngokwemaski yayo ye-subnet.

Ukuqwalasela i Gateway ngokungagqibekanga kwaye emva koko ujonge umsebenzi, masenze:

buzz@sysadmin:~$ indlela yesudo yongeza okungagqibekanga gw 172.16.10.1 eth0

buzz@sysadmin:~$ sudo indlela -n
Kernel IP itheyibhile yokubonisa Indawo ekuyiwa kuyo ISango leGenmask Iiflegi zeMetric Ref Use Iface 0.0.0.0 172.16.10.1 0.0.0.0 UG 0 0 0 eth0 0.0.0.0 172.16.10.1 0.0.0.0 UG1024 0. 0 0 .172.16.0.0. 0.0.0.0 U 255.255.0.0 0 0 eth0 0 192.168.10.0 0.0.0.0 U 255.255.255.0 0 0 vmnet0 8 192.168.20.0 0.0.0.0 U 255.255.255.0br 0br

Sisanda kunika iGateway okwethutyana 172.16.10.1 ujongano eth0 172.16.10.2, ngelixa olunye ujongano lugcina amaxabiso angaphambili.

Ukususa ZONKE iisetingi kwikhadi lenethiwekhi, masiqhube:

buzz@sysadmin:~$ sudo ip addr flush eth0

buzz@sysadmin:~$ sudo ifconfig
eth0 Link encap:Ethernet HWaddr 70:54:d2:19:ad:65 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX ipakethe:0 iimpazamo:0 eyehliweyo:0 overruns:0 frame:0 TX ipakethe:718 iimpazamo:0 iwisiwe: 0 ugqithiso:0 umthuthi:0 ungquzulwano:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:125388 (122.4 KB) Ukuphazamisa:20 Memory:fe600000-fe620000

buzz@sysadmin:~$ sudo indlela -n
Kernel IP itheyibhile yokubonisa Indawo ekuyiwa kuyo ISango leGenmask Iiflegi zeMetric Ref Use Iface 192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet8 192.168.20.0 0.0.0.0 255.255.255.0.
  • Makhe sijonge kakuhle, njengoko sisusa LONKE ulungelelwaniso lwangaphambili lwenethiwekhi kubandakanywa nale ichazwe kwifayile /etc/network/interfaces!.

Ukubuyisela ihlabathi kwindlela elaliyiyo ngaphambi kokuba siqalise kwakhona ikhompyutha. Ukuba asifuni ukuyeka ukusebenza, masiphumeze:

buzz@sysadmin:~$ sudo ifconfig eth0 10.10.10.1 netmask 255.255.255.0

buzz@sysadmin:~$ sudo ifconfig eth0
eth0 Link encap:Ethernet HWaddr 70:54:d2:19:ad:65 inet addr:10.10.10.1 Bcast:10.10.10.255 Mask:255.255.255.0 UP BROADCAST EQHUBEKAYO I-MULTICAST MTU:1500 I-packets iwisiwe: i-1 overruns: 0 frame:0 iipakethe zeTX:0 iimpazamo:0 ziwisiwe:0 zigqithise:729 carrier:0 conllisions:0 txqueuelen:0 RX bytes:0 (0 B) TX bytes:1000 (0 KiB) Interrupt:0.0 Imemori:fe129009-fe125.9

buzz@sysadmin:~$ sudo indlela -n
Kernel IP itheyibhile yokubonisa Indawo ekuyiwa kuyo ISango leGenmask Iiflegi zeMetric Ref Use Iface 10.10.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 192.168.10.0 0.0.0.0 255.255.255.0 U-0 U. 0 0 .8 192.168.20.0. 0.0.0.0 U 255.255.255.0 0 0 virbr0

kwaye ke sibuyela kuqwalaselo lokuqala.

Idilesi yethutyana usebenzisa i-ip command

Ngamaxesha amaninzi sihamba ngeLaptop - laptop kwenye Inethiwekhi ye-SME ecele iinkonzo zethu okanye uncedo kwaye asifuni ukulungisa uqwalaselo jikelele lojongano lomsebenzi womnatha. Ukufezekisa oku sinokusebenzisa umyalelo ip.

Umyalelo ip ifakela ngepakethe iproute, okanye iploute2 kuxhomekeke kunikezelo kunye noguqulelo. KwiDebian 6 "Cwangcisa" -ngokoluvo lwethu lobuqu– amaphepha omyalelo wendoda ip Zazicace ngakumbi kunezo, umzekelo, uWheezy noJessie. ip ukuba iyaqhubeka kusetyenziswa ukubonisa, okanye ukukhohlisa umzila- ukuhamba, izixhobo, imigaqo-nkqubo kunye neetonela.

Ungajonga amaphepha esandla oguqulelo olufakiweyo usebenzisa umntu ip.

Ndiyisebenzise kuphela ukunika enye idilesi ye-IP ehambelana ne-SME LAN subnet yenye inkampani. Umzekelo, masinike idilesi ye-IP 192.168.1.250 ukongeza kule osele unayo kwaye eyiyo 10.10.10.1 kwikhadi lenethiwekhi yekhompyuter yam:

buzz@sysadmin:~$ ip addr show eth0
2: eth0: mtu 1500 qdisc pfifo_fast state UP iqela elimiselweyo qlen 1000 link/ether 70:54:d2:19:ad:65 brd ff:ff:ff:ff:ff:ff
    inet 10.10.10.1/24 brd 10.10.10.255 ububanzi behlabathi eth0
       ivumelekile_lft ikhethwa ngonaphakade_lft ngonaphakade inet6 fe80::7254:d2ff:fe19:ad65/64 ikhonkco lomda osebenzayo_lft ikhethwa ngonaphakade_lft ngonaphakade

buzz@sysadmin:~$ sudo ip addr yongeza 192.168.1.250/24 usasazo 192.168.1.255 dev eth0

buzz@sysadmin:~$ ip addr show eth0
2: eth0: mtu 1500 qdisc pfifo_fast state UP iqela elimiselweyo qlen 1000 link/ether 70:54:d2:19:ad:65 brd ff:ff:ff:ff:ff:ff
    inet 10.10.10.1/24 brd 10.10.10.255 ububanzi behlabathi eth0
       esebenzayo_lft ngonaphakade ukhetha_lft ngonaphakade
    inet 192.168.1.250/24 brd 192.168.1.255 ububanzi behlabathi eth0
       ivumelekile_lft ikhethwa ngonaphakade_lft ngonaphakade inet6 fe80::7254:d2ff:fe19:ad65/64 ikhonkco lomda osebenzayo_lft ikhethwa ngonaphakade_lft ngonaphakade

Nangona imveliso yomyalelo ibonisa ukuba utshintsho lusebenza ngonaphakade

esebenzayo_lft ngonaphakade ukhetha_lft ngonaphakade

Oku akwenzeki, esinokuthi sijonge ukuba siyacima kwaye sivule ngokukhawuleza ujongano ekuthethwa ngalo sisebenzisa imiyalelo ifdow eth0 && ifup eth0. Ukuba asifuni ukuqalisa kwakhona ujongano kwaye sibuyele ku I-eth0 kwimo yayo yokuqala, senza:

buzz@sysadmin:~$ sudo ip addr del 192.168.1.250/24 kusasazo 192.168.1.255 dev eth0
buzz@sysadmin:~$ ip addr show eth0

Ukwazi imiyalelo efaka ipakethe iploute2 masenze:

buzz@sysadmin:~$ sudo dpkg -L iproute2 | grep/bin
buzz@sysadmin:~$ sudo dpkg -L iproute2 | grep /sbin

Intetho Eguquguqukayo

Ukuba sifuna ikhompyuter ifumane idilesi ye-IP eguqukayo, kufuneka siqwalasele ujongano lwayo lomsebenzi womnatha ukuze ifumaneke nge zenzeli. Kufuneka nje sibhengeze kwifayile / njl / inethiwekhi / ujongano le migca ilandelayo yolo jongano:

ezenzekelayo eth0
iface etho inet Dhcp

Ukuba ngexesha lenkqubo yokufakela kwagqitywa ukuba ikhadi lenethiwekhi lifumana i-IP eguquguqukayo, inyathelo langaphambili aliyimfuneko njengoko kufuneka liqwalaselwe ngokuchanekileyo ukwenzela ukuba liqeshe i-IP kwi-server ye-DHCP ekhoyo kwi-SME Network.

Ukuba kungenxa yokuba sitshintsha ukusuka kwi-IP engatshintshiyo ukuya kwi-IP yeDynamic, okanye ukuba songeze ujongano olutsha kwaye sifuna ukufumana i-IP eguqukayo, ukwenza olu jongano siluphumeze.

buzz@sysadmin:~$ sudo ifup eth0

umyalelo ukuba kule meko uyalela inkqubo zenzeli ukuqalisa inkqubo yeDHCP. Ukuvala ujongano esilwenzayo

buzz@sysadmin:~$ sudo ifdown eth0

umyalelo oqala inkqubo yokukhupha - Ukukhululwa yoqwalaselo usebenzisa i-DHCP kwaye icime ujongano lwenethiwekhi.

Qhuba indoda dhclient ngolwazi oluninzi malunga nenkqubo yomxhasi weDHCP.

Idilesi engatshintshiyo

Siye sabona kumanqaku amaninzi angaphambili indlela yokuqwalasela i-IP engatshintshiyo kwi-interface yenethiwekhi. Ifayile yoqwalaselo engundoqo yi / njl / inethiwekhi / ujongano. Umzekelo:

buzz@sysadmin:~$ ikati /etc/network/interfaces
# Le fayile ichaza unxibelelwano lwenethiwekhi olukhoyo kwindlela yakho # kunye nendlela yokuyenza isebenze. Ngolwazi oluthe vetshe, jonga ujongano (5). # I-loopback network interface auto lo iface lo inet loopback # Ujongano olusisiseko lwenethiwekhi luvumela-hotplug eth0
iface eth0 inet static
    idilesi 10.10.10.1/24 netmask 255.255.255.0 womnatha 10.10.10.0 usasazo 10.10.10.255 isango 10.10.10.101 # dns-* iinketho ziphunyezwe yi # resolvconfns192.168.10.5. ukusuka kwilinux.fan

Iparameters zoqwalaselo lojongano lwenethiwekhi I-eth0 ukusuka kwifayile yangaphambili bonisa:

  • ukuvumela-hotplug eth0: Isithethantonye se "auto"Y"vumela-auto«. Umgca obonisa ukuba ujongano olubonakalayo I-eth0 kufuneka uvuke - up ngokuzenzekelayo ngenkqubo esezantsi ezohlukeneyo ngexesha loqalo lwekhompyuter. Ngokuqhelekileyo ngokusebenzisa ukuba
  • iface eth0 inet static: umgca obonisa ukuba ujongano- ubuso eth0 kufuneka ilungiselelwe inethiwekhi TCP/IP IPv4 i-IP ezinzileyo- kwaye ayiguquguqukiyo, njengoko yenzeka kwimeko yeNtetho eDynamic ngomgca. Iface eth0 inet dhcp
  • idilesi 10.10.10.1: yabela i IPv4 10.10.10.1 ujongano
  • Umnatha 255.255.255.0: Imaski ye-Subnet ye-LAN yeKlasi "C" eqhelekileyo ukuya kuthi ga kwiikhompyuter ezingama-254. Isithethantonye sokuxela idilesi 10.10.10.1/24 kumgca ongaphambili
  • womnatha: i-subnet apho idilesi eyabelweyo engatshintshiyo iyeyayo
  • usasazo: Usasazo okanye intengiso ye-IP
  • isango: isango lokuqhagamshela kwi-Intanethi
  • dns-nameservers: Idilesi ye IP yomncedisi we DNS ukuba ipakethe ifakiwe isisombululoconf engafanelanga kudideke nefayile /etc/resolv.conf – okanye sombulule
  • dns-ukukhangela: Indawo yokukhangela ehlala ikho kwimibuzo yeDNS

Umxholo wale fayile ungentla unokwenziwa lula ukuze:

buzz@sysadmin:~$ ikati /etc/network/interfaces
auto lo iface lo inet loopback

ukuvumela-hotplug eth0 iface eth0 inet idilesi emileyo 10.10.10.1/24

buzz@sysadmin:~$ ip addr show eth0
2: eth0: mtu 1500 qdisc pfifo_fast state UP iqela elimiselweyo qlen 1000 link/ether 70:54:d2:19:ad:65 brd ff:ff:ff:ff:ff:ff inet 10.10.10.1/24 brd 10.10.10.255 isikophu esisebenzayo etth0 ikhethwa ngonaphakade_lft ngonaphakade inet6 fe80::7254:d2ff:fe19:ad65/64 ikhonkco lomda osebenzayo_lft ikhethwa ngonaphakade_lft ngonaphakade

Zonke ezinye iiparamitha ziya kuthatha amaxabiso angagqibekanga, ngaphandle kokulibala amaxabiso esiwabhengeze kwifayile. /etc/resolv.conf al Hayi fakela iphakheji isisombululoconf.

UQhagamshelwano lweBhulorho - Ibhulorho

Ukwenza iBridge - iblorho kufuneka ufakele i-bridge-utils package:

buzz@sysadmin:~$ sudo ukufaneleka kokufaka ibhulorho-usetyenziso

Iibhulorho zisetyenziswa ngokubanzi kwi-Virtualization. Masithi sine-HP Proliant ML 350 Gen 8 okanye iseva ye-Gen 9 ene-4 ujongano lwenethiwekhi. Sinokushiya omnye wabo ukuba anxibelelane ngokuthe ngqo noMbukeli- host exhasa oomatshini benyani. Ngezithathu eziseleyo sinokwenza iBhulorho engaziwayo -ngaphandle kokwabela nayiphi na idilesi ye-IP- kwaye uqhagamshele oomatshini benyani kuloo bhulorho ukuze bakwazi ukufikelela kwi-SME LAN, nokuba aba matshini baneedilesi ze-IP ezimileyo okanye eziguqukayo.

Eli cebiso liluncedo kakhulu ndilinikwe ngumhlobo wam kunye nomntu endisebenza naye. UEduardo Noel. Kwakhona, kwifayile /usr/share/doc/ifupdown/examples/bridge siya kufumana umbhalo- elishicilelwe indlela yokudibanisa ujongano lwenethiwekhi ezininzi.

buzz@host:~$ sudo nano /etc/network/interfaces
auto lo iface lo inet loopback ukuvumela-hotplug eth0 iface eth0 inet idilesi engatshintshi 192.168.10.27 iface eth1 inet manual iface eth2 inet manual iface eth3 inet manual # Bridge Anonymous auto br0 iface br0 inet manual bridge_ports eth1 eth2 eth3

Isishwankathelo

Isihloko seTelecommunications siyakhohlisa kwaye sifuna ukufundwa kunye nokuziqhelanisa kakhulu. Ii-Sysadmins kufuneka zazi izinto ezibalulekileyo. Eli nqaku nje a Ubuncinci beNdawo yokuNgena. Hayi kwakhona.

Asizange siyichukumise okanye siyichukumise Imodeli yeOSI «Vula uqhagamshelo lwenkqubo» engumzekelo wereferensi yeeprothokholi zenethiwekhi ezinomaleko owenziwe ngo-1980 nguMbutho weHlabathi woMgangatho.ISO«.

Yehla kwimiba yethiyori ye Imodeli yeOSI, phantse ilingana nokuhla kwi-Deep Web ... ubuncinane kum, ongeyena Hacker.

Ukuhanjiswa okulandelayo

Intshayelelo kwiNkonzo yoQinisekiso


Izimvo ezi-5, shiya ezakho

Shiya uluvo lwakho

Idilesi yakho ye email aziyi kupapashwa. ezidingekayo ziphawulwe *

*

*

  1. Uxanduva lwedatha: UMiguel Ángel Gatón
  2. Injongo yedatha: Ulawulo lwe-SPAM, ulawulo lwezimvo.
  3. Umthetho: Imvume yakho
  4. Unxibelelwano lwedatha: Idatha ayizukuhanjiswa kubantu besithathu ngaphandle koxanduva lomthetho.
  5. Ukugcinwa kweenkcukacha
  6. Amalungelo: Ngalo naliphi na ixesha unganciphisa, uphinde uphinde ucime ulwazi lwakho.

  1.   Zodiac Carburus sitsho

    Umyalelo ip Ndiyisebenzisile njengawe, fico, ngamaxesha amaninzi kwaye iye yasebenza njengomsindisi wobomi. Ubufuna nje ukubhala malunga neenethiwekhi zabucala ezigcinelwe uthungelwano lweshishini. Kulihlazo ukuba inqaku "eliluncedo" okanye incwadi kwaye lityelelwe ngabaninzi alinawo amagqabantshintshi.

  2.   Zodiac Carburus sitsho

    Ndiqaphele into eshiyiweyo kwicala lakho, fico. Kwingxelo yebhulorho ithi:
    iface br0 inet manual

    Njengoko uyazi, ngaloo mgca omnye, i-jumper ayiphakamisi ngokuzenzekelayo xa iqala kwakhona. Kufuneka uthi:

    imoto br0
    iface bro inet manual
    ibhulorho_iizibuko eth1 eth2 eth3

    Wamkelekile. 🙂

  3.   UFrederick sitsho

    Molo Zodiac.
    Njengesiqhelo, ukufunda izithuba zam nzulu.
    Ndiza kubandakanya isihloko samanethiwekhi abucala kwinqaku lokuqala leSamba 4. Kwaye ewe, ndilibele ukubhala imoto br0 ekuqaleni koqwalaselo lwebhulorho. Makhe sibone ukuba uLuigys othandekayo, umlawuli wesayithi, uyasiguqula na isithuba.
    Enkosi kakhulu ngexesha lakho, Zodiac.

  4.   UAdo Ello sitsho

    Ndiyakuthanda ukufunda ezi ntlobo zezifundo kwi-RSS yam. Kudala ndizifunda kwaye ndiye ndaqonda ukuba zifana nezahluko. Into endiyithethileyo ... Enkosi, ndikufundile

  5.   UFrederick sitsho

    Ewe, qhubeka ukonwabela ukufunda, Ado El. Molweni!