CCNA_3

1. Ethernet network

l  采用CSMA/CD Carrier Sense Multiple Access with Collision Detection, a protocol that helps devices share the bandwidth evenly without having two devices transmit at the same time on the network medium. 平均分配带宽, 并且不会导致两台设备同时在网络上传输数据. 因为如果当一个节点在网络上面发送数据时, 网络上所有其他节点都会receive 和 examine 此次transmission. 注意: 只有桥和路由器可以阻止数据被传送到整个网络.

l  CSMA/CD如何工作?

一个主机想发送数据, 首先他先检查这条线路上是否已经存在一个数字信号; 如果没有的话, 他就开始传送数据. 但是, 同时这个主机还要继续监听这个网络, 看是否还有别的主机发送数据包. 如果他发现了另外的主机正在发送数据, 他就会发送一个extended jam signal 要求别的主机停止发送信号. 于是其他主机就会响应这个信号, 并且等待一段时间后重发. Backoff algorithms

l  当LAN上发生collision时, 以下步骤会发生

n  A jam signal informs all devices that a collision occurred

n  The collision invokes a random backoff algorithm.

n  Each device on the Ethernet segment stops transmitting for a short time until the timers expires.

n  All hosts have equal priority to transmit after the timers have expired.

2. Half- and Full-Duplex Ethernet

l  Half-duplex: only one wire pair with a digital signal running in both directions on the wire.

使用CSMA/CD, 一旦发生冲突, 重传集线器连接交换机, 那集线器必须工作于半双工状态, 因为端站点必须能够检测到冲突, 典型的是10BaseT

l  Full-duplex Ethernet uses two pairs of wires. Full duplex uses a point-to-point connection between the transmitter of the transmitting device and the receiver of the receiving device. 点对点的连接. 全双工方式下, 可以得到更高的数据传输速率. 由于发送和接受在不同电缆上, 因此不会发生冲突.

l  全双工以太网工作于以下三种情况:

n  交换机到主机

n  交换机之间

n  使用交叉电缆的从主机到主机的连接

l  注意:当网络中只有两个节点时, 全双工以太网需要点到点的连接. 除了集线器, 其他任何设备都可运行全双工.

l  问题: 可以达到这样的传输速率, 却无法传输?

因为一个全双工以太网端口加电时, 它首先连接到远程端, 与FastEthernet链路的另一端进行协商, 来检测能运行哪种速率下.—— auto-detect mechanism 自动检测机制

l  要点:

n  There are no collisions in full-duplex mode.

n  A dedicated switch port is required for each full-duplex node.

n  The host network card and the switch port must be capable of operating in full-duplex mode.

3. Ethernet at the Data Link Layer

以太网链路层负责硬件寻址, 亦即MAC寻址.

Ethernet is also responsible for framing packets received from the Network layer and preparing them for transmission on the local network through the Ethernet contention media access method. 以太网同时负责对从网络层接受到的数据包组合成帧, 并且准备在本地用MAC方法进行传播.???

l  Ethernet Addressing

通过MAC地址寻址, 因为MAC地址已经烧在了每个NIC以太网卡内.

MAC地址 = 硬件地址

I/G 是0 表示设备MAC地址; 是1, 表示是以太网的广播地址或组播地址.

G/L 是0 表示globally administered address; 是1 locally governed and administered address

l  Ethernet frame

n  The Data Link layer is responsible for combining bits into bytes and bytes into frames. Frames are used at the Data Link layer to encapsulate packets handed down from the Network layer for transmission on a type of media access.

位à字节à帧

n  The function of Ethernet stations is to pass data frames between each other using a group of bits known as a MAC frame format.以太网站点的功能就是使用一组称为MAC帧格式的位, 在站点间传送数据帧.采用CRC差错检测, 只查错不纠错.

n  Tunneling: encapsulating a frame within a different type of frame.

n  两种帧 802.3 和 Ethernet frame 各个字节段的意思.

l  Ethernet at the Physical Layer

n  IEEE 802.3 standards:

10Base2: 10Mb/s, 185meter, 10表示传输速率, Base表示采用基带传输技术, 2表示最大距离几乎是200米;

10Base5

10BaseT: 与前两者不同的是每台设备必须链接到集线器或者交换机上, 对每段电缆来说只能连接一台主机.

l  Ethernet Cabling

三种: Straight-through cable直通电缆; Crossover cable交叉电缆; Rolled cable翻转电缆;

n  直通电缆:

u  Host to switch or hub

u  Router to switch or hub

u  只能用于以太网, wouldn’t work with voice, Token Ring, ISDN, and so on.

n  交叉电缆:

u  Switch to switch

u  Hub to hub

u  Host to host

u  Hub to switch

u  Router direct to host

n  翻转电缆

注意:交换机之间用交叉电缆, 路由器到交换机使用直通电缆, 主机到交换机也使用直通电缆

4. Data Encapsulation

l  主机跨越网络像其他设备传输数据时, 要进行数据封装, 亦即在OSI模型的每一层加上协议信息. 每一层只与接收设备上对应的对等层进行通信. When a host transmits data across a network to another device, the data goes through encapsulation: It is wrapped with protocol information at each layer of the OSI model. Each layer communicates only with its peer layer on the receiving device.

l  PDU: protocol data units, 在模型每一层当中, 这些含有控制信息的PDU被附加到数据上. 它们通常是附加到数据字段的报头中.PDU 只能由接收方设备中的对等层读取, 在读取之后, 报头就被剥离, 然后把数据交给上一层.

l  How Upper-layer user data converted and transmitted?

u  The data stream is then handed down to the Transport layer, which sets up a virtual circuit to the receiving device by sending over a synch packet. Next, the data stream is broken up into smaller pieces, and a Transport layer header (a PDU) is created and attached to the header of the data field; now the piece of data is called a segment. Each segment is sequenced so the data stream can be put back together on the receiving side exactly as it was transmitted.

u  Each segment is then handed to the Network layer for network addressing and routing through the internetwork. Logical addressing (for example, IP) is used to get each segment to the correct network. The Network layer protocol adds a control header to the segment handed down from the Transport layer, and what we have now is called a packet or datagram. Remember that the Transport and Network layers work together to rebuild a data stream on a receiving host, but it’s not part of their work to place their PDUs on a local network segment-which is the only way to get the information to a router or host. 网络寻址, 路由选择, control header, packet和datagram. 传输层和网络层一起工作重建数据流.

注意有几个概念: PDU, segment, packet, frame, bits

u  It’s the Data Link layer that’s responsible for taking packets from the Network layer and placing them on the network medium (cable or wireless). The Data Link layer encapsulates each packet in a frame, and the frame’s header carries the hardware address of the source and destination hosts. If the destination device is on a remote network, then the frame is sent to a router to be routed through an internetwork. Once it gets to the destination network, a new frame is used to get the packet to the destination host.数据链路层负责从网络层拿到packets, 然后放到网络传输媒介上. 数据链路层把每个packet封装到一个帧里面, 帧的header含有目的地的硬件地址. 如果目标地址在远程网络, 那么帧就会被传到路由器, 再发送到目的地.

u  To put this frame on the network, it must first be put into a digital signal. Since a frame is really a logical group of 1s and 0s, the Physical layer is responsible for encoding these digits into a digital signal, which is read by devices on the same local network. The receiving devices will synchronize on the digital signal and extract (decode) the 1s and 0s from the digital signal. At this point, the devices build the frames, run a CRC, and then check their answer against the answer in the frame’s FCS field. If it matches, the packet is pulled from the frame and what’s left of the frame is discarded. This process is called de-encapsulation. The packet is handed to the Network layer, where the address is checked. If the address matches, the segment is pulled from the packet and what’s left of the packet is discarded. The segment is processed at the Transport layer, which rebuilds the data stream and acknowledges to the transmitting station that it received each piece. It then happily hands the data stream to the upper-layer application.帧放到网络上, 需要先转换成数字信号. 物理层负责将由1和0逻辑组成的帧转换成数字信号, 然后本地网络内设备就可以读. 接收方同步这些数字信号, 并且从数字信号中提取1和0, 执行CRC, 检查FCS, 如果match就构建帧, 丢弃剩余部分—解封装. Packet然后传到网络层, 检查地址, 如果match, 就由packet组成segment, 并且抛弃packet剩余部分. 然后传输层得到segment, 重建数据流, 并且通知发送方接收成功. 最后传输层吧数据流传到高层应用程序.

u  封装:

Data stream从高层应用传输到传输层, 传输层用一个sync packet建立起与接收设备间的虚电路, 然后data stream被分解为pieces, 同时transport layer 生成一个transport layer header(是个PDU)并且附加到了data stream piece的header里, 就把这个piece就叫做一个segment. Segment 排序. 接着每一个segment传输到network layer, 用于network addressing和routing, segment的逻辑地址保证它们被送到正确的网段. Network layer然后给从transport layer接受过来的segment加上一个control header, 这就叫做一个packet或者datagram. Network layer和transport layer需要合作才能重建data stream.           (packet = datagram)

Remember that a data stream is handed down from the upper layer to the Transport layer.

ARP

Popularity: 3% [?]

  • May 2, 2009 -- CCNA_2 (0)
    OSI 应用 表示 会话, 传输 网络 数据, 物理. l  上三层一组, 定义终端系统中的应用程序如何彼此通信(how the applications within the...
  • May 21, 2009 -- 36步搞定IP Routing(4/4) (0)
    1.         此例中,得到协议是IP后, IP 先在IP header上运行CRC, 然后检测destination IP address. 注意1: IP仅仅是完成部分CR...
  • May 21, 2009 -- 36步搞定IP Routing(3/4) (0)
    1.         首先这个payload 先发送给ICMP, ICMP会认为这是一个echo request, 于是ICMP立即回应: 丢弃packet, 并产生一个新的payload...
Share this Post:
Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

No Comments

(Required)
(Required, will not be published)

Videos, Slideshows and Podcasts by Cincopa Wordpress Plugin