




版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、數(shù)據(jù)通信基礎(chǔ)第19章 (網(wǎng)絡(luò)互聯(lián))Internetworking20120331Network LayerPART IV20120331Position of network layer20120331Network layer dutiesDatalink layer data frames through single physical networkNetwork layer data packets between multiple networks - the Inter-network layerMake many networks look like one large netw
2、orkUnique address for every host on the internetDetermine best route to destination (routers)Organise data into packets, add addressing info., etc.Split large packets into smaller ones (routers)20120331ChaptersChapter 19 Host-to-Host DeliveryChapter 20 Network Layer ProtocolsChapter 21 Unicast and M
3、ulticast Routing Protocols20120331Figure 24-1An Internet According to TCP/IPREVIEW20120331Figure 24-2TCP/IP and the OSI ModelREVIEW20120331Chapter 19Host-to-Host Delivery:主機(jī)到主機(jī)的傳送Internetworking, 網(wǎng)絡(luò)互聯(lián)Addressing, 編址and Routing 路由2012033119.1 InternetworksNeed For Network LayerInternet As A Packet-Swi
4、tched Network分組交換網(wǎng) - individual packets take their own route (and must contain their own addressing)Internet As A Connectionless Network無(wú)連接網(wǎng) - no permanent connection made between source and destination existence of destination not checked in advance20120331Figure 19.1 InternetworkSourceDestinationS
5、witch or Router20120331Figure 19.2 Links in an internetworkHop-to-hop: from one node to another20120331Figure 19.3 Network layer in an internetworkHost-to-host: from source to destination20120331Figure 19.4 Network layer at the source20120331Figure 19.5 Network layer at a router20120331Figure 19.6 N
6、etwork layer at the destination20120331Figure 19.7 SwitchingPermanent connection during transfer, like switched telephone data does not include addressing infoSame route defined for all packets for duration of messageEach independent packet has addresses attached- Route not predetermined電路交換虛電路方式數(shù)據(jù)包
7、方式20120331Figure 19.8 Datagram approach20120331Switching at the network layer in the Internet is done using the datagram approach to packet switching.Note:20120331Communication at the network layer in the Internet is connectionless. Note:2012033119.2 AddressingInternet AddressClassful Addressing 有分類(lèi)
8、的編址Supernetting 超網(wǎng)編址Subnetting 子網(wǎng)編址Classless Addressing 無(wú)分類(lèi)的編址Dynamic Address ConfigurationNetwork Address Translation20120331An IP address is a 32-bit address.Note:NOTE: It is BIT, not BYTENOTE: 32 bits = 4 Bytes1 Byte = 8 BitsThere are TWO parts in IP address: Netid (network ID網(wǎng)絡(luò)號(hào)) and Hostid (Hos
9、t ID主機(jī)號(hào))20120331The IP addresses are unique and universal.Note:20120331Figure 19.9 Dotted-decimal notationDotdecimalPurpose of Use: Convenient for human being to remember IP address.NOTE: The maximum of each number should be 255.點(diǎn)分十進(jìn)制表示方式20120331The binary, decimal, and hexadecimal number systems ar
10、e reviewed in Appendix B.Note:How to convert:From Binary to Decimal: Weighted SumFrom Decimal to Binary: Long Division20120331Example 1Change the following IP addresses from binary notation to dotted-decimal notation.a.10000001 00001011 00001011 11101111b.11111001 10011011 11111011 00001111SolutionW
11、e replace each group of 8 bits with its equivalent decimal number (see Appendix B) and add dots for separation:a.129.11.11.239b.249.155.251.1520120331Example 2Change the following IP addresses from dotted-decimal notation to binary notation.a.111.56.45.78b.75.45.34.78SolutionWe replace each decimal
12、number with its binary equivalent (see Appendix B):a.01101111 00111000 00101101 01001110b.01001011 00101101 00100010 01001110 20120331In classful addressing, the address space is divided into five classes: A, B, C, D, and E.Note:20120331Figure 19.10 Finding the class in binary notation這張表非常重要2012033
13、1Figure 19.11 Finding the address class 20120331Example 3Find the class of each address:a.00000001 00001011 00001011 11101111b.11110011 10011011 11111011 00001111SolutionSee the procedure in Figure 19.11. a.The first bit is 0; this is a class A address.b.The first 4 bits are 1s; this is a class E ad
14、dress. 20120331Figure 19.12 Finding the class in decimal notation 0d = 0 0000000b; 127d = 0 1111111b;128d = 10 000000b; 191d = 10 111111b;192d = 110 00000b; 223d = 110 11111b;這張表非常實(shí)用20120331Example 4Find the class of each address:a.227.12.14.87b.252.5.15.111c.134.11.78.56Solutiona.The first byte is
15、227 (between 224 and 239); the class is D.b.The first byte is 252 (between 240 and 255); the class is E.c.The first byte is 134 (between 128 and 191); the class is B.20120331Figure 19.13 Netid and hostid20120331Figure 19.14 Blocks in class A20120331Millions of class A addresses are wasted.Note:20120
16、331Figure 19.15 Blocks in class B20120331Many class B addresses are wasted.Note:20120331The number of addresses in class C is smaller than the needs of most organizations.Note:20120331Figure 19.16 Blocks in class C20120331Figure 19.17 Network address20120331In classful addressing, the network addres
17、s is the one that is assigned to the organization. Note:The network address is one specific IP address, but it represents a group of IP addresses from one organization. Network address = NetID + 0(HostID)20120331Example 5Given the address 23.56.7.91, find the network address.SolutionThe class is A.
18、Only the first byte defines the netid. We can find the network address by replacing the hostid bytes (56.7.91) with 0s. Therefore, the network address is 23.0.0.0. 20120331Example 6Given the address 132.6.17.85, find the network address.SolutionThe class is B. The first 2 bytes defines the netid. We
19、 can find the network address by replacing the hostid bytes (17.85) with 0s. Therefore, the network address is 132.6.0.0.20120331Example 7Given the network address 17.0.0.0, find the class.SolutionThe class is A because the netid is between 0-127. (because the netid is only 1 byte.)20120331A network
20、 address is different from a netid. A network address has both netid and hostid, with 0s for the hostid.Note:Netid0(hostid)20120331Figure 19.18 Sample internete.g. T1 lineToken Ring NetworkClass B EthernetClass A Ethernet Network20120331IP addresses are designed with two levels of hierarchy.The neti
21、d is the first level this unique number identifies the networkThe hostid is the second level this defines the host on that network. A hostid is not uniqueNote:20120331Figure 19.19 A network with two levels of hierarchy Class B networkNetid = 141.14Network address = 141.14.0.0Hostid = 192.2IP address
22、 = 141.14.192.2This router looks for packetsWith address 141.14.X.XWhere X = dont care20120331Figure 19.20 A network with three levels of hierarchy (subnetted)This router looks for 141.14.64.X20120331Figure 19.21 Addresses in a network with and without subnetting20120331Figure 19.22 Hierarchy concep
23、t in a telephone numberA router which connects to the internet will look for all packets with destination address 141.14.X.X (first layer)A subnet router on network 141.14.192.0 will look for all packets with subnet id = 192 (middle layer)Host 141.14.192.2 will read all packets with hostid = 2NetidH
24、ostidSubnet id20120331Table 19.1 Default masksClassIn BinaryIn Dotted-DecimalUsing SlashA11111111 00000000 00000000 00000000255.0.0.0/8B11111111 11111111 00000000 00000000255.255.0.0/16C11111111 111111111 11111111 00000000255.255.255.0/24A mask is a binary number used to select certain sections of a
25、n IP address. When the mask is ANDed with the IP address, the sections where the mask bits=1 are extracted, and the remainder is set to zero (since anything ANDed with zero = 0). A class B default mask will thus extract the first 16 bits of an IP address (the netid)Routers use masks to extract routi
26、ng information20120331The network address can be foundby applying the default mask to anyaddress in the block (including itself).It retains the netid of the block and sets the hostid to 0s.Note:網(wǎng)絡(luò)地址 20120331Example 8A router outside the organization receives a packet with destination address 190.240
27、.7.91. Show how it finds the network address to route the packet.SolutionThe router follows three steps:The router looks at the first byte of the address to find the class. It is class B. The default mask for class B is 255.255.0.0. The router ANDs this mask with the address to get 190.240.0.0. The
28、router looks in its routing table to find out how to route the packet to this destination. Later, we will see what happens if this destination does not exist.20120331Figure 19.23 Subnet maskThe subnet mask will extract both the netid and the subnet id20120331Example 9A router inside the organization
29、 receives the same packet with destination address 190.240.33.91. Show how it finds the subnetwork address to route the packet.SolutionThe router follows three steps:The router must know the mask. We assume it is /19, as shown in Figure 19.23. The router applies the mask to the address, 190.240.33.9
30、1. The subnet address is 190.240.32.0. The router looks in its routing table to find how to route the packet to this destination. Later, we will see what happens if this destination does not exist. 20120331Class C addresses only support 256 hosts (strictly 254). Organisations can supernet several cl
31、ass C addresses to form one larger block. External routers then need to look for a range of netids, rather than just one.Note:20120331Private IP addresses within a network are often not permanently assigned to individual hosts (since addresses are in short supply, and not all hosts will be active).
32、A process of Dynamic Host Configuration automatically leases temporary IP addresses to hosts using DHCP 動(dòng)態(tài)主機(jī)配置協(xié)議(P = protocol)Note:20120331Each host must have:IP addressSubnet maskIP address of nearest router (gateway)IP address of name server DHCP takes care of all this automaticallyNote:20120331Ta
33、ble 19.2 Default masksRangeTotal10.0.0.0 to 10.255.255.255224172.16.0.0 to 172.31.255.255220192.168.0.0 to 192.168.255.255216Private IP addresses 專(zhuān)用的IP地址The above IP address ranges NEVER appear on the Internet, and are ignored by routers. They are for private (internal) IP networks within organisati
34、ons they are not unique, since they are used over and over again within each organisation. The University uses these addresses for all its PCs (hosts)20120331Figure 19.25 IPconfigipconfig is a DOS (command line) based utility for establishing the IP address of a host. Run ProgramsAccessoriesCommand
35、prompt, and enter ipconfigExample session:20120331Figure 19.25 NATNetwork Address Translation (NAT 網(wǎng)絡(luò)地址轉(zhuǎn)換) is the process of converting a private address into a global (assigned) Internet address. Host 172.18.3.1 sends a request out to the internet. The source address must be modified by the router
36、before it sends it out onto the internet, since 172.x.x.x addresses arent allowed the NAT router substitutes its own address as the source172.18.3.120120331Figure 19.26 Address translationWhen the reply comes back (addressed to 200.24.5.8), the NAT router must then substitute the original host addre
37、ss as the destination within the private networkHow does the router know which private address to substitute for 200.24.5.8 ?20120331Figure 19.27 Translation20120331Figure 19.26 Address translationProblem: What if 2 hosts in a private network using NAT want to connect to the same site over the same
38、period, e.g. Google? How can the translation table reflect access to the same destination from different sources?Solution: Have a pool of global addresses for the NAT router this allows multiple access of the same destination bound to different addresses. Each global router address will be assigned
39、to one host request. Clearly, there is still a limit, depending on the size of the pool of global addresses available.20120331Figure 19.26 Address translationProblem: NAT works because the (private) host initiates the request. How can an external host (e.g. an email server) initiate a request to sen
40、d an email to a private host?How can an external host (e.g. a browser) request a page from an internal server with a private address?Solution: It cannot !NAT only allows requests to be initiated in an outgoing direction. No external host can ever know the address of an internal host. Even if it gues
41、sed an address, the internet will not forward a packet with a private address on it.20120331Table 19.3 Five-column translation tablePrivate AddressPrivate PortExternalAddressExternal PortTransportProtocol172.18.3.1140025.8.3.280TCP172.18.3.2140125.8.3.280TCP.An alternative way to identify hosts whic
42、h contact the same server is to keep a record of the TCP port number used by the host on the private address. The combination of private_address:port_number (called a socket see TCP notes) could be unique on that network.2012033119.3 RoutingRouting TechniquesStatic Versus Dynamic RoutingRouting Tabl
43、e for Classful AddressingRouting Table for Classless Addressing路由表20120331Figure 19.28 Next-hop routingThe next hop scheme is simpler. Changes in router/link availability can be catered for at each router, rather than needing to be done at the source. Scheme (a) - source routing is impossible on the
44、 Internet20120331Figure 19.29 Network-specific routingInternet routing is really about getting to the right network. Routing tables based on networks rather than individual hosts are sufficient, and much simpler20120331Figure 19.30 Host-specific routingA routing table can have specific entries added
45、. Occasionally, there is a need to specify a specific route to a particular host, e.g. a network administrator may wish to check a specific router/route20120331Figure 19.31 Default routingThe default route entry defines a route for all packets except for those destined for N220120331Static and Dynam
46、ic Routing TablesOn a small internet, an administrator may use static routing tables which are entered manually and do not change, e.g. company internal network, or the Internet in the 1970s On the Internet today, routing tables are updated dynamically according to conditions on links and routers. T
47、hese dynamic updates are done using protocols as RIP, OSPF or BGP. These protocols were developed as the Internet grew in size and complexityInternet Routers nowadays are based on very powerful computers with huge routing tables.20120331Figure 19.32 Classful addressing routing tableClassful routing
48、tables are relatively simple, since there are only a few types of netid/hostid combinations: A, B or C. Such tables may contain host specific and default entries, alongside class A, B or C entries.Four columns is a minimum, since the mask, destination, next hop address and interface (output port num
49、ber) need to be known for each entry 20120331Example 10Using the table in Figure 19.32, the router receives a packet for destination 192.16.7.1. For each row, the mask is applied to the destination address until a match with the destination address is found. In this example, the router sends the pac
50、ket through interface m0 (host specific).NNNm0m1m2interfacesIncoming Packet20120331Example 11Using the table in Figure 19.32, the router receives a packet for destination 193.14.5.22. For each row, the mask is applied to the destination address until a match with the next-hop address is found. In this example, the router sends the packet through interface m2 (network specific).Example 12Using the table in Figure 19.32, the router receives a packet fo
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- (一模)臨沂市2025屆高三高考第一次模擬考試政治試卷(含答案詳解)
- 水墨知識(shí)與技能培訓(xùn)課件
- 教師試用期總結(jié)(33篇)
- 開(kāi)學(xué)典禮工作報(bào)告
- DB31∕700-2020 鋼質(zhì)冷模鍛件單位產(chǎn)品能源消耗限額
- 平安快樂(lè)我成長(zhǎng)主題隊(duì)會(huì)課件
- 民營(yíng)醫(yī)院運(yùn)營(yíng)管理2
- 高中數(shù)學(xué)競(jìng)賽題庫(kù):數(shù)列求和技巧訓(xùn)練教學(xué)方案
- 會(huì)計(jì)報(bào)表編制作業(yè)指導(dǎo)書(shū)
- 合作雙方保密協(xié)議
- 各種螺釘尺寸-標(biāo)準(zhǔn)螺釘尺寸表
- 銷(xiāo)售人員人才畫(huà)像
- (完整版)建筑工程技術(shù)畢業(yè)論文
- 鑫宇鋅合金模具設(shè)計(jì)標(biāo)準(zhǔn)
- 整理我的小書(shū)桌(課件)小學(xué)勞動(dòng)二年級(jí)通用版
- 森林撫育施工組織設(shè)計(jì)
- 切削刀具及其材料課件
- 山東省義務(wù)教育地方課程安全教育課程實(shí)施指導(dǎo)意見(jiàn)
- DL-T 736-2021 農(nóng)村電網(wǎng)剩余電流動(dòng)作保護(hù)器安裝運(yùn)行規(guī)程
- SB/T 10439-2007醬腌菜
- GB/T 33644-2017數(shù)控板料折彎?rùn)C(jī)精度
評(píng)論
0/150
提交評(píng)論