PennStateBerks
BuildingaNetworkinGNS3
Inthistutorial,youwillcreateanetworkinGNS3betweentworouters,andeachrouterwillhave
onehostconnectedtoit.TheultimategoalistoroutedatabetweennetworkAandCsothattwo
hostswillbeabletocommunicatewithoneanother.However,youwillnotconfigurethehostin
thislab.Ifeverythingiscorrect,therouterR1shouldbeablepingthef0/0interfaceoftherouter
R2.Belowisthetopologyforwhatthisnetworkwilllooklike:
TherearetheIPaddressesthatwillbeused:
NetworkA:192.168.101.0/255.255.255.0
R1f0/0:192.168.101.1/255.255.255.0
NetworkB:192.168.100.0/255.255.255.252
R1s0/0:192.168.100.1/255.255.255.252
R2s0/0:192.168.100.2/255.255.255.252
NetworkC:192.168.102.0/255.255.255.0
R2f0/0:192.168.102.1/255.255.255.0
1of1
CollaborativeVirtualComputerLab(CVCLAB)
PennStateBerks
A.ConfiguringInterfacesforR1
GNS3allowsyoutoaddcardstodifferentslotsonarouter.Thisportionofthetutorialwill
describehowtoconfiguretheslots,aswellastheCiscocommandstosetuptheinterfaces.By
default,Cisconetworkinterfacesaredisabledandyoumustturnthemonbeforetheycanbe
used.
1. BeginbyopeningGNS3andcreatingaprojectnamednetwork.Checktheboxin
frontofSavenvramsandvirtualharddrivesandtheboxinfrontofSaveIOS
startupconfigurations.
2. Dragac2691routerfromtheNodesTypescolumntotheemptyworkspace.By
default,thisrouterisreferredtoasR1.
3. RightclickR1andselectConfigure.Inthetreetotheleft,selectR1.Navigateto
theSlotstab,andclickonthedropdownmenuforslot1.
4. Thereareavarietyofchoiceslisted.Forthisexercise,choosetheNM4Tadapter.
TherouteroriginallyhadtwoFastEthernetports,butbymodifyingslot1,itnowhas
fouradditionalserialports.ClickOK.Again,theserialportwillbeusedtoconnect
thetworoutersandtheFastEthernetportswillbeusedtoconnecthoststorouters.
5. RightclickR1andclickStart,thenclickConsole.Therouterwillbootandaconsole
windowtotherouterwillopen.
6. Whentherouterhasfinishedbooting,typeenabletoenterprivilegedmode.
R1>enable
7. Then,typeconfigterminaltoentertheconfigurationmode.
R1#configterminal
2of2
CollaborativeVirtualComputerLab(CVCLAB)
PennStateBerks
8. Fromhere,interfacescanbeconfigured.Typeints0/0,whichwillenterthe
configurationforserialinterface0/0.Inthisexercise,youwilluseaserial
connectiontoconnectthetworouters.
R1(config)#interfaces0/0
9. Toenabletheinterface,typenoshutdown.Shortlyafterdoingso,therouter
shouldpostthattheinterfaceisnowup.
R1(config)#noshutdown
10. SettheIPaddressofs0/0to192.168.100.1withthesubnetmask255.255.255.252,
typethefollowingcommand:
R1(configif)#ipaddress192.168.100.1255.255.255.252
11. Pressctrl+ctoreturnbacktheprivileged(oryoucantypeexittwice).
12. Beforesavingthenewconfiguration,typeshowrunning,whichwilldisplaythe
runningconfiguration.
R1#showrunning
WhenyouseeMoreonthescreen,pressthespacebartoviewthenext
segmentofdata.Lookforthes0/0interfacedoesithavethesettingsyou
specified?
13. Yourchangeshavetakeneffectimmediately,butiftherouterisshutdown,the
3of3
CollaborativeVirtualComputerLab(CVCLAB)
PennStateBerks
changeswilldisappear.Tosavewhatyouhavedone,typecopyrunningconfig
startupconfig,thenpressEntertoconfirm.Bydoingso,yourcurrentconfiguration
becomestheconfigurationthatisloadedwhenevertherouterisbootedup.
R1#copyrunningconfigstartupconfig
14. Now,youwillconfigurefastethernetinterface(fa0/0).Typethefollowingcommands
backtobacktoentertheinterfaceconfiguration.
R1#configterminal
R1(config)#interfacefa0/0
13. Then,typenoshutdowntobringtheinterfaceupandpressEnteroncemoreto
enabletheinterface.
R1(config)#noshutdown
14. TypethefollowingcommandtosetR1sFastEthernetaddressto192.168.101.1.
R1(configif)#ipaddress192.168.101.1255.255.255.0
15. Pressctrl+ctoreturnbacktheprivileged(oryoucantypeexittwice).
16. Beforesavingthenewconfiguration,typeshowrunning,whichwilldisplaythe
runningconfiguration.
R1#showrunning
17. Tosavewhatyouhavedone,typecopyrunningconfigstartupconfig,then
pressEntertoconfirm.
R1#copyrunningconfigstartupconfig
B.ConfiguringInterfacesforR2
1. Dragac2691routerfromtheNodesTypescolumntotheemptyworkspace.By
4of4
CollaborativeVirtualComputerLab(CVCLAB)
PennStateBerks
default,thisrouterisreferredtoasR2.
2. RightclickR2andselectConfigure.Inthetreetotheleft,selectR2.Navigateto
theSlotstab,andclickonthedropdownmenuforslot1.
3. Forthisexercise,choosetheNM4Tadapter.TherouteroriginallyhadtwoFast
Ethernetports,butbymodifyingslot1,itnowhasfouradditionalserialports.Click
OK.Again,theserialportwillbeusedtoconnectthetworoutersandtheFast
Ethernetportswillbeusedtoconnecthoststorouters.
4. RightclickR2andclickStart,thenclickConsole.Therouterwillbootandaconsole
windowtotherouterwillopen.
YouneedtorepeattheconfigurationstepsinpartAandconfiguretheinterfacesasfollows:
s0/0 192.168.100.2/255.255.255.252
fa0/0192.168.102.1/255.255.255.0
Basically,youneedtofollowthefollowingcommands:
R2>enable
R2#configureterminal
R2(config)#interfaces0/0
R2(configif)#noshutdown
R2(configif)#ipaddress192.168.100.2255.255.255.252
R2(configif)#exit
R2(config)#interfacefa0/1
R2(configif)#noshutdown
R2(configif)#ipaddress192.168.102.1255.255.255.0
R2(configif)#exit
R2(config)#exit
R2#copyrunningconfigstartupconfig
B.ConnectingNodes
5of5
CollaborativeVirtualComputerLab(CVCLAB)
PennStateBerks
1. MinimizetheconsolewindowssothattheGNS3workspaceisvisible.Atthetopbar,
findtheiconthatresemblesaconnector.
2. ClickontheiconandselectSerial.Thiswillallowyoutoattempttocreateaserial
connectionbetweentwonodes.ClickonR1andthenclickonR2,whichwillcreatea
redlineconnectingthetwonodes.ToexittheLinkfeature,clickontheredXicon
wheretheconnectoriconpreviouslywas.
3. Totheright,underTopologySummary,expandthetreesforR1andR2.More
detailsaregivenregardingtheconnectionthatisinplace.
4. FromtheNodesTypescolumntotheleft,clickanddragtwoQemuhoststothe
workspace.ThesedevicesarerunningmicrocoreLinuxOS,andtheywillbeused
ashostsinthisexercise.
5. Inthetopbar,clickontheconnectoriconagainandselectFastEthernet.Clickon
6of6
CollaborativeVirtualComputerLab(CVCLAB)
PennStateBerks
R1andthenclickonQemu1andselecte0tocreateaconnectionbetweenthe
routerandhost.Whenfinished,exittheLinkfeaturebyclickingtheredXicon.
6. Repeatthepreviousstep,butthistime,drawtheconnectionfromR2toQemu2
C.TestingtheSerialConnections
1. Nowthattheroutershavebeenphysicallyconnected,theymustbetestedtoseeif
theserialconnectionisrunningsuccessfully.OntheprivilegedconsoleforR1and
R2,trythefollowings:
1 R1#ping192.168.100.2 R2#ping192.168.100.2
2 R1#ping192.168.102.1 R2#ping192.168.101.1
3 R1#ping192.168.101.1 R2#ping192.168.102.1
Discusswhysomepingsaresuccessful,butothersarenot.
D.IPRoutingTables
Routingtablesarenecessarytotellrouterswheretoforwardtheirpackets.Tosetastaticroute,
7of7
CollaborativeVirtualComputerLab(CVCLAB)
PennStateBerks
youwillneedtheIPaddress,subnetmask,andthenexthopaddressorinterface.
1. OnR1,typeconfigttoenterconfigurationmodeifyouarenot.
R1#configureterminal
2. Then,typeiproute192.168.102.0255.255.255.0s0/0.Thiscommandwillputany
IPpacketaddressedtonetwork192.168.102.0onserialinterfaces0/0.
R1(config)#iproute192.168.102.0255.255.255.0s0/0
3. Typeexittoexitconfigurationmode,thentypeshowiproute.Thecurrentrouting
tablewillbedisplayed.Doyouseeastaticsettingforyourserialconnection?
R1(config)#exit
R1#showiproute
4. OnR2,inconfigurationmode,repeatthesecommandstosettheroutingtable
R2#configureterminal
R2(config)#iproute192.168.101.0255.255.255.0s0/0
R2(config)#exit
R2#showiproute
5. Doyouseeastaticsettingforyourserialconnection?
F.TestingConnectionsAgain
1. Nowthatallinterfacesandroutingtableshavebeenconfigured,testthefollowing
again.
8of8
CollaborativeVirtualComputerLab(CVCLAB)
PennStateBerks
1 R1#ping192.168.100.2 R2#ping192.168.100.2
2 R1#ping192.168.102.1 R2#ping192.168.101.1
3 R1#ping192.168.101.1 R2#ping192.168.102.1
ReviewAssignment:
CreatethenetworkbelowinGNS3.Demonstratethatanyroutercanpingallinterfacesofthe
othertworouters.TestthisfortheR1,R2,andR3router.Includetheroutingtablesofthethree
routersasapictureinyourreport.(PS:useSM=255.255.255.0forallnetworksanddonot
configurethehosts192.168.1.5and192.168.4.5.Theywillbeonlyusedtocreatethe
connectionstotherouters).
9of9