二层交换网络_网络中的第2层交换
二層交換網絡
二層交換簡介 (Introduction to Layer 2 Switching)
As you know hubs are not intelligent devices. Whenever a hub receives a frame, it broadcasts the frame in all ports. Also, the hub represents a single collision domain i.e. when any 2 hosts send frames simultaneously and a collision occurs. Due to these limitations of Hubs, there are problems in the network.
如您所知,集線器不是智能設備。 當集線器收到幀時,它將在所有端口中廣播該幀。 同樣,集線器表示單個沖突域,即,當任意兩個主機同時發送幀并且發生沖突時。 由于集線器的這些限制,網絡中存在問題。
Bridges were constructed to overcome the limitations of Hubs. Bridges are better than hubs. Bridges are used to connect local area networks. If you want to spread your local area network more then you can do it through the bridges. Bridges use the MAC address to forward the frames. But because the bridges had only 2 port, bridges were also not able to provide a reliable and scalable network.
建造橋梁是為了克服樞紐的局限性。 橋梁比集線器更好。 網橋用于連接局域網。 如果您想擴大局域網的范圍,則可以通過網橋進行擴展。 網橋使用MAC地址轉發幀。 但是因為網橋只有2個端口,所以網橋也無法提供可靠且可擴展的網絡。
Switches are used to overcome the limitations of hubs and bridges. Every port of a switch is called single collision domain. Therefore a switch represents multiple collision domains and a single broadcast domain. Switches are an intelligent device.
交換機用于克服集線器和橋接器的限制。 交換機的每個端口稱為單個沖突域。 因此,交換機代表多個沖突域和一個廣播域。 開關是一種智能設備。
Switches to determine the destination in Layer 2 switching uses the table of the MAC (Media Access Control) addresses. This table is also called the CAM table. MAC address is hardcoded by the manufacturer on every host's NIC (Network Interface Card). Layer 2 switches Application Specific Integrated Circuits (ASIC) is used to maintain and maintain a table of MAC addresses.
用于確定第2層交換中的目的地的交換使用MAC(媒體訪問控制)地址表。 該表也稱為CAM表。 制造商在每個主機的NIC(網絡接口卡)上將MAC地址硬編碼。 第2層交換機專用集成電路(ASIC)用于維護和維護MAC地址表。
開關功能 (Functions of Switches )
Switches on Layer 2 performs 3 important functions:
第2層上的開關執行3個重要功能:
1)硬件地址學習 (1) Hardware Address Learning )
When the switch is first turned on, the CAM table is empty. When a host frame sends the store address of the switch frame to the CAM table. Because switch does not have the knowledge of the destination host at this time, so switch lets the frame broadcast all other ports except source port.
首次打開開關時,CAM表為空。 當主機幀將交換幀的存儲地址發送到CAM表時。 由于交換機此時不了解目標主機,因此交換機允許幀廣播源端口以外的所有其他端口。
All hosts discard this frame except for the host that has been sent to this frame. The person who receives the host frame sends the acknowledgment frame to the source host. Now switch stores the source address of this frame in your CAM table.
除已發送到該幀的主機外,所有主機都丟棄該幀。 接收主機幀的人將確認幀發送到源主機。 現在,switch將此幀的源地址存儲在CAM表中。
Whenever a frame is sent to the network, Switch stores its source address in its CAM table. Thus a switch creates your CAM table. Once the switch stores all hosts' MAC addresses, it does not need to broadcast any frame as the first time. Now the frames are sent from the source to the destination like a point to point connection.
每當將幀發送到網絡時,Switch會將其源地址存儲在其CAM表中。 因此,一個開關將創建您的CAM表。 一旦交換機存儲了所有主機的MAC地址,它就不需要在第一次廣播任何幀。 現在,幀像點對點連接一樣從源發送到目的地。
2)幀轉發 (2) Forwarding of Frames )
As soon as a frame switch interface comes in, its destination MAC address is compared to the MAC addresses of the CAM table. If the destination address matches the frame, then the frame is forwarded only to the port corresponding to that MAC address.
一旦幀切換接口進入,它的目標MAC地址就會與CAM表的MAC地址進行比較。 如果目標地址與幀匹配,則僅將幀轉發到與該MAC地址相對應的端口。
If the destination address of any frame does not match the CAM table then that frame is broadcasted. If a host receives the frame and sends its acknowledgment frame, then stores the address of that frame in the switch CAM table. If someone broadcast hosts or server frames then switch sends such frames to all hosts.
如果任何幀的目標地址與CAM表都不匹配,則廣播該幀。 如果主機接收到該幀并發送其確認幀,則將該幀的地址存儲在交換機CAM表中。 如果有人廣播主機或服務器幀,則交換機會將此類幀發送到所有主機。
Switches provide 3 methods to forward frames:
交換機提供了三種轉發幀的方法:
Store and Forward: The entire frame is copied to memory in this method. After copying the frame, it is performed on Cyclic Redundancy Check (CRC).
存儲并轉發 :用這種方法將整個幀復制到內存中。 復制幀后,將執行循環冗余校驗(CRC)。
Cut Through: In this method, the initial 6 bytes are copied from the header of the frame so that the destination host can be identified. This method does not perform any type of error checking.
切入 :在此方法中,從幀的頭復制前6個字節,以便可以標識目標主機。 此方法不執行任何類型的錯誤檢查。
Fragment Free: In this method, 64 bytes of the frame are copied to perform the error checking.
無碎片 :在此方法中,復制幀的64個字節以執行錯誤檢查。
3)避免循環 (3) Loop Avoidance )
It is very important to have multiple links between switches. Because if there is a link down for some reason then the second link can be sent to the frames. But sometimes these multiple links cause many problems in the network.
交換機之間具有多個鏈接非常重要。 因為如果由于某種原因導致鏈接斷開,則可以將第二個鏈接發送到幀。 但是有時這些多重鏈接會在網絡中引起許多問題。
Because there is more than one link between switches, loops can be created in the network. If no loop avoidance technique is used then the broadcast storm is created in the network. Because of the loops in the network, one can get multiple copies of the host frames.
由于交換機之間存在多個鏈接,因此可以在網絡中創建環路。 如果未使用環路避免技術,則會在網絡中創建廣播風暴。 由于網絡中存在環路,因此可以獲取主機幀的多個副本。
The Spanning Tree Protocol is used to prevent loops in Layer 2 switching.
生成樹協議用于防止第2層交換中的循環。
翻譯自: https://www.includehelp.com/computer-networks/layer-2-switching.aspx
二層交換網絡
總結
以上是生活随笔為你收集整理的二层交换网络_网络中的第2层交换的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: i2c-toos 交互数据_什么是CD-
- 下一篇: ideatomcat老是运行以前的项目_