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

11/12/2015

HowtoConfigureDHCPinCiscoRouterUsingPacketTracerandGns3|RouterSwitchConfigurationUsingPacketTracerGNS3

ROUTER SWITCH CONFIGURATION USING PACKET TRACER


GNS3
How to Configure DHCP in Cisco Router Using Packet Tracer and Gns3
HowtoconfigureDHCPinciscorouterusingpackettracersimulator,

Step1:Createatopologylikethis,

Step2:Configurerouterinterfacefastethernet0/0andfastethernet
1/0withipaddress.
R1#configt
R1(config)#interfacefastethernet0/0
http://chennaicisco.blogspot.com/2013/10/howtoconfiguredhcpinciscorouter.html

1/5

11/12/2015

HowtoConfigureDHCPinCiscoRouterUsingPacketTracerandGns3|RouterSwitchConfigurationUsingPacketTracerGNS3

R1(configif)#ipaddress10.0.0.1255.0.0.0
R1(configif)#noshutdown

R1(configif)#exit
R1(config)#interfacefastethernet1/0
R1(configif)#ipaddress20.0.0.1255.0.0.0
R1(configif)#noshutdown
R1(configif)#exit
Step3:ConfigureDHCPpoolforthenetwork10and20,
InRouterR1,GlobalConfigurationmode,

R1(config)#servicedhcp
Thiscommandistoenablethedhcpserveronarouter.Routersinpackettracerwon'tacceptthiscommand.Bydefault
dhcpwillberunningonroutersoskip'servicedhcp'commandifyouareconfiguringdhcpinpackettracer,justcreate
anetworkpoolforthenetworkitwillwork.Usethisinrealtimeorothersimulatorslikegns3.

R1(config)#ipdhcppool10network"where'10network'isthepoolnamewecanusewhateverwe
want.ThiscommandgetusintotheDHCPConfigurationmode."
R1(dhcpconfig)#network10.0.0.0255.0.0.0"Itdefinesthenetworkrangetobeleased"
R1(dhcpconfig)#dnsserver10.0.0.2"Ipaddressforthednsserver."
R1(dhcpconfig)#defaultrouter10.0.0.1"Defaultgatewayforthisnetwork."
R1(dhcpconfig)#exit

DHCPpoolfor10Network
R1(config)#ipdhcppool10network
R1(dhcpconfig)#network10.0.0.0255.0.0.0
R1(dhcpconfig)#dnsserver10.0.0.2
R1(dhcpconfig)#defaultrouter10.0.0.1
R1(dhcpconfig)#exit
DHCPpoolfor20Network
R1(config)#ipdhcppool20network
R1(dhcpconfig)#network20.0.0.0255.0.0.0
R1(dhcpconfig)#dnsserver10.0.0.2
R1(dhcpconfig)#defaultrouter20.0.0.1
http://chennaicisco.blogspot.com/2013/10/howtoconfiguredhcpinciscorouter.html

2/5

11/12/2015

HowtoConfigureDHCPinCiscoRouterUsingPacketTracerandGns3|RouterSwitchConfigurationUsingPacketTracerGNS3

R1(dhcpconfig)#exit

Now,ClickonanyofthePC>Desktop>ipconfiguration>ChooseDHCP.NowPCwillgetanipfromDHCPserver.

http://chennaicisco.blogspot.com/2013/10/howtoconfiguredhcpinciscorouter.html

3/5

11/12/2015

HowtoConfigureDHCPinCiscoRouterUsingPacketTracerandGns3|RouterSwitchConfigurationUsingPacketTracerGNS3

FewmorecommandWecanuse,butwecan'tconfigurethisinpackettracer.Usegns3simulatorforthis.

R1(dhcpconfig)#netbiosserverx.x.x.x'wherex.x.x.xisipaddressofnetbiosserver.
R1(dhcpconfig)#leasex'whereXisthenumberitsetstheleasetime,bydefault1(i.e.oneday).
R1(dhcpconfig)#ipdhcpexcludedaddressx.x.x.xx.x.x.x'Rangeofipaddressexcludedfromthepoolitwillnotbe
leasedtotheclients'.
R1(dhcpconfig)#ipdhcpexcludedaddressx.x.x.x'Toexcludeonlyoneipaddressfromtherangeofipaddress'.

Ex.
R1(dhcpconfig)#netbiosserver10.0.0.2
R1(dhcpconfig)#lease2
R1(dhcpconfig)#ipdhcpexcludedaddress10.0.0.110.0.0.10
R1(dhcpconfig)#ipdhcpexcludedaddress10.0.0.35

Trouble shooting commands,

Router#showipdhcpbinding 'Displaysalistofallbindingscreated.'

Router#showipdhcpbindingw.x.y.z'DisplaysthebindingsforaspecificDHCPclientwithanIPaddressof
w.x.y.z.'

Router#clearipdhcpbindinga.b.c.d 'ClearsanautomaticaddressbindingfromtheDHCPserverdatabase.'

Router#clearipdhcpbinding* 'ClearsallautomaticDHCPbindings.'
http://chennaicisco.blogspot.com/2013/10/howtoconfiguredhcpinciscorouter.html

4/5

11/12/2015

HowtoConfigureDHCPinCiscoRouterUsingPacketTracerandGns3|RouterSwitchConfigurationUsingPacketTracerGNS3

Router#showipdhcpconflict 'DisplaysalistofalladdressconflictsrecordedbytheDHCPserver.'

Router#clearipdhcpconflicta.b.c.d 'Clearsaddressconflictfromthedatabase.'

Router#clearipdhcpconflict*'Clearsconflictsforalladdresses.'

Router#showipdhcpdatabase'DisplaysrecentactivityontheDHCPdatabase.'

Router#showipdhcpserverstatistics'Displaysalistofthenumberofmessagessentandreceivedbythe
DHCPserver.'

Router#clearipdhcpserverstatistics

PostedbyNagarajrptrpt

http://chennaicisco.blogspot.com/2013/10/howtoconfiguredhcpinciscorouter.html

5/5

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