《【大学课件】本科网络课程讲义:Chapter 7 Internet》由会员分享,可在线阅读,更多相关《【大学课件】本科网络课程讲义:Chapter 7 Internet(82页珍藏版)》请在金锄头文库上搜索。
1、Chapter 7 Internet & TCP/IPn7.1 Internet基本协议栈n7.2 IP地址n7.3 地址转换协议ARPn7.4 IP协议n7.5 ICMP协议n7.6 IP寻址n7.7 Internet 路由协议n7.8 组播17.1 Internet基本协议栈IPICMPIGMPUDPTCPEthernetRARPARPFTPTELNETDNSSNMPSMTPPhysical InterfaceframeIP PacketDatagramSegmentMessage2数据封装流程运行FTP应用程序调用FTP应用层模块,将内容封装在FTP协议中调用TCP模块,将上层内容封装在
2、TCP协议中调用IP模块,对每个数据段加上IP分组头对每个IP分组加上以太帧头或帧尾将数据帧的二进制码转换成光电信号应用层传输层网络层数据链路层物理层Seg1Seg2Seg3IPH Seg1IPH Seg2IPH Seg3FS IPH Seg1 FEFS IPH Seg2 FEFS IPH Seg3 FE3 RouterRouterRouterRouterNetworkData LinkPhysicalA router routes with the network address (such as the IP address)Application 1Application 2Applic
3、ation 1Application 2IP address is used toroute data around the InternetTCP part allows applications to communicate over the network47.2IP地址32 bits网络号主机号101010100101010100110011110011008 bits1708551204Dottednotation(W.X.Y.Z)BinarynotationHOSTHOSTHOST (128 191)NETHOSTHOST (192 223)NETNETHOSTClass ACla
4、ss BClass C(0127)0 NET 10 NET 110 NET Class DClass E播地留地1110 11110 保 (224-239)(240-247)组址址5特殊IP地址nIP地址中网络号或主机号为全0或全1的一般用做特殊处理,不用来标识网络或主机。n如:全1有限广播网络号全1127任意全0主机号全0用做测试定向广播回送地址(loopback)6nIPv4地址由4个字节(32位)组成,每个字节之间由点号分割,用十进制表示,称为点分十进制表示点分十进制表示。n分成5类:nA类类:最高位为0,随后7位为网络号,最后24位表示主机号。可以标识126个个A类网络类网络,每个网络
5、可以有224-2(约1600万)个主机。nB类类:最高两位10,随后14位为网络号,最后16位表示主机号。可以标识214-2(约16000)个B类网络,每个网络可以有216-2(约65000)个主机。nC类类:最高三位为110,随后21位为网络号,剩下8位为主机号。可以标识200万个C类网络,每个网络最多只能有254个主机。nD类类:最高四位为1110,是组播地址,标识一个组的地址。nE类类:最高五位为11110,是保留地址。7IP地址与MAC地址的区别MACIP物理地址(数据链路层地址)逻辑地址(网络层地址)局部意义全局意义随机获得上级分配48位(如08:00:39:00:2f:c3)32位
6、(如202.38.75.11)87.3地址转换协议ARP(Address Resolution Protocol)IPTCP HTTPDataE.g.Preamble(7B)Startdelimiter (1B)Dest.address (6B)Src.Address (6B)Len(2B)PADData field(Logical link control)0 to 1500 bytesSrc.IPDest.IP?由目的IP地址 目的MAC地址FCS(4 B)9地址转换规程n当链路层要封装网络层分组当链路层要封装网络层分组时,它需要知道目的物理地时,它需要知道目的物理地址。址。n首先,每个主
7、机都有ARP缓存,用来存放一些IP地址与MAC地址的对应关系。主机根据分组头上的目的IP地址查阅自己的ARP缓存,如果没查到,就用广播地址发送广播地址发送ARPARP请求请求。n被请求的IP地址所对应的主机返回一个ARP响应。n主机收到响应后,就可发送数据帧,并将该IP地址与MAC地址对存放在ARP缓存中。10Proxy ARP 如果目的IP地址是子网外的,显然它不可能收到ARP请求,这时有两种方案:1.路由器有ARP代理功能,它代理子网外的主机响应ARP请求。2.主机通过识别目的IP地址的网络号,知道它是子网外的主机,直接发给确省路由器11ROUTERStn.AStn.BStn.DStn.C
8、MAC R1NET N1MAC R2NET N2Station B wants to send a frame to Station DnOne Way Using Router with Proxy ARPnStation B Arps for Station DnRouter Proxy ARP responds with MAC address of R1nStation B transmits frame with SourceMAC=MB, SourceNetwork=N1B, DestinationMAC=R1, DestinationNetwork=N2DnRouter forw
9、ards frame with SourceMAC=R2, SourceNetwork=N1B, DestinationMAC=MD, DestinationNetwork=N2DnSecond Way Station knows R1 is the designated Router for N212Reverse ARP - RARPnRARP协议定义在RFC903nRARP协议用于查找物理地址所对应的IP地址,例如对于无盘机,启动时需要知道自己的IP地址。13ARP协议帧格式Preamble(7B)Startdelimiter (1B)Dest.address (6B)Src.Addre
10、ss (6B)Type(2B)协议类型2B物理地址长度1B硬件类型2B协议地址长度1B操作2B发送者物理地址发送者IP地址目的物理地址目的IP地址PADCRC4B帧类型(Type):ARP请求及响应为0X0806硬件类型:指发送者的网络接口类型,如以太网为1协议类型:指发送者所采用的网络层协议类型,如IP协议为0X0800操作:ARP请求1,ARP响应2,RARP请求3,RARP响应414arp Utility157.4IP(Internet Protocol)协议n7.4.1 IPv4协议16版本号与头标长度版本号(版本号(VERS):4bits,IPv4协议填4,IPv6协议填6。IP分组
11、头长度(分组头长度(LEN):4bits,单位为4字节,取值范围5-15(确省值为5,即标准头标长20字节),指示IP分组头的长度。17服务类型(TOS)优 先 级 d tr0 0可靠性:0-一般可靠;1-高可靠吞吐量:0-一般;1-高吞吐延时:0-一般;1-低延时000 Routine 001 Priority 010 Immediate 011 Flash 100 Flash override 101 Critical 110 Internetwork control 111 Network control 18总长度、分段功能总长度总长度:16bits ,单位字节,描述IP分组的总长(包
12、括头和数据),最大分组长度为65535字节。标识符标识符:16bits,用于唯一标识该分组。标志标志:3bits,第1位未定义,第2位为0表示该分组可分段,否则表示不可分段;第3位为0表示这是最后报片,否则则表示还有后续报片。段偏移段偏移:13bits,单位8字节。取值0-8191,标明当前报片在原分组中的位置。19为什么要分段?20怎样分段?数据(1400字节)分组头MTU=620字节分组头分组头分组头数据(600字节)数据(600字节)数据200字节段偏移=0段偏移=75段偏移=15021TTL、Protocol生存时间(生存时间(TTL):8bits,单位秒,表示分组的生存时间。实际操作
13、时,分组每经过一个路由器,TTL值减一,当TTL值为0时,该分组被丢弃。协议(协议(Protocol):表示高层协议类型。0 Reserved 1 Internet Control Message Protocol (ICMP) 2 Internet Group Management Protocol (IGMP) 3 Gateway-to-Gateway Protocol (GGP) 4 IP (IP encapsulation) 5 Stream 6 Transmission Control (TCP) 8 Exterior Gateway Protocol (EGP) 9 Private
14、 Interior Routing Protocol 17 User Datagram (UDP) 89 Open Shortest Path First 22分组头校验、源/目的地址分组头校验分组头校验:16bits,用来检验分组头。源地址源地址:32bits,分组发送者的IP地址。目的地址目的地址:32bits,分组接收者的IP地址。填充(填充(padding):分组头长度必须为4字节的整数倍,如果选项的长度不是4字节的整数倍,那么就要进行填充。23选项(option)安全性(安全性(SecuritySecurity):):指明分组的机密性指明分组的机密性严格的源路由选择(严格的源路由选择
15、(Strict Source routingStrict Source routing):):给出分组经过的完整路由给出分组经过的完整路由松散的源路由选择(松散的源路由选择(Loose Source routingLoose Source routing):):给出分组经过的某些路由器列表给出分组经过的某些路由器列表路由记录(路由记录(Route recordingRoute recording):):使每个路由器都附上它的使每个路由器都附上它的IPIP地址地址时间标记(时间标记(Time stampingTime stamping):):使每个路由器都附上它的使每个路由器都附上它的IP地址和
16、时间标记地址和时间标记TYPE(1B)LENTH(1B)VALUE(nB)TLV格式格式24IPv4协议提供的功能提供TOS分段分段提供分组的生存时间分段寻址提供头标校验提供选项257.4.2 IPv6协议n扩展地址空间,128位地址长度n简化了头标n修订了参数n增加了流标记域n改善了选项功能n提供地址的自动配置(即插即用plug & play)26IP - Version NumbernIP v 1-3 defined and replacednIP v4 - current versionnIP v5 - streams protocolnIP v6 - replacement for I
17、P v4nDuring development it was called IPng nNext GenerationnIPv8、IPv9、IPv1627IPv6头标格式28头标比较nV6: 6 fields + 2 addrnV4: 10 fields + 2 addr + optionsnDeleted: nHeader length ntype of servicenidentification, flags, fragment offsetnHeader ChecksumnAdded:nTraffic classnFlow labelnRenamed:nlength - Payload
18、 lengthnProtocol - Next headerntime to live - Hop LimitnRedefined: Option mechanismTraffic class29头标参数说明nVersion 4 bit IP version (6)nTraffic Class 8 bit priority valuenFlow Label 20 bitnPayload Length 16 bit length of packetnIncludes all extension headers plus user datanAllows for 216 1 (65,535) by
19、tesnOptional Extension Headers allow for larger packet sizesnNext Header 8 bit identifier of next headernHop Limit 8 bit value denoting number of hops left before packet is droppednSource Address 128 bit address of sending hostnTarget Address 128 bit address of target host“流是指从某个源点向(单目或组播的)信宿发送的分组群中
20、,源点要求中间路由器作特殊处理的那些分组”。换句话说,流是指源点、信宿和流标记三者分别相同的分组的集合。 30IPv6地址n128位地址可产生2128个地址。n理论上说,地球上每平方米有665,570,793,348,866,943,898,599个IPv6地址.n实际分析表明,地球上每平方米可用的IPv6地址数为1564 - 3,911,873,538,269,506,102n表示方法采用十六进制冒号分割法n如1025:1ab6:0:0:0:87:a76f:1234n以上地址还可表示为1025:1ab6:87:a76f:1234n混合表示:FFFF:129.144.52.38n地址前缀表示:
21、IPv6地址/前缀长度31IPv6地址的分类可聚类全局单播地址TLA(Top-Level Aggregation ):顶级聚类;NLA(Next-Level Aggregation ):次级聚类 SLA(Site-Level Aggregation):网点级聚类;Interface ID:接口标识符 32局域使用的IPv6地址n链路局域地址(Link-Local Address)10比特54比特64比特1111 1110100Interface IDn网点局域地址(Site-Local Address)10比特38比特16比特64比特1111 1110 110子网IDInterface ID3
22、3其它IPv6地址n未指明地址(unspecified address): 0:0:0:0:0:0:0:0或表示为:,只能作为尚未获得正式地址的主机的源地址使用 ,不能将该地址用作信宿地址 。n环回地址( loopback address): 0:0:0:0:0:0:0:1n组播地址n标志:000T,T=0,表示永久性组地址;n任播地址(anycast address):从单播地址空间中分配n子网路由器的任播地址844112比特1111 1111标志区域Group IDn 比特128-n 比特子网前缀0000000000000000000034内嵌内嵌IPv4地址的地址的IPv6地址地址 n兼
23、容兼容IPv4的的IPv6地址地址 n将二个冒号和IPv4的点分十进制记法结合,将地址表示成:1.2.3.4的形式。 n映射映射IPv4的的IPv6地址地址 n将80比特的0和紧接其后的16比特的1组成前缀置于IPv4地址之前就够成了映射IPv4的IPv6地址。例如记作:FFFF:4.3.2.1。35IPv6 extension headersn中继点选项(Hop-by-hop options)n寻路头标(Routing)n报片头标(Fragment)n信宿选项(Destination options)n认证头标(Authentication)n安全净荷加密头标(Encryption Secu
24、rity Payload)36下一头标值含义0中继点选项头标4IP6TCP17UDP43寻路头标44报片头标45IDRP46RSVP50封装化安全净荷51认证头标58ICMP59无下一个头标60信宿选项头标37Extension Header OrdernIPv6 HeadernHop by Hop Options HeadernDestination Options Header 1nRouting HeadernFragmentation HeadernAuthentication HeadernEncryption HeadernDestination Options Header 23
25、87.5 ICMP协议 (Internet Control Message Protocol) IP在网络层提供尽力服务(best effort service),当分组由于各种原因无法投递而遭丢弃时,就用互连网控制报文协议(ICMP)发送差错报告,尽管ICMP也是网络层协议,但它也需要经过IP协议封装。同样ICMP也不能保证可靠传输。ICMP协议定义在RFC 792 和 RFC 950。39ICMP的主要功能nICMP定义了两类报文:差错报文和信息报文n差错报文n源抑制(Source quench):抑制发送过多分组的主机。 n超时(Time exceeded) :分组的TTL为0。n信宿不
26、可达(Destination unreachable) :报告子网、主机不能定位的信宿。n重定向(Redirect):路由重定向 n参数问题(Parameter problem):分组头参数出错。n信息报文n回音请求/响应(Echo request/reply) n地址掩码请求/响应(Address mask request/reply) n路由器发现(Router discovery)40ICMP Message Types41ICMP的直接应用-Ping & Traceroute ProgramnPing Progarmn功能:测试主机的可到达性。nPing程序采用ICMP的回音请求/响应
27、(Echo request/reply)报文,通过向信宿发送回音请求,返回响应报文,来测试目的主机的可达性。n Traceroute n通过发送递增的TTL值的回音报文,测试目的主机沿途经过的路由器地址。42nC:WINDOWSDesktopping 202.38.75.33nPinging 202.38.75.33 with 32 bytes of data:nReply from 202.38.75.33: bytes=32 time10ms TTL=254nReply from 202.38.75.33: bytes=32 time10ms TTL=254nReply from 202.
28、38.75.33: bytes=32 time10ms TTL=254nReply from 202.38.75.33: bytes=32 time10ms TTL=254nPing statistics for 202.38.75.33:n Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),nApproximate round trip times in milli-seconds:n Minimum = 0ms, Maximum = 0ms, Average = 0ms437.6 IP寻址nIPv4的地址问题n32位的IPv4地址总共有
29、232 (4,294,967,296) IP地址,但根据地址的分类方式,实际可用的地址要少得多。n地址分配得不合理。n解决方法n采用CIDR(Classless Inter domain Routing,无类别域间寻路)n采用NAT(Network Address Translation)技术n采用IPv6447.6.1 CIDRnCIDR 是 1993年9月发布在RFC 1517, 1518, 1519, 1520n采用变长的网络前缀( network prefix )的概念取消了地址分类中网络号固定长度做法。n采用子网掩码(subnet mask)与IP地址相与来获取IP地址中的网络号与主
30、机号45子网掩码n32bits的位模式,表示方法与IP地址类似。n位模式中的1对应于IP地址的网络号,0对应于主机号。例:11111111 11111111 11111111 00000000 255.255.255.0 11111111 11111111 11111111 11000000 255.255.255.192某主机的IP地址为140.128.34.79,如果其子网掩码为255.255.255.0,则其网络号为140.128.34.0,主机号为79;如果子网掩码为255.255.255.192,则其网络号为140.128.34.64,主机号为15另外也可以采用地址/掩码长度表示,例
31、如:132.46.56.0/2246nSubnet mask Dotted not. Max sub. Max hosts (/subnet)n11111111.11111111.11000000.00000000 255.255.192.0 2 16382 n11111111.11111111.11100000.00000000 255.255.224.0 6 8190n11111111.11111111.11110000.00000000 255.255.240.0 14 4094n11111111.11111111.11111000.00000000 255.255.248.0 30 2
32、046n11111111.11111111.11111100.00000000 255.255.252.0 62 1022n11111111.11111111.11111110.00000000 255.255.254.0 126 510n11111111.11111111.11111111.00000000 255.255.255.0 254 254n11111111.11111111.11111111.10000000 255.255.255.128 510 126n11111111.11111111.11111111.11000000 255.255.255.192 1022 62n11
33、111111.11111111.11111111.11100000 255.255.255.224 2046 30n11111111.11111111.11111111.11110000 255.255.255.240 4094 14n11111111.11111111.11111111.11111000 255.255.255.248 8190 6n11111111.11111111.11111111.11111100 255.255.255.252 16382 2IP地址=网络地址+主机地址IP地址=网络地址+子网地址+主机地址47子网掩码:255.255.255.224 192.228.
34、17.32/27将一个C类网络划分成若干个子网子网掩码:255.255.255.224 192.228.17.64/27子网掩码:255.255.255.224 192.228.17.96/27487.6.2 NATn在RFC1597中定义了内部网地址(或称专网,Private Internet,Intranet)n有部分地址被IANA组织定义用作内部网地址: 10.0.0.0 - 10.255.255.255 A single Class A network 172.16 .0.0- 172.31 .255.255 16 contiguous Class B networks 192.168
35、.0.0 - 192.168.255 .255 256 contiguous Class C networks 49NAT技术nNAT技术可以在路由器、防火墙上实现内外地址的翻译工作n实现方式:n静态NAT(static NAT)n动态NAT(Dynamic NAT)n过载(Overloading)50NAT技术举例静态方式下,内部地址与外部IP地址总是一一对应的。如: 192.168.32.10 总是翻译成 213.18.123.110.在动态方式下,有一组全局IP地址与内部IP地址对应。例如: 192.168.32.10 总是翻译成213.18.123.100 to 213.18.123.
36、150. 范围内第一个可用的IP地址过载(Overloading)也是一种动态方式,用一个全局IP地址加上端口号实现与内部IP地址的翻译。51Internet10.0.0.110.0.0.410.0.0.310.0.0.2Web serverabcNAT204.1.1.10Connection request to port 80 from c to source 10.0.0.4, port 1025.10.0.0.4, port 1025mapped to204.1.1.10, port 2000Connection request from c forwarded to source 2
37、04.1.1.10, port 2000.Request received and accepted. Outgoing Web Client Through NAT Inside IPInside PortOut IPOut Port10.0.0.31034204.1.1.10200510.0.0.41025204.1.1.10200052Internet10.0.0.110.0.0.410.0.0.310.0.0.2Web serverabcNATResponse sent to 204.1.1.10, port 2000.Outgoing Web Client Through NAT I
38、nside IPInside PortOut IPOut Port10.0.0.31034204.1.1.10200510.0.0.41025204.1.1.102000Translate 204.1.1.10, port 2000 to 10.0.0.4 port 1025537.6.3 路由表(route table)n路由器根据分组的目的IP地址查找路由表,找出分组的下一个中继点。n每一个路由器都有一个路由表。n路由表至少包含两个条目n目的网络/主机地址n下一跳(Next Hop)地址n路由表可由管理员手工配置(静态路由表),也可通过路由协议和路由算法动态建立和维护(动态路由表)。n路由
39、表的表项有显式路由和默认路由两种,默认路由可以缩小路由表的表项。54Route Table ExampleE0: 10.1.5.1NETWORKNEXT HOP10.1.1.0directly connected10.1.2.0directly connected10.1.3.010.1.2.210.1.4.010.1.2.210.1.5.010.1.2.210.1.6.010.1.2.210.1.7.010.1.2.2NETWORKNEXT HOP10.1.2.0directly connected10.1.3.0directly connected10.1.4.0directly conn
40、ected10.1.5.010.1.4.210.1.6.010.1.4.210.1.7.010.1.4.2NETWORKNEXT HOP10.1.1.010.1.4.110.1.2.010.1.4.110.1.3.010.1.4.110.1.4.0directly connected10.1.5.0directly connected10.1.6.0directly connected10.1.7.010.1.6.2NETWORKNEXT HOP10.1.1.010.1.6.110.1.2.010.1.6.110.1.3.010.1.6.110.1.4.010.1.6.110.1.5.010.
41、1.6.110.1.6.0directly connected10.1.7.0directly connectedS0: 10.1.2.1E0: 10.1.1.1S0: 10.1.2.2S1: 10.1.4.1E0: 10.1.3.1S0: 10.1.4.2S1: 10.1.6.1S0: 10.1.6.2E0: 10.1.7.155Default RoutingE0: 10.1.5.1NETWORKNEXT HOP10.1.1.0directly connected10.1.2.0directly connectedDefault 10.1.2.2 NETWORKNEXT HOP10.1.2.
42、0directly connected10.1.3.0directly connected10.1.4.0directly connectedDefault 10.1.4.2 NETWORKNEXT HOP10.1.1.010.1.4.110.1.2.010.1.4.110.1.3.010.1.4.110.1.4.0directly connected10.1.5.0directly connected10.1.6.0directly connected10.1.7.010.1.6.2Default x.x.x.x NETWORKNEXT HOP10.1.6.0directly connect
43、ed10.1.7.0directly connected default10.1.6.1S0: 10.1.2.1E0: 10.1.1.1S0: 10.1.2.2S1: 10.1.4.1E0: 10.1.3.1S0: 10.1.4.2S1: 10.1.6.1S0: 10.1.6.2E0: 10.1.7.1Internet56Basic Routing Table CommandsnLinuxnroutenWindows NT/2000/XPnroute print57Static vs. Dynamic RoutingnStatic Routing route(s) configured man
44、ually, i.e. entered into and removed from, the routing table by a human being or a scriptnDynamic Routing route(s) entered into and removed from the routing table automatically through the activity of a distributed application known as a Routing Protocol e.g. RIP, IGRP, OSPF, BGPnDo we need static r
45、outing? When is static routing better than dynamic routing?nWhich dynamic Routing Protocol should we run?587.6.4 IP寻址的体系结构n核心结构n对等主干结构n自治系统(Autonomous System)n内部管理由独立管理机构完成的一组网关和网络,整个网络由一个(或几个)核心网关与Internet相连。n交换路由信息的两个网关如果属于不同的自治系统,则称这两个网关是外部相邻,如果同属于一个自治系统,就称为内部相邻。n外部网关协议EGP(Exterior Gateway Protoc
46、ol)用于外部相邻的网关之间交换路由信息。如BGPn内部网关协议IGP(Interior Gateway Protocol)用于内部相邻的网关之间交换路由信息。如RIP、OSPF597.7Internet 路由协议nBased on extent of routing information flownInterior Gateway Protocols (IGP,内部网关协议)nExterior Gateway Protocols (EGP,外部网关协议)nBased on type of information used for determining routing tablenDist
47、ance Vector Routing Protocols(距离矢量路由协议)nLink State Routing Protocols(链路状态路由协议) 7.7.1路由协议的分类60IGP vs. EGPInterior Router Protocols or Interior Gateway Protocols are used to distribute the routing information between routers within the same Autonomous SystemAS1AS2AS3EGPEGPEGPIGPIGPIGPIGPIGPIGPIGP61Dis
48、tance Vector Routing ProtocolsnRIP for IPnXNS(Xerox network system) RIPnNovell IPX RIPnIGRP (Cisco Proprietary)nDEC DNA Phase IVnAppleTalk Routing Table Maintenance Protocol (RTMP)62Link State Routing ProtocolsnInternets OSPFnNovells NLSPnISOs IS-ISnATMs PNNI637.7.2 RIP协议 ( RFC 1058 )Routing Informa
49、tion ProtocolnEnables Routers to exchange Routing InformationnDistance Vector Routing ProtocolnSends update every 30 secsnUse Hop Count as Metric.nMaximum hop-count is 15 16 is unreachable in RIPnFollows Split Horizon RulesnUses UDP (Port 520) both for sending and receiving647.7.3 OSPF协议( RFC2328 )n
50、OSPF = Open Shortest Path FirstnSPF = Dijkstras Algorithm to generate routing informationnDeveloped by IETF as a link state interior router protocolnUses IP (Protocol ID=89)nSends updates only when change occursn(unlike RIPs every 30 secs)nSends hellos & updates to multicast addressesn224.0.0.5 & 22
51、4.0.0.6(all ospf routers of LAN)65Five types of OSPF routing protocol packetsnHellonDatabase DescriptionnLink State RequestnLink State UpdatenLink State Acknowledgment667.7.4 BGP( Border gateway Protocol )边界网关协议Autonomous System 65000Autonomous System 65500IGPs: RIP, IGRP, OSPF, EIGRPEGPs: BGP67BGP
52、CharacteristicsnBGP is a distance vector protocol with enhancements:nReliable updatesBGP runs on top of TCP (port 179)nIncremental, triggered updates onlynPeriodic keepalives to verify TCP connectivitynRich metrics (called path vectors or attributes)nDesigned to scale to huge internetworks (for exam
53、ple, the Internet)687.7.5 IS-IS Routing ProtocolnIS-IS is the Intermediate System to Intermediate System intra-domain routing protocol defined in 1992 in the ISO/IEC recommendation 1058969nTwo type of systemsnEnd System (ES)nHosts or WorkstationsnIntermediate System (IS)nRoutersnES-ISnDiscovery prot
54、ocol nDefine how ESs and ISs learn about each othernIS Hello messages (ISHs) and ES Hello Messages( ESHs )nIS-ISnLink-State Hierarchical Routing ProtocolnFlood link-state information between intermediate systems (routes)nBuild a complete picture of network topology70Routing vs. SwitchingnHow does ro
55、uting differ from switching?nSwitch works on MAC addressnMAC address is not a true address so you cannot truly route based on MAC addressesnSwitch is simple hardware implementation possible switches are fast and economicalnAll ports on a switch must be of the same MAC typenWhich is better?nWhy have
56、both?nThe golden rule of network design:“Switch where you can, route where you must”讨论717.8 组播(Multicast)n单播(unicast):1对1n组播(multicast) :1对多,多对多n也称多播,可用于会议电视,分布式计算,视频转播,网络游戏,讨论组nIP采用D类地址作为组播地址,每个D类地址代表一组主机,共有28位可用来标识小组。因此可同时支持多达25亿个小组。nInternet支持两类组地址:永久组地址和临时组地址n224.0.0.1LAN上所有系统 ,224.0.0.2LAN上所有路由
57、器 n224.0.0.5LAN上所有OSPF路由器n广播(broadcast):1对多n任播(anycast):1对多个中的一个72 Unicast128.146.222.0/24128.146.226.0/24128.146.116.0/24Receivers128.146.199.0/24ReceiverReceiverSender73 Multicast128.146.222.0/24128.146.226.0/24128.146.116.0/24Receivers128.146.199.0/24ReceiverReceiverSender74 组播相关协议组播路由协议,如组播路由协议,
58、如DVMRP,PIM功能:生成组播路由表功能:生成组播路由表组播管理协议,组播管理协议,IGMP功能:组成员的加入和退出功能:组成员的加入和退出Router to RouterHost to Router75 IGMP( Internet Group Management Protocol )Host informs router with IGMP report224.2.127.254Designated router queries LAN for group membership224.0.0.176 IGMPnInternet Group Management Protocol (I
59、GMP)nhost: sends IGMP report when application joins multicast groupnrouter: sends IGMP query at regular intervals. host belonging to a multicast group must reply to querynIGMP V2 allows hosts to leave group without having to wait for router to time out - reduces leave latencynIGMP V3 host can be mor
60、e specific about source (breaks MAC address filtering)nHost and Router election protocol machinery77Multicast Routing ProtocolnSource based tree multicast protocols, in which multicast tree is rooted at senders and covers all the group membersnDVMRP (Distance Vector Multicast Routing Protocol)nMOSPF
61、 (Multicast Extension to OSPF)nShared tree based protocols, the protocols in this category use a shared tree for each groupnCBT (Core Based Trees)nProtocols with mixed approachesnPIM (Protocol Independent Multicast)nPIM-DM (Dense Mode), PIM-SM (Sparse Mode)78组播通信模式n根结构(rooted)n非根结构(non-rooted)79 Eth
62、ernet switchesSourceReceiverAll interfaces are forwarding, even those without a receiver普通交换机普通交换机当分组的目的IP地址为组播地址时,它所对应的目的MAC地址是什么呢?是不是采用ARP协议呢?解决方案:采用地址映射,即将IP组播地址的低23位映射到MAC地址的低23位,前面加上01005E。01 00 5E 0+IP组播地址低23位10000000问题:IP组播地址是28位,这样的映射会造成多对一。80 Ethernet switchesSourceReceiverMulticast stream
63、is only forwarded to interface with receiver for groupMulticast aware switchIGMP Snooping81小结n熟练掌握Internet的网络层IP及其相关协议,掌握IP寻址、组播等机制。n习题:34,39,40,41,43n补充习题:n1.IP分组头标中的TTL域有何作用?n2.ICMP协议的主要功能是什么?n3.某实验室有若干台PC(假设20台左右),一台24口的二层交换机和一个全局IP地址(如202.38.75.11),要组一个内部局域网。假设你是该实验室的网络管理员,请你画出网络的拓扑结构,内部IP地址的分配,网关的基本功能。82