You are on page 1of 7

ASSIGNING IP ADDRESSES TO ROUTERS John P. Abraham University of Texas Pan American Mary T. Wa !

!er "outh Texas #o e$e mt%a !er@southtexasco e$ Abstract With the pro iferation of home based net%or!s& casua computer users are no% forced to setup routers that %ere once in the rea m of net%or! en$ineers. This paper exp ains the purpose of 'P addresses both in the (A) side and the WA) side& sub* nettin$& net%or! address trans ation +)AT,& -.#P& and -)"& and provides a description of practica approach to set up a common y used -"( router. Without a modest understandin$ of these topics it %ou d be very difficu t to setup routers& particu ar y %hen defau t settin$s %ou d not suffice. Many home based net%or!s end up usin$ the -"( modem and a router& either %ired or %ire ess& and in such cases defau t settin$s may not %or!. After introducin$ necessary bac!$round theoretica concepts& this paper %i $uide the reader throu$h settin$ up a comp icated home net%or! %ith a -"( modem& a %ired router and a %ire ess router. Pac!ets ori$inatin$ at a source computer are made into frames %hi e circu atin$ %ithin the oca area net%or! +(A), and sent direct y to the destination usin$ the MA# address obtained usin$ the A/P. Those pac!ets intended for a destination outside the (A) are for%arded to the defau t $ate%ay %hich is the (A) side 'P address of the router. (A) side 'P addresses usua y are private 'P addresses& %hi e the WA) side is a pub ic 'P addresses. #onsu tin$ the routin$ tab e the pac!ets are for%arded to the next hop. Usin$ net%or! address trans ation +)AT, machines on the (A) side %ith oca 'P addresses are mapped on the pubic 'P addresses usin$ port numbers. Introduction 0irtua y every business and home in the U.". uses some sort of a router. 1usinesses may have their o%n 'T staff or outsource net%or! re ated tas!s. .o%ever& many users are ob i$ated to set up net%or!s in their homes. This re2uires some basic understandin$ of theory of net%or!in$& more specifica y insta ation of routers. More important y anyone %or!in$ routers must have an understandin$ of the machine addressin$ schemes& net%or! address trans ation +)AT,& dynamic host confi$uration protoco +-.#P,& and domain name systems +-)",. This paper exp ains the purpose of 'P addresses both in the (A) side and the WA) side& sub*nettin$& )AT& -.#P& -)"& and provides a practica approach to set up a net%or! %ith a -"( modem& %ired router and a %ire ess router. 3ven thou$h this paper dea s %ith -"( routers& insta ation of

most broadband routers is very simi ar& and can prove usefu since most U" homes no% use -"(& cab e or '"-) broadband net%or!s. Computer Addressing 3ach computer that needs to be net%or!ed must have some sort of identification assi$ned to it. Today most computers communicate %ith each other throu$h an 3thernet card. 'n the past an assortment of cards such as 3thernet& To!en /in$& and Arc)et had been used. 'f the reader is sti usin$ a card other than 3thernet& p ease contact the author for specific instructions for that card. There are t%o types of addresses4 Media Access #ontro +MA#, and 'nternet Protoco +'P,. A device attached to a net%or! must have at east one net%or! card. Any device havin$ more than one net%or! card is !no%n as a mu tihomed device. 3ach 3thernet card comes %ith a uni2ue 56*bit address pro$rammed in a /7M chip. This address is !no%n as the MA# address or the hard%are address& and is used by ayer 8 of the 7pen "ystems 'nterconnection +7"', mode . There are seven ayers to this mode . The MA# address is used for direct de ivery of frames of data %ithin the same physica net%or!. Machines %ithin a (A) discover each other9s MA# address usin$ the Address /eso ution Protoco +A/P,. -iscovered addresses are !ept in an A/P cache unti they become sta e. 'n order to de iver a pac!et outside of a oca area net%or!& the 'P addressin$ scheme is used. 'n as much as the MA# addresses are short ived due to rep acement of net%or! card or rep acement of the entire computer& it is impossib e to ocate a computer %ith MA# address a one. The 'P address is a :8*bit number that is dynamica y obtained at boot time and rene%ed periodica y& or it is statica y set by the net%or! administrator.

;i$ure < * # asses of 'P addresses and number of bits used for net%or! and host portions

;or easier human understandin$ the :8 bits are divided into four octets and %ritten in decima notation. The #ontro and distribution of 'P addresses are centra y contro ed by 'nternet Assi$ned )umbers Authority +'A)A,. This address is used by the third ayer of the 7"' mode and is re2uired to transmit pac!ets of data across the 'nternet throu$h routers. An 'P address is divided into t%o parts4 the net%or! portion and the host portion

as sho%n in fi$ure <. # ass A uses 6 bits for the net%or! portion and 85 bits for the host portion. The first bit of the net%or! portion is fixed as =& and can9t be chan$ed. Therefore there are on y 8> +<86, c ass A addresses. A serious prob em %ith the :8*bit 'P addressin$ scheme is the dep etion of 'P addresses. There are not enou$h addresses for a the computers in the %or d. 0arious so utions have been used to overcome this deficiency. ;or instance& subnet mas!in$ a o%s a ar$e b oc! of 'P addresses to be bro!en into sma er net%or!s. The University of Texas Pan American %as $iven a c ass 1 b oc! of net%or! addresses. ;rom Tab e < it can be ascertained that <? bits are used for the net%or! portion and <? bits are used for the host portion. The first t%o bits of the net%or! portion are fixed as <= and cannot be chan$ed. Therefore& there are on y 8<5 +<?&:65, c ass 1 net%or!s in the %or d. # ass 1 net%or!s can have 8<? +?@&@:?, minus 8 or ?@&@:5 hosts. A Aeros and a ones have specia meanin$s and cannot be used as host addresses. -efau t subnet mas! for a c ass 1 address is 8@@.8@@.=.=& meanin$ that it is assumed a ?@&@:5 computers are on one net%or!. 'f this c ass 1 net%or! is sub netted to have 8@? sma er net%or!s& the subnet mas! %i be 8@@.8@@.8@@.=. 'f it is sub netted to have :8 subnets& on y the most si$nificant @ bits of the third octet needs to be turned to a ones $ivin$ a subnet mas! of 8@@.8@@.856.=. ;or further information refer to +Abraham,. )et%or! Address Trans ation +)AT, is another so ution to the prob em of dep etion of net%or! address. )AT provides for security& as %e . 'A)A +/;# <@B> and <B<6, has set aside three b oc!s of addresses& # ass A& 1 and #& that can be repeated y used by different or$aniAations. These b oc!s are <=.=.=.= to <=.8@@.8@@.8@@& <>8.<?.=.= to <>8.:<.8@@.8@@& and <B8.<?6.=.= to <B8.<?6.8@@.8@@& respective y. /outers are pro$rammed not to route pac!ets bearin$ these net%or! addresses and pac!ets are restricted to the net%or! itse f. This a o%s anyone to set up a T#PC'P oca area net%or!. .o%ever& many of these or$aniAations usin$ the private 'P need to access the 'nternet. 'n order to access the 'nternet& there must be at east one pub ic 'P assi$ned to that net%or!9s $ate%ay. A computer %ith a private 'P address can access the 'nternet usin$ the )AT insta ed in the router. The router !eeps trac! of the oca 'P address of the computer and assi$ns a soc!et +port number, to hand e the traffic. -evices %ith pub ic 'P addresses are intrusion prone. -evices outside the (A) cannot initiate communication %ith a machine havin$ a private 'P address. Thus machines %ith private 'Ps are more secure as on$ as they do not initia iAe communication %ith mischievous sites and do%n oad scripts& virus& %orms& !no%in$ y or un!no%in$ y. Address trans ation can ta!e p ace %ith one pub ic 'P address or a poo of 'P addresses. Routing A router& a ayer : device& directs traffic of pac!ets destined for a device outside of the oca area net%or!. A traffic bet%een direct y connected devices ta!es p ace usin$ ayer 8. (ayer 8 hand es frames& %hi e ayer : hand es pac!ets. A router is a specia purpose computer desi$ned to direct pac!et traffic havin$ input ports& output ports& routin$ processor and a s%itchin$ fabric +1ehrouA). ;rames from a direct y connected device are received by the input ports and %here physica and data in! ayer

functions are performed. ;rom the received frames pac!ets are reconstructed and stored in the buffer. These pac!ets are then directed to the s%itchin$ fabric %hich in turn directs them to appropriate output 2ueues. The most popu ar s%itchin$ fabrics are the #rossbar and 1anyan s%itches. The routin$ processor deciphers the destination 'P address from the pac!et and performs a tab e oo!up to determine the output port to %hich the pac!et must be directed. The output ports receive the pac!ets& convert them to frames to be for%arded to the appropriate direct y connected device& %hich may be another router or a device on the oca area net%or!. The routin$ processor can determine %hether a pac!et is destined to a device %ithin the same net%or! or outside of it by A)-in$ the destination address %ith the net mas!. 'f it is destined to another net%or!& the router must decide on %hich output port +interface, that pac!et must be sent over. To determine the route there are severa sets of ru es referred to as routin$ protoco sD the t%o most common ones bein$ /outin$ 'nformation Protoco +/'P, and 7pen "hortest Path ;irst +7"P;,. 3ach router !eeps a routin$ tab e that is statica y assi$ned& dynamica y created& or both. /outers share routin$ information %ith each other. As it receives a pac!et& the router determines if it be on$s to se f or it must be for%arded. There are various for%ardin$ methods& such as )ext*hop& )et%or!*"pecific& .ost*"pecific and -efau t +1ehrouA,. When a router encounters a net%or! address that is not in its tab e& it sends that pac!et over the defau t path. A time to ive +TT(, is assi$ned to each pac!et and is decremented as it passes throu$h a routerD the pac!et is discarded as the TT( becomes =. This prevents a pac!et from circu atin$ indefinite y. Assigning IP addresses to routers A samp e net%or! %ith t%o routers and resu tin$ t%o net%or!s are dra%n in ;i$ure 8. A discussions that fo o% %i refer to this fi$ure for 'P addressin$ and device ayout. The routers used in this examp e are )etopia :@== $ate%ay router and (in!sys 8.5 E Wire ess router. As mentioned ear ier& a router is a mu tihomed device havin$ more than one 3thernet port. 3ach port must have an 'P address assi$ned to it. The WA) side 'P addresses must have a pub ic 'P addresses %hi e the (A) side cou d be either pub ic or private 'P addresses. ;or i ustrative purposes& refer to ;i$ure 8 and assume that t%o routers are used& one to connect the (A) %ith attached des!tops and printers to the 'nternet and another one to provide %ire ess connections to aptops. "creen captures of such a setup are $iven in ;i$ures : and 5. ;i$ure : i ustrates the confi$uration of the main $ate%ay router that is connected to the internet. The pub ic 'P address $iven by the broadband 'nternet "ervice Provider +'"P, is ><.<@=.6=.<@B and this address is assi$ned to the WA) side. ;or the (A) side& any of the private 'P addresses $roups mentioned may be usedD <B8.<?6.=.< is used here.

;i$ure 8 * "amp e )et%or!

A %ired machines %i be connected to this $ate%ay router either throu$h a separate s%itch or a bui t*in s%itch in the router. Most home routers come %ith a four port s%itch bui t*in a eviatin$ the necessity for a separate s%itch. A devices connected to this router must have 'P addresses ran$in$ from <B8.<?6.=.< to <B8.<?6.=.8@5. The WA) side of the %ire ess router %i a so receive one of these addresses. ;rom fi$ure 8 %e see that the four computers and one printer connected to the $ate%ay router have address <B8.<?6.=.< to <B8.<?6.=.@. ;rom fi$ure 5& %e can see that the 'P address assi$ned to the WA) side of the %ire ess router is <B8.<?6.=.:<.

;i$ure : #onfi$uration of the router connected to the 'nternet

)o% %e turn our attention the Wire ess /outer as sho%n in fi$ure 5. As exp ained the WA) side of this router is $iven <B8.<?6.=.:< as it is direct y %ired to the $ate%ay router. ;or the (A) side any 'P address ran$e from <B8.<?6.<.F to <68.<?6.8@5.F may be chosen. 'n this particu ar examp e& 'P address <B8.<?6.<.< is assi$ned to the (A) side of the %ire ess router. A %ire ess devices connected to this router %i receive 'P address in the ran$e from <B8.<?6.<.8 to <B8.<?6.<.8@5.

;i$ure 5 Wire ess router confi$uration The -.#P is enab ed on both routers. As a ne% device is turned on +if it does not have a static address a ready assi$ned, it %ou d re2uest for an 'P address from the -.#P servers connected to it. A -.#P server has a database that amon$ other detai s !eeps trac! of avai ab e 'P address& assi$ned 'P addresses %ith their correspondin$ MA# address& and remainin$ ease time for each assi$ned 'P address. ;rom ;i$ure :& %e can see that the -.#P server is enab ed and a poo of 'P addresses startin$ from <B8.<?6.<.<== to <B8.<?6.<.<5B +inc usive, is avai ab e. 3ach %ire ess device connected to it %i receive one of these addresses. ;i$ure 8 i ustrates that the three aptops connected %ire ess y received <B8.<?6.<.<==& <B8.<?6.<.<=< and <B8.<?6.<.<=8. A -.#P server can assi$n specified 'P addresses to devices re2uirin$ static 'Ps. Routing Table

"ince the printer has an 'P address of <B8.<?6.=.@& it is connected to a different net%or! than the %ire ess noteboo!s. 'f noteboo!s need to access fi es contained in one of the computers connected to the <B8.<?6.=.= net%or!& or access the printer& the router needs to be setup to a o% that. ;rom ;i$ure 5& %e see that a pac!ets containin$ net%or! address of <B8.<?6.<.= is either de ivered direct y to the destination machine usin$ the MA# address or de ivered to the %ire ess router <B8.<?6.<.<. A pac!ets destined to net%or! <B8.<?6.=.= are de ivered to the WA) side of the %ire ess router +<B8.<?6.=.:<,& %hich in turn& is direct y connected to a those devices. 't may use MA# address de ivery to the destination devices. A other addresses +'nternet traffic, %i be for%arded to <B8.<?6.=.< %hich is the $ate%ay router.

Destination LAN IP =.=.=.= <B8.<?6.=.= <B8.<?6.<.=

Subnet Mask =.=.=.= 8@@.8@@.8@@.= 8@@.8@@.8@@.=

Gateway <B8.<?6.=.< <B8.<?6.=.:< <B8.<?6.<.<

Interface WA) +'nternet, WA) +'nternet, (A) G Wire ess

Tab e 5 * /outin$ Tab e 3ntry (ist Conclusion 'nsta in$ routers can be intimidatin$ particu ar y %hen dea in$ %ith assi$nin$ 'P addresses to attached devices. This paper examined both MA# addressin$ and 'P addressin$ and the purpose of these addressin$ schemes. #ertain b oc!s of 'P addresses are set aside for private addressin$. Private 'P addresses are used %ithin an or$aniAation9s net%or! usua y in conjunction %ith address trans ation. 't %as exp ained ho% a router can ma!e use of both pub ic 'P addresses and private 'P addresses to ensure security %hi e a o%in$ access the 'nternet. Usin$ specific examp es assi$nin$ 'P address to the WA) side and the (A) side of routers %as covered. ;urthermore& this paper described ho% to insta additiona routers %ithin an or$aniAation& and ho% to create routin$ tab es to access fi e servers and print servers. References Abraham& John P.& HA Practica Approach to Assi$nin$ "ubnet Mas!s&H Proceedin$s of the 3T#3C7MA3 8=== Joint #onference& )e% 7r eans& (A 8===. 1ehrouA A. ;orouAan& T#PC'P Protoco "uite& :rd 3d.& McEra% .i & 8==?. p <@<. /e2uest for #omments +/;#,& http4CC%%%.ietf.or$Cies$C<rfcIindex.txt.