A typical network consists of nodes (computers), a connecting medium (wired or wireless) and specialized network equipment like routers or hubs. In the case of the Internet, all of these pieces work together to allow your computer to send information to another computer that could be on the other side of the world! Switches are a fundamental part of most networks. They make it possible for several users to send information over a network at the same time without slowing each other down. Just like routers allow different networks to communicate with each other, switches allow different nodes (a network connection point, typically a computer) of a network to communicate directly with one another in a smooth and efficient manner. There are a lot of different types of switches and networks. Switches that provide a separate connection for each node in a company's internal network are called LAN switches. Essentially, a LAN switch creates a series of instant networks that contain only the two devices communicating with each other at that particular moment. Here we will focus on Ethernet networks that use LAN switches. You will learn what a LAN switch is and how transparent bridging works. You will also learn about VLANs, trunking and spanning trees. Networking Basics Adding Switches While hubs provide an easy way to scale up and shorten the distance that the packets must travel to get from one node to another, they do not break up the actual network into discrete segments. That is where switches come in. Think of a hub as a four-way intersection where everyone has to stop. If more than one car reaches the intersection at the same time, they have to wait for their turn to proceed. Now imagine what this would be like with a dozen or even a hundred roads intersecting at a single point. The amount of waiting and the potential for a collision increases significantly. But wouldn't it be amazing if you could take an exit ramp from any one of those roads to the road of your choosing? That is exactly what a switch does for network traffic! A switch is like a cloverleaf intersection -- each car can take an exit ramp to get to its destination without having to stop and wait for other traffic to go by. A vital difference between a hub and a switch is that all the nodes connected to a hub share the bandwidth among themselves, while a device connected to a switch port has the full bandwidth all to itself. For example, if 10 nodes are communicating using a hub on a 10 Mbps network, then each node may only get a portion of the 10 Mbps if other nodes on the hub want to communicate as well. But with a switch, each node could possibly communicate at the full 10 Mbps. Think about our road analogy. If all of the traffic is coming to a common intersection, then it has to share that intersection with everyone else. But a cloverleaf allows all of the traffic to continue at full speed from one road to the next. In a fully switched network, switches replace all the hubs of an Ethernet network with a dedicated segment for every node. These segments connect to a switch, which supports multiple dedicated segments (sometimes in the hundreds). Since the only devices on each segment are the switch and the node, the switch picks up every transmission before it reaches another node. The switch then forwards the frame over the appropriate segment. Since any segment contains only a single node, the frame only reaches the intended recipient. This allows many conversations to occur simultaneously on a switched network. Switching allows a network to maintain full-duplex Ethernet. Before switching, Ethernet was half-duplex, which means that only one device on the network can transmit at any given time. In a fully switched network, nodes only communicate with the switch, never directly with each other. Using our road analogy, half-duplex is similar to the problem of a single lane, like when road construction closes down the use of one lane of a two-lane road. Traffic is trying to use the same lane in both directions. This means that traffic coming one way must wait until traffic from the other direction stops -- otherwise, they will hit head-on! Fully switched networks employ either twisted-pair or fiber-optic cabling, both of which use separate conductors for sending and receiving data. In this type of environment, Ethernet nodes can forgo the collision detection process and transmit at will, since they are the only potential devices that can access the medium. In other words, traffic flowing in each direction has a lane to itself. This allows nodes to transmit to the switch as the switch transmits to them, in a collision free environment. Transmitting in both directions also can effectively double the apparent speed of the network when two nodes are exchanging information. For example, if the speed of the network is 10Mbps, then each node can transmit simultaneously at 10 Mbps. Most networks are not fully switched because of the costs incurred in replacing all of the hubs with switches. Instead, a combination of switches and hubs are used to create an efficient yet cost-effective network. For example, a company may have hubs connecting the computers in each department and a switch connecting all of the department-level hubs. Switching Technologies A hub or a switch will pass along any broadcast packets they receive to all the other segments in the broadcast domain; but a router will not. Think about our four-way intersection again: All of the traffic passed through the intersection no matter where it was going. Now imagine that this intersection is at an international border. To pass through the intersection, you must provide the border guard with the specific address that you are going to. If you don't have a specific destination, then the guard will not let you pass. A router works like this. Without the specific address of another device, it will not let the data packet through. This is a good thing for keeping networks separate from each other, but not so good when you want to talk between different parts of the same network. This is where switches come in. LAN switches rely on Packet-switching. The switch establishes a connection between two segments just long enough to send the current packet. Incoming packets (part of an Ethernet frame) are saved to a temporary memory area (buffer); the MAC address contained in the frame's header is read and then compared to a list of addresses maintained in the switch's lookup table. In an Ethernet-based LAN, an Ethernet frame contains a normal packet as the payload of the frame, with a special header that includes the MAC address information for the source and destination of the packet. Packet-based switches use one of three methods for routing traffic: Cut-through switches read the MAC address as soon as a packet is detected by the switch. After storing the six bytes that make up the address information, they immediately begin sending the packet to the destination node, even as the rest of the packet is coming into the switch. A switch using store and forward will save the entire packet to the buffer and check it for CRC errors or other problems before sending. If the packet has an error, it is discarded. Otherwise, the switch looks up the MAC address and sends the packet on to the destination node. Many switches combine the two methods, using cut-through until a certain error level is reached and then changing over to store and forward. Very few switches are strictly cut-through, since this provides no error correction. A less common method is fragment-free. It works like cut-through except that it stores the first 64 bytes of the packet before sending it on. The reason for this is that most errors, and all collisions, occur during the initial 64 bytes of a packet. LAN switches vary in their physical design. Currently, there are three popular configurations in use: Transparent Bridging Here's how it works: In our example, two nodes share each segment. In an ideal LAN-switched network, every node would have its own segment. This would eliminate the possibility of collisions and also the need for filtering. Notice that while a node on Segment A is talking to a node on Segment B at 10 Mbps, a node on Segment C can communicate with a node on Segment D at 10 Mbps also. Redundancy and Broadcast Storms In this case, even if one of the switches fails, the network will continue. This provides redundancy, effectively eliminating the single point of failure. But now we have a new problem. In the last section, you discovered how switches learn where the nodes are located. With all of the switches now connected in a loop, a packet from a node could quite possibly come to a switch from two different segments. For example, imagine that Node B is connected to Switch A, and needs to communicate with Node A on Segment B. Switch A does not know who Node A is, so it floods the packet. The packet travels via Segment A or Segment C to the other two switches (B and C). Switch B will add Node B to the lookup table it maintains for Segment A, while Switch C will add it to the lookup table for Segment C. If neither switch has learned the address for Node A yet, they will flood Segment B looking for Node A. Each switch will take the packet sent by the other switch and flood it back out again immediately, since they still don't know who Node A is. Switch A will receive the packet from each segment and flood it back out on the other segment. This causes a broadcast storm as the packets are broadcast, received and rebroadcast by each switch, resulting in potentially severe network congestion. Which brings us to spanning trees... Spanning Trees Here's how STP works: To compensate for the speed of networks increasing beyond the gigabit range, the standard cost has been slightly modified. The new cost values are: You should also note that the Path Cost can be an arbitrary value assigned by the network administrator, instead of one the standard cost values. All of the switches are constantly sending BPDUs to each other, trying to determine the best path between various segments. When a switch receives a BPDU (from another switch) that is better than the one it is broadcasting for the same segment, it will stop broadcasting its BPDU out that segment. It will, instead, store the other switch's BPDU for reference and for broadcasting out to inferior segments, such as those that are farther away from the root bridge. Designated Ports are selected based on the lowest path cost to the Root Bridge for a segment. Since the Root Bridge will have a path cost of "0," any ports on it that are connected to segments will become Designated Ports. For the other switches, the path cost is compared for a given segment. If one port is determined to have a lower path cost, it becomes the Designated Port for that segment. If two or more ports have the same path cost, then the switch with the lowest BID is chosen. Each switch has a table of BPDUs that it continually updates. The network is now configured as a single spanning tree, with the Root Bridge as the trunk and all the other switches as branches. Each switch communicates with the Root Bridge through the Root Ports, and with each segment through the Designated Ports, thereby maintaining a loop-free network. In the event that the Root Bridge begins to fail or have network problems, STP allows the other switches to immediately reconfigure the network with another switch acting as Root Bridge. This amazing process gives a company the ability to have a complex network that is fault-tolerant and yet fairly easy to maintain. Routers and Layer 3 Switching When a router receives a packet, it looks at the Layer 3 (Network Layer) source and destination addresses to determine the path the packet should take. A standard switch relies on the MAC addresses to determine the source and destination of a packet, which is Layer 2 (Data) networking. The fundamental difference between a router and a Layer 3 switch is that Layer 3 switches have optimized hardware to pass data as fast as Layer 2 switches, yet they make decisions on how to transmit traffic at Layer 3, just like a router. Within the LAN environment, a Layer 3 switch is usually faster than a router because it is built on switching hardware. In fact, many Layer 3 switches are actually routers that operate faster because they are built on "switching" hardware with customized chips inside the box. The pattern matching and caching on Layer 3 switches is similar to the pattern matching and caching on a router. Both use a routing protocol and routing table to determine the best path. However, a Layer 3 switch has the ability to reprogram the hardware dynamically with the current Layer 3 routing information. This is what allows much faster packet processing. On current Layer 3 switches, the information received from the routing protocols is used to update the hardware caching tables. The 6000 is a great way to connect to the Internet because it has WAN cards; but, based on traffic flow and budget, simple routers of varying sizes are usually fine for Internet connections. An important item to note: Routers are necessary when communicating between two VLANs... VLANs Here are some common reasons why a company might have VLANs: You can create a VLAN using most switches simply by logging into the switch via Telnet and entering the parameters for the VLAN (name, domain and port assignments). After you have created the VLAN, any network segments connected to the assigned ports will become part of that VLAN. While you can have more than one VLAN on a switch, they cannot communicate directly with one another on that switch. If they could, it would defeat the purpose of having a VLAN, which is to isolate a part of the network. Communication between VLANs requires the use of a router. VLANs can span across multiple switches and you can have more than one VLAN on each switch. For multiple VLANs on multiple switches to be able to communicate via a single link between the switches, you must use a process called trunking; trunking is the technology that allows information from multiple VLANs to be carried over just one link between switches. The VLAN Trunking Protocol (VTP) is the protocol that switches use to communicate among themselves about VLAN configuration. In the image above, each switch has two VLANs. On the first switch, VLAN A and VLAN B are sent through a single port (trunked) to the router and through another port to the second switch. VLAN C and VLAN D are trunked from the second switch to the first switch, and through the first switch to the router. This trunk can carry traffic from all four VLANs. The trunk link from the first switch to the router can also carry all four VLANs. In fact, this one connection to the router allows the router to appear on all four VLANs, as if it had four, different, physical ports connected to the switch. The VLANs can communicate with each other via the trunking connection between the two switches using the router. For example, data from a computer on VLAN A that needs to get to a computer on VLAN B (or VLAN C or VLAN D) must travel from the switch to the router and back again to the switch. Because of the transparent bridging algorithm and trunking, both PCs and the router think that they are on the same physical segment! As you can see, LAN switches are an amazing technology that can really make a difference in the speed and quality of your network.
Here are some of the fundamental parts of a network:
In the picture above, you see several of the common elements of a network.
Bus network topology
Ring network topology
Star network topology
A typical star bus network.
In the most basic type of network found today, nodes are simply connected together using hubs. As a network grows, there are some potential problems with this configuration:
Imagine that each vehicle is a packet of data waiting for an opportunity to continue on its trip.
A mixed network with two switches and three hubs.
You can see that a switch has the potential to radically change the way nodes communicate with each other. But you may be wondering what makes it different from a router. Switches usually work at Layer 2 (Data or Datalink) of the OSI Reference Model, using MAC addresses, while routers work at Layer 3 (Network) with Layer 3 addresses (IP, IPX or Appletalk depending on what Layer 3 protocols are being used). The algorithm that switches use to decide how to forward packets is different from the algorithms used by routers to forward packets. One of these differences in the algorithms between switches and routers is how broadcasts are handled. On any network, the concept of a broadcast packet is vital to the operability of a network. Whenever a device needs to send out information but doesn't know who it should send it to, it sends out a broadcast. For example, every time a new computer or other device comes on to the network, it sends out a broadcast packet to announce its presence. The other nodes (such as a domain server) can add the computer to their browser list (kind of like an address directory) and communicate directly with that computer from that point on. Broadcasts are used any time a device needs to make an announcement to the rest of the network or is unsure of who the recipient of the information should be.
The OSI Reference Model consists of seven layers that build from the wire (Physical) to the software (Application).
Most Ethernet LAN switches use a very cool system called transparent bridging to create their address lookup tables. Transparent bridging is a technology that allows a switch to learn everything it needs to know about the location of nodes on the network without the network administrator having to do anything. Transparent bridging has five parts:
Click on the menu terms to learn more about how transparent bridging works.
When we talked about bus and ring networks earlier, one issue was the possibility of a single point of failure. In a star or starbus network, the point with the most potential for bringing all or part of the network down is the switch or hub. Look at the example below:
To prevent broadcast storms and other unwanted side effects of looping, Digital Equipment Corporation created the Spanning Tree Protocol (STP), which has been standardized as the 802.1d specification by the Institute of Electrical and Electronic Engineers (IEEE). Essentially, a spanning tree uses the spanning tree algorithm (STA), which senses that the switch has more than one way to communicate with a node, determines which way is best and blocks out the other path(s). The cool thing is that it keeps track of the other path(s), just in case the primary path is unavailable.
Bandwidth STP Cost Value 4 Mbps 250 10 Mbps 100 16 Mbps 62 45 Mbps 39 100 Mbps 19 155 Mbps 14 622 Mbps 6 1 Gbps 4 10 Gbps 2
While most switches operate at the Data layer (Layer 2) of the OSI Reference Model, some incorporate features of a router, and operate at the Network layer (Layer 3) as well. In fact, a Layer 3 switch is incredibly similar to a router.
Like routers, Layer 3 switches actually work at the Network layer.
As networks have grown in size and complexity, many companies have turned to Virtual Local Area Networks (VLANs) to provide some way of structuring this growth logically. Basically, a VLAN is a collection of nodes that are grouped together in a single broadcast domain that is based on something other than physical location. You learned about broadcasts earlier, and how a router does not pass along broadcasts. A broadcast domain is a network (or portion of a network) that will receive a broadcast packet from any node located within that network. In a typical network, everything on the same side of the router is all part of the same broadcast domain. A switch that you have implemented VLANs on has multiple broadcast domains, similar to a router. But you still need a router to route from one VLAN to another; the switch can't do this by itself.
Search in uioop.blogspot.com
Labels
- Adobe CS4 (1)
- Affiliate Program (1)
- Android (7)
- Android Emulator (1)
- ASUS (1)
- browser (1)
- BT (1)
- Cloud Free Trial (1)
- Cyber Cafe (1)
- dual boot (1)
- Email (1)
- EXCEL (6)
- forex broker (1)
- free vpn (1)
- Gaming (1)
- GRUB (1)
- Hardware (4)
- IE (3)
- Inkscape (1)
- IP Camera (1)
- kaspersky (2)
- Linux (31)
- Lotus Notes (6)
- MacOS (9)
- MSSQL (2)
- MT4 (1)
- network (2)
- online torrent client (1)
- open source (1)
- OpenOffice (1)
- Oracle (1)
- PSU (1)
- regedit (10)
- remote desktop (1)
- RunDLL32 (1)
- SAMSUNG (1)
- Screen Recording (1)
- Server 2008 (6)
- Teardown (1)
- torrent (2)
- torrent client (2)
- Ubuntu (3)
- USB (1)
- virus (2)
- vista (7)
- Website (1)
- windows (1)
- windows 7 (10)
- Windows PE (1)
- WINPE 3.0 (1)
- xp (25)
- xp CMD (2)
- 注册表 (7)
- 線上教學 (1)
Blog Archive
-
▼
2007
(213)
-
▼
October
(25)
- Windows XP注册表大盘点(三)
- Windows XP注册表大盘点(二)
- Windows XP注册表大盘点(一)
- 一盘在手杀毒无忧 DIY超完美杀毒闪盘
- XP几条实用的知识和技巧
- Win XP 键盘快捷键
- XP 运行菜单中的“快捷方式”
- 注册表禁用技巧
- How To Change the Windows XP Product Key Code
- 电脑F1——F12键的功能
- XP keyboard HOT Keys
- How LAN Switches Work
- Trend Micro HijackThis 2.0.2
- 磁盘分区右键第一项为AUTO的解决办法(在已经不存在autorun.inf的条件下)
- wsctf.exe和EXPLORER.EXE的查杀
- ITE CE Projector
- 解析U盘病毒、Autorun.inf文件和RavMonE.exe病毒
- Cannot run two device installations
- Limit.EXE
- 清除autorun.inf
- Turn Off AutoPlay in Group Policy
- NUSRMGR.cpl
- Make Your Thumb Drive Bootable
- 用Ghost实现网络硬盘克隆
- BOOTP远程启动大全
-
▼
October
(25)
Sunday, October 28, 2007
How LAN Switches Work
http://www.verizon.com/learningcenter
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment