通信与网络安全基础议题1.OSI模型和TCP/IP协议簇2.通信和网络技术3.互联网技术与服务4.主要网络安全协议和机制一、OSI模型和TCP/IP协议簇OSI七层模型PhysicalNetworkTransportSessionPresentationApplicationDataLinkApplication(Upper)LayersDataFlowLayersOSI七层模型-物理层Layer1物理层•定义物理链路的电气、机械、通信规程、功能要求等;电压,数据速率,最大传输距离,物理连接器;线缆,物理介质;•将比特流转换成电压;物理层设备•Repeater,Hub,Multiplexers,NIC;物理层协议•100BaseT,OC-3,OC-12,DS1,DS3,E1,E3;PhysicalNetworkTransportSessionPresentationApplicationDataLinkOSI七层模型-数据链路层Layer2数据链路层•物理寻址,网络拓扑,线路规章等;•错误检测和通告(但不纠错);•将比特聚成帧进行传输;•流量控制(可选);数据链路层设备•网桥和交换机;数据链路层协议•PPP,HDLC,F.R,Ethernet,TokenRing,FDDI,ISDN,ARP,RARP,L2TP,PPTP.PhysicalNetworkTransportSessionPresentationApplicationDataLinkOSI七层模型-数据链路层两个子层•MAC(MediaAccessControl)物理地址;烧录到网卡ROM;48比特;唯一性;•LLC(LogicalLinkControl)为上层提供统一接口;使上层独立于下层物理介质;提供流控、排序等服务;PhysicalNetworkTransportSessionPresentationApplicationDataLinkOSI七层模型–网络层Layer3网络层•逻辑寻址;•路径选择;•网络问题管理(如拥塞);•MTU;网络层设备•路由器,三层交换机;网络层协议•IP,IPX,RIP,OSPF,EIGRP,IS-IS,ICMP;PhysicalNetworkTransportSessionPresentationApplicationDataLinkOSI七层模型–传输层Layer4传输层•端到端数据传输服务;•建立逻辑连接;传输层协议•TCP(TransmissionControlProtocol)状态协议;按序传输;纠错和重传机制;Socket;•UDP(UserDatagramProtocol)无状态协议;•SPXPhysicalNetworkTransportSessionPresentationApplicationDataLinkOSI七层模型–会话层Layer5会话层•不同应用的数据隔离;•会话建立,维持,终止;•同步服务;•名称标识和识别;•会话控制(单向或双向);会话层协议•NFS,SQL,RPC;•SSL/TLS,SSH;PhysicalNetworkTransportSessionPresentationApplicationDataLinkOSI七层模型–表示层Layer6表示层•数据格式表示;•协议转换;•字符转换;•数据加密/解密;•数据压缩等;表示层数据格式•ASCII,MPEG,TIFF,GIF,JPEG;PhysicalNetworkTransportSessionPresentationApplicationDataLinkOSI七层模型–应用层Layer7应用层•应用接口;•网络访问流处理;•流控;•错误恢复;应用层协议•FTP,Telnet,HTTP,SNMP,SMTP,DNS;PhysicalNetworkTransportSessionPresentationApplicationDataLink数据封装PhysicalNetworkTransportSessionPresentationApplicationDataLinkUpperLayerDataUpperLayerDataTCPHeaderDataIPHeaderDataLLCHeader0101110101001000010DataMACHeaderFCSFCSSegmentPacketBitsFramePDU数据解封装PhysicalNetworkTransportSessionPresentationApplicationDataLinkUpperLayerDataLLCHdr+IP+TCP+UpperLayerDataIP+TCP+UpperLayerDataTCP+UpperLayerDataUpperLayerData0101110101001000010OSI定义的安全服务认证;访问控制;数据机密性;数据完整性;抗抵赖;OSI定义的安全机制加密;数字签名;访问控制;数据完整性;认证;流量填充;路由控制;公证(notarization);TCP/IP协议簇模型PhysicalNetworkTransportSessionPresentationApplicationDataLinkNetworkAccessInternetHost-to-hostApplicationTCP/IP协议簇主要协议其它TokenRingFDDIEthernetICMPRARPARPIPUDPTCP其它SMTPTelnetFTPIP包头VersionIHLTypeofServiceTotalLengthIdentificationFlagsFragmentOffsetTimetoLiveProtocolHeaderChecksumSourceAddressDestinationAddressOptionsPaddingIP包头版本号Reserved15Unassigned10141347TCPandUDPoverBiggerAddresses(TUBA)91621PInternetProtocol(PIP)81475TP/IX71883InternetProtocolversion6(IPv6)6SimpleInternetProtocol(SIP)61190STDatagramMode5791InternetProtocolversion4(IPv4)4Unassigned13Reserved0RFC版本数值IP包头协议字段值OpenShortestPathFirst(OSPF)89CiscoInternetGatewayRoutingProtocol(IGRP)88NBMANextHopResolutionProtocol(NHRP)54GenericRoutingEncapsulation(GRE)47ResourceReservationProtocol(RSVP)46Inter-DomainRoutingProtocol(IDRP)45UserDatagramProtocol(UDP)17TransmissionControlProtocol(TCP)6IPinIP(encapsulation)4InternetGroupManagementProtocol(IGMP)2InternetControlMessageProtocol(ICMP)1协议协议字段值IP地址A类:1-126;B类:128-191;C类:192-223;D类:224-239;E类:240-254;RFC1918;TCP和UDP报头SourcePortNumberDestinationPortNumberUDPLengthUDPChecksumSourcePortNumberDestinationPortNumberSequenceNumberAcknowledgmentNumberHeaderLengthReservedURGACKPSHRTSSYNFINWindowSizeTCPChecksumUrgentPointerOptions(ifAny)UDP报头TCP报头二、通信和网络技术局域网(LAN)特点•高数据传输率;•短距离;•低误码率;线缆•光纤(FiberOptic)•非屏蔽双绞线(UnshieldedTwistedPair,UTP);•屏蔽双绞线(ShieldedTwistedPair,STP);•同轴电缆(CoaxialCable);介质:以太网、令牌环、FDDI;拓扑:总线,星形,环形,网状;同轴电缆(CoaxialCable)构成•Copperconductor;•Shieldinglayer;•Groundingwire;•Outerjacket;类型•50ohm-以太网;•75ohm-视频;规范•10Base2(thinnet)10Mbs;Baseband;185meters;•10Base5(thicknet)500meters;双绞线(TwistedPair)构成•多对铜线;•Outerjacket;类型•UTP(UnshieldedTwistedPair);•STP(ShieldedTwistedPair);主要的UTP类型需要高速传输的网络部署;1000MbpsCat7需要高速传输的网络部署;155MbpsCat6100BaseTX,FDDI100MbpsCat516MbpsTokenRing16MbpsCat410BaseT,TokenRing10Mbps(以太网)和4Mbps(令牌环)Cat3IBM3270,AS/4004MbpsCat2模拟话音,不适合数据传输低于1MhzCat1主要用途传输速率UTP类型光纤(FiberOptics)构成•Core;•Cladding;•Buffercoating;•Outerjacket;类型•单模(9micron);•多模(62.5micron);光源•激光(Laser);•发光二极管(LED);以太网—IEEE802.3广播介质(“一人说,众人听”)载波监听多路访问/冲突检测•CSMA/CD(CarrierSenseMultipleAccesswithCollisionDetect)冲突域封装•EthernetIEEE802.3Ethernet,FastEthernetandGigabitEthernet主要的以太网类型PhysicalDataLink(MAClayer)10BaseT802.310Base510Base2802.3Specificationsfor10MBEthernet802.3uSpecificationsfor100MB(Fast)Ethernet10BaseFDIXStandard802.3abSpecificationsforGigabitEthernet主要以太网类型比较10BaseTDuplexmedia-interfaceconnector(MIC)ST令牌环—IEEE802.5广播介质令牌•Onepersontalksatatime自愈和管理•Activemonitor•Upstream/downstreamnotification•BeaconingTokenRing,FastTokenRingFDDI—ANSIX3T9.5广播介质令牌•“Onepersontalksatatime”自愈和管理•DualRing•SMTFDDI物理拓扑总线(Bus);•Ethernet;星形(Star);•Ethernet(逻辑上是总线);•TokenRing(逻辑上是环形);环形(Ring);•FDDI;网状(Mesh);•Internet;广域网连接特征-Multi-Mode-Coaxial-SingleMode-TwistedPairFiberCopper介质(Media)Transportn