Your SlideShare is downloading. ×
  • Like
  • Save
Switching and Routing for Dummies - Ethernet Switching
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Switching and Routing for Dummies - Ethernet Switching

  • 293 views
Published

Download a PDF file: http://www.netmanias.com/en/?m=view&id=blog&no=6330 …

Download a PDF file: http://www.netmanias.com/en/?m=view&id=blog&no=6330
You can also find and download more materials from http://www.netmanias.com

Published in Technology , News & Politics
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
293
On SlideShare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
0
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. 1 NETMANIAS TECH-BLOG Please visit www.netmanias.com to view more posts Switching and Routing for Dummies - Part 1. Ethernet Switching April 28, 2014 | By Chris Yoo (tech@netmanias.com) In this and next posts, we will learn about L2 (Ethernet) switching and L3 (IP) routing. This post will cover:  ARP and IP packet  changes in Ethernet header during switching/routing process  entry changes in the tables for device, switch and router (i.e. routing, ARP and MAC tables) Switching and Routing Please take a close look at the figure above, especially server/router MAC address, IP address, and switch/router port (interface) numbers in it, as it illustrates the configuration of a network to be discussed here and in the next post. As seen in the left side of the figure above, if both Sender (e.g. SVR1 in the figure) and Receiver (e.g. SVR2) are located in the same network (LAN), the two communicate with each other directly through the switch between them (e.g. S1) without having to go through the router (e.g. R1). At this time, each packet consists of the following fields: IP: 1.1.1.1/24 MAC: a1 Router 1 (R1) Switch 2 (S2) Internet IP: 2.1.1.1/24 MAC: a2 ge1/1 ge2/1 SVR3 SVR4 IP: 1.1.1.10 MAC: m1 IP: 1.1.1.20 MAC: m2 IP: 2.1.1.30 MAC: m3 IP: 2.1.1.40 MAC: m4 SVR1 SVR2 IP: 1.1.1.1/24 MAC: a1 Router 1 (R1) Internet IP: 2.1.1.1/24 MAC: a2 ge1/1 ge2/1 SVR3 SVR4 IP: 1.1.1.10 MAC: m1 IP: 1.1.1.20 MAC: m2 IP: 2.1.1.30 MAC: m3 IP: 2.1.1.40 MAC: m4 SVR1 SVR2 Ethernet(L2) Switching IP(L3) Routing fe1 fe2 fe1 fe2 fe1 fe2 fe1 fe2 fe3 fe3 Switch 1 (S1) fe3 fe3 a1 m1 2.1.1.30 1.1.1.10 IPDestination IPSource MACSource MACDestination m3 a2 2.1.1.30 1.1.1.10 IPDestination IPSource MACSource MACDestination m2 m1 1.1.1.20 1.1.1.10 IPDestination IPSource MACSource MACDestination 1 2 4 3 1 2 1 2 1 2 3 4 Switch 2 (S2) Switch 1 (S1) Ethernet Header IP Header lan1 lan1 lan1 lan1 lan1 lan1 lan1 lan1
  • 2. Netmanias Tech-Blog: Fronthaul Size: Calculation of maximum distance between RRH and BBU 2 Header Fields Ethernet Header * Destination MAC = m2, the MAC address of Receiver (SVR2) * Source MAC = m1, the MAC address of Sender (SVR1) IP Header * Destination IP = 1.1.1.20, the IP address of Receiver (SVR2) * Source IP = 1.1.1.10, the IP address of Sender (SVR1) On the other hand, if the two are not located in the same network (LAN), they communicate through the router (R1). In this case, Ethernet header fields have different values on this and the other side of the router. Sending packets from SVR1 to R1 Header Fields Ethernet Header * Destination MAC = a1, the MAC address of Router (R1 ge1/1) * Source MAC = m1, the MAC address of Sender (SVR1) IP Header * Destination IP = 2.1.1.30, the IP address of Receiver (SVR3) * Source IP = 1.1.1.10, the IP address of Sender (SVR1) Sending packets from R1 to SVR3 Header Fields Ethernet Header * Destination MAC = m3, the MAC address of Receiver (SVR3) * Source MAC = a2, the MAC address of Router (R1 ge2/1) IP Header * Destination IP = 2.1.1.30, the IP address of Receiver (SVR3) * Source IP = 1.1.1.10, the IP address of Sender (SVR1) Ethernet Switching 1. SVR1 sends ARP Request  SVR1 at IP address of 1.1.1.10 is trying to send a packet to SVR2 at IP address of 1.1.1.20.  To send a packet, a server (or router) must refer to the routing table first. Through routing table lookup, the server (e.g. SVR1 here) finds out that the destination address is located in the same network as itself (having no gateway at the routing entry 1.1.1.0/24 indicates both sender and receiver are in the same network), and that the Outoing Interface (OIF) is lan1 (note that there is just one server port in the figure, lan1).  Now, SVR1 refers to its ARP table to find the MAC address of the destination IP address 1.1.1.20, but finds the table empty (having no related entry is called ARP Miss).  So, SVR1 sends an ARP Request to port lan1 to obtain the MAC address of SVR2 (1.1.1.20). At this time, the ARP Request packet consists of the following fields: Header Fields Ethernet Header * Destination MAC = FF:FF:FF:FF:FF:FF (broadcasting: reaching all devices in the same LAN) * Source MAC = m1, the MAC address of Sender (SVR1) IP Header * Sender MAC = m1, the MAC address of the ARP Request packet sender (SVR1) * Sender IP = 1.1.1.10, the IP address of the ARP Request packet sender (SVR1) * Target MAC = 00:00:00:00:00:00 (the value that SVR1 wants to find out) * Target IP = 1.1.1.20, the IP address of the ARP Request packet target (SVR2)  Now, this packet is received by S1 (Switch 1), and the source MAC address of the received packet (the switch does not care whether the received packet is IP or ARP) is learned. Then, the following is recorded in the MAC table at S1: {MAC address m2 is connected to fe2 port}.
  • 3. Netmanias Tech-Blog: Fronthaul Size: Calculation of maximum distance between RRH and BBU 3  Immediately after the source MAC is learned, S1 checks the destination MAC address of the received packet, and finds out it is broadcast-type. So, it performs flooding to all the ports except for the receiving port (or to all the ports belonging to the same VLAN if VLAN support is provided). That way, the ARP Request packet is received by SVR2 and Router (R1).  From the target IP address of the received ARP Request packet, R1 notices the address does not match any of the addresses that it has (i.e.1.1.1.1 or 2.1.1.1). So, it discards it. 2. SVR2 responds with ARP Reply  SVR2 also checks the target IP address of the received ARP Request packet, and finds out the address matches its own address. So, it enters the MAC address corresponding to 1.1.1.20 in the Sender MAC field of an ARP Reply packet, and sends the ARP Reply packet to lan1 port. At this time, the ARP Reply packet includes the following fields: Header Fields Ethernet Header * Destination MAC = m1, the MAC address of SVR1 to which ARP Reply is to be delivered * Source MAC = m2, the MAC address of Sender (SVR2) IP Header * Sender MAC = m2, the MAC address of the ARP Reply packet sender (SVR2) * Sender IP = 1.1.1.20, the IP address of the ARP Reply packet sender (SVR2) * Target MAC = m1, the MAC address of the ARP Reply packet target (SVR1) * Target IP = 1.1.1.10, the IP address of the ARP Reply packet target (SVR1)  S1, upon receiving the packet, learns the source MAC and records the following in the MAC table: {MAC address m2 is connected to fe2 port}.  Then, it sends (unicasts) the packet to fe1 port by referring to the MAC table where m1, the destination MAC address of the received packet, is mapped to fe1.  Next, SVR1 records the received value (m2, the MAC address assigned for 1.1.1.20) in its ARP Table. 3. SVR1 sends IP Packet to SVR2  SVR1, now ready to send an IP packet to SVR2, sends one with the following fields to lan1 port: Header Fields Ethernet Header * Destination MAC = m2, the MAC address of Receiver (SVR2) * Source MAC = m1, the MAC address of Sender (SVR1) IP Header * Destination IP = 1.1.1.20, the IP address of Receiver (SVR2) * Source IP = 1.1.1.10, the IP address of Sender (SVR1)  Upon receiving the packet, S1 (Switch 1) attempts to learn the source MAC address, and finds out the address m1 has already been learned. So, no MAC learning is needed. now, it checks for m2, the destination MAC address, in the MAC table, and finds out it is mapped to fe2 port.  Accordingly, the packet is sent to fe2 port and received by SVR2.
  • 4. Netmanias Tech-Blog: Fronthaul Size: Calculation of maximum distance between RRH and BBU 4 SVR1 sends ARP Request R1 S1 S2 SVR1 SVR2 SVR3 SVR4 IP: 1.1.1.10 MAC: m1 IP: 1.1.1.20 MAC: m2 R1 S1 S2 SVR1 SVR2 SVR3 SVR4 IP: 1.1.1.10 MAC: m1 IP: 1.1.1.20 MAC: m2 R1 S1 S2 SVR1 SVR2 SVR3 SVR4 IP: 1.1.1.10 MAC: m1 IP: 1.1.1.20 MAC: m2 FF:FF:FF:FF:FF:FF m1 1 2 m1 1.1.1.10 - 1.1.1.20 MACDestination MACSource IPSender IPTarget MACSender MACTarget 2 1 2 34 5 6 Traffic Flow Packet Format (ARP Request) 3 4 Packet Format (ARP Reply) m1 m2 m2 1.1.1.20 m1 1.1.1.10 MACSource MACDestination IPSender IPTarget MACSender MACTarget 5 6 Packet Format (IP Packet) m2 m1 1.1.1.20 1.1.1.10 IPDestination IPSource MACSource MACDestination Traffic Flow Traffic Flow SVR1 sends ARP Request to S1 OIF lan1 lan1 Destination Network 1.1.1.0/24 0.0.0.0/0 - 1.1.1.1 Gateway SVR1: Routing Table IP Address MAC Address SVR1: ARP Table MAC Address Port S1(Switch 1): MAC Table S1 floods ARP Packet OIF lan1 lan1 Destination Network 1.1.1.0/24 0.0.0.0/0 - 1.1.1.1 Gateway SVR1: Routing Table IP Address MAC Address SVR1: ARP Table MAC Address m1 fe1 Port S1(Switch 1): MAC Table SVR2 sends ARP Reply to S1 OIF lan1 lan1 Destination Network 1.1.1.0/24 0.0.0.0/0 - 1.1.1.1 Gateway SVR1: Routing Table IP Address MAC Address SVR1: ARP Table MAC Address m1 fe1 Port S1(Switch 1): MAC Table S1 sends ARP Reply to SVR1 OIF lan1 lan1 Destination Network 1.1.1.0/24 0.0.0.0/0 - 1.1.1.1 Gateway SVR1: Routing Table IP Address 1.1.1.20 m2 MAC Address SVR1: ARP Table MAC Address m1 m2 fe1 fe2 Port S1(Switch 1): MAC Table SVR1 sends IP Packet to S1 OIF lan1 lan1 Destination Network 1.1.1.0/24 0.0.0.0/0 - 1.1.1.1 Gateway SVR1: Routing Table IP Address 1.1.1.20 m2 MAC Address SVR1: ARP Table MAC Address m1 m2 fe1 fe2 Port S1(Switch 1): MAC Table S1 sends IP Packet to SVR2 OIF lan1 lan1 Destination Network 1.1.1.0/24 0.0.0.0/0 - 1.1.1.1 Gateway SVR1: Routing Table IP Address 1.1.1.20 m2 MAC Address SVR1: ARP Table MAC Address m1 m2 fe1 fe2 Port S1(Switch 1): MAC Table SVR2 responds with ARP Reply11 12 SVR1 sends IP Packet to SVR213 1 2 3 4 5 6 Routing Table Lookup Routing Table Lookup ARP Table Lookup ARP Learning Source MAC Learning Source MAC Learning Destination MAC Lookup Destination MAC Lookup S1 S1 S1 S1S1S1 ARP Miss
  • 5. About NMC Consulting Group (www.netmanias.com) NMC Consulting Group is an advanced and professional network consulting company, specializing in IP network areas (e.g., FTTH, Metro Ethernet and IP/MPLS), service areas (e.g., IPTV, IMS and CDN), and wireless network areas (e.g., Mobile WiMAX, LTE and Wi-Fi) since 2002. Copyright © 2002-2014 NMC Consulting Group. All rights reserved. 5 Carrier WiFi Data Center Migration Wireline Network LTE Mobile Network Mobile WiMAX Carrier Ethernet FTTH Data Center Policy Control/PCRF IPTV/TPS Metro Ethernet MPLS IP Routing 99 00 01 02 03 04 05 06 07 08 09 10 11 12 13 eMBMS/Mobile IPTV Services CDN/Mobile CDN Transparent Caching BSS/OSS Cable TPS Voice/Video Quality IMS LTE Backaul Netmanias Research and Consulting Scope Visit http://www.netmanias.com to view and download more technical documents. Future LTE IP/MPLS CarrierEthernet Networks Consulting POC Training Wi-Fi Infrastructure Services CDN Transparent Caching IMS Concept Design DRM eMBMS protocols Analyze trends, technologies and market Analysis Report Technical documents Blog One-Shot gallery We design the future We design the future We design the future