ESSENTIALS. Understanding Ethernet Switches and Routers. April 2011 VOLUME 3 ISSUE 1 A TECHNICAL SUPPLEMENT TO CONTROL NETWORK

Similar documents
Networking Test 4 Study Guide

Ethernet. Ethernet Frame Structure. Ethernet Frame Structure (more) Ethernet: uses CSMA/CD

CCNA R&S: Introduction to Networks. Chapter 5: Ethernet

Based on Computer Networking, 4 th Edition by Kurose and Ross

EITF25 Internet Techniques and Applications L5: Wide Area Networks (WAN) Stefan Höst

Computer Network. Interconnected collection of autonomous computers that are able to exchange information

Local-Area Network -LAN

IP Networking. Overview. Networks Impact Daily Life. IP Networking - Part 1. How Networks Impact Daily Life. How Networks Impact Daily Life

- Hubs vs. Switches vs. Routers -

Data Link Protocols. TCP/IP Suite and OSI Reference Model

Guide to TCP/IP, Third Edition. Chapter 3: Data Link and Network Layer TCP/IP Protocols

GUIDE. CTRLink. EIPR Skorpion Wired and Wireless IP Routers. EIPR Series

Data Communication Networks and Converged Networks

UPPER LAYER SWITCHING

Communications and Computer Networks

R2. The word protocol is often used to describe diplomatic relations. How does Wikipedia describe diplomatic protocol?

EECS 122: Introduction to Computer Networks Multiaccess Protocols. ISO OSI Reference Model for Layers

The OSI and TCP/IP Models. Lesson 2

Candidates should attempt FOUR questions. All questions carry 25 marks.

Chapter 5. Data Communication And Internet Technology

Chapter 2 TCP/IP Networking Basics

Overview of Computer Networks

Computer Networking Networks

Protocol Data Units and Encapsulation

LAN Switching Computer Networking. Switched Network Advantages. Hubs (more) Hubs. Bridges/Switches, , PPP. Interconnecting LANs

Local Area Networks transmission system private speedy and secure kilometres shared transmission medium hardware & software

Chapter 4 Connecting to the Internet through an ISP

Chapter 9A. Network Definition. The Uses of a Network. Network Basics

WAN Data Link Protocols

High Speed Ethernet. Dr. Sanjay P. Ahuja, Ph.D. Professor School of Computing, UNF

Ethernet and IP A slightly less introductory networking class. Drew Saunders Networking Systems Stanford University

Introduction to computer networks and Cloud Computing

SHEET. CTRLink. EIPR Skorpion Wired and Wireless IP Routers. EIPR Series

IST 220 Exam 3 Notes Prepared by Dan Veltri

Appendix B Network, Routing, Firewall, and Basics

Unit of Learning # 2 The Physical Layer. Sergio Guíñez Molinos sguinez@utalca.cl

Overview of Network Hardware and Software. CS158a Chris Pollett Jan 29, 2007.

Network Basics GRAPHISOFT. for connecting to a BIM Server (version 1.0)

How To Understand The Layered Architecture Of A Network

2. What is the maximum value of each octet in an IP address? A. 128 B. 255 C. 256 D. None of the above

LAN Switching and VLANs

Zarządzanie sieciami telekomunikacyjnymi

Ethernet. Ethernet. Network Devices

Technical Support Information Belkin internal use only

EE4367 Telecom. Switching & Transmission. Prof. Murat Torlak

CSE 3461 / 5461: Computer Networking & Internet Technologies

Computer Networks. Definition of LAN. Connection of Network. Key Points of LAN. Lecture 06 Connecting Networks

ELEC3030 (EL336) Computer Networks. How Networks Differ. Differences that can occur at network layer, which makes internetworking difficult:

Outline. CSc 466/566. Computer Security. 18 : Network Security Introduction. Network Topology. Network Topology. Christian Collberg

Transport and Network Layer

CSCI 362 Computer and Network Security

Written examination in Computer Networks

DATA COMMUNICATION AND NETWORKS

Computer Networking: A Survey

CCT vs. CCENT Skill Set Comparison

Fast Ethernet and Gigabit Ethernet. Networks: Fast Ethernet 1

Using MIS 3e Chapter 6A Appendix

How To Understand The Network Protocol Of A Network (Netware) 2.5 (Networchestra) 2 (Netwire) 2) (Netrocessor) 2-Way (Networking) 2,5 (Network)

Advanced features on Ethernet networks. Fulvio Risso Politecnico di Torino

SSVP SIP School VoIP Professional Certification

CCNA 1: Networking Basics. Cisco Networking Academy Program Version 3.0

Level 2 Routing: LAN Bridges and Switches

COMPUTER NETWORK TECHNOLOGY (300)

Data Communication and Computer Network

Ring Local Area Network. Ring LANs

Chapter 9. IP Secure

Local Area Networks. Guest Instructor Elaine Wong. Elaine_06_I-1

Chapter 3. TCP/IP Networks. 3.1 Internet Protocol version 4 (IPv4)

Howstuffworks "How LAN Switches Work" Click here to go back to the normal view!

Fibre Channel over Ethernet in the Data Center: An Introduction

Network layer" 1DT066! Distributed Information Systems!! Chapter 4" Network Layer!! goals: "

Gigabit Ethernet. Abstract. 1. Introduction. 2. Benefits of Gigabit Ethernet

Understanding TCP/IP. Introduction. What is an Architectural Model? APPENDIX

IT-AD08: ADD ON DIPLOMA IN COMPUTER NETWORK DESIGN AND INSTALLATION

CSE331: Introduction to Networks and Security. Lecture 6 Fall 2006

Operating System Concepts. Operating System 資 訊 工 程 學 系 袁 賢 銘 老 師

Chapter 8: Computer Networking. AIMS The aim of this chapter is to give a brief introduction to computer networking.

Performance Analysis of Switches in High Speed LAN

What is CSG150 about? Fundamentals of Computer Networking. Course Outline. Lecture 1 Outline. Guevara Noubir noubir@ccs.neu.

Internet Packets. Forwarding Datagrams

SFWR 4C03: Computer Networks & Computer Security Jan 3-7, Lecturer: Kartik Krishnan Lecture 1-3


IP addressing. Interface: Connection between host, router and physical link. IP address: 32-bit identifier for host, router interface

Final Exam. Route Computation: One reason why link state routing is preferable to distance vector style routing.

The OSI Model: Understanding the Seven Layers of Computer Networks

CS 457 Lecture 19 Global Internet - BGP. Fall 2011

Protocols. Packets. What's in an IP packet

Computer Networks: LANs, WANs The Internet

Agenda. Distributed System Structures. Why Distributed Systems? Motivation

Data Networking and Architecture. Delegates should have some basic knowledge of Internet Protocol and Data Networking principles.

Internet Working 5 th lecture. Chair of Communication Systems Department of Applied Sciences University of Freiburg 2004

Introduction to Ethernet

4. H.323 Components. VOIP, Version 1.6e T.O.P. BusinessInteractive GmbH Page 1 of 19

SSVVP SIP School VVoIP Professional Certification

CORPORATE NETWORKING

DATA COMMUNICATIONS AND NETWORKING. Solved Examples

WAN Technology. Heng Sovannarith

FSW-0505TX/0805TX 5/8 Port SOHO 10/100Mbps NWay Switch FSW-0505TX FSW-0805TX. 5/8 Port SOHO 10/100Mbps NWay Switch. User s Manual. (Revision 1.

THE TCP/IP PROTOCOL SUITE

Transcription:

VOLUME 3 ISSUE 1 A TECHNICAL SUPPLEMENT TO CONTROL NETWORK Contemporary Control Systems, Inc. Understanding Ethernet Switches and Routers This extended article was based on a two-part article that was written by George Thomas of Contemporary Controls and appeared in the February and March 2011 issues of InTech Magazine an ISA publication. When you go to a computer store to purchase a device that will access the Internet they will try to sell you a router. In most instances, the router will come with a built-in switch (shortened term for switching hub) so that you can connect several Ethernet devices to just one device. So what is the difference between an Ethernet router and an Ethernet switch? The long answer to that question requires an examination of the Open Systems Interconnection Model (OSI) which is frequently used to explain how communication networks operate. Ethernet and the OSI Model In Figure 1 you will see the seven-layer model with each layer providing a unique service. Communication between two stations begins at the Application layer with the sending station initiating a message to a receiving station via a common medium. With respect Figure 1 The OSI Model to this model, Ethernet provides services at the Physical and Data Link layers through the use of bridges and repeaters. An Ethernet switch is classified as a bridge and therefore operates at the data link layer while routers operate at the Network layer. Let s try to understand why. The lowest layer is the physical layer that defines the basic signalling on the medium. Ethernet transmits symbols representing logic ones or zeros across the medium to another station that decodes the symbols to extract the data. Although Ethernet will operate with coaxial cable as the medium, modern Ethernet networks incorporate twisted-pair cabling. If the path is too long, a repeater can be used to extend distance. If fibre optic cable is preferred, media converters can be used. If multiple devices need to share the connection, a repeating hub (commonly called just a hub) is used. All three of these devices reside at the physical layer because they do nothing more than process symbols on the medium. One layer above the physical layer is the data link layer. Ethernet is a local area network technology with end stations assigned unique 48-bit addresses. These addresses are called media access control (MAC) addresses. When data is to be sent from one Ethernet station to another, the data is first arranged in frames as shown in Figure 2. The destination and source addresses are appended so that the intended station knows that it is to receive the message and who sent it. Other parts of the frame include the Preamble which alerts the receiving station that a frame is coming, a Type or Length field that identifies either the type of data or length of the data field, the Data field itself and the Frame Check Sequence used page 1

Figure 2 An Ethernet Frame to verify the integrity of the frame. The payload of the frame is the actual data. Everything else is overhead. Carrier Sense Multiple Access with Collision Detection (CSMA/CD) As an Ethernet station prepares to send a frame, it first listens to the medium to verify that a clear channel exists. If silence is sensed, it transmits its message and then waits a determined amount of time, called the slot time. The slot time is used for detecting a collision due to another station transmitting at the same time. If no collision is sensed, the sender assumes a successful transmission. If a collision has occurred, the sender refrains from transmitting again for an amount of time based on a backoff algorithm that incorporates randomness. An early criticism of Ethernet was that this probabilistic approach to media access control was not conducive to real-time systems. There are other problems with CSMA/CD. All CSMA/CD stations must reside within one collision domain to ensure that all stations will detect a collision between stations located at the farthest points. This limits the geographic distance of the Ethernet network. Stations residing in the same collision domain can detect all transmissions but only receive those addressed to them. All stations can transmit but not at the same time. This is called half-duplex operation or Shared Ethernet. Breaking Up the Collision Domains for Higher Performance A switching hub was introduced to avoid the problems of Shared Ethernet. A switching hub is much different from a repeating hub. A port on a switching hub appears to an end station as another end station except that it does not consume a MAC address. To an attached end station, the switch port appears as the only other station within the collision domain. This is how it works. Assume station A is on port 1 of an eight-port switch and station B is on port 2 as shown in Figure 3. Figure 3 Using an Ethernet Switch Station A sends a message to station B. Switch port 1 reads the entire frame into its internal input buffer and forwards it to port 2 s output buffer which then transmits the entire frame to station B. So what is the advantage? The switch has effectively created two collision domains each appearing as a two-station link. With only two stations, collisions can be avoided altogether by creating a full-duplex link which potentially doubles throughput. With a full-duplex link there is no collision domain thus, distance is limited only by cable losses. Fibre optic distances are no longer limited by the collision domain and can be much greater than Shared Ethernet lengths. Without a concern for a common collision domain, switches can be cascaded at will. With separate collision domains on each port, each port can operate at different data rates allowing for the mixing of data rates within the same switch. Another advantage to using a switch is its ability for simultaneous messages within its switch fabric. When a transmission is received on a particular switch port, page 2

the source MAC address of the sender is stored in the database of the switch. Using this learning process, shown in Figure 4, the switch determines on what port a station can be reached. Assume, in Figure 3, that station A sends a message to station C which has been attached to port 3, but the switch does not know how to reach station C. The switch will flood the same message to all ports. When station C eventually replies, the switch will learn that station C is on port 3 so that future flooding will not be necessary. Now station A sends a message to station B, but the switch already knows that station B can be reached on port 2 by using a lookup process so only port 2 will transmit the message. The other ports do not need to pass the message because it was only directed to station B. This frees up the other ports to pass unrelated messages without a concern for stations A and B s traffic. This greatly improves throughput over Shared Ethernet which requires that only one message can pass through a hub at any one time. Figure 4 The Learning Process Now assume the cable on port 1 is moved to port 4. If station A does not initiate a transmission, the switch will still believe station A can be reached on port 1. For this reason, all learned addresses must be aged by clearing out the database periodically. Eventually, the pairing of station A with port 1 will be cleared and transmissions intended for station A will be flooded to all ports, including port 4. Station A will now receive the flooded message and its response will allow the switch to learn its new location. Modern switches have two more interesting features Auto-negotiation and Auto-MDIX. With Auto-negotiation, the data rate and duplex for link partners is negotiated during initial connection. If the end station and the switch port can operate at either 10 Mbps or 100 Mbps at either half- or full-duplex, the negotiation process will select higher performing 100 Mbps full-duplex. With Auto-MDIX, either a straight-through or crossover cable can be used between an end station or switch port or between two switch ports. Stepping Up to Routers In the beginning of this article we used the example of visiting a computer store to purchase a device that will access the Internet and we noted that they will try to sell us a router. In most instances, the router will come with a built-in switch so that you can connect several Ethernet devices using just one device. So again, what is the difference between an Ethernet router and an Ethernet switch? We will refer back to the Open Systems Interconnection Model. Revisiting the OSI Model In Figure 1 you will see the seven-layer model with each layer providing a unique service. As we mentioned before, Ethernet provides services at the Physical and Data Link layers through the use of bridges and repeaters. The rules of Ethernet are restricted to a single local-area-network (LAN). If we have a collection of interconnected LANs, this is called an inter-network. Communicating between LANs within an inter-network requires routers which operate one layer above that of a switch at the Network layer. The most famous of inter-networks is the Internet with the rules for communication being defined by the Internet Protocol (IP). It is not necessary that routers support the Internet Protocol, but this is the most common protocol used by routers so we will use this in our discussion. In Figure 5 you will see a collapsed seven-layer model which is called the Internet Model. The only difference is that the functions of presentation and session are lumped into the Figure 5 The Internet Model transport layer. The transport layer provides end-toend communications between applications with the Transmission Control Protocol (TCP) being the one used in the Internet Model. The middle layer is the network layer which is involved with host addressing and fragmentation with the most common addressing scheme called IPv4. page 3

IPv4 Header and Datagram Figure 6 shows an IPv4 header and datagram encapsulated into an Ethernet frame. The Ethernet frame is shown with a destination address (DA) and a source address (SA) as we would expect. The Type field has a hexadecimal 0800 indicating the Ethernet data field contains an IP packet or a portion of an IP packet. A Cyclic Redundancy Check (CRC) completes the frame. When we refer to the Internet Protocol we talk in terms of packets. With Ethernet communication we talk in terms of frames. Ethernet frames pass without issues through Ethernet switches, but it is the data inside Ethernet frames called packets that hosts and routers on the Internet respond to. Switches do not understand the meaning of packets they just understand frames. Figure 6 IPV4 Header and Datagram Figure 6 can be very confusing and it does not get any easier as we move up the Internet Model. We will just point out some fields within the packet that are the most interesting. With the IPv4 (IP protocol version 4), a new addressing scheme is introduced to identify hosts on the Internet. There is a source IP address and a destination IP address just like there are source and destination Ethernet addresses so what is the difference? IP addresses are 32-bit long addresses while Ethernet addresses are 48-bits long. In the Internet world, a device does not have to be an Ethernet device in order to have an IP address. While an Ethernet device manufacturer supplies a unique 48-bit address to the product it sells, IP addresses are assigned using rules established by the Internet Engineering Task Force (IETF). IP addresses are designated as being private and public. Public IP addresses must be unique across the Internet, but private addresses can be duplicated because they will never reach the Internet thanks to IP routers that block them from appearing on the Internet. Switches would not restrict IP addresses from appearing and that is one reason why routers are used to access the Internet and not switches. Other fields that should be pointed out within the IP packet are the IP Datagram Data. Our main purpose is to send data between hosts and this data is referred to as a datagram. Unlike the transport layer of the Internet Model which is involved with end-to-end delivery of data, the network layer is only required to make its best effort. There are no acknowledgements that a packet sent by a host is received by another. If the packet is too big to fit into one Ethernet frame, it is split up into fragments requiring reassembly at the receiving end. Ethernet Switch-Router Combination Figure 7 shows a four-port Ethernet switch as part of an IP Router. Although there are a total of five Ethernet ports on this combination Ethernet switch-router, the five ports are not peers to one another. Certainly, the four clustered ports are peers they are all part of the internal Ethernet switch and no one port on the switch has precedence over another. The switch-router is divided into two halves the LAN-side and the WAN-side. The Ethernet switch resides on the LAN-side or what is sometimes called the private side. Remember that Ethernet is a local-area-network technology so Ethernet equipment deployment is restricted to either a work group, a building, process line or possibly a campus. Workstations, printers, servers and automation equipment can attach to any of these switch ports. If more LAN ports are needed, external switches can be cascaded to any switch port on the switch-router. The one remaining Ethernet port is not part of the switch fabric. It is called a WAN port for wide-area-network. It does not have to be an Ethernet port but we will use an Ethernet port in our example. This single WAN port is considered to be located on the public side of the switch-router because this is the port that gains us access to the Internet. Between the LAN and WAN sides is logic that controls the routing of messages between the two sides. How can a single Ethernet port connect to the Internet? In our example we are attaching the Ethernet port to a cable modem although a Digital Subscriber Line (DSL) modem page 4

could be used as well. At the far-end of the modem connection is an Internet Service Provider (ISP) that functions as a gate-keeper to the Internet. Obtaining IP Addresses In our example of Figure 7, the hosts on the private side have been given private IP addresses. These addresses can be statically set in the hosts or the hosts can receive them dynamically using a process called Dynamic Host Configuration Protocol (DHCP). In the dynamic case, the router functions as a DHCP server providing addresses in a preselected range while the attached hosts function as DHCP clients requesting IP addresses. However, the router needs a WAN side address as well and usually obtains a public IP address from the ISP using a similar process. Once addressing is established, connected hosts on the LAN-side can have access to the Internet through the switch-router. The translation of the private addresses to that of a public address is another function of a router. Figure 7 Public and Private IP Addressing Summary Ethernet switches and routers have distinct purposes and when the two devices are included in the same enclosure like a switch-router it is sometimes difficult to separate the two functions. Think of Ethernet switches operating at layer 2 of the OSI model and routers operating one layer up at layer 3. At layer 2, we are concerned about the rules within one localarea-network while at layer 3, the rules for operating in an inter-network result in more complexity. page 5