IP Tutorial: Subnet Mask thiab Subnetting

Cov txheej txheem:

IP Tutorial: Subnet Mask thiab Subnetting
IP Tutorial: Subnet Mask thiab Subnetting
Anonim

Ib lub subnet tso cai rau kev khiav ntawm kev sib txuas hauv network ntawm cov tswv kom raug cais raws li kev teeb tsa network. Los ntawm kev teeb tsa cov tswv rau hauv cov pab pawg muaj txiaj ntsig, subnetting tuaj yeem txhim kho kev ruaj ntseg network thiab kev ua haujlwm.

Subnet Mask

Tej zaum qhov pom zoo tshaj plaws ntawm subnetting yog lub npog ntsej muag subnet. Zoo li IP chaw nyob, lub npog ntsej muag subnet muaj plaub bytes (32 khoom) thiab feem ntau sau siv tib lub cim dotted-decimal. Piv txwv li, ntawm no yog ib daim npog qhov ncauj qhov ntswg hauv nws qhov sawv cev binary:

11111111 11111111 11111111 0000000

Lub npog ntsej muag no feem ntau pom nyob rau hauv qhov sib npaug, nyeem tau ntau dua:

255.255.255.0

Txhua ntawm plaub bytes yog yim ntsis ntev. Hauv binary notation, ib byte muaj yim xoom thiab ib qho, sawv cev ntawm ob lub zog. Tus nqi "rau lub hwj chim" yog qhov ua haujlwm ntawm txoj haujlwm ntawm tus nqi hauv txoj hlua, nrog rau tus nqi qis tshaj plaws pib ntawm 0. Tus nqi me ntsis ntawm 11111111 yog sib npaug rau 2 7 + 26+25+24+23 +22+21+20, los yog 255. Los ntawm qhov sib piv, tus nqi me ntsis ntawm 00100001 is equal to 25+20, or 33.

Thov Subnet Mask

Lub npog ntsej muag subnet tsis ua haujlwm raws li qhov chaw nyob IP lossis nws tsis muaj nyob ntawm tus IP chaw nyob. Hloov chaw, lub qhov ncauj qhov ntswg subnet nrog tus IP chaw nyob, thiab ob qhov tseem ceeb ua haujlwm ua ke. Siv lub npog ntsej muag subnet rau qhov chaw nyob IP faib qhov chaw nyob ua ob ntu, qhov chaw nyob txuas ntxiv thiab chaw nyob tus tswv.

Rau lub ntsej muag subnet kom siv tau, nws cov khoom seem seem yuav tsum tau teem rau 1. Piv txwv li:

00000000 00000000 00000000 00000000

Lub npog ntsej muag subnet no siv tsis tau ntawm koj lub network vim tias qhov seem ntawm sab laug tau teeb tsa rau 0.

Hloov pauv, cov khoom tsim nyog tshaj plaws hauv lub npog ntsej muag siv tau yuav tsum tau teeb tsa rau 0, tsis yog 1. Piv txwv li:

11111111 111111111 11111111 11111111

Lub npog ntsej muag subnet siv tsis tau ntawm lub network.

Txhua qhov siv tau lub qhov ncauj qhov ntswg muaj ob ntu: sab laug nrog txhua daim npog ntsej muag teeb tsa rau 1 (qhov txuas txuas txuas ntxiv) thiab sab xis nrog txhua qhov teeb tsa rau0 (tus tswv cuab feem), xws li thawj qhov piv txwv saum toj no.

Subnetting in Practice

Subnetting ua haujlwm los ntawm kev siv lub tswv yim ntawm qhov txuas txuas ntxiv mus rau ib tus neeg lub computer (thiab lwm lub network ntaus ntawv) chaw nyob. Qhov chaw nyob txuas ntxiv muaj xws li qhov chaw nyob hauv network thiab cov khoom ntxiv uas sawv cev rau tus lej subnet.

Ua ke, ob lub ntsiab lus no txhawb nqa ob theem kev hais lus uas tau lees paub los ntawm tus qauv siv IP. Lub network chaw nyob thiab tus lej subnet, thaum ua ke nrog tus tswv tsev chaw nyob, txhawb nqa peb theem txheej txheem.

Image
Image

Xav txog qhov piv txwv hauv ntiaj teb no: Ib lub lag luam me npaj siv 192.168.1.0 network rau nws cov tswv tsev sab hauv (intranet). Lub chaw saib xyuas tib neeg xav kom lawv cov khoos phis tawj nyob rau ntawm qhov txwv ntawm lub network no vim tias lawv khaws cov ntaub ntawv them nyiaj thiab lwm cov ntaub ntawv cov neeg ua haujlwm rhiab heev. Tab sis vim tias qhov no yog Class C network, lub default subnet npog ntawm 255.255.255.0 tso cai rau txhua lub khoos phis tawj ntawm lub network ua phooj ywg (xa cov lus ncaj qha rau ib leeg) los ntawm lub neej ntawd.

Thawj plaub ntawm 192.168.1.0:

1100

Qhov no tso lub network hauv chav C ntau thiab tseem kho qhov ntev ntawm qhov chaw nyob hauv network ntawm 24 ntsis. Txhawm rau subnet lub network no, ntau dua 24 cov khoom yuav tsum tau teeb tsa rau 1 ntawm sab laug ntawm lub ntsej muag subnet.

Rau txhua qhov me ntsis ntxiv rau 1 hauv daim npog ntsej muag, lwm qhov me me yuav muaj nyob rau hauv tus lej subnet txhawm rau txheeb xyuas cov subnets ntxiv. Tus lej ob-ntsis subnet tuaj yeem txhawb nqa txog plaub lub subnets, tus lej peb-ntsis txhawb txog yim subnets, thiab lwm yam.

kab hauv qab

Cov thawj tswj hwm uas tswj hwm Internet raws tu qauv tau tseg qee lub network rau kev siv sab hauv. Feem ntau, intranets siv cov tes hauj lwm no tau txais kev tswj hwm ntau dua los tswj lawv cov kev teeb tsa IP thiab kev siv internet. Nrog rau RFC 1918 kom paub meej ntxiv txog cov tes hauj lwm tshwj xeeb no.

Summary

Subnetting tso cai rau cov thawj coj hauv network qee qhov yooj yim hauv kev txhais cov kev sib raug zoo ntawm cov tswv network. Cov tswv cuab ntawm cov subnets sib txawv tsuas tuaj yeem sib tham los ntawm kev tshwj xeeb network gateway li zoo li routers. Lub peev xwm los lim cov tsheb khiav ntawm subnets tuaj yeem ua kom muaj bandwidth ntau rau cov ntawv thov thiab tuaj yeem txwv kev nkag mus rau hauv txoj kev xav tau.

Pom zoo: