计算机网络Computer Network重点知识复习

The main idea of protocolCSMA/CD of the Ethernet.

Stations sense the medium when they have aframe to send and send the frame as soon as the medium becomes idle.

They monitor the channel for collisions asthey send. If there is a collision, they abort the transmission with a shortjam signal and retransmit after a random interval.

The random interval is determined by theBinary Exponential Backoff algorithm.

The early backoff mechanismin CSMA/CA.

CSMA/CA uses channel sensing beforesending. However, a station that has a frame to send starts with a random earlybackoff (except in the case that it has not used the channel recently and thechannel is idle) even though the channel is idle. Specifically, the number ofslots to backoff is chosen randomly. The station waits until the channel isidle, by sensing that there is no signal for a short period of time (called theDIFS), and counts down idle slots, pausing when frames are sent. It sends itsframe when the counter reaches 0.

Techniques used in TCP congestion control: Slow Start,Additive Increase, Multiplicative Decrease, Fast Retransmission

Slowstart: When a connectionis established, the sender initializes the congestion window to 1 segment. Thesender then sends the initial window. When an ACK for a segment is receivedbefore the retransmission timer goes off, the sender adds one segment to thecongestion window. Thus, the congestion window is doubling every roundtrip time

AdditiveIncrease: To keep slowstart under control, the sender keeps a threshold for the connection called theslow start threshold. Initially this value is set arbitrarily high, to the sizeof the flow control window. In slow start, whenever the slow start threshold iscrossed (during this period of time, no timeout occurs), TCP switches from slowstart to additive increase. In this mode, the congestion window is increased byone segment every round-trip time.

MultiplicativeDecrease: Whenever apacket loss (a signal for congestion) is detected, the slow start threshold isset to be half of the current congestion window (Multiplicative Decrease), andthe congestion window is then reset to its small initial value and slow startresumes.

Fastretransmission: TCPassumes that 3 duplicate acknowledgements imply that a packet has been lost.The identity of the lost packet can be inferred from the acknowledgement numberas well. It is the very next packet in sequence. This packet can then beretransmitted right away, before the retransmission timeout fires.

The typical steps that thebrowser carries out when a user clicks on a hyperlink.

1) Thebrowser determines the URL (by seeing what was selected).

2) Thebrowser asks DNS for the IP address of the server.

3) DNSreplies.

4) Thebrowser makes a TCP connection to the server on port 80, the well-known portfor the HTTP protocol.

5) Itsends over an HTTP request asking for the page.

6) Theserver sends the page as an HTTP response.

7) Ifthe page includes URLs that are needed for display, the browser fetches theother URLs using the same process.

8) Thebrowser displays the page.

9) TheTCP connections are released if there are no other requests to the same serversfor a short period.

Calculating the minimum framesize for a CSMA/CD Network.

Consider building a CSMA/CD network runningat 10 Mbps over a 2km cable with no repeaters. The signal speed in the cable is200000 km/sec. What’s the minimum frame size?

L=2τC = 2*2*103200000*103

*10*106 = 200 bits = 25 bytes

The forwarding decision madeby a router for an incoming packet.

The routing table for a router is shown in thefollowing table. Each entry consists of three parts: the destination network,the subnet mask, and the next hop.

128.96.39.0

255.255.255.128

Interface 0

128.96.39.128

255.255.255.128

Interface 1

128.96.40.0

255.255.255.128

R2

192.4.153.0

255.255.255.192

R3

*(default)

R4

For eachdestination IP address, please decide the next hop. (6 marks).

1)128.96.40.12

128.96.40.12 AND 255.255.255.128 = 128.96.40.0, does not match the 1st entry;

128.96.40.12 AND 255.255.255.128 = 128.96.40.0, does not match the 2nd entry;

128.96.40.12 AND 255.255.255.128 = 128.96.40.0, match the 3rd entry.

The next hop isR2

2)128.96.40.151

128.96.40.151 AND 255.255.255.128 = 128.96.40.128, does not match the first 3entries;

128.96.40.151 AND 255.255.255.192 = 128.96.40.128, does not match the 4thentry;

So default routeis used, and the next hop is R4.

TCP congestion control.

Q: Suppose for a TCP connection, every TCPsegment has the size of 1 KB. Suppose a timeout occurs, and at that time, thesize of the congestion window is 16 KB. Suppose all the segments in thefollowing 5 RTTs (round-trip time) are successfully delivered. After the 5thRTT, what is the size of the current congestion window?

A: After the timeout, the new slow startthreshold is 8 KB, and the new congestion window is 1 KB. Then slow startresumes. For every RTT, the congestion control window doubles.

After 3 RTTs, the congestion window size is8 KB. TCP switches from slow start to additive increase. For every RTT, thecongestion control window increases by 1KB.

After the 5th RTT, the congestion windowsize is 10 KB.

Specific Subnetting schemes

Q: How many equal-sized subnets arepossible with a Class C prefix and a subnet mask of 255.255.255.252?

A: In a Class C prefix, the network IDconsists of 24 bits, and the host ID 8 bits. The subnet mask is 255.255.255.0,i.e., 11111111 11111111 11111111 00000000.

With a subnet mask of 255.255.255.248,i.e., 11111111 11111111 11111111 11111000, the subnet ID consists of 5 bits.

So, we can get 25=32 subnets.For each subnet, at most 23-2=6 hosts can be connected (all 0s and1s are not used).

Q: We divide a class C prefix into equal-sizedsubnets. What should be the subnet mask if 62 hosts are required for eachsubnet?

A: In a Class C prefix, the subnet mask is 255.255.255.0,i.e., 11111111 11111111 11111111 00000000.

Suppose the host ID consists of x bits after subnetting. We have 2x-2=62.So x=6.

The subnet mask is 11111111 1111111111111111 11000000, i.e., 255.255.255. 192.

Q: Calculate the number of usable IPaddress of hosts for the network 201.105.13.0/26

A: The network portion consists of 26 bits,so the host portion consists of 32-26=6 bits. At most, there are 26-2=62hosts for each subnet.

TCP flow control: dynamic sliding window, i.e., dynamic receivingwindows size

Q: Host1 and Host2 has established a TCP connection,and agreed on an MSS of 1000 bytes. Suppose the current size of the congestionwindow of host1 is 5000 bytes. Suppose Host1 has transmitted 2 maximumsegments, and received the ACK for the first one. In addition, Host2 declaredthat the size of the receiving window is 3000 bytes.

Now, how many bytes can Host1 transmit?

A: sending window = min{ receiving window,congestion window}

= min{3000 bytes, 5000 bytes }

=3000 bytes.

Host1 has transmitted 2000 bytes (2 maximumsegments), and received the ACK for the first one, but not the second one.

So the number of bytes that Host1 cantransmit is 3000-1000=2000 bytes.

Nyquist’s theorem

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值