Rabu, 31 Agustus 2016

Configure a Switch - LAN Switching and Wireless


LAN SWITCHING AND WIRELESS – CHAPTER 2

MODIFIED BY TONY CHEN

 

OBJECTIVES
·         Summarize the operation of Ethernet as defined for 100/1000 Mbps LANs in the IEEE 802.3 standard.
·         Explain the functions that enable a switch to forward Ethernet frames in a LAN.
·         Configure a switch for operation in a network designed to support voice, video, and data transmissions.
·         Configure basic security on a switch that will operate in a network designed to support voice, video, and data transmissions.


key elements of Ethernet/802.3 networks
  •  CSMA/CD
·         Ethernet signals are transmitted to every host connected to the LAN using a special set of rules to determine which station can access the network.
·         The set of rules that Ethernet uses is based on the IEEE carrier sense multiple access/collision detect (CSMA/CD) technology.
·         Note: CSMA/CD is only used with half-duplex communication typically found in hubs. Full-duplex switches do not use CSMA/CD.

  • Carrier Sense
        In CSMA/CD, all devices that have messages to send must listen before transmitting.
         If a device detects a signal from another device, it waits before attempting to transmit.
         When there is no traffic detected, a device transmits its message.
         While this transmission is occurring, the device continues to listen for traffic on the LAN.
         After the message is sent, the device returns to its default listening mode. 

  • Multi-access
        If the signals of one device are not detected by a second device, the second device may also start to transmit.
         The media now has two devices transmitting signals at the same time.
         The messages propagate across the media until they encounter each other.
         At that point, the signals mix and the messages are destroyed, a collision.
         Although the messages are corrupted, the remaining signals continues to propagate across the media.

  • Collision Detection
        When a device is in listening mode, it can detect when a collision occurs on the media,
         because devices can detect an increase in amplitude of the signal above the normal level.

  • Jam Signal and Random Backoff
        When collision is detected, the transmitting devices send out a jamming signal.
        The jamming signal notifies the other devices of a collision, so that they invoke a backoff algorithm.
         This backoff algorithm causes all devices to stop transmitting for a random amount of time, which allows the collision signals to subside.
         A random backoff period ensures that the devices in the collision do not try to send traffic again at the same time, which would cause the whole process to repeat.
         During the backoff period, a third device may transmit before either of the two involved in the collision have a chance to re-transmit. 

  • Communications in a switched LAN network occur in three ways
        Unicast:
         In unicast transmission, there is just one sender and one receiver.
         Unicast transmission is the predominant form of transmission on LANs and within the Internet.
         Examples of unicast transmissions include HTTP, SMTP, FTP, and Telnet.
        Broadcast:
         In this case, there is just one sender, but the information is sent to all connected receivers.
         Broadcast transmission is essential when sending the same message to all devices on the LAN.
         An example of a broadcast transmission is the ARP sends to all computers on a LAN.
        Multicast:
         Communication in which a frame is sent to a specific group of devices or clients.
         Multicast transmission clients must be members of a logical multicast group to receive the information.
         An example of multicast transmission is the video and voice transmissions associated with a network-based, collaborative business meeting.

Ethernet Frame
·         Ethernet Frame
        The Ethernet frame structure adds headers and trailers around the Layer 3 PDU to encapsulate the message.
·         Preamble and Start Frame (7 bytes) Delimiter Fields (1 byte)
        The Preamble and SFD fields are used for synchronization and to get the attention of the receiving nodes.
·         Destination MAC Address Field (6 bytes)
        The address in the frame is compared to the MAC address in the device. If there is a match, the device accepts the frame.
·         Source MAC Address Field (6 bytes)
        It identifies the originating NIC or interface. Switches use this address to add to their lookup tables.
·         Length/Type Field (2 bytes)
        It defines the exact length of the frame's data field. This field is used later as part of the Frame Check Sequence (FCS) to ensure that the message was received properly.
·         Data and Pad Fields (46 to 1500 bytes)
        It contain the encapsulated data from a higher layer, which is a generic Layer 3 PDU. All frames must be at least 64 bytes long (minimum length aides the detection of collisions). If a small packet is encapsulated, the Pad field is used to increase the size of the frame to the minimum size.
·         Frame Check Sequence Field (4 bytes)
        It detects errors in a frame. The receiving device receives the frame and generates a CRC to look for errors. If the calculations do not match, the frame is dropped.

Ethernet auto-negotiation
·         Each Ethernet frame (or packet) starts out with a sequence of bits that alternate between 1 and 0 that looks like this: 1010101010101010.... Each value (1 or 0) is represented by a specific state change, so when these bits are transmitted, the electrical signal on the Ethernet media transitions from "high" to "low" and back at the same speed the bits are being transmitted.
·         To determine the speed, the interface needs to measure only the time between the transitions.
o   If an interface is not capable of doing a higher speed, the bit pattern will look like signal noise, just like human speech played at ten times the normal speed sounds like noise.
o   If each interface starts at its highest speed and works down, it can sync to the first speed it understands from the other side.
·         This passive system allows the interfaces to determine a common speed very quickly with a great deal of reliability. It is also worth pointing out that the contents and format of the data that is sent is irrelevant, just the fact that the data is sent.
·         The only way to detect, or attempt to guess, if the other side of a link can do full-duplex or not is to start transmitting something as soon as you start to receive a signal from the other end.The other side will start to receive your transmission before finishing up their own.
o   If the other side is happy with this, it must be in full-duplex mode.
o   If the other side thinks a collision has taken place, you know the other interface is in half-duplex mode.
·         Due to the problems with the older auto-sensing schemes (and the less than perfect ability of auto-negotiation to get things correct), many people have gotten in the habit of "forcing" an interface into a specific mode.
·         In general, it is standard practice here at the University of Illinois U-C campus to hand configure all switch uplink interfaces and router interfaces to a specific mode of operation, and not rely on any of the auto-negotiating or auto-sensing systems. 

Ethernet errors
·         When transmitting smaller data packets, a Pad field must be added to bring the total size of the Ethernet packet up to at least 64 bytes. 

MAC Address
·         MAC Address
        An Ethernet MAC address is a two-part 48-bit binary value expressed as 12 hexadecimal digits.
         The address formats be similar to 00-05-9A-3C-78-00
        All devices connected to an Ethernet LAN have MAC-addressed interfaces.
        The NIC uses the MAC address to determine if a message should be passed to the upper layers.
         The MAC address is permanently encoded into a ROM chip on a NIC. This type of MAC address is referred to as a burned in address (BIA).
        Some vendors allow local modification of the MAC address.

·         The MAC address is made up of the organizational unique identifier (OUI) and the vendor assignment number.
        Organizational Unique Identifier
         The OUI is the first part of a MAC address. It is 24 bits long and identifies the manufacturer of the NIC card. The IEEE regulates the assignment of OUI numbers. Within the OUI, there are 2 bits that have meaning only when used in the destination address, as follows:
        Broadcast or multicast bit: Indicates to the receiving interface that the frame is destined for all or a group of end stations on the LAN segment.
        Locally administered address bit: If the vendor-assigned MAC address can be modified locally, this bit should be set.
        Vendor Assignment Number
         The vendor-assigned part of the MAC address is 24 bits long and uniquely identifies the Ethernet hardware. It can be a BIA or modified by software indicated by the local bit.

MAC Address: I/G bit and U/L bit
·         The first 2 bits of a MAC address are used as I/G bit and U/L bit.
·         I/G bit and U/L bit
·         The first two bits of a destination address convey certain information:
        I/G = 0
         Individual address: the destination is a singe node.
        I/G = 1
         Group address: the destination is a group of LAN nodes (multicast or broadcast address).
        U/L = 0
         Universally administered address: the adapter uses its burned-in MAC address.
        U/L = 1
         Locally administered address: the adapter uses a logical address (assigned by network administrator). U/L=1 may result in a hex code of 0x02 in the first byte. The U/L bit is always set when a logical address is assigned (even if the assigned address doesn't follow this convention). Therefore, it is impossible to imitate a burned-in address; but other logical address may be imitated at any time.
·         Source addresses don't use the I/G bit (because multiple stations cannot be the source of a single frame). The first bit of a source address doesn't have any special meaning in Ethernet LANs; in Token-Ring LANs, it is used as RII bit (RII = routing information indicator). The RII bit indicates that source routing information will follow the source address. 

IEEE 802 & EUI-64 Address
·         IEEE EUI-64 addresses
        The IEEE EUI-64 address represents a new standard for network interface addressing. The company ID is still 24-bits in length, but the extension ID is 40 bits, creating a much larger address space for a network adapter manufacturer. The EUI-64 address uses the U/L and I/G bits in the same way as the IEEE 802 address.
·         Mapping IEEE 802 addresses to EUI-64 addresses
·         Mapping EUI-64 addresses to IPv6 interface identifiers 

Duplex Settings
·         There are 2 types of duplex settings used on an Ethernet:
·         Half Duplex:
        Half-duplex relies on unidirectional data flow where sending and receiving data are not performed at the same time.
         This is similar to how walkie-talkies function in that only one person can talk at any one time.
         efficiency is typically at 50 to 60 percent of the 10-Mb/s bandwidth
        Half-duplex uses CSMA/CD to help reduce the collisions.
        Half-duplex are typically in older hardware, such as hubs.
         Nodes that are attached to hubs that share their connection to a switch port must operate in half-duplex mode.
        Nodes can operate in a half-duplex mode if the NIC card cannot be configured for full duplex operations.
         In this case the port on the switch defaults to a half-duplex as well.
·         Full Duplex:
        In full-duplex communication, data flow is bidirectional, so data can be sent and received at the same time.
         Most Ethernet, Fast Ethernet, and Gigabit Ethernet NICs sold today offer full-duplex capability.
        In full-duplex mode, the collision detect circuit is disabled.
         Frames sent by the two connected end nodes cannot collide because the end nodes use two separate circuits in the cable.
        Each full-duplex connection uses only one port.
         Full-duplex connections require a switch that supports full duplex or a direct connection between two nodes that each support full duplex. 

Switch Port Settings
·         A port on a switch needs to be configured with duplex settings that match the media type.
·         The Cisco Catalyst switches have three settings
        The auto option sets autonegotiation of duplex mode. With autonegotiation enabled, the two ports communicate to decide the best mode of operation
        The full option sets full-duplex mode.
        The half option sets half-duplex mode.
·         For Fast Ethernet and 10/100/1000 ports, the default is auto.
·         For 100BASE-FX ports, the default is full.
·         The 10/100/1000 ports operate in either half- or full-duplex mode when they are set to 10 or 100 Mb/s, but when set to 1,000 Mb/s, they operate only in full-duplex mode
·         Note: Autonegotiation can produce unpredictable results.
        By default, when autonegotiation fails, the Catalyst switch sets the corresponding switch port to half-duplex mode.
         This type of failure happens when an attached device does not support autonegotiation.
        If the device is manually configured having half-duplex on one end and full-duplex on the other causes late collision errors at the half-duplex end.
         To avoid this situation, manually set the duplex parameters of the switch to match the attached device. 

Switch Port Settings: auto-MDIX
·         auto-MDIX
        You used to be required to use certain cable types (cross-over, straight-through) when connecting between specific devices, switch-to-switch or switch-to-router.
        Instead, you can now use the mdix auto interface configuration command in the CLI to enable the automatic medium-dependent interface crossover (auto-MDIX) feature
         When the auto-MDIX feature is enabled, the switch detects the required cable type for copper Ethernet connections and configures the interfaces accordingly.
         Therefore, you can use either a crossover or a straight-through cable for connections to a copper 10/100/1000 port on the switch, regardless of the type of device on the other end of the connection.
        The auto-MDIX feature is enabled by default on switches running Cisco IOS Release 12.2(18)SE or later. For releases between Cisco IOS Release 12.1(14)EA1 and 12.2(18)SE, the auto-MDIX feature is disabled by default. 

MAC Address Tables
·         MAC Addressing and Switch MAC Address Tables
        Switches use MAC addresses to direct network communications to the appropriate port toward the destination node.
·         For a switch to know which port to use to transmit a unicast frame, it must first learn which nodes exist on each of its ports.
·         A switch determines how to handle incoming data frames by using its MAC address table.
·         A switch builds its MAC address table by recording the MAC addresses of the nodes connected to each of its ports.
·         Once a MAC address for a specific node on a specific port is recorded in the address table, the switch then knows to send traffic destined for that specific node out the port.
·         When an incoming data frame is received by a switch and the destination MAC address is not in the table, the switch forwards the frame out all ports, except for the port on which it was received.
·         When the destination node responds, the switch records the node's MAC address in the address table from the frame's source address field.
·         In networks with multiple interconnected switches, the MAC address tables record multiple MAC addresses for the ports connecting the switches which reflect the node's beyond.
Typically, switch ports used to interconnect two switches have multiple MAC addresses recorded in the MAC address table.

MAC Addressing and Switch MAC Address Tables
·         Step 1. The switch receives a broadcast frame from PC 1 on Port 1.
·         Step 2. The switch enters the source MAC address and the switch port that received the frame into the address table.
·         Step 3. Because the destination address is a broadcast, the switch floods the frame to all ports, except the port on which it received the frame.
·         Step 4. The destination device replies to the broadcast with a unicast frame addressed to PC 1.
·         Step 5. The switch enters the source MAC address of PC 2 and the port number of the switch port that received the frame into the address table. The destination address of the frame and its associated port is found in the MAC address table.
·         Step 6. The switch can now forward frames between source and destination devices without flooding.

Bandwidth and Throuhgput
·         A major disadvantage of Ethernet is collisions.
        Collisions occur when two hosts transmit frames simultaneously.
        When a collision occurs, the transmitted frames are corrupted or destroyed.
        The sending hosts stop sending further transmissions for a random period, based on the Ethernet 802.3 rules of CSMA/CD
·         It is important to understand that when stating the bandwidth of the Ethernet network is 10 Mb/s, full bandwidth for transmission is available only after any collisions have been resolved.
        A hub offers no mechanisms to either eliminate or reduce collisions and the available bandwidth that any one node has to transmit is correspondingly reduced.
        As a result, the number of nodes sharing the Ethernet network will have effect on the throughput

Collision Domains
·         To reduce the number of nodes on a given network segment, you can create separate physical network segments, called collision domains
        The network area where frames originate and collide is called the collision domain.
        All shared media environments, such as those created by using hubs, are collision domains.
        When a host is connected to a switch port, the switch creates a dedicated connection. This connection is an individual collision domain.
·         When 2 connected hosts want to communicate with each other, the switch to establish connection between these 2 ports. The switch creates the connection that is referred to as a microsegment.
        The circuit is maintained until the session is terminated.
        The microsegment behaves as if the network has only two hosts, one host sending and one receiving, providing maximum available bandwidth

Broadcast Domains
·         Although switches filter frames based on MAC addresses, they do not filter broadcast frames.
        A broadcast frames must be forwarded by switches.
         A collection of interconnected switches forms a single broadcast domain.
        Only a Layer 3 entity, such as a router, or a virtual LAN (VLAN), can stop a Layer 2 broadcast domain.
        Routers and VLANs are used to segment both collision and broadcast domains.
·         When a device wants to send out a Layer 2 broadcast, the destination MAC address in the frame is set to all ones.
        All the devices accept and process the broadcasted frame.
        The broadcast domain at Layer 2 is referred to as the MAC broadcast domain. 

Network Latency
·         Latency is the time a frame or a packet takes to travel from the source to the final destination.
        Users of network-based applications experience latency when they have to wait many minutes to access data stored in a data center.
·         Latency has at least 3 sources.
        First, the time it takes the source NIC to place voltage pulses on the wire, and the time it takes the destination NIC to interpret these pulses.
         This is sometimes called NIC delay, typically around 1 microsecond for a 10BASE-T NIC.
        Second, the actual propagation delay as the signal takes time to travel through the cable.
         Longer cable and slower nominal velocity of propagation (NVP) result in more propagation delay.
        Third, latency is added based on network devices that are in the path between two devices.
         These are either Layer 1, Layer 2, or Layer 3 devices. 

Network Congestion
·         The primary reason for segmenting a LAN into smaller parts is to isolate traffic and to achieve better use of bandwidth per user.
        Without segmentation, a LAN quickly becomes clogged with traffic and collisions.
·         The most common causes of network congestion:
        Increasingly powerful computer and network technologies.
         Today, CPUs, buses, and peripherals are much faster and more powerful than those used in early LANs, therefore they can send more data at higher rates through the network, and they can process more data at higher rates.
        Increasing volume of network traffic.
         Network traffic is now more common because remote resources are necessary to carry out basic work.
        High-bandwidth applications.
         Software applications are becoming richer in their functionality and are requiring more and more bandwidth. Desktop publishing, engineering design, video on demand (VoD), electronic learning (e-learning), and streaming video all require considerable processing power and speed.

LAN Segmentation
·         LANs are segmented into a number of smaller collision and broadcast domains using routers and switches.
·         Bridges and Switches
        Bridges and switches share many attributes, several distinctions differentiate these technologies.
         Bridges are generally used to segment a LAN into a couple of smaller segments.
         Switches are generally used to segment a large LAN into many smaller segments.
         Bridges have only a few ports for LAN connectivity
         Switches have many ports.
·         Routers
        Because routers do not forward broadcast traffic by default, they can be used to create broadcast domains.
         Each router interface connects to a separate network, containing broadcast traffic within the LAN segment in which it originated.

LAN Design Consideration
·         Controlling Network Latency
        SWITCHES can introduce latency on a network when oversubscribed on a busy network.
         For example, if a core level switch has to support 48 ports, each one capable of running at 1000 Mb/s full duplex, the switch should support around 96 Gb/s internal throughput if it is to maintain full wirespeed across all ports simultaneously.
        The use of ROUTERS increase latency on a network.
         When a Layer 3 device, such as a router, needs to examine the Layer 3 addressing information contained within the frame, it must read further into the frame than a Layer 2 device, which creates a longer processing time.
         However, appropriate use of Layer 3 devices helps prevent contention from broadcast traffic in a large broadcast domain.

LAN Design Consideration
·         Removing Bottlenecks
        Bottlenecks on a network are places where high network congestion results in slow performance.
         In this figure which shows six computers and a single server are connected to the same switch.
        Each workstation and the server are all connected using a 100 Mb/s NIC.
        If each connection was used at full capacity, each computer would be able to use only 16.7 Mb/s, one-sixth of the 100 Mb/s bandwidth.
         To reduce the bottleneck to the server, additional network cards can be installed, which increases the total bandwidth the server is capable of receiving.
        Higher capacity links (for example, upgrading from 100 Mb/s to 1000 Mb/s connections) and using multiple links leveraging link aggregation technologies (for example, combining two links as if they were one to double a connection's capacity) can help to reduce the bottlenecks created by inter-switch links and router links.


0 komentar:

Posting Komentar