Whirihoranga Whatunga me te Whakahaere - SME Networks

Kia ora e hoa ma, e hoa ma!

Taupū whanui o te raupapa: Tuihono Rorohiko mo nga SME: Whakataki

Kaore ano kia whakatapua he tuhinga mo te kaupapa e ahu mai ana te upoko o tenei. Kaore ano kia panuihia e maatau etahi korero e pa ana ki te tuhi mo taua mea. I tangohia e maatau mo taua mea e mohiotia ana e te katoa, akene koina pea te take i warewarehia ai e maatau tae noa ki tenei ra. Heoi, ka tuhia e maatau he pou paku mo taua mea mo te hunga e hiahia ana ki te whakahou, ki te ako ranei mo te kaupapa.

Whatunga: whakamāramatanga whaihua

Mo nga mahi whaihua, kotahi Kupenga - whatunga Kei i a ia nga taputapu whatunga e rua neke atu ranei penei i te rorohiko, te kaituku, te miihini, nga waea pukoro, etahi atu taputapu whatunga ranei, e honoa ana e nga taura a-tinana, hononga ahokore ranei hei tohatoha me te tohatoha korero i waenga i nga taputapu hono

Mo etahi atu korero tirohia:

Kia maumahara, ko nga hononga e whakaekea ana ma te whakaaro nui, kaore mo te ngahau. 😉

Tautuhinga whatunga

  • Ka tūtohu ahau ki te hunga e whakamahi ana i nga punaha whakahaere CentOS y OpenSUSE, kia arahina e te tuhinga Whirihoranga Tūmau Me te GNU / Linux, na te kaituhi a Joel Barrios Dueñas. He uaua ki ahau te tuhi i nga kaupapa ka korerohia e matou i raro ake nei mo te tohatoha Debian, CentOS me te OpenSUSE i roto i taua tuhinga ano, na te mea e rua nga mea e rua he rereke mai i te mea tuatahi rawa atu mo nga ingoa, te waahi o nga konae whirihora, o raatau korero, me etahi atu ahuatanga rapunga whakaaro e pa ana ki te kaupapa.

Ko nga punaha whakahaere e whakamahia ana e maatau puta noa i tenei raupapa, he taputapu whakairoiro mo te whirihora i nga momo taputapu whatunga. Heoi, ko tenei pou ka aro ki te whakamahi i te papatohu whakahau, te tauranga ranei.

Ka rite ki ta tatou i kite ai i nga tuhinga o mua, i te nuinga o nga wa ka whirihorahia e maatau te hononga whatunga -e nga atanga ranei- i te waa o te whakauru kia mohio ai, ka oti te whakauru i te punaha whakahaere turanga, he hononga whaihua ta te rorohiko kupenga

Ko te whirihoranga tika o te mea nui ko te atanga whatunga tuatahi - matua - he mea nui mo nga mahi o muri mai o te Papamahi, Papa Mahiranei tūmau kei te whakatinana tatou.

Kaore matou e whakamahi i te NetworkManager

Hei whakangawari i nga tuhinga o tenei tuhinga, aro atu ki te whirihoranga a te kaiwhakarato, kia maama ake ai te panui, ka kii maatau no ko te ratonga e tohaina mai ana e te kohinga kei te whakamahia kaiwhakahaere-whatunga. Ki te kore me mahi e tatou nga mahi e whai ake nei:

I Debian

buzz @ sysadmin: ~ $ sudo systemctl kati whatunga-kaiwhakahaere.service
buzz @ sysadmin: ~ $ sudo systemctl mana-whatunga-kaiwhakahaere.service
buzz @ sysadmin: ~ $ sudo systemctl mono i te whatunga-kaiwhakahaere.service
buzz @ sysadmin: ~ $ sudo ifconfig

Mena ko te whirihoranga o nga kaata whatunga i whakawhirinaki ki te ratonga kaiwhakahaere-whatunga he tika, katahi ka taea te mahi tonu. Heoi, he pai ki te mahi:

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

ki te tiro takirua kei te pai nga mahi katoa.

I runga i te CentOS

I roto i te pukapuka i te whakatakotoranga PDF «Whirihoranga Tūmau Me te GNU / Linux«, Putanga Hōngongoi 2016, Upoko 48.2.2 kua whakatapua ki te kaupapa o te ratonga KaiwhakahaereAitua. Kei te tumanako ahau ko tana kaituhi, ko Joel Barrios Dueñas, kaore i tino pai - ki a ia he wairangi - te whakamahinga o KaiwhakahaereAitua i nga Servers.

Atanga Itarangi

Hei tikanga whanui, ka mahi ana maatau me nga miihini mariko Qemu-KVM, ka tautuhia e te punaha whakahaere nga Ethernet Atanga me nga ingoa penei ethX, kei hea te X he tohu i te uara tau. Ko te atanga Itarangi tuatahi e mohiotia ana ko te eth0, ko te tuarua ko te eth1, me era atu.

Mena e pa ana ki nga punaha whakahaere a Debian - me nga waahanga - ka rere i runga i nga miihini a-tinana, he pono ano enei korero.

Mena ka mahi maatau i nga miihini a-tinana me nga punaha whakahaere CentOS y OpenSUSE, ka tautuhia e te punaha whakahaere hei enoX. He nui nga ritenga ka rite ki nga miihini mariko-me enei punaha whakahaere- i runga i nga kaitoro o te VMware.

I roto i nga miihini mariko i hangaia mai i te punaha whakahaere FreeBSD -ko wai hoki te Rorohiko Koreutu- e mohiotia ana ko emX o vtnetX i runga i te mea kei Qemu-KVM ranei kei runga VMware ranei. Mena he tinana-a-tinana ka mohiotia ko era emX.

Tautuhia nga Atanga Itarangi

Hei tautuhi i nga atanga whatunga katoa e waatea ana ki taku rorohiko sysadmin.fromlinux.fan, mahia e matou:

buzz @ sysadmin: ~ $ sudo ifconfig -a
eth0 Hono hono: Itarangi HWaddr 70: 54: d2: 19: ad: 65 inet addr: 10.10.10.1 Bcast: 10.10.10.255 Kapi: 255.255.255.0 inet6 addr: fe80 :: 7254: d2ff: fe19: ad65 / 64 Taapu: Hono ... lo Whakakapi hono: Taapiri Paetata Whakauru Whakauru: 127.0.0.1 Kapi: 255.0.0.0 inet6 addr: :: 1/128 Tauira: Kaihautu ... virbr0 Hono hono: Ethernet HWaddr 52: 54: 00: c8: 35 : 5e inet addr: 192.168.10.1 Bcast: 192.168.10.255 Mask: 255.255.255.0 inet6 addr: fe80 :: 5054: ff: fec8: 355e / 64 Scope: Hononga ... virbr0-nic Hono kapi: Ethernet HWaddr 52:54 : 00: c8: 35: 5e PUKA MULTICAST MTU: 1500 Mita: 1 ... vmnet8 Hono hono: Ethernet HWaddr 00: 50: 56: c0: 00: 08 inet addr: 192.168.20.1 Bcast: 192.168.20.255 Kapi: 255.255.255.0 .6 inet80 addr: fe250 :: 56: 0ff: fec8: 64/XNUMX Tauwhi: Hono ...
  • Ko nga ellipsis e toru i roto i nga whakaputanga o mua ko te tikanga he maha atu nga korero i whakahokia mai kaore e whakaatuhia ana hei penapena waahi.

I te mea kua whakauruhia e au ki runga i te punaha whakahaere a Debian 8 "Jessie" e rua nga kaupapa miihini miihini tautoko, ara, Qemu-KVM y VMware Mahi Mahi Tūmau 10.0.6, Ka whakahokia e te whakahau nga atanga katoa o mua.

  • Mo te rekoata: ko te raupaparorohiko takitahi VMware Workstation Server 10.0.6 he kape ture na taku hoa me taku hoamahi a El NeoZelandes, i whiwhi ma te Ipurangi i tona whenua ake ka atawhai ki te tuku mai ki ahau.

Kia kite taatau he korero ka taea mai i nga putanga o mua:

  • eth0: Atanga whatunga matua me te wahitau IPv4 10.10.10.1. Ka whakaatuhia hoki te wahitau IPv6.
  • lo: Loopback ranei rohe me te IPv4 127.0.0.1 me te IPv6 -e matauhia ana ki enei atanga katoa- :: 1/128.
  • virbr0: Atanga whatunga momo-piriti -  Bhiwi me te IPv4 192.168.10.1 me te wahitau MAC 52:54:00:c8:35:5e. Ko tenei maataki mariko te mea e hanga ana e tatou, e whirihora ana i nga Kaiwhakarite-Pai o te Qemu-KVM hei whatunga «TaunoaTuhinga o mua.
  • virbr0-nic: Atanga Whatunga e hanga ana i te Qemu-KVMTuhinga o mua. Anonymous Bridge me te korero ano MAC 52:54:00:c8:35:5e e virbr0. Kaore he IP.
  • vmnet8: Momo atanga whatunga NAT whirihorahia i roto i te VMware Etita Whatunga Mariko.

El VMware Tūmau Wāhimahi ma tana Etita Whatunga Mariko, whirihorahia te rereketanga o nga Piriti e hangaia ana e koe me ia waahanga-a-tinana o te Kaimana - Kaihautū. Kei te whakamahia te ipu i roto i Tuhinga o mua?.

Ko tetahi atu tono - ehara koinei anake ko tera anake - ki te tiki korero mo nga hononga whatunga lshw - Rarangi Hardware. lshw he taputapu hei tango i nga korero taipitopito mo te whirihoranga o te miihini. Mena ka rere taatau i roto i te papatohu:

buzz @ sysadmin: ~ $ aptitude rapu lshw
p lshw - nga korero mo te whirihoranga taputapu  
p lshw-gtk - korero whakairoiro mo te whirihoranga taputapu

Kua kite matou kei kona ano tetahi atanga whakairoiro ka waiho e matou ma koutou hei whakamatautau. Me whakauru e tatou te aratau papatohu ka oma i muri:

buzz @ sysadmin: ~ $ sudo lshw -cass network
[sudo] kupuhipa mo te buzz:
  *-mahinga               
       whakaahuatanga: Hua atanga Ethernet: 82579V Gigabit Hononga Hononga kaihoko: Intel Corporation tinana tinana: 19 info pahi: pci @ 0000: 00: 19.0 ingoa arorau: putanga et0: 05 rangatū: 70: 54: d2: 19: pānuitanga: 65 rahi: 100Mbit / s kaha: 1Gbit / s whanui: 32 paraire karaka: 33MHz kaha: pm msi bus_master ...
  * -Whakaahono KAUPAPA
       whakaahuatanga: Itarangi atanga id id: 1 ingoa arorau: virbr0-nic rangatū: 52: 54: 00: c8: 35: 5e rahi: 10Mbit / s kaha: ethernet a-tinana

Me whakahaere e tatou nga ingoa whaitake o te atanga

I etahi waa, ina koa ka huri maatau i tetahi kaari hononga a-tinana ahakoa te aha, ka kite maatau ko te nama X e tautuhi ana i te atanga kua piki ake ma te 1 ka kite noa maatau ka rere ana ifconfig -a, i waenga la āhuatanga he aha te mahi i muri o te panoni. Ka puta ano ka tangohia ana e maatau tetahi hononga whatunga mariko ahakoa te aha, katahi ka taapiri ano i tetahi atu.

Ka raru pea nga korero o runga ake nei i a maatau kua whirihora e hono ana - herea ki tetahi, ki te maha atu ranei o nga ratonga, tetahi ingoa atanga arorau, ahakoa eth0, eno1 o em0. Ko te mea tino kore e pai ko te nuinga o nga wa i muri mai - i nga tau pea - mai i te whirihoranga tuatahi. Na ka puta mai nga atanga hou me nga ingoa penei eth1,eth2, eno2, em1, me etahi atu, me etahi ratonga ka mutu te mahi tika. He pera ano te hunga kua pa atu āhuatanga Kei te mohio koe ki taku korero 😉

Ko nga ingoa whaitake o nga hononga whatunga kei Debian - me etahi o o raatau ake - kei roto i te konae /etc/udev/rules.d/70-persisten-net.rules. I te CentOS 7 kei roto i te konae /etc/udev/rules.d/90-eno-fix.rules, i te mea i ona putanga o mua he rite tonu te konae ki ta Debian.

I DebianMena kei te hiahia koe ki te whakarereke i te ingoa whaitake o tetahi atanga whatunga, tirohia te raina e tika ana ki tana wahitau MAC me te whakarereke i te uara Ingoa = ethX ma te aha te uara ingoa whaitake e hiahia ana. Kia angitu ai nga whakarereketanga, me whakato i to rorohiko.

Mo te CentOS 7, tirohia nga mahi «Whirihoranga Tūmau Me te GNU / Linux»Na Joel Barrios Dueñas, i reira ka horaina he tikanga taipitopito.

  • Mea nui: Ahakoa he aha,Kia mataara! Me te ratonga KaiwhakahaereAitua mena kei te whakahaere koe i nga hononga.

Whakakihia nga taapiri o nga hononga whatunga

I Debian, ki te hiahia tatou ki te whakarereke i nga waahanga o te kaari whatunga mo te wa katoa, me whakatika e tatou te konae / Etc / whatunga / atanga kia rite ki te korero i raro nei.

Kia mohio taipitopito -a te maha atu- o nga whiringa katoa ka taea e koe te whakamahi korero tangata atanga. Ka tūtohu ano matou ki te panui i nga tuhinga kei roto i te kōpaki:

buzz @ sysadmin: ~ $ ls -l / usr / share / tuhinga / mena /
katoa 44 drwxr-xr-x 2 pakiaka pakiaka 4096 Akuhata 7 2016 tokoni
drwxr-xr-x 2 pakiaka pakiaka 4096 Akuhata 7 2016 tauira
-rw-r - r-- 1 pakiaka pakiaka 976 Jun 21 2012 manatārua -rw-r - r-- 1 pakiaka pakiaka 18243 13 Poutu te Rangi 2015 1 changelog.gz -rw-r - r-- 297 pakiaka pakiaka 21 Jun 2012 1 PANUI.Bebian.gz -rw-r - r-- 454 pakiaka pakiaka 29 Nov 2014 1 README -rw-r - r-- 946 pakiaka pakiaka 21 Jun 2012 XNUMX KATOA

Kaupapa matawai

Na roto i te hotaka matawai Ka taea e taatau te korero, te whakararangi me te whakarereke i nga taapiri o te kaari whatunga penei i te tere hononga, te whiriwhiringa aunoa, te tirotiro i nga utanga - tirohia te utu utunga, etc. E waatea ana i nga whare putunga o nga tohatoha tata.

buzz @ sysadmin: ~ $ sudo aptitude tāuta ettool
[sudo] kupuhipa mo te buzz:

buzz @ sysadmin: ~ $ sudo ethtool eth0
Tautuhinga mo te eth0: tauranga tautokohia: [TP] Aratau hono tautokohia: 10baseT / Haurua 10baseT / Katoa 100baseT / Haurua 100baseT / Katoa 1000baseT / Katoa te tautoko anga okioki tautokohia: Kaore e tautoko i te whiriwhiringa-aunoa: Ae Nga momo hono hono: 10baseT / hawhe 10baseT / 100base KatoaT / Haurua 100baseT / Katoa 1000baseT / Katoa te whakamahi anga anga okioki: Kaore he Whakawhiti-korero Aunoa: Ae Tere: 100Mb / s Ruarua: Tauranga Katoa: Tuarua takirua PHYAD: 1 Kaituku: whakawhiti-a-roto: i runga i te MDI-X: i runga (auto) Ka tautoko i te Whakaoho-i runga: pumbg Whakaoho-mai: g Te taumata karere o naianei: 0x00000007 (7) drv rapurapu hono hono Kua kitea te hono: ae

Ko nga whakarereketanga ka mahia e maatau ma tenei taputapu he poto poto noa iho ka ngaro i te whakaohooho ano o te rorohiko. Mena ka hiahia maatau ki te whakarereke pumau matawai, me taapiri atu ki te konae / Etc / whatunga / atanga he aronga «Tuhinga o mua"Ranei" i mua i te hiki o te atanga "e whai ake nei:

auto1 auto
iface eth1 inet dhcp
i mua / sbin / ethtool -s eth1 tere 1000 duplex kapi

Koinei te kaari hononga eth1 e whiwhi ana i tana wahitau IP mai i te kaiwhakarato DHCP, ka whakarerekehia mo te mahi tere tere 1000 Mb / s i te aratau Te Whanga Kino.

  • Ko te tikanga i runga ake nei he tika ano mo nga kaari me nga IP pateko.

Ip wāhitau

Ka kite maatau i raro nei me pehea te whirihora i te wahitau IP o nga taputapu, me te tomokanga hoki - kuwaha na te taunoa, e tika ana mo te whakawhitiwhiti korero me te toenga o te whatunga rohe me tika me te Ipurangi na roto su kuwaha.

  • Ka tuhia e matou "tika»Ka tirohia nga keehi o nga whatunga SME e whakaaehia ai te urunga Ipurangi me te kore he kaitoha takawaenga, nei te e kore e tūtohu, ahakoa he kaha Pātūahi i runga i te rorohiko ake e mahi ana hei Patohi. Ka tae ana ki tou huringa ka pa ta matau ki tenei kaupapa takawaenga.

Te korero poto

Te whakamahi i nga whakahau paerewa o tetahi tohatoha Linux penei i te ip, ifconfig me te huarahi, ka taea e taatau te whirihora i tetahi waahanga hononga pera ka kite i raro.

Ki te toha i tetahi wahitau IP me tana kopare a ka tirohia te mahi, me mahi:

buzz @ sysadmin: ~ $ sudo ifconfig eth0 172.16.10.2 netmask 255.255.0.0
buzz @ sysadmin: ~ $ sudo ifconfig
eth0 Hono hono: Itarangi HWaddr 70: 54: d2: 19: ad: 65 inet addr: 172.16.10.2 Bcast: 172.16.255.255 Kapi: 255.255.0.0 inet6 addr: fe80 :: 7254: d2ff: fe19: ad65 / 64 Taapu: Hononga UP BROADCAST RUNNING MULTICAST MTU: 1500 Metric: 1 RX paatete: 0 hapa: 0 i maturuturu: 0 he taapiri: 0 anga: 0 TX paatete: 659 hapa: 0 kua taka: 0 he taapiri: 0 kaikawe: 0 tukinga: 0 tohu: 1000 RX paita: 0 (0.0 B) TX paita: 115601 (112.8 KiB) Aukati: 20 Mahara: fe600000-fe620000

Katahi ano ka tohaina mo te kaari eth0 wāhitau IP pateko 172.16.10.2 me te kopare subnet 255.255.0.0 no ki te Akomanga «B» Whatunga Ipurangi Takitahi.

  • Panui kua whakahoutia e maatau te whirihoranga o te atanga whatunga eth0 o te rorohiko sysadmin.fromlinux.fan, i mua ko te IP 10.10.10.1/255.255.255.0 no tetahi Akomanga Ipurangi Tuuturu, "A", ahakoa e 254 noa nga rorohiko e rite ana ki tana kopare..

Hei whirihora i te Patohi ma te taunoa ka tirohia te mahi me mahi e tatou:

buzz @ sysadmin: ~ $ sudo ara taapiri taunoa gw 172.16.10.1 eth0

buzz @ sysadmin: ~ $ sudo ara -n
Kernel IP ararere tepu Whakatau Kaha Gateway Genmask Flags Metric Ref Whakamahia 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 UG 1024 0 0 eth0 172.16.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0 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 U 0 0 0 virbr0

Katahi ano ka tohaina e matou te Pukapuka 172.16.10.1 ki te atanga eth0 172.16.10.2, i te mea e pupuri ana etahi atu atanga i o raatau uara o mua.

Hei tango KATOA i nga tautuhinga kaari whatunga, kia rere a:

buzz @ sysadmin: ~ $ sudo ip addr flush eth0

buzz @ sysadmin: ~ $ sudo ifconfig
Eth0 Whakakapi hono: Itarangi HWaddr 70: 54: d2: 19: ad: 65 UP BROADCAST RUNNING MULTICAST MTU: 1500 Metric: 1 RX paatete: 0 hapa: 0 i taka: 0 he taapiri: 0 anga: 0 pihi TX: 718 hapa: 0 i maturuturu: 0 nui ake: 0 kaikawe: 0 tukinga: 0 txqueuelen: 1000 RX paita: 0 (0.0 B) TX paita: 125388 (122.4 KiB) Whakakore: 20 Mahara: fe600000-fe620000

buzz @ sysadmin: ~ $ sudo ara -n
Kernel IP ararere tepu Whakatere Kaha Gateway Genmask Flags Metric Ref Whakamahia 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 U 0 0 0 virbr0
  • Kia pai ta tatou titiro, i a tatou ka tango KATOA i nga tautuhinga whatunga o mua tae atu ki nga korero i te / etc / whatunga / atanga!.

Ki te whakahoki i te ao ki tona ahuatanga i mua i te tiimata o te rorohiko. Ki te kore tatou e hiahia ki te whakamutu i te mahi, me oma:

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

buzz @ sysadmin: ~ $ sudo ifconfig eth0
et0 Hono hono: 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 RUNNING MULTICAST MTU: 1500 Mita: 1 RX paatete: 0 hapa: 0 i whakahekehia: 0 nui ake: 0 anga: 0 TX paatete: 729 hapa: 0 kua heke: 0 nui atu: 0 kaikawe: 0 tukinga: 0 txqueuelen: 1000 RX paita: 0 (0.0 B) TX paita: 129009 (125.9 KiB) Aukati: 20 Mahara: fe600000-fe620000

buzz @ sysadmin: ~ $ sudo ara -n
Kernel IP ararere tepu Whakatau Kaha Gateway Genmask Flags Metric Ref Whakamahia 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 0 0 vmnet8 192.168.20.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0

ana hoki ka hoki ano ki te whirihoranga taketake.

Te korero poto ma te whakamahi i te whakahau ip

He maha nga waa ka neke maatau me tetahi Pona - pona ki tetahi atu Whatunga SME i tono mai i a maatau ratonga, awhina ranei kaore matou e hiahia ki te whakarereke i te whirihoranga whanui o tana hononga whatunga. Hei whakatutuki i tenei ka taea e taatau te whakamahi i te whakahau ip.

Te whakahau ip tāuta me te mōkihi iproute, ko te iproute2 kei i te tohatoha me te putanga. I roto i te Debian 6 "Kopikopiko" -ki ta maatau ake whakaaro- nga wharangi whakahau tangata ip i tino marama atu i te tauira, Wheezy me Jessie. ip mena kei te whakamahia tonu hei whakaatu, hei whakahaere ranei i te huarahi. ararere, taputapu, kaupapa here huringa, me nga kauhanga.

Ka taea e koe te tirotiro i nga whaarangi tangata mo te waahanga whakauru ma te whakamahi tangata ip.

Kua whakamahia noa e au ki te toha i tetahi atu wahitau IP e hangai ana ki te raina tuarua a SMB LAN a tetahi atu kamupene. Hei tauira, kia tohua te IP IP 192.168.1.250 hei taapiri ki tetahi kei a koe na ko tehea te 10.10.10.1 ki te kaari rorohiko a taku rorohiko:

buzz @ sysadmin: ~ $ ip addr whakaatu i te eth0
2: eth0: mtu 1500 qdisc pfifo_fast state UP roopu taunoa qlen 1000 hono / 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 whanui ao eth0
       valid_lft ake ake manakohia_lft ake tonu inet6 fe80 :: 7254: d2ff: fe19: ad65 / 64 hononga whanui valid_lft ake ake manakohia_lft ake ake

buzz @ sysadmin: ~ $ sudo ip addr taapiri 192.168.1.250/24 paho 192.168.1.255 dev eth0

buzz @ sysadmin: ~ $ ip addr whakaatu i te eth0
2: eth0: mtu 1500 qdisc pfifo_fast state UP roopu taunoa qlen 1000 hono / 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 whanui ao eth0
       valid_lft ake ake manakohia_lft ake ake
    inet 192.168.1.250/24 brd 192.168.1.255 whanui ao eth0
       valid_lft ake ake manakohia_lft ake tonu inet6 fe80 :: 7254: d2ff: fe19: ad65 / 64 hononga whanui valid_lft ake ake manakohia_lft ake ake

Ahakoa ko te putanga o te whakahau e whakaatu ana ka whai mana te whakarereketanga mo ake tonu atu

valid_lft ake ake manakohia_lft ake ake

kaore tenei e tino pa ana, ka taea e taatau te tirotiro mēnā ka whakakorehia e maatau i muri tonu ka taea te atanga e paatai ​​ana ma te whakamahi i nga whakahau ifdow eth0 && ifup eth0. Mena kaore tatou e hiahia ki te whakaara ano i te atanga ka hoki ano ki eth0 ki tona ahua tuatahi, ka mahia e matou:

buzz @ sysadmin: ~ $ sudo ip addr del 192.168.1.250/24 paho 192.168.1.255 dev eth0
buzz @ sysadmin: ~ $ ip addr whakaatu i te eth0

Kia mohio ai ki nga whakahau e utaina ana e te putea iproute2 kia rere a:

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

Whakawhitinga Tuuturu

Mena e hiahia ana maatau kia whiwhi te taputapu i tetahi wahitau IP hihiri, me whirihora e tatou tana hononga whatunga kia riro mai ma te kaitoha. Me kii noa ta maatau ki te konae / Etc / whatunga / atanga nga raina e whai ake nei mo taua atanga:

auto0 auto
iface etho inet dhcp

Mena i te wa o te whakauru ka whakatauhia kia whiwhi te kaari whatunga i tetahi IP hihiri, kaore i te tika te takahanga o mua na te mea me tika te whirihora kia riihitia ai he IP mai i te kaituku DHCP kei roto i te Whatunga SME.

Mena he rereke taatau mai i te IP Static ki tetahi Dynamic, ki te taapiri ranei i tetahi waahanga hou me te hiahia ki te whiwhi IP hihiri, kia ahei ai taua hononga e mahia ana e taatau.

buzz @ sysadmin: ~ $ sudo ifup eth0

whakahaua kia penei te tohutohu i te hotaka kaitoha tiimata te tukanga DHCP. Hei mono i te atanga e mahia ana e maatau

buzz @ sysadmin: ~ $ sudo ifdown eth0

whakahau ka tiimata te tukanga tuku - tuku tautuhinga ma te whakamahi i te DHCP ka kati i te hononga whatunga.

Rere tangata dhclient mo etahi atu korero mo te hotaka a te kaihoko DHCP.

Te korero korero

Kua kitea e maatau i roto i nga tuhinga o mua me pehea te whirihora i tetahi IP tuuturu ki runga i te hononga whatunga. Ko te konae whirihoranga matua / Etc / whatunga / atanga. Tauira:

buzz @ sysadmin: ~ $ ngeru / etc / whatunga / atanga
# Ma tenei konae e whakaahua nga hononga whatunga e waatea ana ki to punaha # me pehea te whakahohe. Mo etahi atu korero, tirohia nga atanga (5). # Ko te hononga whatunga loopback auto auto if if lo inet loopback # Te hononga whatunga tuatahi whakaaetia-hotplug eth0
iface eth0 inet static
    wāhitau 10.10.10.1/24 netmask 255.255.255.0 whatunga 10.10.10.0 paho 10.10.10.255 tomokanga 10.10.10.101 # dns- * ka whakatinanahia e te kohinga # resolvconf, mena ka whakauruhia nga ingoa-ingoa-ingoa 192.168.10.5 dns-rapu mai linux.fan

Nga waahanga whirihoranga atanga whatunga eth0 mai i te konae kei runga ake nei tohu:

  • tukua-hotplug eth0: Kupu taurite o "auto»A«tukua-aunoa«. Raina e tohu ana ko te hononga tinana eth0 me whakatika - up aunoa e nga momo punahaarorohiko i te whakaohotanga rorohiko. Tikanga e mena
  • iface eth0 inet static: raina e tohu ana ko te atanga - iface eth0 me whirihora mo tetahi whatunga TCP / IP IPv4 statically -fixed IP- a kaore i te hihiri, pera i te keehi Dynamic Addressing me te raina iface eth0 inet dhcp
  • wāhitau 10.10.10.1: toha IPv4 10.10.10.1 ki te atanga
  • netmask 255.255.255.0- Ko te kopare Subnet mo te Akomanga angamaheni "C" LAN tae atu ki te 254 rorohiko. Tuhinga o mua kua puta wahitau 10.10.10.1/24 i te raina o mua
  • whatunga: subnet kei a ia te waahi korero kua tohaina
  • pāhotanga: Pāhotanga whakatairanga IP ranei
  • kuwaha: tomokanga mo te hono noa ki te Ipurangi
  • dns-ingoa-ingoa- Wāhitau IP tūmau DNS mena kua whakauruhia te mōkihi whakataunga e kore nei e raruraru ki te konae /etc/resolv.conf - whakaoti ranei
  • dns-rapu: rohe rapu taunoa i nga uiui DNS

Ko nga korero o te konae i runga ake nei ka taea te ngawari ki:

buzz @ sysadmin: ~ $ ngeru / etc / whatunga / atanga
auto lo iface mai inet loopback

allow-hotplug eth0 iface eth0 inet static address 10.10.10.1/24

buzz @ sysadmin: ~ $ ip addr whakaatu i te eth0
2: eth0: mtu 1500 qdisc pfifo_fast state UP roopu taunoa qlen 1000 hono / 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 whanui ao eth0 valid_lft ake ake prefer_lft ake tonu inet6 fe80 :: 7254: d2ff: fe19: ad65 / 64 hono whanui valid_lft ake ake manakohia_lft ake ake

Ko nga taapiri katoa ka tango i nga uara taunoa, me te kore e warewarehia nga uara kua kiia e matou i roto i te konae /etc/resolv.conf al NO whakauruhia te putea whakataunga.

Piriti - Hononga Piriti

Ki te hanga Piriti - Bridge me whakauru e koe te kohinga piriti-utils:

buzz @ sysadmin: ~ $ sudo aptitude whakauruhia nga taputapu-piriti

Kei te whakamahia whanui nga piriti i roto i te Virtualization. Me kii taatau he HP Proliant ML 350 Gen 8, ko te Gen 9 kaiwhakarato ranei me te 4 nga hononga whatunga. Ka taea e maatau te waiho tetahi o ia kia korero tika ki te Kaimanaaki - Kaihautū e tautoko ana i nga miihini mariko. Me nga toenga e toru ka taea e maatau te hanga Piriti Ingoa -me te kore e toha i tetahi IP- ka hono atu i nga miihini mariko ki taua piriti kia uru ki te SME LAN, he miihini IP tuuturu, he hihiri ranei nga IP.

Ko tenei tohu tino whaihua i homai e taku hoa me taku hoamahi Eduardo Noera. Ano hoki, kei roto i te konae / usr / share / doc / mena / tauira / piriti ka kitea e maatau he tuhinga - hōtuhi me pehea te piriti i te maha o nga hononga whatunga.

buzz @ host: ~ $ sudo nano / etc / whatunga / atanga
auto lo iface lo inet loopback allow-hotplug eth0 iface eth0 inet static address 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

Whakarāpopoto

He uaua te kaupapa Telecommunications a he nui nga akoranga me nga whakaritenga. Me mohio a Sysadmin ki nga mea nui. Ko tenei tuhinga he noa Tuhinga o mua. Kore ake.

Kare matou i pa atu - kaore ano hoki matou e pa atu ki te Tauira OSI «Whakatuwheratanga Matapihi Tatauranga»Ko tehea te tauira tohutoro mo nga kawa whatunga me te hoahoanga paparanga i hangaia i te 1980 e te International Organization for Standardization«ISO".

Heke atu ki nga ahuatanga ari o Tauira OSI, he rite tonu ki te heke ki te Paetukutuku hohonu, ki te Paetukutuku hohonu ... te mea nui ki ahau ehara au i te Hacker.

Te tuku ā muri ake

Whakataki ki te Ratonga Motuhēhēnga


Ko nga korero o te tuhinga e piri ana ki o maatau kaupapa o matatika whakatika. Ki te ripoata i tetahi paatene paato Here.

5 korero, waiho maau

Waiho to korero

Ka kore e whakaputaina tō wāhitau īmēra. Kua tohua ngā āpure e hiahiatia ana ki *

*

*

  1. He kawenga mo nga raraunga: Miguel Ángel Gatón
  2. Te kaupapa o te raraunga: Whakahaerehia te SPAM, te whakahaere korero.
  3. Ture: To whakaae
  4. Whakawhitinga korero: Kaore nga korero e tukuna ki nga taha tuatoru engari ma te ture herenga.
  5. Rokiroki raraunga: Paetukutuku e whakahaerehia ana e Occentus Networks (EU)
  6. Tika: I nga wa katoa ka taea e koe te whakaiti, te whakaora me te muku i o korero.

  1.   Kaihauturu Zodiac ka mea

    Te whakahau ip He maha nga wa i whakamahia ai e au kia rite ki a koe, e Fico, a kua waiho hei raina ora. Me tuhi noa koe mo nga hononga tuuturu kua rahuitia mo nga hononga pakihi. He mea pouri na te mea he tuhinga "ngawari" he pukapuka-a-ringa ranei na te nuinga kaore he korero ake.

  2.   Kaihauturu Zodiac ka mea

    I kite ahau i tetahi hapa i to taha, e Fico. I roto i nga korero a te piriti e kii ana:
    iface br0 inet pukapuka

    E mohio ana koe, me taua raina kotahi ka whakaara ano i te piriti kaore e neke aunoa. Me ki:

    motuka br0
    iface bro inet manual
    piriti_ports eth1 eth2 eth3

    Nau mai haere mai. 🙂

  3.   kaikaiwhenua ka mea

    Kia ora Zodiac.
    Ko koe e panui tonu ana i aku pou ki te hohonu.
    Ka whakauruhia e au te kaupapa o nga hononga takitahi ki te tuhinga tuatahi o Samba 4. Ae ra, kua wareware ahau ki te tuhi motuka br0 i te timatanga o te whirihoranga piriti. Tirohia mena kei te whakarerekehia e te Luigys, kaiwhakahaere o te papaanga te pou.
    Nga mihi nui mo to wa, Zodiac.

  4.   Ado Ello ka mea

    He pai ki ahau te panui i enei momo akoranga i runga i taku RSS. Kua roa taku korero i a raatau kua hinga kua rite ratou ki nga upoko. I kii au ... Mauruuru, kua panui ahau ki a koe

  5.   kaikaiwhenua ka mea

    Ka pai tonu ki te paanui, Ado Ello. Kia ora!