Midterm of 232 计算机网络复习

I. EXPONENTIAL AND POISSON (EXPONENTIALPOISSON IN FILES) PDF in resources:

 • Exponential distribution (inter arrival, service) + Poisson process

exponential distribution:
A continuous random variable X is said to have an Exponential(λ) distribution if it has probability density function:

Poisson process:

        For a continuous-time stochastic process {X(t) : t ≥ 0}, an increment is the difference in the process at two times, say s and t. For s < t, the increment from time s to time t is the difference X(t) − X(s). A process is said to have stationary increments if the distribution of the increment X(t) − X(s) depends on s and t only through the difference t − s, for all s < t. So the distribution of X(t1) − X(s1) is the same as the distribution of X(t2) − X(s2) if t1 − s1 = t2 − s2.

        A process is said to have independent increments if any two increments involving disjoint intervals are independent. That is, if s1 < t1 < s2 < t2, then the two increments X(t1) − X(s1) and X(t2) − X(s2) are independen

   

• Properties: memoryless, minimum interarrival time of multiple exponential processes (distribution, average, probability of arrival from process i), Definition of Poisson process, superposition of Poisson processes, thinned Poisson processes.


definition of Poisson Process:

definition1:

definition2:

definition3:


superposition of Poisson processes:

        Suppose that {N1(t) : t ≥ 0} and {N2(t) : t ≥ 0} are two independent Poisson processes with rates λ1 and λ2, respectively. The sum of N1(t) and N2(t), {N(t) = N1(t) + N2(t) : t ≥ 0}, is called the superposition of the two processes N1(t) and N2(t).


thinned Poisson processes:

        Let {N(t) : t ≥ 0} be a Poisson process with rate λ. Suppose we mark each event with probability p, independently from event to event, and let {N1(t) : t ≥ 0} be the process which counts the marked events. We can use Definition 2 of a Poisson process to show that the thinned process N1(t) is a Poisson process with rate λp.


II. ARCHITECTURE Tanenbaum (material1.pdf in files):

• 2.6.1: Telephone network topology

• 2.6.2: LATA, LEC, IXC, POP, definitions and description

-LATA: Local Access and Transport Access. Very roughly, a LATA is about as big as the area covered by one area code

-LEC: local exchange carrier. Within each LATA, there was one LEC (Local Exchange Carrier) with a monopoly on traditional telephone service within its area.

-IXC: Inter exchange carrier. The new feature was that all inter-LATA traffic was handled by a different kind of company, an IXC (IntereXchange Carrier)

-POP: Point of presence. Any IXC that wishes to handle calls originating in a LATA can build a switching office called a POP (Point of Presence) there

-Tandem office:intra-LATA toll offices

• 2.6.4: trunks, multiplexing, hierarchy of multiplexing, TDM, FDM. No details on digitalization and modulation (Only comments in slides), No SONET/SDH, No wavelength multiplexing

-trunks:

        1.carrry more than 1 call simultaneously(thousands,millions)

        2.carries digital information(regeneration,recovery),not anaglog(sensitive to noise).


-multiplexing:

        TDM:statistical,function of traffic rate of other nodes,congestion,etc.

        FDM:

-Digital vs Analog:

        1.Long Distance,analog sensitive to noise.

        2.Analog senstive to noise.

        3.Digital:regenetation,recovery

• 2.6.5: circuit switching

Kurose:

• 1.3.2: circuit switching, multiplexing in circuit switching

circuit switching:

        refers to creating an electrical circuit for the duration of each telephone call. Resource reserved for the entire call.Delay to set up a path.

        eg. telephone call. 1 application,constant generation rate,long unicast sessions,sparse calls.


multiplexing in circuit switching:

        A circuit in a link is implemented with either frequency-division multiplexing (FDM) or time-division multiplexing (TDM).With FDM, the frequency spectrum of a link is divided up among the connections established across the link.For a TDM link, time is divided into frames of fixed duration, and each frame is divided into a fixed number of time slots. When the network establishes a connection across a link, the network dedicates one time slot in every frame to this connectionwith one time slot available for use (in every frame) to transmit the connection’s data.

• 1.2.1: access networks

• 1.3.1: Packet switching

packet switching:

        idea:decompose message into packets. Transmit the packets one by one.

        packet switches/routers replace telephone routers. Instead of seeting up "circuits" for each call,route packets one by one. Packet are buffered,first in first out.

        efficient for bursty traffic..

• 1.3.2: Packet switching vs circuit switching

-circuit:

        1.synchronous

        2.connection-oriented

        3.relible

        4.cannot support store and forwarding

-datagram packet switching:

        1.asynchronous

        2.connectionless

        3.unreliable

        4.support store and forwarding ,robust against router's failures.

(store-and-forward transmission:Store-and-forward transmission means that the packet switch must receive the entire packet before it can begin to transmit the first bit of the packet onto the outbound link.)

-conclusion:

Difference:

In circuit switching, a physical link is established and dedicated for the call. All traffic goes through that link.

In packet switching, data are grouped into small packets. Each packet is switched and routed separately, and reassembled in the proper sequence.

Circuit switching is used for telephone network, because (1) phone calls are sparse, but generate data at relatively constant rate during the session, (2) circuit switching provides stable quality of service, given the predictable rate.

Packet switching is more efficient in Internet infrastructure because (1) the packets are processed individually. Therefore, it is faster. (2) Share wire in time domain.

• 1.3.3: Network of networks

ISP:internet service provider

IXP:internet exchange points

Tier1 ISP:AT&T,Sprint etc.

• 1.4: performance metrics: delay, throughput, packet loss, (efficiency in slides)

-Delay:

Processing delay: The time to examine the packet’s header and determine where to direct the packet. 

Queuing delay: The time for the packet to wait for earlier-arrived packets to be transmitted. It depends on the packets in the queue when the packet arrives.

Transmission delay: The time to transmit the packet onto the link. It depends on the length of the packet and the transmission rate of the link.

Propagation delay: The time for the packet to propagate through the link physically. It depends on the distance and the propagation speed on the link.


throughput:

packet loss:A queue preceding a link has finite capacity, a packet can arrive to find a full queue. With no place to store such a packet, a router will drop that packet; that is, the packet will be lost.

efficiency:data successfully delivered to the destination/overall resource used.

• 1.5: layering: motivation, ISO stack, internet stack, encapsulation

-motivation:

We have seen that there are many pieces to the Internet: numerous applications and protocols, various types of end systems, packet switches, and vari- ous types of link-level media. Given this enormous complexity, is there any hope of organizing a network architecture


-ISO stack and internet stack


encapsulation:

At each layer, a packet has two types of fields: header fields and a payload field. The payload is typically a packet from the layer above

• 3.6.1: congestion and scenarios.

Scenario1:Two Senders, a Router with Infinite Buffers

        

        large queuing delays are experienced as the packetarrival rate nears the link capacity

Scenario2:Two Senders and a Router with Finite Buffers

a: router know whether a buffer is free,no loss would occur.

b:sender retransmits only when a packet is known for certain to lose.We see here another cost of a congested network—the sender must perform retransmissions in order to compensate for dropped (lost) packets due to buffer overflow.

c:sender may time out prematurely and retransmit a packet that has been delayed in the queue but not yet lost. Since each packet is forwarded twice, the throughput will have an asymptotic value of R/4 as the offered load approaches R/2

Scenario3:Four Senders, Routers with Finite Buffers, and Multihop Paths

So here we see yet another cost of dropping a packet due to congestion—when a packet is dropped along a path, the transmission capacity that was used at each of the upstream links to forward that packet to the point at which it is dropped ends up having been wasted

III. APPLICATION LAYER Kurose:

• 2.1: client-server and peer-to-peer architectures, processes and sockets, transport services, TCP and UDP services, Application layer protocols

-client-server and peer-to-peer architectures:

Client-server:
        Clients don't communicate with each other
        Server has fixed - well-knowned address (its IP)
        Clients can always request packets from server's IP and server alwasy on to listenn for requests.
        Costly as service provider has to pay for interconnection & bandwidth cost
        Star topology
        Applications: web, FTP, email, Telnet
Peer-to-peer:
        each machine acts as both a client and a server.

        same task 

        as a client: must have some way to find peer acting as a server that is on and has desired content

        as a servermust have some way of advertising availability and content.

        scalable.

        Hybrid architectures

        cost effective,no server infrastructure and server bandwidth

        Applications: file sharing, peer assisted download, Internet Telephony


processes and sockets:

processes:

        It is not actually programs but processes that communicate,A process can be thought of as a program that is running within an end system

        Same end system,processes can communicate with each other with interprocess communication, using rules that are governed by the end system’s operating system.

        processes on two different end systems communicate with each other by exchanging messages across the computer network.

        A sending process creates and sends messages into the network; a receiving process receives these messages and possibly responds by sending messages back

        process that initiates the communication (that is, initially contacts the other process at the beginning of the session) is labeled as the client. The process that waits to be contacted to begin the session is the server

Sockets:

        A process sends messages into, and receives messages from, the network through a software interface called a socket


-TCP and UDP:

UDP:
  Connectionless: send datagrams to IP without setting channels or datapaths - no handshake
  Light weight: minimum protocol mechanism
  Unreliable: the message can get lost without knowing
  Not ordered: order of messages received is random
  No congestion control: application layer will take care of congestion
  Datagrams: individual packets are checked at receiver only
  Unidirectional
  Small packet header overhead: 8 bytes of overhead

TCP:
  Connection-oriented: handshaking is a must to alert client and server to prepare for onslaught of packets.
  Heavy weight: 3 packets are needed to set up the connection
  Reliable: guaranteed of service
  Ordered: order of message is preserved, out-of-order data will be buffered
  Congestion control: TCP handles congestion-control
  Full duplex connections: two-way communication全双工
  Big packet header overhead: 20 bytes of overhead in every segment

UDP is more suited for mutimedia streaming because:
  UDP is stateless, suitable for large number of clients. Transmission delay is less. By design, UDP is unidirectional单向

        Streaming can tolerate small amount of packet loss, thus reliable data transfer is not absolutely critical.
  Real-time applications react very poorly to TCP's congestion control


-Application layer protocols

an application-layer protocol defines:

• The types of messages exchanged, for example, request messages and response messages

• The syntax of the various message types, such as the fields in the message and how the fields are delineated句法

• The semantics of the fields, that is, the meaning of the information in the fields语义

• Rules for determining when and how a process sends messages and responds to messages处理

An application-layer protocol is only one piece of a network application

http is one kind of ...

smtp is one kind of...

• 2.2: HTTP architecture, non-persistent and persistent connections (no header format), cookies

-http

purpose:request and transfer a webpage from a server to a user(client-server)

service characteristics:

1.pages requested and sent at random times

2.connected only for duration of  download

performance:

1.loss not ok

2.delay few seconds ok,but flexible

3.throughput higher is better,but flexible

http connection management:

connection initiation :HTTP client first initiates a TCP connection with the server

well-known ports

client browser,server webserver

connction access control(limited resources,tcp)    sever may block a connection

server balancing     sever may redirect a connection


-connection termination:

1.Non-persistent:

        each file requires a seperate connection e.g.(-first request main page,close connection  -if has images,each image open connection request image,close) (costs two RTTs delay).

        workaround: open parallel connections,one for each image.(but server may have limited resources in terms of tcp connections)

2.persistent:

        leaves the TCP connection open after sending response/can send an entire including mutiple images or multiple pages over a single persistent connection between the same client and server. Dont need to wait for the response of request.

        whole HTTP page can be downloaded using a single TCP connection which saves the server’s computational resources.

        closes a connection when it isn't used for  a certain time. or after client is done with server.

        disadvantage:serial objects transfer


-cookies:

        Because e-commerce requires state,but http doesn't keep track of state.So cookies are used to identify users,allow sites to keep track of users’ state.

        Four components:(1. a cookie header line in the HTTP response message.2. request message...3.a cookie file kept on the user's end system and managef by users browesr 4.a back-end database te the website)

• 2.4: architecture, SMTP (operations, skip the message part), comparison with HTTP, mail access protocols, POP3, Imap (functioning, no need to memorize the commands).

-architecture:


-SMTP(simple mail transfer protocol):

        1.user agents allow users to read,reply to,foward,save and compose messages/

        2.sends message to its mail server,message placed in the mail server's outgoing message queue.

        3.when reader wants to read a message,his user agent retrieves the messafe from his mailbox in his mail server.

        conclusion:SMTP is the principal application-layer protocol for Internet electronic mail. It
uses the reliable data transfer service of TCP to transfer mail from the sender’s mail server to the recipient’s mail server. As with most application-layer protocols,
SMTP has two sides: a client side, which executes on the sender’s mail server, and a
server side, which executes on the recipient’s mail server. Both the client and server
sides of SMTP run on every mail server. When a mail server sends mail to other
mail servers, it acts as an SMTP client. When a mail server receives mail from other
mail servers, it acts as an SMTP server.

-SMTP operations:

        (open TCP connection,upload messages,close TCP connection)

        1.sender invoke his user agent,provides information about receiver,compose messgage...

        2.his agent sends the message to his mail server,queue,

    3.client side of SMTP see the message in queue,opens TCP connection to an SMTP server,running on receiver's mail server

        4.handshaking,the SMTP client sends sender's message into the TCP connection

        5.receiver's server.server side of SMTP receives the message.mail server place message in mailbox.

        6.receiver invoke his user agent to read the message at convenience


-Comparison with HTTP:

similarity:

        Both protocols are used to transfer files from one host to another: HTTP transfers files (also called objects) from a Web server to a Web client (typically a browser); SMTP transfers files (that is, e-mail messages) from one mail server to another mail server.

difference:

        1.HTTP pull protocol(TCP connection initiated by machine who want to receive),SMTP push protocol(TCP connection initiated by machine who want to send)

      2.SMTP requires each message, including the body of each message, to be in 7-bit ASCII format.Message has to be encoded into 7-bit ASCII. HTTP data does not impose this restriction.

        3.how a document consisting of text and images (along with possibly other media types) is handled.HTTP encapsulates each object in its own HTTP response message. Internet mail places all of the message’s objects into one message


-mail access protocols:

        mail access uses a client-server architecture—the typical user reads e-mail with a client that executes on the user’s end system.

        Alice’s mail server would dialogue directly with Bob’s PC

       This mail server is shared with other users and is typically maintained by the user’s ISP (for example, university or company)

        Alice’s user agent uses SMTP to push the e-mail message into her mail server, then Alice’s mail server uses SMTP (as an SMTP client) to relay the e-mail message to Bob’s mail server.Why two procedures?without relaying through Alice’s mail server, Alice’s user agent doesn’t have any recourse to an unreachable destination mail server.r. By having Alice first deposit the e-mail in her own mail server, Alice’s mail server can repeatedly try to send the message to Bob’s mail server.

        Bob’s user agent can’t use SMTP to obtain the messages because obtaining the messages is a pull operation, whereas SMTP is a push protocol.


-Post Office Protocol—Version 3 (POP3), Internet Mail Access Protocol (IMAP)

pop3:Post office protocols

        1.messages downloaded from mailbox on server to mailbox on non webmail client.

IMAP:

        1.messages kept in(multiple) server mailboxes.

        2.or moved to mailboxes on non webmail clients

        

  • 25
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 12
    评论
评论 12
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值