Computer Networks. Concepts

来源:互联网 发布:数控下料机如何编程 编辑:程序博客网 时间:2024/06/03 22:57
1
OSI, open system interconnection
The principles that were applied to arrive at
the seven layers can be briefly summarized as follows:
1. A layer should be created where a different abstraction is needed.
2. Each layer should perform a well-defined function.
3. The function of each layer should be chosen with an eye toward defining internationally standardized protocols.
4. The layer boundaries should be chosen to minimize the information flow across the interfaces.
5. The number of layers should be large enough that distinct functions need not be thrown together in the same layer
out of necessity and small enough that the architecture does not become unwieldy.
1>The physical layer is concerned with transmitting raw bits over a communication Channel. 101010
2>The main task of the data link layer is to transform a raw transmission facility into a line that appears free of
undetected transmission errors. break up the input data into data frames; back an acknowledgement frame.; keep a
fast transmitter from drowning a slow receiver in data; control access to the shared channel.
3>The network layer controls the operation of the subnet. A key design issue is determining how packets are routed
from source to destination.
4>The basic function of the transport layer is to accept data from above it, split it up into smaller units if need be,
pass these to the network layer, and ensure that the pieces all arrive correctly at the other end.
4>The session layer allows users on different machines to establish sessions between them.Sessions offer various
services, including dialog control (keeping track of whose turn it is to transmit), token management (preventing
two parties from attempting the same critical operation simultaneously), and synchronization.
5>the presentation layer is concerned with the syntax and semantics of the information transmitted. In order to
make it possible for computers with different internal data representations to communicate, the data structures to be
exchanged can be defined in an abstract way, along with a standard encoding to be used ‘‘on he wire.’’
6>The application layer contains a variety of protocols that are commonly needed by users. One widely used
application protocol is HTTP (HyperText Transfer Protocol), which is the basis for the World Wide Web.
2
TCP/IP
1> All these requirements led to the choice of a packet-switching network based on a connectionless layer that runs
across different networks. The lowest layer in the model, the link layer describes what links such as serial lines and
classic Ethernet must do to meet the needs of this connectionless internet layer. It is not really a layer at all, in the
normal sense of the term, but rather an interface between hosts and transmission links.
2>The internet layer holds the whole architecture together. It corresponds roughly to the OSI network layer. Its job
is to permit hosts to inject packets into any network and have them travel independently to the destination (potentially
on a different network). IP (Internet Protocol), plus a companion protocol called ICMP (Internet Control
Message Protocol) that helps it function. The job of the internet layer is to deliver IP packets where they are
supposed to go.
3>The layer above the internet layer in the TCP/IP model is now usually called the transport layer. It is designed to
allow peer entities on the source and destination hosts to carry on a conversation, just as in the OSI transport layer.
Two end-to-end transport protocols have been defined here. The first one, TCP (Transmission Control Protocol), is a
reliable connection-oriented protocol that allows a byte stream originating on one machine to be delivered without
error on any other machine in the internet. It segments the incoming byte stream into discrete messages and passes
each one on to the internet layer. At the destination, the receiving TCP process reassembles the received messages into
the output stream. TCP also handles flow control to make sure a fast sender cannot swamp a slow receiver with more
messages than it can handle. The second protocol in this layer, UDP (User Datagram Protocol), is an unreliable,
connectionless protocol for applications that do not want TCP’s sequencing or flow control and wish to provide their
own. It is also widely used for one-shot, client-server-type request-reply queries and applications in which prompt
delivery is more important than accurate delivery, such as transmitting speech or video. The relation of IP, TCP, and
UDP is shown in Fig. 1-22. Since the model was developed, IP has been implemented on many other networks.
4>The TCP/IP model does not have session or presentation layers. No need for them was perceived. Instead,
application layer simply includes any session and presentation functions that they require. Experience with the OSI
model has proven this view correct: these layers are of little use to most applications.
//*****************************Chp 2 Physical Layer******************************************
Media are roughly grouped into guided media, such as copper wire and fiber optics, and unguided media, such as
terrestrial wireless, satellite, and lasers through the air.
Twisted Pairs/Coaxial Cable/Power Lines/Fiber Optics
Radio Transmission/Microwave Transmission/Infrared Transmission/Light Transmission/COMMUNICATION
SATELLITES
3
//****************************CHP 3 Data link Layer*****************************************
Framing
1. Byte count. problem:count can be garbled by a transmission error.
2. Flag bytes with byte stuffing.(字节填充的标记字节法) Problem: data 中occur ESC or FLAG
3. Flag bits with bit stuffing (11111>>111110, Problem: if data contains too much “1”...)
sender>>0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0>>Data Link Layer
Data Link Layer> 0 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 0 0 1 0>>receiver
Reciver>>0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0
4. Physical layer coding violations.
(- = Exclusive OR )
Error Free: T(x)%G(x)=0; Error:( T(x)+E(x))%G(x)=E(x)
4
SLIDING WINDOW PROTOCOLS
//**********************CHP 4***************************************************************
1-persistent CSMA (Carrier Sense Multiple Access). That is a bit of a mouthful for the simplest CSMA scheme.
When a station has data to send, it first listens to the channel to see if anyone else is transmitting at that moment. If the
channel is idle, the stations sends its data. Otherwise, if the channel is busy, the station just waits until it becomes idle.
Then the station transmits a frame. PROBLEM: If two stations become ready in the middle of a third station’s
transmission, both will wait politely until the transmission ends, and then both will begin transmitting exactly
simultaneously, resulting in a collision.
nonpersistent CSMA: a conscious attempt is made to be less greedy than in the previous one. As before, a
station senses the channel when it wants to send a frame, and if no one else is sending, the station begins doing so
itself. However, if the channel is already in use, the station does not continually sense it for the purpose of seizing it
immediately upon detecting the end of the previous transmission. Instead, it waits a random period of time and then
repeats the algorithm. 好处:better channel utilization 坏处: longer delays than 1-persistent CSMA.
p-persistent CSMA:When a station becomes ready to send, it senses the channel. If it is idle, it transmits with a
probability p. With a probability q  1 − p, it defers until the next slot. If that slot is also idle, it either transmits or
defers again, with probabilities p and q. This
process is repeated until either the frame has
been transmitted or another station has begun
transmitting. In the latter case, the unlucky
station acts as if there had been a collision (i.e.,
it waits a random time and starts again). If the
station initially senses that the channel is busy,
it waits until the next slot and applies the
above algorithm.
5
CSMA with Collision Detection: the stations to quickly detect the collision and abruptly stop transmitting,
(rather than finishing them) since they are irretrievably garbled anyway. This strategy saves time and bandwidth.
(t0A、B station 同时开始传输,传到最远station B 用时dt, 2dt 后才可以保证抓住信道)
This difference will greatly improve performance if the frame time is much longer than the transmitting time.
Wireless LAN Protocols
(a) hidden terminal problem (b) exposed terminal problem.
Solutions: MACA (Multiple Access with Collision Avoidance),sender to stimulate the receiver into outputting a
short frame, so stations nearby can detect this transmission and avoid transmitting for the duration of the upcoming
(large) data frame.
//*********************CHP 5
NETWORK LAYER DESIGN ISSUES***************************
connectionless service: packets are injected into the network individually and routed independently
of each other. No advance setup is needed. In this context, the packets are frequently called datagrams (in analogy
with telegrams) and the network is called a datagram network..
connection-oriented service: a path from the source router all the way to the destination router must be established
before any data packets can be sent. This connection is called a VC (virtual circuit), in analogy with the physical
circuits set up by the telephone system, and the network is called a virtual-circuit network..
Shortest Path Algorithm: Dijkstra
6
Distance vector routing: algorithm operates by having each router maintain a table (i.e., a vector) giving the best
known distance to each destination and which link to use to get there. These tables are updated by exchanging
information with the neighbors. Eventually, every router knows the best link to reach each destination.
Problem: The Count-to-Infinity Problem,好消息传播快,坏消息传播慢.The core of the problem is that when X
tells Y that it has a path somewhere,Y has no way of knowing whether it itself is on the path. 因此路由表发现一个断
连(无穷远)node 需要经过若干次更新。
Link State Routing: 1. Discover its neighbors and learn their network addresses. 2. Set the distance or cost
metric to each of its neighbors. 3. Construct a packet telling all it has just learned. 4. Send this packet to and receive
packets from all other routers. 5. Compute the shortest path to every other router.
In effect, the complete topology is distributed to every router. Then Dijkstra’s algorithm
can be run at each router to find the shortest path to every other router.
Packet Fragmentation:Each network or link imposes some maximum size on its packets. These limits
have various causes, among them: 1. Hardware,2. Operating system,3. Protocols,4. Compliance with some
(inter)national standard.,5. Desire to reduce error-induced retransmissions to some level.,6. Desire to prevent one
packet from occupying the channel too long.
IP Addresses:A defining feature of IPv4 is its 32-bit addresses. Every host and router on the Internet has an IP
address that can be used in the Source address and Destination address fields of IP packets. It is important to note
that an IP address does not actually refer to a host. It really refers to a network interface, so if a host is on two
networks, it must have two IP addresses. However, in practice, most hosts are on one network and thus have one IP
address. In contrast, routers have multiple interfaces and thus multiple IP addresses.
128.208.0.0/24, 24 bits for the Network portion
CIDR—Classless InterDomain Routing
7
//*****************CHP 6 CONGESTION CONTROL 传输层***************
6.3.1 Efficiency and Power
max-min fairness. An allocation is max-min fair if the bandwidth given to one flow cannot be increased without
decreasing the bandwidth given to another flow with an allocation that is no larger. That is, increasing the bandwidth
of a flow will only make the situation worse for flows that are less well off.
如R2-R3A 占的过多,但是把A 给B 并不能提高B 的容量
Convergence(收敛):A good congestion control algorithm should rapidly converge to the ideal operating point, and
it should track that point as it changes over time.
6.3.2 Regulating the Sending Rate:
Issue: 1)The first is flow control, in the case that there is insufficient buffering at the receiver. 2) The second is
congestion, in the case that there is insufficient capacity in the network.
Solutions: (1) XCP (eXplicit Congestion Protocol): when routers tell the sources the rate at which they may send
precisely. (2) ECN (Explicit Congestion Notification) with TCP, routers set bits on packets that experience
congestion to warn the senders to slow down, but they do not tell them how much to slow down.
0 0
原创粉丝点击