Вы находитесь на странице: 1из 17

Computer Network : Lecture Notes Nepal Engineering College Compiled by: Junior Professor: Daya Ram Bud at oki

Nepal Engineering college! C angunarayan C apter":#CP$%P Reference &odel! %P 'ddressing and (ubnetting #CP$%P &odel: The U.S. Department of Defense (DOD) created the TCP/IP reference model because it wanted a networ that could sur!i!e an" conditions 'pplication Layer: The application la"er handles hi#h$le!el protocols% representation% encodin#% and dialo# control. The TCP/IP protocol suite combines all application related issues into one la"er. It ensures that the data is properl" pac a#ed before it is passed on to the ne&t la"er. TCP/IP includes Internet and transport la"er specifications such as IP and TCP as well as specifications for common applications. TCP/IP has protocols to support file transfer% e$mail% and remote lo#in% in addition to the followin#' )ile #ransfer Protocol *)#P+ ( )TP is a reliable% connection$oriented ser!ice that uses TCP to transfer files between s"stems that support )TP. It supports bi$ directional binar" file and *SCII file transfers. #ri,ial )ile #ransfer Protocol *#)#P+ ( T)TP is a connectionless ser!ice that uses the User Data#ram Protocol (UDP). T)TP is used on the router to transfer confi#uration files and Cisco IOS ima#es% and to transfer files between s"stems that support T)TP. It is useful in TCP/IP Model some +*,s because it operates faster than )TP in a stable en!ironment. Network )ile (ystem *N)(+ ( ,)S is a distributed file s"stem protocol suite de!eloped b" Sun -icros"stems that allows file access to a remote stora#e de!ice such as a hard dis across a networ . (imple &ail #ransfer Protocol *(&#P+ ( S-TP administers the transmission of e$mail o!er computer networ s. It does not pro!ide support for transmission of data other than plain te&t. #elnet ( Telnet pro!ides the capabilit" to remotel" access another computer. It enables a user to lo# into an Internet host and e&ecute commands. * Telnet client is referred to as a local host. * Telnet ser!er is referred to as a remote host. (imple Network &anagement Protocol *(N&P+ ( S,-P is a protocol that pro!ides a wa" to monitor and control networ de!ices. S,-P is also used to mana#e confi#urations% statistics% performance% and securit". Domain Name (ystem *DN(+ ( D,S is a s"stem used on the Internet to translate domain names and publicl" ad!ertised networ nodes into IP addresses.

Pa#e'.

#ransport Layer: The transport la"er pro!ides a lo#ical connection between a source host and a destination host. Transport protocols se#ment and reassemble data sent b" upper$la"er applications into the same data stream% or lo#ical connection% between end points. Creates pac et from b"tes stream recei!ed from the application la"er. Uses port number to create process to process communication. Uses a slidin# window protocol to achie!e flow control. Uses ac nowled#ement pac et% timeout and retransmission to achie!e error control.

The primar" dut" of the transport la"er is to pro!ide end$to$end control and reliabilit" as data tra!els throu#h this cloud. This is accomplished throu#h the use of slidin# windows% se/uence numbers% and ac nowled#ments. The transport la"er also defines end$to$end connecti!it" between host applications. Transport la"er protocols include TCP and UDP. TCP is a connection$oriented transport la"er protocol that pro!ides reliable full$duple& data transmission. TCP is part of the TCP/IP protocol stac . In a connection$oriented en!ironment% a connection is established between both ends before the transfer of information can be#in. TCP brea s messa#es into se#ments% reassembles them at the destination% and resends an"thin# that is not recei!ed. TCP supplies a !irtual circuit between end$user applications. #CP -eader )ormat: TCP uses onl" a sin#le t"pe of protocol data unit% called a #CP segment. The header is shown in )i#ure . 0ecause one header must ser!e to perform all protocol mechanisms% it is rather lar#e% with a minimum len#th of 12 octets.

The followin# protocols use TCP' )TP 3TTP S-TP Telnet

Pa#e'1

The followin# are the definitions of the fields in the TCP se#ment' (ource port ( ,umber of the port that sends data Destination port ( ,umber of the port that recei!es data (e.uence number ( ,umber used to ensure the data arri!es in the correct order 'cknowledgment number ( ,e&t e&pected TCP octet -LEN ( ,umber of 41$bit words in the header Reser,ed ( Set to 5ero Code bits ( Control functions% such as setup and termination of a session /indow ( ,umber of octets that the sender will accept C ecksum ( Calculated chec sum of the header and data fields 0rgent pointer ( Indicates the end of the ur#ent data 1ption ( One option currentl" defined% ma&imum TCP se#ment si5e Data ( Upper$la"er protocol data

Code Bits or )lags *2 bits+3 U67' Ur#ent pointer field si#nificant. *C8' *c nowled#ment field si#nificant. PS3' Push function. 6ST' 6eset the connection. S9,' S"nchroni5e the se/uence numbers. )I,' ,o more data from sender.

0DP *0ser Datagram Protocol+: UDP is the connectionless transport protocol in the TCP/IP protocol stac . UDP is a simple protocol that e&chan#es data#rams without #uaranteed deli!er". It relies on hi#her$la"er protocols to handle errors and retransmit data. )ig: 0DP Datagram

UDP does not use windows or *C8s. 6eliabilit" is pro!ided b" application la"er protocols. UDP is desi#ned for applications that do not need to put se/uences of se#ments to#ether. The followin# protocols use UDP' T)TP S,-P D3CP D,S

Pa#e'4

The followin# are the definitions of the fields in the UDP se#ment' (ource port ( ,umber of the port that sends data Destination port ( ,umber of the port that recei!es data Lengt ( ,umber of b"tes in header and data C ecksum ( Calculated chec sum of the header and data fields Data ( Upper$la"er protocol data 0DP 4 0ser Datagram Protocol

#CP ,s 0DP: (3no #CP 4 #ransmission Control Protocol . 1 4 < = > ? connection$oriented% reliable (!irtual circuit) connectionless% unreliable% does not chec messa#e deli!er" Di!ides out#oin# messa#es into se#ments reassembles messa#es at the destination re$sends an"thin# not recei!ed pro!ides flow control more o!erhead than UDP (less efficient) @&amples'3TTP% ,)S% S-TP sends :data#rams; does not reassemble incomin# messa#es Does$not ac nowled#e. pro!ides no flow control low o!erhead $ faster than TCP @#. AOIP%D,S%T)TP

%nternet Layer: The purpose of the Internet la"er is to select the best path throu#h the networ for pac ets to tra!el. The main protocol that functions at this la"er is IP. 0est path determination and pac et switchin# occur at this la"er. The followin# protocols operate at the TCP/IP Internet la"er' IP pro!ides connectionless% best$effort deli!er" routin# of pac ets. IP is not concerned with the content of the pac ets but loo s for a path to the destination. Internet Control -essa#e Protocol (IC-P) pro!ides control and messa#in# capabilities. *ddress 6esolution Protocol (*6P) determines the data lin la"er address% or -*C address% for nown IP addresses. 6e!erse *ddress 6esolution Protocol (6*6P) determines the IP address for a nown -*C address. %P performs t e following operations: Defines a pac et and an addressin# scheme Transfers data between the Internet la"er and networ access la"er 6outes pac ets to remote hosts Network 'ccess Layer: The networ access la"er allows an IP pac et to ma e a ph"sical lin to the networ media. It includes the +*, and B*, technolo#" details and all the details contained in the OSI ph"sical and data lin la"ers. Pa#e'<

Dri!ers for software applications% modem cards% and other de!ices operate at the networ access la"er. The networ access la"er defines the procedures used to interface with the networ hardware and access the transmission medium. -odem protocol standards such as Serial +ine Internet Protocol (S+IP) and Point$to$Point Protocol (PPP) pro!ide networ access throu#h a modem connection. -an" protocols are re/uired to determine the hardware% software% and transmission$medium specifications at this la"er. This can lead to confusion for users. -ost of the reco#ni5able protocols operate at the transport and Internet la"ers of the TCP/IP model. ,etwor access la"er protocols also map IP addresses to ph"sical hardware addresses and encapsulate IP pac ets into frames. The networ access la"er defines the ph"sical media connection based on the hardware t"pe and networ interface. 1(% &odel and #CP$%P &odel: # e 1(% and #CP$%P models a,e many similarities: 0oth ha!e la"ers. 0oth ha!e application la"ers% thou#h the" include different ser!ices. 0oth ha!e comparable transport and networ la"ers. 0oth use pac et$switched instead of circuit$switched technolo#". ,etwor in# professionals need to now both models. TCP/IP combines the OSI application% presentation% and session la"ers into its application la"er. TCP/IP combines the OSI data lin and ph"sical la"ers into its networ access la"er. TCP/IP appears simpler because it has fewer la"ers. Bhen the TCP/IP transport la"er uses UDP it does not pro!ide reliable deli!er" of pac ets. The transport la"er in the OSI model alwa"s does.

-ere are some differences of t e 1(% and #CP$%P models:

The Internet was de!eloped based on the standards of the TCP/IP protocols. The TCP/IP model #ains credibilit" because of its protocols. The OSI model is not #enerall" used to build networ s. The OSI model is used as a #uide to help students understand the communication process.

Pa#e'=

%P 'ddress: @ach computer in a TCP/IP networ must be #i!en a uni/ue identifier% or IP address. This address% which operates at +a"er 4% allows one computer to locate another computer on a networ . *ll computers also ha!e a uni/ue ph"sical address% which is nown as a -*C address. These are assi#ned b" the manufacturer of the ,IC. -*C addresses operate at +a"er 1 of the OSI model. *n IP address (IP!<) is a 41$bit se/uence of ones and 5eros.To ma e the IP address easier to wor with% it is usuall" written as four decimal numbers separated b" periods. )or e&ample% an IP address of one computer is .C1..>D...1. *nother computer mi#ht ha!e the address .1D..2.1... This is called the dotted decimal format. @ach part of the address is called an octet because it is made up of ei#ht binar" di#its. )or e&ample% the IP address .C1..>D...D would be ..222222..2.2.222.2222222..2222.222 in binar" notation. The dotted decimal notation is an easier method to understand than the binar" ones and 5eros method. This dotted decimal notation also pre!ents a lar#e number of transposition errors that would result if onl" the binar" numbers were used. %p," -eader:

5ersion:*" bits+: Indicates the !ersion number% to allow e!olution of the protocol. %nternet -eader Leng t*%-L " bits+: +en#th of header in 41 bit words. The minimum !alue is fi!e for a minimum header len#th of 12 octets. #ype4of4(er,ice : The T"pe$of$Ser!ice field contains an D$bit binar" !alue that is used to determine the priorit" of each pac et. This !alue enables a Eualit"$of$Ser!ice (EoS) mechanism to be applied to hi#h priorit" pac ets% such as those carr"in# telephon" !oice data. The router processin# the pac ets can be confi#ured to decide which pac et it is to forward first based on the T"pe$of$Ser!ice !alue. #otal lengt : total data#ram len#th %in octets. %dentifier *62 bits+: * se/uence number that% to#ether with the source address% destination address% and user protocol% is intended to uni/uel" identif" a data#ram. Thus% the identifier should be uni/ue for the Pa#e'>

data#ramFs source address% destination address% and user protocol for the time durin# which the data#ram will remain in the internet. )ragment 1ffset ' * router ma" ha!e to fra#ment a pac et when forwardin# it from one medium to another medium that has a smaller -TU. Bhen fra#mentation occurs% the IP!< pac et uses the )ra#ment Offset field and the -) fla# in the IP header to reconstruct the pac et when it arri!es at the destination host. The fra#ment offset field identifies the order in which to place the pac et fra#ment in the reconstruction. )lags*7 bits+: )ra#ment)' Onl" two of the bits are currentl" defined' -)(-ore )ra#ments) and D)(DonFt

&ore )ragments flag *&)+:The -ore )ra#ments (-)) fla# is a sin#le bit in the )la# field used with the )ra#ment Offset for the fra#mentation and reconstruction of pac ets. The -ore )ra#ments fla# bit is set% it means that it is not the last fra#ment of a pac et. Bhen a recei!in# host sees a pac et arri!e with the -) G .% it e&amines the )ra#ment Offset to see where this fra#ment is to be placed in the reconstructed pac et. Bhen a recei!in# host recei!es a frame with the -) G 2 and a non$5ero !alue in the )ra#ment offset% it places that fra#ment as the last part of the reconstructed pac et. *n unfra#mented pac et has all 5ero fra#mentation information (-) G 2% fra#ment offset G2). Don8t )ragment flag *D)+:The DonFt )ra#ment (D)) fla# is a sin#le bit in the )la# field that indicates that fra#mentation of the pac et is not allowed. If the DonFt )ra#ment fla# bit is set% then fra#mentation of this pac et is ,OT permitted. If a router needs to fra#ment a pac et to allow it to be passed downward to the Data +in la"er but the D) bit is set to .% then the router will discard this pac et. %P Destination 'ddress The IP Destination *ddress field contains a 41$bit binar" !alue that represents the pac et destination ,etwor la"er host address. %P (ource 'ddress The IP Source *ddress field contains a 41$bit binar" !alue that represents the pac et source ,etwor la"er host address. #ime4to4Li,e The Time$to$+i!e (TT+) is an D$bit binar" !alue that indicates the remainin# HlifeH of the pac et. The TT+ !alue is decreased b" at least one each time the pac et is processed b" a router (that is% each hop). Bhen the !alue becomes 5ero% the router discards or drops the pac et and it is remo!ed from the networ data flow. This mechanism pre!ents pac ets that cannot reach their destination from bein# forwarded indefinitel" between routers in a routin# loop. If routin# loops were permitted to continue% the networ would become con#ested with data pac ets that will ne!er reach their destination. Decrementin# the TT+ !alue at each hop ensures that it e!entuall" becomes 5ero and that the pac et with the e&pired TT+ field will be dropped. Protocol: This D$bit binar" !alue indicates the data pa"load t"pe that the pac et is carr"in#. The Protocol field enables the ,etwor la"er to pass the data to the appropriate upper$la"er protocol. Pa#e'?

@&ample !alues are' 2. IC-P 2> TCP .? UDP -eader c ecksum *62 bits+: *n error$detectin# code applied to the header onl". 0ecause some header fields ma" chan#e durin# transit (e.#.% time to li!e% se#mentation$related fields)% this is re!erified and recomputed at each router. The chec sum field is the .>$bit oneFs complement addition of all .>$bit words in the header. )or purposes of computation% the chec sum field is itself initiali5ed to a !alue of 5ero . 1ptions *,ariable+3 @ncodes the options re/uested b" the sendin# user. Padding *,ariable+. Used to ensure that the data#ram header is a multiple of 41 bits. Data *,ariable+3 The data field must be an inte#er multiple of D bits. The ma&$ imum len#th of the data#ram (data field plus header) is >=%=4= octets. %P addresses are di,ided into class: IP *ddress )irst Octet *ddress Used for' Class 6an#e Class * Class 0 Class C Class D Class @ 2$.1? .1D$.C. .C1$114 11<$14C 1<2$1== Unicast (Aer" ,etwor s) +ar#e to

Unicast (-edium lar#e networ ) -ulticast 6eser!ed

Unicast (Small ,etwor )

Class ' Blocks * class * address bloc was desi#ned to support e&tremel" lar#e networ s with more than .> million host addresses. Class * IP!< addresses used a fi&ed /D prefi& with the first octet to indicate the networ address. The remainin# three octets were used for host addresses. The first bit of a Class * address is alwa"s 2. Bith that first bit a 2% the lowest number that can be represented is 22222222% decimal 2. The hi#hest number that can be represented is 2.......% decimal .1?. The numbers 2 and .1? are reser!ed and cannot be used as networ addresses. *n" address that starts with a !alue between . and .1> in the first octet is a Class * address.

Pa#e'D

,o of Class * ,etwor ' 1? ,o. of Usable 3ost address per ,etwor ' 11<$1 (-inus 1 because 1 addresses are reser!ed for networ and broadcast address)

Class B Blocks Class 0 address space was desi#ned to support the needs of moderate to lar#e si5e networ s with more than >=%222 hosts. * class 0 IP address used the two hi#h$order octets to indicate the networ address. The other two octets specified host addresses. *s with class *% address space for the remainin# address classes needed to be reser!ed. The first two bits of the first octet of a Class 0 address are alwa"s .2. The remainin# si& bits ma" be populated with either .s or 2s. Therefore% the lowest number that can be represented with a Class 0 address is .2222222% decimal .1D. The hi#hest number that can be represented is .2......% decimal .C.. *n" address that starts with a !alue in the ran#e of .1D to .C. in the first octet is a Class 0 address. ,o of Class 0 ,etwor ' 1.< ,o. of Usable 3ost address per ,etwor ' 1.>$1 Class C Blocks 'The class C address space was the most commonl" a!ailable of the historic address classes. This address space was intended to pro!ide addresses for small networ s with a ma&imum of 1=< hosts. Class C address bloc s used a /1< prefi&. This meant that a class C networ used onl" the last octet as host addresses with the three hi#h$order octets used to indicate the networ address. * Class C address be#ins with binar" ..2. Therefore% the lowest number that can be represented is ..222222% decimal .C1. The hi#hest number that can be represented is ..2.....% decimal 114. If an address contains a number in the ran#e of .C1 to 114 in the first octet% it is a Class C address. ,o of Class C ,etwor ' 11. ,o. of Usable 3ost address per ,etwor ' 1D$1

Class D Blocks: The Class D address class was created to enable multicastin# in an IP address. * multicast address is a uni/ue networ address that directs pac ets with that destination address to predefined #roups of IP addresses. Therefore% a sin#le station can simultaneousl" transmit a sin#le stream of data to multiple recipients. The Class D address space% much li e the other address spaces% is mathematicall" constrained. The first four bits of a Class D address must be ...2. Therefore% the first octet ran#e for Class D addresses is ...22222 to ...2....% or 11< to 14C. *n IP address that starts with a !alue in the ran#e of 11< to 14C in the first octet is a Class D address. Pa#e'C

Class E Block: * Class @ address has been defined. 3owe!er% the Internet @n#ineerin# Tas )orce (I@T)) reser!es these addresses for its own research. Therefore% no Class @ addresses ha!e been released for use in the Internet. The first four bits of a Class @ address are alwa"s set to .s. Therefore% the first octet ran#e for Class @ addresses is ....2222 to ........% or 1<2 to 1==.

@!er" IP address also has two parts. The first part identifies the networ (,etwor ID)where the s"stem is connected and the second part identifies the s"stem (3ost ID).

Class *

Class 0

Class C

Bithin the address ran#e of each IP!< networ % we ha!e three t"pes of addresses' Network address - The address b" which we refer to the networ Broadcast address - * special address used to send data to all hosts in the networ Host addresses - The addresses assi#ned to the end de!ices in the networ (pecial %p," addresses: Default Route: we represent the IP!< default route as 2.2.2.2. The default route is used as a Hcatch allH route when a more specific route is not a!ailable. The use of this address also reser!es all addresses in the 2.2.2.2 $ 2.1==.1==.1== (2.2.2.2 /D) address bloc . Network and Broadcast 'ddresses: *s e&plained earlier% within each networ the first and last addresses cannot be assi#ned to hosts. These are the networ address and the broadcast address% Pa#e'.2

respecti!el". Loopback: One such reser!ed address is the IP!< loopbac address .1?.2.2... The loopbac is a special address that hosts use to direct traffic to themsel!es. *lthou#h onl" the sin#le .1?.2.2.. address is used% addresses .1?.2.2.2 to .1?.1==.1==.1== are reser!ed. *n" address within this bloc will loop bac within the local host. ,o address within this bloc should e!er appear on an" networ .

Link4Local 'ddresses: IP!< addresses in the address bloc .>C.1=<.2.2 to .>C.1=<.1==.1== (.>C.1=<.2.2 /.>) are desi#nated as lin $local addresses. These addresses can be automaticall" assi#ned to the local host b" the operatin# s"stem in en!ironments where no IP confi#uration is a!ailable. These mi#ht be used in a small peer$to$peer networ or for a host that could not automaticall" obtain an address from a D"namic 3ost Confi#uration Protocol (D3CP) ser!er. #E(#4NE# 'ddresses : The address bloc .C1.2.1.2 to .C1.2.1.1== (.C1.2.1.2 /1<) is set aside for teachin# and learnin# purposes. These addresses can be used in documentation and networ e&amples

Network Prefi9es: *n important /uestion is' 3ow do we now how man" bits represent the networ portion and how man" bits represent the host portionI Bhen we e&press an IP!< networ address% we add a prefi& len#th to the networ address. The prefi& len#th is the number of bits in the address that #i!es us the networ portion. )or e&ample% in .?1..>.<.2 /1<% the /1< is the prefi& len#th $ it tells us that the first 1< bits are the networ address. This lea!es the remainin# D bits% the last octet% as the host portion. Pri,ate and Public %P addresses: Public IP addresses'Public IP addresses are assi#ned b" the Inter,IC (InternetFs ,etwor Information Centre) and consists of class based networ Ids or bloc s of CID6 based addresses (called CID6 bloc s) that are #loball" rout$able to the Internet and are uni/ue. Pri!ate IP address'*n address that is used for internal networ s. These addresses are not rout$able to the Internet. The private address blocks are: .2.2.2.2 to .2.1==.1==.1== (.2.2.2.2 /D) .?1..>.2.2 to .?1.4..1==.1== (.?1..>.2.2 /.1) .C1..>D.2.2 to .C1..>D.1==.1== (.C1..>D.2.2 /.>)

(ubnet &ask: To define the networ and host portions of an address% the de!ices use a separate 41$bit pattern called a subnet mas . Be e&press the subnet mas in the same dotted decimal format as the IP!< address. The Pa#e'..

subnet mas is created b" placin# a binar" . in each bit position that represents the networ portion and placin# a binar" 2 in each bit position that represents the host portion. The prefi& and the subnet mas are different wa"s of representin# the same thin# $ the networ portion of an address. Default (ubnet &ask: Class *' 1==.2.2.2 Class 0' 1==.1==.2.2 Class C' 1==.1==.1==.2 C%DR: * routin# s"stem used b" routers and #atewa"s on the bac bone of the Internet for routin# pac ets. CID6 replaces the old class method of allocatin# D% .>% or 1< bits to the networ ID% and instead allows an" number of conti#uous bits in the IP address to be allocated as the networ ID. )or e&ample% if a compan" needs a few thousand IP addresses for its networ % it can allocate .. or .1 bits of the address for the networ ID instead of D bits for a class C (which wouldnJt wor because "ou would need to use se!eral class C networ s) or .> bits for class 0 (which is wasteful). -ow %t /orks CID6 assi#ns a numerical prefi& to each IP address. )or e&ample% a t"pical destination IP address usin# CID6 mi#ht be .??.>?.=.<</.4. The prefi& .4 indicates that the first .4 bits of the IP address identif" the networ % while the remainin# 41 $ .4 G .C bits identif" the host. The prefi& helps to identif" the Internet destination #atewa" or #roup of #atewa"s to which the pac et will be forwarded. Prefi&es !ar" in si5e% with lon#er prefi&es indicatin# more specific destinations. 6outers use the lon#est possible prefi& in their routin# tables when determinin# how to forward each pac et. CID6 enables pac ets to be sent to #roups of networ s instead of to indi!idual networ s% which considerabl" simplifies the comple& routin# tables of the InternetJs bac bone routers. -ow to Create (ubnets To create subnetwor s% "ou ta e bits from the host portion of the IP address and reser!e them to define the subnet address. -ow many bits to borrow: .. ,o of subnetwor G 100 1. ,o. of usable hosts per subnetwor G106$1 T0G06 K 00 T0GTotal bits in host portion

Pa#e'.1

00G0its borrowed 06G0its 6emainin#

(ubnetting Class C 'ddresses There are man" different wa"s to subnet a networ . The ri#ht wa" is the wa" that wor s best for "ou. In a Class C address% onl" D bits are a!ailable for definin# the hosts. 6emember that subnet bits start at the left and #o to the ri#ht% without s ippin# bits. This means that the onl" Class C subnet mas s can be the followin#'

0inar"

Decimal

CID6

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 22222222 G 2 /1< .2222222 G .1D ..222222 G .C1 ...22222 G 11< ....2222 G 1<2 .....222 G 1<D ......22 G 1=1 to hosts. /1= /1> /1? /1D /1C /42

Be canJt use a /4. or /41 because we ha!e to ha!e at least 1 host bits for assi#nin# IP addresses

*ll "ou need to do is answer fi!e simple /uestions' 3ow man" subnets does the chosen subnet mas produceI 3ow man" !alid hosts per subnet are a!ailableI Bhat are the !alid subnetsI .. BhatJs the broadcast address of each subnetI 1. Bhat are the !alid hosts in each subnetI

Pa#e'.4

(ubnetting Class C 'ddress: 6;<362=36>3>$<2 1==.1==.1==..C1 (/1>) In this second e&ample% weJre #oin# to subnet the networ address .C1..>D..2.2 usin# the subnet mas 1==.1==.1==..C1. .C1..>D..2.2 G ,etwor address 1==.1==.1==..C1 G Subnet mas ,ow% letJs answer the bi# fi!e' 3ow man" subnetsI Since .C1 is 1 bits on (..222222)% the answer would be 11 G < subnets. 3ow man" hosts per subnetI Be ha!e > host bits off (..222222)% so the e/uation would be 1> ( 1 G >1 hosts. Bhat are the !alid subnetsI 1=> ( .C1 G ><. 6emember% we start at 5ero and count in our bloc si5e% so our subnets are 2% ><% .1D% and .C1. (-a#ic ,umberG1=>$Subnet -as ) BhatJs the broadcast address for each subnetI The number ri#ht before the !alue of the ne&t subnet is all host bits turned on and e/uals the broadcast address. )or the 5ero subnet% the ne&t subnet is ><% so the broadcast address for the 5ero subnet is >4. Bhat are the !alid hostsI These are the numbers between the subnet and broadcast address. The easiest wa" to find the hosts is to write out the subnet address and the broadcast address. This wa"% the !alid hosts are ob!ious. The followin# table shows the 2% ><% .1D% and .C1 sub$ nets% the !alid host ran#es of each% and the broadcast address of each subnet'

The subnets (do this first) The broadcast address Usable 3ost 6an#e

2 >4 . ( >1

>< .1? >= ( .1>

.1D .C. .1C ( .C2

.C1 1== .C4 $ 1=<

(ubnetting Class B 'ddress: 6?<3623>3>$6? 1==.1==..1D.2 (/.?) .?1..>.2.2 G ,etwor address Pa#e'.<

1==.1==..1D.2 G Subnet mas SubnetsI 1. G 1 (same as Class C). 3ostsI 1.= ( 1 G 41%?>> (? bits in the third octet% and D in the fourth). Aalid subnetsI 1=> ( .1D G .1D. 2% .1D. 6emember that subnettin# is performed in the third octet% so the subnet numbers are reall" 2.2 and .1D.2% as shown in the ne&t table. These are the e&act numbers we used with Class CL we use them in the third octet and add a 2 in the fourth octet for the networ address. 0roadcast address for each subnetI Aalid hostsI The followin# table shows the two subnets a!ailable% the !alid host ran#e% and the broad$ cast address of each' Subnet 0roadcast Usable 3ost 6an#e .?1..>.2.2 .?1..>..1?.1== .?1..>.2.. $ .?1..>..1?.1=< .?1..>..1D.2 .?1..>.1==.1== .?1..>..1D.. $ .?1..>.1==.1=<

'not er E9ample (ubnetting Class B address: 6?<3623>3>$6= <@@3<@@36;<3> *$6=+ .?1..>.2.2 G ,etwor address 1==.1==..C1.2 G Subnet mas SubnetsI 11 G <. 3ostsI 1.< ( 1 G .>%4D1 (> bits in the third octet% and D in the fourth). Aalid subnetsI 1=> ( .C1 G ><. 2% ><% .1D% .C1. 6emember that the subnettin# is performed in the third octet% so the subnet numbers are reall" 2.2% ><.2% .1D.2% and .C1.2% as shown in the ne&t table.

0roadcast address for each subnetI Aalid hostsI The followin# table shows the four subnets a!ailable% the !alid host ran#e% and the broadcast address of each' Subnet 0roadcast )irst host +ast host Pa#e'.= 2.2 >4.1== 2.. >4.1=< ><.2 .1?.1== ><.. .1?.1=< .1D.2 .C..1== .1D.. .C..1=< .C1.2 1==.1== .C1.. 1==.1=<

'not er E9ample:6?<3623>3>$<@ <@@3<@@3<@@36<= *$<@+ This is one of the hardest subnet mas s "ou can pla" with. *nd worse% it actuall" is a reall" #ood subnet to use in production because it creates o!er =22 subnets with .1> hosts for each subnetMa nice mi&ture. So% donJt s ip o!er itN .?1..>.2.2 G ,etwor address 1==.1==.1==..1D G Subnet mas SubnetsI 1C G =.1. 3ostsI 1? ( 1 G .1>. Aalid subnetsI O a"% now for the tric " part. 1=> ( 1== G .. 2% .% 1% 4% etc. for the third octet. 0ut "ou canJt for#et the one subnet bit used in the fourth octet. 9ou actuall" #et two subnets for each third octet !alue% hence the =.1 subnets. )or e&ample% if the third octet is showin# subnet 4% the two subnets would actuall" be 4.2 and 4..1D. 0roadcast address for each subnetI Aalid hostsI

The followin# table shows how "ou can create subnets% !alid hosts% and broadcast addresses usin# the Class 0 1==.1==.1==..1D subnet mas (the first ei#ht subnets are shown% and then the last two subnets)' Subnet 2.2 2..1D 2..1C ..2 ...1? ... ...1> ...1D ..1== ...1C ..1=< 1.2 1..1? 1.. 1..1> 1..1D 1.1== 1..1C 1.1=< 4.2 4..1? 4.. 4..1> 4..1D ... 4.1== ... 4..1C ... 4.1=< ... 1==.2 1==..1? 1==.. 1==..1> 1==..1D 1==.1== 1==..1C 1==.1=< 0roadcast 2..1? 2.1== )irst host 2.. +ast host 2..1> 2.1=<

(ubnetting Class ' network: 6>3>3>3>$62 1==.1==.2.2 (/.>) Class * addresses use a default mas of 1==.2.2.2% which lea!es 11 bits for subnettin# since "ou must lea!e 1 bits for host addressin#. The 1==.1==.2.2 mas with a Class * address is usin# D subnet bits. SubnetsI 1D G 1=>. 3ostsI 1.> ( 1 G >=%=4<. Aalid subnetsI Bhat is the interestin# octetI 1=> ( 1== G .. 2% .% 1% 4% etc. (all in the second octet). The subnets would be .2.2.2.2% .2...2.2% .2.1.2.2% .2.4.2.2% etc.% up to .2.1==.2.2. 0roadcast address for each subnetI Aalid hostsI The followin# table shows the first two and last two subnets% !alid host ran#e% and broad$ Pa#e'.>

cast addresses for the pri!ate Class * .2.2.2.2 networ ' Subnet .2.2.2.2 .2...2.2 ... .2...1==.1== ... .2...2.. ... .2...1==.1=< ... .2.1=<.2.2 .2.1=<.1==.1== .2.1=<.2.. .2.1=<.1==.1=< .2.1==.2.2 .2.1==.1==.1== .2.1==.2.. .2.1==.1==.1=< 0roadcast .2.2.1==.1== )irst host .2.2.2.. +ast host .2.2.1==.1=<

Pa#e'.?

Вам также может понравиться