Professional Documents
Culture Documents
1. GII THIU DHCP l vit tt ca Dynamic Host Configuration Protocol: Giao thc Cu hnh Host ng DHCP c thit k lm gim thi gian chnh cu hnh cho mng TCP/IP bng cch t ng gn cc a ch IP cho khch hng khi h vo mng. Mt s khi nim cn quan tm DHCP client - My trm DHCP: l mt thit b ni vo mng v s dng giao thc DHCP ly cc thng tin cu hnh nh l a ch mng, a ch my ch DNS. DHCP server - My ch DHCP: l mt thit b ni vo mng c chc nng tr v cc thng tin cn thit cho my trm DHCP khi c yu cu. (c th l router hoc PC Server). BOOTP relay agents - Thit b chuyn tip BOOTP: l mt my trm hoc mt router c kh nng chuyn cc thng ip DHCP gia DHCP server v DHCP client. Binding - Ni kt : l mt tp hp cc thng tin cu hnh trong c t nht mt a ch IP, c s dng bi mt DHCP client. Cc ni kt c qun l bi my ch DHCP. 2. MC CH Bi lab ny s gip cc bn c c k nng cn thit qun tr h thng mng trong vic cp pht a ch IP cho mt mng n gin n phc tp bng cch thit lp mt hoc nhiu DHCP Server trn thit b phn cng Router ca Cisco 3. M T BI LAB Trng hp 1 : DHCP Client kt ni trc tip vi DHCP Server M hnh ny thch hp cho cc m hnh mng nh c cu trc n gian.
Trng hp 2: DHCP Client ni vi DHCP Server thng quan DHCP Relay Agent
M hnh ny thch hp cho cc mng c quy m ln, tri di trn nhiu khu vc khc nhau nh trong mt to nh hoc mt thnh ph, mt quc giaTrong trng hp ny Router c th cu hnh mt hoc nhiu Pool (dy a ch mng) cp pht a ch IP cho nhiu mng khc nhau
LAB 1:
Trong bi lab ny Router v my tnh s kt ni trc tip
Cc bc cu hnh Router >ena Router #conf t Router (config)#host DHCPServer DHCPServer (config)#int f 0/0 DHCPServer (config-if)#ip add 192.168.1.1 255.255.255.0 DHCPServer (config-if)#no sh DHCPServer (config-if)#exi DHCPServer (config)#service dhcp // m dch v DHCP trn Router
DHCPServer (config)#ip dhcp pool net192.168.1.0 //nh ngha tn 1 pool DHCPServer (dhcp-config)#network 192.168.1.0 /24 DHCPServer (dhcp-config)#default-router 192.168.1.1 DHCPServer (dhcp-config)#dns-server 10.0.0.1 DHCPServer (dhcp-config)#domain-name test.com DHCPServer (dhcp-config)#lease 2 DHCPServer (dhcp-config-dhcp)#exit DHCPServer (config)#ip dhcp excluded-address 192.168.1.240 192.168.1.254 DHCPServer (config)#end DHCPServer# show ip dhcp binding // kin tra nhng IP cp //thi gian thay IP mi (ngy/gi/pht) //dy IP s cp
kim tra xem Router cp pht nhng a ch IP ta s dng lnh: DHCPServer# show ip dhcp binding
LAB 2:
Cc bc cu hnh Cu hnh DHCP Server Router >ena Router #conf t Router (config)#host DHCPServer DHCPServer (config)#int s 0/0 DHCPServer (config-if)#ip add 192.168.1.1 255.255.255.0 DHCPServer (config-if)#no sh DHCPServer (config-if)#exit DHCPServer (config)#service dhcp DHCPServer (config)#ip dhcp pool net194.168.1.0 DHCPServer (dhcp-config)#network 194.168.1.0 /24 DHCPServer (dhcp-config)#default-router 194.168.1.1 DHCPServer (dhcp-config)#dns-server 10.0.0.1 DHCPServer (dhcp-config)#domain-name test.com DHCPServer (dhcp-config)#lease 2 DHCPServer (dhcp-config)#exit DHCPServer (config)#ip dhcp excluded-address 194.168.1.240 194.168.1.254 DHCPServer (config)#ip dhcp pool net195.168.1.0 DHCPServer (dhcp-config)#network 195.168.1.0 /24 DHCPServer (dhcp-config)#default-router 195.168.1.1 DHCPServer (dhcp- config)#dns-server 10.0.0.1 DHCPServer (dhcp-config)#domain-name test.com DHCPServer (dhcp-config)#lease 2 DHCPServer (dhcp-config)#exit DHCPServer (config)#ip dhcp excluded-address 195.168.1.240 195.168.1.254 Cu hnh DHCP cp a ch 195.168.1.10 cho my LAPTOP c a ch Physical Address l 0101.0011.1121.21 DHCPServer (config)#ip dhcp pool LAPTOP DHCPServer (dhcp-config)#host 195.168.1.10 255.255.255.0 DHCPServer (dhcp-config)# client-identifier 0101.0011.1121.21 //thi gian thay IP mi (ngy/gi/pht) // m dch v DHCP trn Router //to pool c tn Net192.168.4.0 //dy IP s cp
DHCPServer (dhcp-config)#default-router 195.168.1.1 DHCPServer (dhcp-config)#dns-server 10.0.0.1 DHCPServer (dhc -config)#domain-name test.com DHCPServer (dhcp-config)#lease 3 DHCPServer (config)#end DHCPServer# show ip dhcp binding // kin tra nhng IP cp
Router>ena Router#conf t Router (config)#hostname Relay-1 Relay-1(config)#int s 0/0 Relay-1(config-if)#ip add 192.168.1.2 255.255.255.0 Relay-1(config-if)#no sh Relay-1(config-if)#exi Relay-1(config)#int s 0/1 Relay-1(config-if)#ip add 193.168.1.1 255.255.255.0 Relay-1(config-if)#no sh Relay-1(config-if)#exi Relay-1(config)#int f 0/0 Relay-1(config-if)#ip add 195.168.1.1 255.255.255.0 Relay-1(config-if)#no sh Relay-1(config-if)#ip helper-address 192.168.1.1 Relay-1(config-if)#exit Relay-1(config)#router rip Relay-1(config-router)#net 192.168.1.0 Relay-1(config-router)#net 193.168.1.0 Relay-1(config-router)#net 195.168.1.0 Relay-1(config-router)#end Cu hnh R2 lm DHCP Relay Agent Router>ena Router#conf t Router (config)#hostname Relay-2 Relay-2(config)#int s 0/1 Relay-2(config-if)#ip add 193.168.1.2 255.255.255.0 Relay-2(config-if)#no sh Relay-2(config-if)#exi
Relay-2(config)#int f 0/0 Relay-2(config-if)#ip add 194.168.1.1 255.255.255.0 Relay-2(config-if)#no sh Relay-2(config-if)#ip helper-address 192.168.1.1 Relay-2(config-if)#exit Relay-2(config)#router rip Relay-2(config-router)#net 193.168.1.0 Relay-2(config-router)#net 194.168.1.0 Relay-2(config-router)#end
Tin hnh cu hnh cc Router nh cc lnh pha trn Cu hnh DHCP Server
5. KT QU THU C Sau khi thc hin cu hnh th nghim 2 bi lab ta c th hiu c k thut cu hnh my ch DHCP trn thit b Router Cisco. Phn bit v hiu hn v m hnh trin khai h thng my ch DHCP trong mt mng t quy m nh n quy m ln