Monday, 27 March 2017

LAB - Identifying MAC and IP Address

Objectives of the lab




  • Gather PDU Information




  • Reflection Questions




Background


This lab is prepared for viewing PDUs. The devices are already configured. You will get PDU information using simulation mode and answer questions about the data you collect.


Gather PDU Information


Gather PDU information as a packet travels from 192.168.10.2 to 192.168.20.2


Click 172.16.31.2 > click desktop and open the Command Prompt.


Enter the ping 192.168.20.2 command in command prompt.


Switch to simulation mode you will see a PDU appears next to192.168.10.2.


Click the PDU and note the following information from the Outbound PDU Layer tab:


Destination MAC Address: 0060.47AD.C801


Source MAC Address: 000A.41E7.AD04


Source IP Address: 192.168.10.2


Destination IP Address: 192.168.20.2



Download topology here


 At Device: Computer Click Capture / Forward to move the PDU to the next device. Gather the same information from Step just like step gather at 192.168.20.2. Repeat this method until the PDU reaches to its target. Maintain a record of the PDU information in a table.


pdu information


Repeat this procedure for all of the following:



  1. Ping 192.168.20.3 from 192.168.10.3

  2. 2.Ping 192.168.20.4 from 192.168.10.4

  3. Ping 192.168.20.4 from 192.168.10.3

  4. Ping 192.168.10.4 from 192.168.20.3


 Answer the following questions regarding the captured data:



  1. Did the Hub lose any of the information given to it?

  2. What does the Hub do with MAC addresses and IP addresses?

  3. Did the wireless Access Point do anything with the information given to it?

  4. Was any MAC or IP address lost during the wireless transfer?

  5. What was the highest OSI layer that the Hub and Access Point used?

  6. Did the Hub or Access Point ever replicate a PDU that was rejected with a red “X”?

  7. When examining the PDU Details tab, which MAC address appeared first, the source or the destination?

Thursday, 23 March 2017

Identifying MAC and IP Addresses

IP addresses are used to see the address of the original source and the final destination of the packet. The destination IP address may be on the same IP network as the source or may be on a remote network.


Destination on the Same Network


There are two types of addresses assigned to a device on an Ethernet LAN:



  • Physical address– Physical address also called the MAC address which is Used for Ethernet NIC to Ethernet NIC communications on the same network.

  • Logical address– Logical Address((the IP address)which is used to send the packet from the original source to the final destination.


We earlier learned that physical addresses are working in layer 2 of the OSI Model. These addresses have a different purpose. For example, these addresses are used to transport the data link frame with the encapsulated IP packet from one NIC to another NIC on the same network. If the destination IP address is on the same network, the destination MAC address will be that of the destination device.


Figure 4.7 shows the Ethernet MAC addresses and IP address for Host-A sending an IP packet to Host-C on the same network.


source and destination


The Address for Layer 2 Ethernet frame:



  • Destination MAC address– This is the MAC address of Host-C Ethernet NIC.

  • Source MAC address– This is the MAC address of Host-A’s Ethernet NIC.


The Address for Layer 3 IP packet:



  • Source IP address–This is the IP address of the source

  • Dest IP address- This the IP address for the final destination of the packet

Auto-MDIX

In Ethernet networking, Twisted Pair that used a port must be connected accordingly that the Transmit pair on one end is connected to the Receive pair on the other end, and vice versa. For the correct duplex setting; it is important to have the correct cable type defined for each port. Connections between particular devices, for example; switch-to-switch, switch-to-host, switch-to-router, router-to-router devices and router-to-host; required the use of exact cable types (crossover or straight-through).


What is Auto-MDIX.?


Auto-MDIX is a function that every port on the switch will automatically detect the Ethernet cable type being used (straight-through or crossover) and adjust to make a link over that cable. Most switch devices now support the MDIX auto interface configuration command in the CLI to enable the automatic medium-dependent interface crossover (auto-MDIX) feature.


When this feature is enabled; the switch automatically detects the type of cable attached to the port and configures the interfaces accordingly. so, if this function is enabled we can use either a crossover or a straight-through cable for connections to a copper 10/100/1000 port on the switch, anyway of the type of device on the other end of the connection.Most of the new switches by default enable the auto-MDIX feature.

Wednesday, 22 March 2017

Duplex and Speed Settings on Switch

Duplex and Speed settings are the most basic settings for each port of a switch. It is possible that the duplex and bandwidth settings between the switch port and the connected devices no match, just like a computer or another switch. There are two types of duplex settings used for communications on an Ethernet network. Full-duplex and Half-duplex, that we already discuss an earlier chapter.




  • Full-duplex


    Both ends of the connection can send and receive simultaneously.




  • Half-duplex


    Only one end of the connection can send at a time.




Auto-negotiation


Most Ethernet Switches has a function called auto-negotiation. This function is also available in NICs. Auto-negotiation makes possible two devices to automatically exchange information about duplex and speed settings. This function help switch and connected device to choose highest performance mode. If both devices have a capability full-duplex it will set both devices on full-duplex along with their highest common bandwidth.


See Figure 4.5, where PC-1 is connected to switch port-1. Both Ethernet NIC  and port can operate in full-duplex or half-duplex, so auto-negotiation set both sides on full-duplex.


The speed of switch is 10/100/1000 Mb/s and PC-1 Speed is 10/100 Mb/s so 100 is the highest common speed for both switch and PC-1, therefore, auto-negotiation set speed for 100 Mb/s for both. Most Cisco switches and Ethernet NICs default to auto-negotiation for speed and duplex. Gigabit Ethernet ports only operate in full-duplex.


duplex and speed settings


Duplex Mismatch


A duplex mismatch occurs when the two communicating Ethernet devices connected with duplex settings that are not the same, either because of manual settings or the auto-negotiation process. Duplex Mismatch down the performance of devices.


Why duplex-mismatch occur?


An example of a duplex mismatch is if one port on the link operates at half-duplex while the other port operates at full-duplex, as shown in Figure 4.6. Duplex mismatches occur when either the Ethernet device or the Ethernet switch is hard-coded to full-duplex and the other side is configured for auto-negotiation. This happens because the switch, when not given any auto-negotiation information, will default to half duplex. This occurs when one or both ports on a link are reset, and the auto-negotiation process does not result in both link partners having the same configuration.


It also can occur when users reconfigure one side of a link and forget to reconfigure the other. Both sides of a link should have auto-negotiation on, or both sides should have it off.


duplex mismatch

Tuesday, 21 March 2017

Memory Buffering on Switches

An Ethernet switch uses a buffering technique to store frames before forwarding to the destination. Buffering can also be used when the destination port is busy due to congestion. During congestion at the port, the switch stores the frame until it can be transmitted. The area of memory where the switch stores the data is called the memory buffer. There are two methods of memory buffering:-



  • Port-based memory buffering

  • Shared memory.


Port-based Memory Buffering


In port-based memory buffering, frames are stored in queues that are linked to specific incoming ports. Switches utilizing port buffered memory in this type of buffering. In port buffering switch provide each Ethernet port with a certain amount of high-speed memory to buffer frames until transmitted.  A disadvantage of port buffered memory is the dropping of frames when a port runs out of buffers. It is also possible for a single frame to delay the transmission of all the frames in memory because of a busy destination port. This delay occurs even if the other frames could be transmitted to open destination ports.


Shared Memory Buffering


Some of the earliest Cisco switches use a shared memory design for port buffering. Shared memory buffering deposits all frames into a common memory buffer that all the ports on the switch share. The amount of buffer memory required by a port is dynamically allocated. The frames in the buffer are dynamically connected to the destination port. This allows the packet to be received on one port and then transmitted on another port, without moving it to a different queue.

Monday, 20 March 2017

Frame Forwarding Methods on Cisco Switches








Cisco switches support different Switching(frame forwarding) Methods. Switching Methods are determined how a switch receives, processes, and forwards a Layer 2 Ethernet frame. Important Switching methods are following:-




  • Store-and-forward switching

  • Cut-through switching


Store-and-forward switching


In Store and Forward switching, Switch copies each complete incoming Ethernet frame into the switch memory. During the storage process, the switch analyzes the frame for information about its destination. Switch also computes trailer for  Cyclic Redundancy Check (CRC) for errors. If a Cyclic Redundancy Check (CRC) error is found. Then Ethernet frame is dropped and if there is no Cyclic Redundancy Check (CRC) error, the switch forwards the Ethernet frame to the destination device.


Store and Forward switching can cause a delay in switching since Cyclic Redundancy Check (CRC) is calculated for each Ethernet frame. CRC uses a mathematical formula, based on the number of bits (1s) in the frame, to determine whether the received frame has an error. After confirming the reliability of the frame, the frame is forwarded out to the right port, toward its destination. Discarding frames with errors reduces the amount of bandwidth consumed by corrupt data. Store-and-forward switching is required for Quality of Service (QoS)


Cut-Through Switching


In cut-through switching, the switch copies into its memory only the destination MAC address the frame before making a switching decision, to which port to forward the data. The destination MAC address is located in the first 6 bytes of the frame following the preamble. The switch looks up the destination MAC address in its switching table, determines the outgoing interface port, and forwards the frame onto its destination through the designated switch port. The switch does not perform any error checking on the frame. switch operating in cut-through switching mode reduces delay because the switch starts to forward the Ethernet frame as soon as it reads the destination MAC address. Problem-related with cut-through switching is that the switch may forward bad frames. Cut-through switching is the predominant switching method used on Cisco switches. There are two variants of cut-through switching:


Fast-forward switching


Fast-forward switching gives the lowest level of latency because switch immediately forwards a packet after reading the destination address. for the reason that fast-forward switching starts forwarding before the entire packet has been received, there may be times when packets are relayed with errors. This occurs infrequently, and the destination network adapter discards the faulty packet upon receipt. In fast-forward mode, latency is measured from the first bit received to the first bit transmitted. Fast-forward switching is the typical cut-through method of switching.


Fragment-free switching


Fragment-free switching is an advanced form of cut-through switching. The switches operating in cut-through switching read only up to the destination MAC address field in the Ethernet frame before making a switching decision. The switches operating in fragment-free switching read and store at least 64 bytes of the Ethernet frame before switching it to avoid forwarding Ethernet runt frames (Ethernet frames smaller than 64 bytes).  Fragment-free switching can be viewed as a compromise between store-and-forward switching and fast-forward switching. The reason fragment-free switching stores only the first 64 bytes of the frame is that most network errors and collisions occur during the first 64 bytes.Fragment-free switching tries to improve fast-forward switching by performing a small error check on the first 64 bytes of the frame.  Fragment-free switching is a compromise between the high latency and high integrity of store-and-forward switching; and the low latency and reduced integrity of fast-forward switching.


Some switches are configured to perform cut-through switching on a per-port basis until a user-defined error threshold is reached; and then they automatically change to store-and-forward. When the error rate falls below the threshold, the port automatically changes back to cut-through switching.


network switch frame forwarding

Sunday, 19 March 2017

Switch Fundamentals - Learning MAC Address

An Ethernet switch is a Layer 2 (data link layer) device, therefore switch uses MAC addresses to make forwarding decisions. It is completely unaware of the protocol being carried in the data portion of the frame, such as an IPv4 packet. The switch makes its forwarding decisions based only on the Layer 2 Ethernet MAC addresses.


Not like an Ethernet hub that repeats bits out all ports except the incoming port, an Ethernet switch consults a MAC address table to make a forwarding decision for each frame. The MAC address table is sometimes referred to as a content addressable memory (CAM) table.


Learning MAC Address Table


The switch automatically builds the MAC address table by examining the source MAC address of the frames received on any port. The switch forwards frames by searching for a match between the destination MAC address in the frame and an entry in the MAC address table. The following process is performed on each Ethernet frame that enters a switch.


Learning the Source and destination MAC Addresses


Every frame that enters a switch it any port is checked for new information to learn. It does this by examining the frame’s source MAC address and port number where the frame entered the switch.


If the source MAC address does not exist, it is added to the table along with the incoming port number. See table in the movie, PC-1 is sending an Ethernet frame to PC-6. The switch adds the MAC address for PC-1 to the table against port-1. If the destination MAC address is on the table, it will forward the frame out the specified port. As you can see in the table there is no mac address entry so the switch will flood the packet to all ports except incoming port. All other will discard the packet and PC-6 will reply. When PC-6 Reply switch will add mac address of PC 6 which is on port-6.By this method, the switch will add all mac addresses against each port. If the destination MAC address is a broadcast or a multicast, the frame is also flooded out all ports except the incoming port.


If the source MAC address does exist, the switch updates the refresh timer for that entry. By default, most Ethernet switches keep an entry in the table for 5 minutes. If the source MAC address does exist in the table but on a different port, the switch treats this as a new entry. The entry is replaced using the same MAC address but with the more current port number.