Knowledge Points.docx

上传人:b****9 文档编号:23425534 上传时间:2023-05-17 格式:DOCX 页数:17 大小:202.66KB
下载 相关 举报
Knowledge Points.docx_第1页
第1页 / 共17页
Knowledge Points.docx_第2页
第2页 / 共17页
Knowledge Points.docx_第3页
第3页 / 共17页
Knowledge Points.docx_第4页
第4页 / 共17页
Knowledge Points.docx_第5页
第5页 / 共17页
点击查看更多>>
下载资源
资源描述

Knowledge Points.docx

《Knowledge Points.docx》由会员分享,可在线阅读,更多相关《Knowledge Points.docx(17页珍藏版)》请在冰豆网上搜索。

Knowledge Points.docx

KnowledgePoints

计算机网络谢希仁

网络编程

网络命令pingipconfigtracertnetstatarptelnetwiresharkbind(dig)nslookupcddir|more盘符名:

网络配置主机配置

通过考试

inflight在途中

binaryhexdecimal

00011

00102

00113

01004

01015

01106

01117

10008

10019

1010A

1011B

1100C

1101D

1110E

1111F

2^0=12^1=2....2^10=1024

192=2^7+2^6=(11000000)

chapter1TheInternetandIP

Networkarecomposedbynodesandlinks.

networknodesincludes:

1)endsystem,alsocalledhost,inlucdingPC,server,client,2)networkdevice,includingrouterandswitch.

Internetprotocolstackincludes

应用层applicationlayer:

HTTP,DNS及所基于的传输层协议

传输层transportlayer:

TCP,UDP

网络层networklayer:

IP协议(IP地址的格式及分类,最长匹配的转发规则),距离向量算法对应的RIP协议链路状态算法对应的OSPF协议ARP:

AddressResolutionProtocol,把IP地址转换为physicaladdress

链路层(节点到相邻节点的协议)linklayer:

Ethernet,WiFi(无线局域网),3G,4G(无线广域网协议)

PDU(protocoldataunit)ineachlayerarecalledmessage,segment,datagram,framerespectively.

littleendianbigendian

Internetchecksum计算

IPAddress:

networkaddress,标识某一个网络;hostaddress,标识某一台主机;broadcastaddress,广播地址,标识网络中的全部主机。

区别:

主机位全0就是网络地址,主机位全1是广播地址,否则是主机地址

子网划分的步骤:

以10.0.0.0/16为例,记住:

划分后子网掩码长度总是大于原来的长度。

根据主机位计算

1.把主机位转换为全二进制00000000.00000000

2.求log2(最大的部门电脑数),得到的结果就是子网划分后的主机位数log2(500)=9取上整

3.原主机位数-子网划分后的主机位数=增加的网络位数16-9=7

4.增加的网络位数从0开始递增得到每一个部门的网络地址0000000—〉0000001—〉0000010—〉0000100

5.将新的网络地址和新的全零的主机地址合在一起每8个作为一组转换为十进制数00000000.00000000à0.0

00000010.00000000->2.0

00000100.00000000->4.0

6.将原网络地址对应的十进制数和新的网络地址对应的十进制数合在一起就是最终的子网地址,子网掩码中1的个数为原网络地址个数加上增加的网络位个数10.0.0.0/23

10.0.2.0/23

10.0.4.0/23

以192.168.1.32/28为例32—00100000

根据主机位计算

1.把主机位转换为全二进制0000

2.求log2(最大的部门电脑数),得到的结果就是子网划分后的主机位数log2

(2)=1取上整

3.原主机位数-子网划分后的主机位数=增加的网络位数4-1=3

4.增加的网络位数从0开始递增得到每一个部门的网络地址000—〉001—〉010—〉011

5.将新的网络地址和新的全零的主机地址合在一起,每8个作为一组转换为十进制数,如果不是8的倍数则从原网络地址中的后面借若干位组成8个。

00100000à32

00100010->34

00100100->36

6.将原网络地址对应的十进制数和新的网络地址对应的十进制数合在一起就是最终的子网地址,子网掩码位数为原网络地址位数加上增加的网络位数192.168.1.32/31

192.168.1.34/31

192.168.1.36/31

根据网络位计算:

1.把主机位转换为全二进制00000000.00000000

2.求log2(部门数),得到的结果就是子网划分后的增加的网络位数log2(3)=2取上整

3.原主机位数-增加的网络位数=子网划分后的主机位数16-2=14

4.增加的网络位数从0开始递增得到每一个部门的网络地址0000000—〉0000001—〉0000010—〉0000100

5.将新的网络地址和新的全零的主机地址合在一起每8个作为一组转换为十进制数00000000.00000000à0.0

00000010.00000000->2.0

00000100.00000000->4.0

6.将原网络地址对应的十进制数和新的网络地址对应的十进制数合在一起就是最终的子网地址,子网掩码位数为原网络地址位数加上增加的网络位数10.0.0.0/23

10.0.2.0/23

10.0.4.0/23

根据网络位长度可变方式计算:

1.把主机位转换为全二进制00000000.00000000

2.O号子网就是子网地址为0,1号子网就是10,2号子网就是110,3号子网就是1110

3.将新的网络地址和剩余的全零的主机地址合在一起每8个作为一组转换为十进制数00000000.00000000à0.0/17

10000000.00000000->128.0/18

11000000.00000000->192.0/19

4.将原网络地址对应的十进制数和新的网络地址对应的十进制数合在一起就是最终的子网地址,子网掩码位数为原网络地址位数加上增加的网络位数10.0.0.0/17

10.0.128.0/18

10.0.192.0/19

ThreeErrorDetectionSchemes

Checksumaddsupvaluesinpacket,one’scomplementsum(IP,TCP),

Cyclicredundancycodecomputesremainderofapolynomial(Ethernet),

Messageauthenticationcode:

cryptographictransformationofdata(TLS)

stopandwait-----SWS=1

slidingwindow|---SWS=NRWS=1GO-BACK-N

|----------RWS=Nselective-retransmission

判断两个ip地址是否在同一个子网内,根据子网掩码二进制前面1的个数所指出的前面若干位是否相同,相同就是在同一个子网,否则不是。

forwardingtable=routingtable

--------

dest|link(nexthop,下一跳)

Encapsulation封装,数据加上头部

ipaddress分为主机地址和子网地址、广播地址,主机位全零就是子网地址,主机位全1就是广播地址,有1也有1就是主机地址,判断主机位就是根据子网掩码.

CIDR:

ClasslessInterDomainRouting

53=32+16+4+1=0000000000110101=0x0035(bigendian)

1-9C题目

01000000.00000000

01000000.00000000/20

01010000.00000000/20

01100000.00000000/20

01110000.00000000/20

-Chapter2--Transport----------------------------------------------------------

Internetprovidesconnection-orientedreliable(TCP)andconnectionlessunreliableservices(UDP)toitsapplications.

TCPheaderincludesoptionthatarevariablelength,sothereisaoffsetfieldtoindicateswhereinthepacketthedatastarts

chapter2Problem25

区别TCP连接的四个元素:

<源地址sourceaddress源端口sourceport目的地址destinationaddress目的端口destinationport>=tuple元组

UDPsocketisidentifiedbythetwo-tupledestinationIPaddress,destinationportnumber

TCP建立连接和拆除连接过程中所涉及的状态

滑动窗口:

发送方可以发送的未经确认的分组数量,发送方需要缓存这些未经确认的分组,所有分组都需要有编号

Reliabledatatransferprotocol(TCP)作用:

就是在不可靠的网络层IP协议基础上提供可靠的数据传输

拥塞控制和流量控制的作用与区别

TCP流量控制中发送方和接收方各保持的恒等式:

Receiver:

Sender:

AsendertransmitsaTCPpacketwith1500bytesofdata,inwhichthesequencenumberis2700.TheothersidereceivesthepacketandpiggybacksanACKinadatapacketwithsequencenumber3700.Assumenootherdatapacketshavebeensent.ACKnumberinthepacketis4200

piggybacks捎带,发送数据时顺便确认已经收到的数据

topology拓扑,布局,连接形式,连接结构

1Mbps卫星高度3*10^4kmframesize=1KB3*10^8m/s计算所需要的序列号个数

1)RWS=1

2)RWS=SWS

Solution:

delay=distance/speed=3*10^7/3*10^8=0.1sRTT=0.2s

时延带宽积Bandwidth*rtt=10^6/(8*10^3)*0.2=125*0.2=25frames/secondSWS=25

1)RWS=1RWS+SWS=1+25=265bitssequence

2)RWS=SWS25*2=506bitssequence

chapter5Problem10

1GbpsRTT(roundtriptime)=140msmaximumsegmentlifetime=60s

computeAdvertisedWindowSequenceNum

Solution:

RTT*bandwidth时延带宽积=140ms*1Gbps=1.4*10^(-1)*10^9=1.4*10^8bits=1.4*10^8/8=1.75*10^7bytes=17.5MB

|-log2(1.75*10^7)-|=25bitsfortheAdvertisedWindow

60*10^9bits=7.5*10^9bytes=7.5GB

|-log2(60*10^9)-|=33bitsfortheSequenceNumfield

33>25,so33bitsneededfortheSequenceNum.

Supplement:

ATCPmachineissendingfullwindowsof65,535bytesovera1-Gbps(bitpersecond)channelthat

hasa10-msecone-waydelay.Whatisthemaximumthroughput吞吐量achievable?

Whatis

thelineefficiency?

Solution:

A--------B

Onewindowcanbesentevery20msec.1s/20ms=50windows/secThisgives50windows/sec

50*65,535=5*6.5535*10^5=3.28*10^6bytes/secmaximumdatarateofabout3.3millionbytes/sec

Thelineefficiencyisthen

3.28*10^6*8/10^9=26.24*10^(-3)=2.6%

---------------------------------------------------------------------------------------------------------------

K=2^10isabout10^3

M=2^20isabout10^6

G=2^30isabout10^9

---------------

chapter3-PacketSwitching----------------------

Endtoenddelay(latency)ismadeupofthreemaincomponents:

Propagationdelayalongthelinks(fixed)

Packetization(Transmission)delaytoplacepacketsontolinks(fixed)

Queueingdelay

Afterpacketazation,

路由器的功能:

forwarding,routing

packetswitching分组交换

circuitswitching电路交换

next-hop下一跳

buffer缓冲区,缓存,缓存区

delay,latency时延

propagationdelay传播时延

packetizationdelay=transmissiondelay传输时延,组包时延

1000000=10^6=million=M

store-and-forward存储转发

queue队列

queueing=queuing排队

StatisticalMultiplexingGain统计复用增益

message报文,消息

cumulativenumber累积数量

deterministicqueue数据到达速率确定的队列

topology布局,拓扑

Derminism

Little'sResult李氏结论L=λ*dλ:

arrivalrateincusomerspersecondd:

averagetimeacustomerwaitsinthesystem(queue+service)L:

averagenumberofcustomersinthesystem(thenumberinthequeueandthenumberinservice)

M/M/1queue:

d=1/(mu-lamda)

-------------------------

Wewishtosendamessageofsize150,000bytesoverthenetwork.Therearefourhops,eachoflength20kmandrunningat100Mb/s.However,beforesendingwesplitthemessageinto1500bytepackets.theend-to-enddelayofthemessageis_______Usespeedoflightincopper=c=2*10^8m/s,androundyouranswertothenearestintegermillisecond.

chapter4CongestionControl

TheamountofunacknowledgeddataatasenderofTCPconnectionmustbelessthanmin{congestionwindow,receivingwindow}

传输层中的AIMD算法中拥塞窗口的变化:

网络拥塞控制中带宽分配的公平原则

TCPTahoe对AIMD算法的改进:

做stanford相应的题目

Supposethenetworksupportsasenderuptoawindowof20packetsafterwhichitdropspackets.Assumethestartingcongestionwindowis1packet,andthessthreshis16packets.HowdoesTCPTahoe’scongestionwindowevolveovertime

1,2,4,8,16,17,18,19,20,21,1,2,………

physicaladdress=ethernetaddress=linklayeraddress

TTL:

TimetoLive(生存时间)

TCPTahoeTimeouts

•risRTTestimate,initializetosomethingreasonable

•gistheEWMAgain(e.g.,0.25)

•mistheRTTmeasurementfrommostrecentlyackeddatapacket

•Errorintheestimatee=m-r

•r=r+g⋅e

•Measurevariancev=v+g(|e|-v)

•Timeout=r+βv(β=4)

•Exponentiallyincreasetimeoutincaseoftremendouscongestion

考试时技巧:

因为estimate的趋势是在稳定状态下接近于以往实际往返时间的加权平均值。

ATCPTahoesenderobtainsRTTsamplesthathavethefollowingdistribution:

30%ofthetime,theRTTis100ms

45%ofthetime,theRTTis150ms

20%ofthetime,theRTTis200ms

5%ofthetime,theRTTis500ms

AddressResolutionProtocol=ARP

hashtable哈希表

(packet)switch:

ethernetswitchandInternetrouter

load:

交换机的负载率

bucket桶

token令牌

egresslink出口链路

ingresslink入口链路

FIFO:

firstinfirstout

overhead开销payload负载

congestion拥塞

bandwidth=ratebit/sbyte/sKb/sMb/sKB/s8Mb/s=8000Kb/s=1000KB/s

bottleneck瓶颈

K,M在表示数据量时为2^10和2^20,表示带宽时为10^3,10^6.

ssthresh阈值

MSS:

maxumsegmentsize最大报文段的字节数

chapter5Application-------------------HTTP-------------

HTTPFTP(FileTransferProtocol)SMTP(SimpleMailTransferProtocol,SMTPisusedtotransfermessagesfromonemailservertoanother

)DHCP(DynamicHostConfigurationProtocol)基于TCP

DNS基于UDP

HTTPrequestmethod:

GETandPOST

304NotModified

404NotFound

200OK.

DNS消息中的域名压缩:

www.stanford.edu,4www18stanford3edu

cs.stanford.edu2cs192offset(偏移)

不能压缩,如果要能压缩,两个域名的后缀(后面的某一部分)必须一样

DNS的响应消息中记录的消息类型CNAME(CanonicalName,正规域名)A(IPv4address)andNS(nameserver)MX(mailserver)

记录的格式:

name[TTL][class]typerdata(value)

charles**********

HTTP传输网页所花时间计算

HTTPHyperTextTransferProtocol

HTMLHyperTextMarkupLanguage

emule电骡p2p软件

WorldWideWeb,www万维网:

网页之间通过超链接构成的网络

Internet因特网:

计算机构成的网络

internet互联网

Wikipedia维基百科www.wikipedia.org

networkcore网络核心

networkedge网络边缘

HTTP包括request请求和response响应两种报

展开阅读全文
相关搜索

当前位置:首页 > 人文社科 > 哲学历史

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1