版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領
文檔簡介
1、Chapter 6 ARP and RARPARPARP package(ARP軟件包)RARP7/15/20221TCP/IP Protocol Suite兩級地址IP分組交付到主機或路由器需要兩級地址互連網(wǎng)級:邏輯地址標識主機/路由器全網(wǎng)統(tǒng)一編址,具有全局唯一性全局地址所有與互聯(lián)網(wǎng)打交道的軟件都要使用邏輯地址在Internet中,邏輯地址就是IP地址(32bit)物理網(wǎng)級:物理地址標識主機/路由器本地范圍內(nèi)具有唯一性,但在整個互聯(lián)網(wǎng)內(nèi)不一定具有全局唯一性本地地址分組需要通過物理網(wǎng)絡才能到達路由器或主機以太網(wǎng)中,物理地址就是MAC地址(48bit)7/15/20222TCP/IP Proto
2、col SuiteMappingLogical address (IP)Physical addressNetworkData LinkPhysicalMappingTo:電子科技大學成都市建設北路2段4號單位名稱(邏輯)單位地址(物理)7/15/20223TCP/IP Protocol Suite IssuesA送往E的分組需封裝在Ethernet幀中傳送IP地址:全局性物理地址:本地性AA僅知道:IPA,MACA,IPEEthernet Frame:IP Packet?EBCD目的MAC類型FCS源MACMACA7/15/20224TCP/IP Protocol SuiteAddress
3、Mapping(地址映射)Logical address Physical addressStatic mapping映射表固定設置Dynamic mappingStatic TableLogical addressPhysical addressConsider:NIC changedMobile computerCacheLogical addressPhysical addressLook for the target on demanding, using dynamic Address Resolution Protocol 7/15/20225TCP/IP Protocol Sui
4、teARP and RARPARPLogical addressPhysical addressRARPLogical addressPhysical address7/15/20226TCP/IP Protocol SuiteARPAddress Resolution Protocol,RFC 826地址解析協(xié)議:IP address MAC addressIPLANsMANsWANsICMPIGMPARPRARPNetworkLayerNetworkAccessLayerTransport LayerApplication Layer7/15/20227TCP/IP Protocol Su
5、iteARP OperationA: E: Im looking for the physical address of a node whose IP address is: I am the node you are looking for, and my physical address is: 0005.5D06.1418RequestRequestRequestReplyRequestBroadcastUnicastB: C: D: IP addressMAC addressAs ARP Cache:0005.5D06.1418bind7/15/20228TCP/IP Protoco
6、l SuiteARP Cache ARP cacheTo maintain the recent mappings from logical addresses (IP) to hardware addresses (MAC)典型存活時間:2 minutesEssential to the efficient operation of ARP 舉例:主機 ARP CacheC:arp aInterface: 8 - 0 x50002Internet AddressPhysical AddressType2 00-03-31-b5-50-00 Dynamic7/15/20229TCP/IP Pr
7、otocol Suite用戶輸入命令“ftp 主機名”時的操作FTPTCPIPARP以太網(wǎng)驅(qū)動程序主機名解析器以太網(wǎng)驅(qū)動程序以太網(wǎng)驅(qū)動程序主機名IP地址(1)(2)(3)(4)(6)ARPARPFTPTCPIP(5)(7)目的源7/15/202210TCP/IP Protocol SuiteARP PacketHardware TypeProtocol TypeHardware address lenProtocol address lenOperation Request 1, Reply 2Sender hardware address(For example,6 bytes for Et
8、hernet)Sender protocol address(For example,4 bytes for IP)Target hardware address(For example,6 bytes for Ethernet)Target protocol address(For example,4 bytes for IP)It is not filled in a request7/15/202211TCP/IP Protocol SuiteEncapsulation of ARP packetThe byte order of ARP packetExample:Ethernet f
9、rameHTypePTypeHLPLOPsMACsIPtMACtIP222116644byteARP Packet目的MAC類型FCS源MACPacket66246 15004pad28 bytes460 x0806byte7/15/202212TCP/IP Protocol SuiteExample: ARP Request Packet7/15/202213TCP/IP Protocol SuiteExample: ARP Reply Packet7/15/202214TCP/IP Protocol SuiteIP Packet and ARP PacketIPIPIPIPARP requ
10、estARP replyIP packetBindingIP packetIP packetIP packetNo binding7/15/202215TCP/IP Protocol SuiteARP ProcessCase 1:A BIn same IP networkCase 2:A DIn different IP networkACBDR1R2IPA,MACAIPB,MACBIPC,MACCIPD,MACDIP1MAC1IP2MAC2IP3MAC3IP4MAC47/15/202216TCP/IP Protocol SuiteCase 1:A BACBDR1R2IPA,MACAIPB,M
11、ACBIPC,MACCIPD,MACDIP1MAC1IP2MAC2IP3MAC3IP4MAC4IP AddressMAC AddressAs ARP Cache:IPBMACBBs ARP Cache:IPAMACAR1s ARP Cache:IPAMACAsIP=IPA,dIP=IPBARPrequestARPrequestARPrequestARPrequestARPreplyIPIPsMAC=MACA,dMAC=MACBsIP=IPA,dIP=IPBdMAC=廣播,Target_IP=IPBSender hardware address: MACASender protocol addr
12、ess: IPATarget hardware address: 0 x00000000Target protocol address: IPBSender hardware address: MACBSender protocol address: IPBTarget hardware address: MACATarget protocol address: IPA7/15/202217TCP/IP Protocol SuiteCase 2:A DACBDR1R2IPA,MACAIPB,MACBIPC,MACCIPD,MACDIP1MAC1IP2MAC2IP3MAC3IP4MAC4IP A
13、ddressMAC AddressAs ARP Cache:IP1MAC1Bs ARP Cache:IPAMACAR1s ARP Cache:IPAMACAsIP=IPA,dIP=IPDARPrequestARPrequestARPrequestARPrequestARPreplyIPIPsMAC=MACA,dMAC=MAC1sIP=IPA,dIP=IPDdMAC=廣播,Target_IP=IP1IPD不在本網(wǎng)內(nèi),分組由R1轉(zhuǎn)發(fā)sMAC=MAC2,dMAC=MAC3sIP=IPA,dIP=IPDsMAC=MAC4,dMAC=MACDsIP=IPA,dIP=IPDIP1是A的缺省網(wǎng)關(guān)(Defau
14、lt Gateway)7/15/202218TCP/IP Protocol Suite關(guān)鍵問題:ARP解析誰的IP地址?7/15/202219TCP/IP Protocol SuiteExampleA host with IP address 0 and physical address 0 xB23455102210 has a packet to send to another host with IP address 5 and physical address 0 xA46EF45983AB. The two hosts are on the same Ethernet network
15、. Show the ARP request and reply packets encapsulated in Ethernet frames.7/15/202220TCP/IP Protocol SuiteExample: ARP Request7/15/202221TCP/IP Protocol SuiteExample: ARP Request7/15/202222TCP/IP Protocol SuiteProxy ARP(代理ARP)Proxy ARP: 產(chǎn)生子網(wǎng)效應代表另一個物理網(wǎng)絡中一組主機回答ARP Request,在ARP Reply中通告自己的MAC地址(即將解析的IP與
16、代理ARP的MAC綁定)To fool the sender of the ARP request into thinking that the router is the destination host, when in fact the destination host is on the other side of the router “Honest”HidedQ: In the same IP network or not?7/15/202223TCP/IP Protocol SuiteAnswerRFC 925: Multi-LAN Address ResolutionExpli
17、cit subnetsTransparent subnets(Extended ARP)RFC 1027: Using ARP to Implement Transparent Subnet GatewaysRouters: Explicit subnetsHosts: Transparent subnets“ From the host point of view, there are no subnets, and their physical networks are simply one big IP network. ”7/15/202224TCP/IP Protocol Suite
18、Proxy ARP功能To be used to create a subnetting effect 兩個物理網(wǎng)絡,具有相同網(wǎng)絡地址(即不需要重新劃分子網(wǎng))使用路由器分別連接這兩個網(wǎng)絡,并執(zhí)行ARP代理,實現(xiàn)兩個邏輯子網(wǎng)方案:路由器上運行Proxy ARP軟件 transparent subnet gateway當路由收到對特定主機的ARP請求時,用自己的物理地址(接收端口)進行ARP應答代理ARP應答的條件(同時滿足):與源站點不在同一邏輯子網(wǎng)的主機路由器有到達該節(jié)點的路由(非默認路由)且路由表項記錄的發(fā)送接口接收該ARP請求的接口關(guān)鍵:創(chuàng)建子網(wǎng),但不需要重新劃分子網(wǎng)地址7/15/2022
19、25TCP/IP Protocol SuiteDiscussion.3向.35發(fā)送IP分組.3廣播請求.35的ARP分組,R不轉(zhuǎn)發(fā)廣播.35向.3發(fā)送IP分組.35廣播請求.62的ARP分組R/24Main network2/27Hided network.00.201 IP發(fā)送失敗 IP發(fā)送成功 ARP失敗 ARP成功設想:R代替.35向.3返回ARP應答 Proxy ARP(RFC 925)7/15/202226TCP/IP Protocol SuiteGratuitous ARP功能:Duplicate address testAB441. ARP re
20、quest: sIP = tIP = 42. ARP reply: sIP = tIP = 43. Disable local interface: 4Startup orChange IP addressW. Stevens, TCP/IP Illustrated Volume 1: The Protocol7/15/202227TCP/IP Protocol SuiteGratuitous ARP PacketThe same sender and target IP address7/15/202228TCP/IP Protocol SuiteChapter 6 ARP and RARP
21、ARPARP package(ARP軟件包)RARP7/15/202229TCP/IP Protocol SuiteARP Package7/15/202230TCP/IP Protocol SuiteARP CacheHost(Windows XP)Router(Cisco)C: arp aInterface: 4 - 0 x2 Internet Address Physical Address Type 3 00-90-27-a7-98-41 dynamic 7 00-90-27-1d-d9-94 dynamic 2 00-90-27-1a-67-e7 dynamicRouter# sho
22、w arpProtocol Address Age (min) Hardware Addr Type InterfaceInternet 3 - 0090.27a7.9841 ARPA Ethernet0Internet 4 5 0005.5d06.1418 ARPA Ethernet0Internet - 00e0.7bc0.b205 ARPA Ethernet17/15/202231TCP/IP Protocol Suite思考更新ARP綁定時,發(fā)現(xiàn)已有的綁定與新的綁定不一樣,是保持已有的還是替換它?封裝IP報文的以太幀中的源MAC和IP報文中的源IP可否用于刷新ARP表項?目的MAC和目
23、的IP呢?教材中ARP輸入模塊描述與RFC 826中的Packet Reception一節(jié)有矛盾7/15/202232TCP/IP Protocol SuiteRFC ReferencesRFC 1122: Requirements for Internet Hosts - Communication LayersSection 2.3.2: ARP cache, ARP packet queueRFC 1812: Requirements for IPv4 RoutersSection 3.3.2RFC 1433: Directed ARPARP helper addressRFC 1868: ARP Extension UNARPAnnounce leaving
溫馨提示
- 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. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 恒大員工轉(zhuǎn)正工作總結(jié)(3篇)
- 垃圾處理工程項目可行性研究報告
- 高三演講稿450字以上(8篇范文)
- 臨床診療指南與藥物臨床應用指南
- 小戶型居住體驗需求調(diào)查
- 高中歷史教研組工作總結(jié)范文8篇
- 魚幼兒美術(shù)教案模板8篇
- 住宅小區(qū)招投標工作指南
- 勞動合同補充協(xié)議范本
- 建筑工程安全評價合同模板
- 2024年公路建設:泥漿外運及環(huán)保處理合同
- 江蘇省蘇州市吳中區(qū)2024-2025學年八年級上學期期中考試歷史卷(含答案)
- 2024-2025學年上學期期中教育學業(yè)質(zhì)量監(jiān)測九年級歷史試卷
- 2024年山東省公務員錄用考試《行測》試題及答案解析
- 民間借貸利息計算表
- 2024江蘇省鐵路集團限公司春季招聘24人高頻500題難、易錯點模擬試題附帶答案詳解
- 滬科版(2024)八年級全一冊物理第一學期期中學業(yè)質(zhì)量測試卷 2套(含答案)
- Q GDW 10115-2022 110kV~1000kV架空輸電線路施工及驗收規(guī)范
- 2023《住院患者身體約束的護理》團體標準解讀PPT
- 辯論賽評分表(完整版)-
- 電子商務支付與安全課程標準
評論
0/150
提交評論