DHCP_原理及其工作過程.ppt_第1頁
DHCP_原理及其工作過程.ppt_第2頁
DHCP_原理及其工作過程.ppt_第3頁
DHCP_原理及其工作過程.ppt_第4頁
DHCP_原理及其工作過程.ppt_第5頁
免費預覽已結(jié)束,剩余51頁可下載查看

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領

文檔簡介

dhcp 原理及其工作過程,dhcp,產(chǎn)生背景 工作原理 典型應用,dhcp產(chǎn)生背景,bootp bootstrap protocol 配置bootp參數(shù),需要主機位置相對固定,不能隨便移動。組網(wǎng)簡單 dhcp ietf 主機經(jīng)常移動 計算機數(shù)量超過可分配ip 提高利用率 internet engineering task force 網(wǎng)絡工程任務組 優(yōu)點:動態(tài)獲得地址 網(wǎng)絡環(huán)境復雜 規(guī)模比較大,dhcp,產(chǎn)生背景 工作原理 典型應用,dhcp八種報文,dhcp工作過程,dhcp 工作過程,問題:dhcp的 offer 報文中已經(jīng)填充了server 分配給 client的ip地址。為什么client 還會再發(fā)一個 request 報文 ?,dhcp 工作過程,dhcp relay 背景,早期的dhcp 協(xié)議只適用于dhcp 客戶端和服務器處于同一個子網(wǎng)內(nèi)的情況,不能跨網(wǎng)段。因此,為進行動態(tài)主機配置,需要在所有網(wǎng)段上都設置一個dhcp 服務器,這顯然是很不經(jīng)濟的。 dhcp relay的引入解決了這一難題:局域網(wǎng)內(nèi)的客戶端可以通過dhcp relay與其他子網(wǎng)的dhcp服務器通信,最終取得合法的ip地址。,dhcp relay,dhcp relay 主備,dhcp的報文格式,dhcp dicover 報文,option 選項,option53 dhcp message type,code len type +-+-+-+ | 53 | 1 | 1-9 | +-+-+-+ n=1 1 個字節(jié) 1 dhcpdiscover 2 dhcpoffer 3 dhcprequest 4 dhcpdecline 5 dhcpack 6 dhcpnak 7 dhcprelease 8 dhcpinform,opinton 選項,61 client identifier,code len type client-identifier +-+-+-+-+-+- | 61 | n | t1 | i1 | i2 | . +-+-+-+-+-+- 3d 07 01 00 1e 65 d5 43 68 3d=61 07:7個字節(jié) n 的最小長度為2 01:ethernet 00 1e 65 d5 43 68: 客戶端的mac地址 this option is used by dhcp clients to specify their uniqueidentifier,option選項,50 requested ip address,code len address +-+-+-+-+-+-+ | 50 | 4 | a1 | a2 | a3 | a4 | +-+-+-+-+-+-+ 請求獲得曾經(jīng)獲得的ip地址 3250 4:4個字節(jié) 固定長度 c0 a8 fe 6a=192.168.254.106,option 選項,12 host name option,code len host name +-+-+-+-+-+-+-+-+- | 12 | n | h1 | h2 | h3 | h4 | h5 | h6 | . +-+-+-+-+-+-+-+-+- 0c 12 n :長度自定 ,最小長度為1 09 9 個字節(jié) 72 63 6a 73 2d 31 37 33 36 = rcjs -1736,option 選項,60 vendor class identifier,+-+-+-+-+- | 60 | n | i1 | i2 | . +-+-+-+-+- used by dhcp clients to optionally identify the type and configuration of dhcp client. dhcp 客戶端選擇性的識別 客戶端的類型和配置 可以攜帶域的配置信息 3c 08 4d 53 46 54 20 35 2e 30 3c=12 , 08 8個字節(jié) n 的最小長度為1 4d 53 46 54 20 35 2e 30 msft 5.0 默認值,option 選項,55 parameter request list,code len option codes +-+-+-+-+- | 55 | n | c1 | c2 | . +-+-+-+-+- 37 0b 01 0f 03 06 2c 2e 2f 1f 21 f9 2b n 的最小值為1 01subnet mask 0f=15= domain name 03=router 06=6=domain name server 2c=44= netbios over tcp/ip name server 2e=46=netbios over tcp/ip node type 2f=47=netbios over tcp/ip scope 1f=31=perform router discover 21=33=static route f9=249= private/classless static route(micro soft) 2b=43=vendor-specific information used by a dhcp client to request values for specified configuration parameters. dhcp 客戶端制定需要的配置參數(shù),option 選項,43 vendor specific information,code len vendor-specific information 廠商專有信息 +-+-+-+-+- | 43 | n | i1 | i2 | . +-+-+-+-+- used by clients and servers to exchange vendor-specific information. 客戶端和服務器交換廠家專有信息 n 的最小值為1 2b 02 dc 00,dhcp offer 報文,dhcp offer報文,option 選項 offer 報文,54 dhcp sever identifier 1 subnet mask,code len address +-+-+-+-+-+-+ | 54 | 4 | a1 | a2 | a3 | a4 | +-+-+-+-+-+-+,code len subnet mask +-+-+-+-+-+-+ | 1 | 4 | m1 | m2 | m3 | m4 | +-+-+-+-+-+-+,option 選項 offer 報文,51 ip address lease time,code len lease time +-+-+-+-+-+-+ | 51 | 4 | t1 | t2 | t3 | t4 | +-+-+-+-+-+-+ the time is in units of seconds, and is specified as a 32-bit unsigned integer. 長度固定為4個字節(jié) ,單位是秒 33 04 00 00 1c 20 1c20=7200 s =2 小時,option 選項 offer 報文,52 option overload,code len value +-+-+-+ | 52 | 1 |1/2/3| +-+-+-+ 34 01 03 value meaning - - 1 the file field is used to hold options 文件過載 2 the sname field is used to hold options sever 名字過載 3 both fields are used to hold options 文件和server 都過載 this option is used to indicate that the dhcp sname or file fields are being overloaded by using them to carry dhcp options. 用來標識dhcp server name 和file 攜帶dhcp 選項是否過載 boot file and sever host name overload option,option 選項 offer 報文,15 domain name,code len domain name +-+-+-+-+-+-+- | 15 | n | d1 | d2 | d3 | d4 | . +-+-+-+-+-+-+- 0f 06 64 6f 6d 61 69 6e n 的最小長度為1 64 6f 6d 61 69 6e = “domain“ this option specifies the domain name that client should use when resolving hostnames via the domain name system. 用于dns來區(qū)別不同的主機 選項指定域名字 客戶端使用他們 當 解決 主機名字 通過 域名服務器,option 選項 offer 報文,3 router,code len address 1 address 2 +-+-+-+-+-+-+-+-+- | 3 | n | a1 | a2 | a3 | a4 | a1 | a2 | . +-+-+-+-+-+-+-+-+- 03 04 c0 a8 fe 01 c0 a8 fe 01 = 192.168.254.1 the router option specifies a list of ip addresses for routers on the clients subnet. 指定了一系列在客戶端同一子網(wǎng)上的ip地址 n 為4 的倍數(shù) 一般情況下為 網(wǎng)關,option 選項 offer 報文,6 domain name server,code len address 1 address 2 +-+-+-+-+-+-+-+-+- | 6 | n | a1 | a2 | a3 | a4 | a1 | a2 | . +-+-+-+-+-+-+-+-+- 06 08 c0 a8 65 01 c0 a8 fe 50 n 的最小長度為4,且為4的倍數(shù) ip1 192.168.101.1 主用dns ip2192.168.254.80 備用dns the domain name server option specifies a list of domain name system name servers available to the client. 指定了一個dns的 列表,option選項 offer報文,31 peform router discovery option,code len value +-+-+-+ | 31 | 1 | 0/1 | +-+-+-+ 1f 01 01 0: client should not perform router discovery. 客戶端不執(zhí)行路由器發(fā)現(xiàn) 1: client should perform router discovery. 執(zhí)行路由器發(fā)現(xiàn) this option specifies whether or not the client should solicit routers using the router discovery mechanism defined in rfc 1256 指定 客戶端是否請求路由器發(fā)現(xiàn),dhcp request 報文,oition選項 request報文,12 host name option,code len host name +-+-+-+-+-+-+-+-+- | 12 | n | h1 | h2 | h3 | h4 | h5 | h6 | . +-+-+-+-+-+-+-+-+- 0c 09 72 63 6a 73 2d 31 37 33 36 “rcjs-1736” 最小長度是 1,dhcp 選項 request 報文,dhcp ack 報文,dhcp ack 報文,dhcp release 報文,dhcp 常用option選項,option1 subnet mask option3 router option6 domain name server option12 host name option option50 requested ip address option51 ip address lease time option53 dhcp message type option54 dhcp sever identifier option60 vendor class identifier option61 client identifier (mac),dhcp 報文的選項對比,discover 53,116,61,50,12,60,55,43 offer 53,54,1,51,52,15,3,6,31 request 53,61,50,54,12,81,60,55,43 ack 53,54,1,51,52,15,3,6,31,dhcp 續(xù)約,dhcp 客戶端重新啟動,先發(fā)dhcp request 報文,requested ip address 填原來獲得的ip地址 發(fā)rquest之后沒有獲得ip地址,然后發(fā)discover 報文,request ip address 選項置0,dhcp,產(chǎn)生背景 工作原理 典型應用,dhcp 相關名詞解釋,tacas terminal access controller access controller system 終端接入控制系統(tǒng) dslam digital subscriber line access multiplexer 數(shù)字用戶線 接入復接器 radius remote authentication dial in user service 遠程認證撥入用戶服務器 bras broadband remote access server 寬帶遠程接入服務器 bas broadband access server sr service router aaa authentication,authorization,accounting,dhcp 用戶上線認證方式,option82方式 option82用來區(qū)分不同的用戶,分配sq資源。 在dslam或者是路由器上插入option82 option82的構(gòu)成: 設備編號(交換機或者dslarm)slotpicportvlan option60:同一用戶有多個終端申請ip地址時,通過option60帶不同的域名來區(qū)分 例如: 機頂盒 帶“vedio” voip終端 帶“voip” 不帶域名 pc上網(wǎng),dhcp 用戶上線認證方式,host方式 通過ip和mac地址對來識別不同的用戶,分配sq資源 qinq方式 根據(jù)內(nèi)層q和p-vlan-group 來分配sq資源 內(nèi)層q表示用戶,外層q表示業(yè)務,radius 介紹,radius 是一個認證計費服務的統(tǒng)稱。多運行在linux上 包含freeraidius ,radiator,tacas 等 是一種基于udp協(xié)議的上層協(xié)議,認證服務的監(jiān)聽端口號為1812,記費服務的監(jiān)聽端口號為1813,dhcp redius 認證過程,portal 介紹,portal在英語中是入口的意思。portal認證通常也稱為web認證,一般將portal認證網(wǎng)站稱為門戶網(wǎng)站。 未認證用戶上網(wǎng)時,設備強制用戶登錄到特定站點,用戶可以免費訪問其中的服務。當用戶需要使用互聯(lián)網(wǎng)中的其它信息時,必須在門戶網(wǎng)站進行認證,只有認證通過后才可以使用互聯(lián)網(wǎng)資源。,dhcp portal 過程,dhcp,arp 探測和 idle-cut,arp 探測 用戶在線之后,bas 設備會定期的發(fā)送arp 報文,探測用戶是否在線 在arp 探測失敗之后,會通知相應模塊做相應處理 idle-cut 設定門限值。低于門限值時,對用戶做切斷處理。有效利用ip地址,dhcp 單跳直連,dhcp 單跳基本配置,創(chuàng)建vlan和接口 iscom3026e(config)#create vlan 100 active iscom3026e(config)#int p 1 iscom3026e(config-port)#switchport access vlan 100 iscom3026e(config)#int ip 1 iscom3026e(config-ip)#ip a 192.168.100.1 100 iscom3026e(config)# 創(chuàng)建地址池 iiscom3026e (config)#ip dhcp server ip-pool aaa 192.168.100.2 192.168.100.254 255.255.255.0 ip 1 gateway 192.168.100.1 啟動dhcp server iscom3026e(config)#ip dhcp server iscom3026e(config)#int p 1 iscom3026e(config-ip)#ip dhcp server ip 接口下的dhcp server 必須啟動,默認是不啟動的,dhcp server 查看命令,show ip dhcp server dhcp server: enabled ip interface enabled: 1 total number: 1 option 82: enabled max lease time: 10080 m min lease time: 30 m default lease time: 30 m,statistics information: running time: 0 hours 0 minutes 54 seconds bootps: 0 discover: 0 request: 0 release: 0 offer: 0 ack: 0 nack: 0 decline: 0 information: 0 unknows: 0 total: 0,dhcp relay,dhcp relay 配置,配置 dhcp relay 1.創(chuàng)建vlan 和ip 接口 iscom3026e(config)#create vlan 10,20 active iscom3026e(config-port)#int port 1 iscom3026e(config-port)#switchport access vlan 10 iscom3026e(config-port)#int port 3 iscom3026e(config-port)#switchport access vlan 20 iscom3026e(config)#int ip 2 iscom3026e(config-ip)#ip address 172.168.1.11 255.255.255.0 20 iscom3026e(config)#int ip 5 iscom3026e(config-ip)ip address 192.168.1.1 255.255.255.0 10 2.啟動dhcp relay 功能 iscom3026e(config)#ip dhcp rel

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論