Computer Networks - Lab Session #4 Layer 2: CSMA-CD & VLANs

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

Exhibit n.2: The layers of a hierarchical network

Zarząd (7 osób) F inanse (13 osób) M arketing (7 osób) S przedaż (16 osób) K adry (15 osób)

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

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

AT-S45 Version Management Software for the AT-9410GB Gigabit Ethernet Switches. Software Release Notes

Lab VI Capturing and monitoring the network traffic

Level 2 Routing: LAN Bridges and Switches

Easy Smart Configuration Utility

3.1 RS-232/422/485 Pinout:PORT1-4(RJ-45) RJ-45 RS-232 RS-422 RS-485 PIN1 TXD PIN2 RXD PIN3 GND PIN4 PIN5 T PIN6 T PIN7 R+ PIN8 R-

Guideline for setting up a functional VPN

Configuring Network Address Translation (NAT)

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

User s Manual TCP/IP TO RS-232/422/485 CONVERTER. 1.1 Introduction. 1.2 Main features. Dynamic DNS

What is VLAN Routing?

GVRP Overview. Overview

IP videoconferencing solution with ProCurve switches and Tandberg terminals

Debugging Network Communications. 1 Check the Network Cabling

From Fieldbus to toreal Time Ethernet

BASIC ANALYSIS OF TCP/IP NETWORKS

Management Software. Web Browser User s Guide AT-S106. For the AT-GS950/48 Gigabit Ethernet Smart Switch. Version Rev.

CCNA Discovery Networking for Homes and Small Businesses Student Packet Tracer Lab Manual

LANs and VLANs A Simplified Tutorial

Procedure: You can find the problem sheet on Drive D: of the lab PCs. 1. IP address for this host computer 2. Subnet mask 3. Default gateway address

Monitoring and Analyzing Switch Operation

> Technical Configuration Guide for Microsoft Network Load Balancing. Ethernet Switch and Ethernet Routing Switch Engineering

Note: This case study utilizes Packet Tracer. Please see the Chapter 5 Packet Tracer file located in Supplemental Materials.

IP Addressing A Simplified Tutorial

IP Office Technical Tip

Link Layer Discovery Protocol

Overview of Routing between Virtual LANs

- Hubs vs. Switches vs. Routers -

FSM73xx GSM73xx GMS72xxR Shared access to the Internet across Multiple routing VLANs using a Prosafe Firewall

CSCI 362 Computer and Network Security

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

IP Routing Features. Contents

IP Addressing and Subnetting. 2002, Cisco Systems, Inc. All rights reserved.

Chapter 11 Network Address Translation

Easy Smart Configuration Utility

Management Software. User s Guide AT-S84. For the AT-9000/24 Layer 2 Gigabit Ethernet Switch. Version Rev. B

AT-S41 Version Management Software for the AT-8326 and AT-8350 Series Fast Ethernet Switches. Software Release Notes

Chapter 7 Configuring Trunk Groups and Dynamic Link Aggregation

Networking Test 4 Study Guide

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

AT-S60 Version Management Software for the AT-8400 Series Switch. Software Release Notes

VLAN 802.1Q. 1. VLAN Overview. 1. VLAN Overview. 2. VLAN Trunk. 3. Why use VLANs? 4. LAN to LAN communication. 5. Management port

Exploring the Remote Access Configuration Utility

CCT vs. CCENT Skill Set Comparison

Lab 2 - Basic Router Configuration

Voice over IP. Demonstration 1: VoIP Protocols. Network Environment

Follow these steps to prepare the module and evaluation board for testing.

Quality of Service (QoS): Managing Bandwidth More Effectively on the Series 2600/2600-PWR and Series 2800 Switches

AlliedWare Plus OS How To Use sflow in a Network

CS 326e F2002 Lab 1. Basic Network Setup & Ethereal Time: 2 hrs

Port Trunking. Contents

How To Configure Voice Vlan On An Ip Phone

ProCurve Switch ProCurve Switch

Introduction to Network Security Lab 1 - Wireshark

1 Data information is sent onto the network cable using which of the following? A Communication protocol B Data packet

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

hp ProLiant network adapter teaming

IP Routing Between VLANs

Computer Networks I Laboratory Exercise 1

Configuring PROFINET

LAB THREE STATIC ROUTING

Switch Quick Configuration CLI Guide for

Topic 7 DHCP and NAT. Networking BAsics.

network infrastructure: getting started with VoIP

1.0 Basic Principles of TCP/IP Network Communications

Objectives. The Role of Redundancy in a Switched Network. Layer 2 Loops. Broadcast Storms. More problems with Layer 2 loops

Packet Tracer 3 Lab VLSM 2 Solution

BIT COMMANDER. Serial RS232 / RS485 to Ethernet Converter

Port Trunking. Contents

A Guide to Simple IP Camera Deployment Using ZyXEL Bandwidth Solutions

Introduction about cisco company and its products (network devices) Tell about cisco offered courses and its salary benefits (ccna ccnp ccie )

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

Introduction. What is a Remote Console? What is the Server Service? A Remote Control Enabled (RCE) Console

ETHERNET WEATHER STATION CONNECTIONS Application Note 33

Using Industrial Ethernet Networks for PROFInet

Interoperability between Mitel IP Phones and ProCurve Switches

Ethernet. Ethernet. Network Devices

VLAN for DekTec Network Adapters

SSVP SIP School VoIP Professional Certification

Instructor Notes for Lab 3

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

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

File Sharing. Peter Lo. CP582 Peter Lo

Multimedia Traffic Control with IP Multicast (IGMP)

Abstract. MEP; Reviewed: GAK 10/17/2005. Solution & Interoperability Test Lab Application Notes 2005 Avaya Inc. All Rights Reserved.

Efficient Video Distribution Networks with.multicast: IGMP Querier and PIM-DM

: Interconnecting Cisco Networking Devices Part 1 v2.0 (ICND1)

Primary VLAN. This document shows how to view and change the primary VLAN for the HP Procurve Series 2500 Switches:

Chapter 3 Using Access Control Lists (ACLs)

Wireless Local Area Networks (WLANs)

Citrix XenServer Design: Designing XenServer Network Configurations

Dynamic LACP Trunking

F2103 GPRS DTU USER MANUAL

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

Procedure: You can find the problem sheet on Drive D: of the lab PCs. Part 1: Router & Switch

ProCurve Networking. Troubleshooting WLAN Connectivity. Technical White paper

Transcription:

Notes : Computer Networks - Lab Session #4 Layer 2: CSMA-CD & VLANs 1 Observing CSMA/CD protocol on a simple example The protocol of the MAC (Multiple Access Carrier) sub-layer of layer 2 is called CSMA/CD (Carrier Sense Multiple Access/Collision Detection), and has been standardized by the IEEE under the name 802.3; it enables one to control access to the Ethernet medium. It is implemented on the Ethernet card added to workstations (refer to Introduction to the platform). It is based on the following mechanism: before sending a frame, a station always listens-in to the cable to check that no other station is already in the process of sending data. When the medium becomes available, the station sends its frame. It sometimes happens that two stations connected to the same Ethernet cable decide to send a frame simultaneously (or nearly simultaneously). In this case, the electric signals combine with each other and neither of the two frames can be read: when this happens, we say that a collision has occurred. Each station is capable of detecting these collisions while it sends a frame. When a collision is detected, each station stops transmitting and then waits for a random time interval before attempting to re-send the entire frame. Note : the information interchanged on the physical medium constitute packets that have a particular format called a frame. A frame always contains the address of the system that sent it, and the address of the system for which it is destined. In the case of Ethernet networks, the frames interchanged have a maximum length of 1518 bytes, and a minimum length of 64 bytes. The aim here is to study one aspect of CSMA/CD protocol. Operation 0 In a window of one workstation, run netstat so that it displays at regular intervals (let s say 2 seconds) the number of collisions observed on this interface : # netstat -w 2 xl0 In another window, use (see below) to generate traffic to a second system. You should previously have started the udptarget server on the target system. The traffic used here is of UDP stream type. Note the number of collisions. 1 Using UDP, the number of packets sent may differ from the number of packets received; netstat states the number of collisions per interface. It must be run on the same system as. On a third system, run targeting the fourth workstation of the platform. Note the variation in the number of collisions. Explain this variation, discussing the CSMA/CD protocol. 2 Analyzing network performances In this section, you are going to use the utility to calculate the effective bandwidth of the network. Remember that the effective bandwidth is the bandwidth that the user actually experiences, compared with the theoretical bandwidth, which is a characteristic of the line. To calculate this bandwidth, sends packets of variable size to another system on the network. The packets are necessarily intended for a system of your choice. The syntax for is as follows: # [-p port] target_host # udptarget [-p port] Other sender options include -s <size>: packet size in bytes -t <int>: timer interval in microseconds (default 500) -d <secs>: test duration in seconds (default transmit until stopped) On the target, one can specify the display interval in ms : -i <ms>. 2.1 Bandwidth measurement on an unloaded network The network is said to be unloaded (or little loaded) when it is not carrying much traffic? in other words, when it is nearly not in use. This is effectively the case for your network, on which the four stations are not communicating. Operation 1 On one of the four stations, use to continuously send UPD packets to another station (refer to figure 1). Note the report output from, varying the size of the packets (from 60 to 2880 bytes). Measure finely the passage between 1460 bytes and 1480 bytes. What do you deduce, remembering that the theoretical bandwidth of Ethernet is 100 Mb/sec? To understand why the Ethernet s effective bandwidth does not attain the theoretical bandwidth, start the ethereal utility on a third system, and sniff some frames interchanged during the execution of. Analyze the packets interchanged, browsing through the ethereal window. 2

Figure 1: Network performance evaluation Explain what happens during a. Try to precisely locate the figures you note. Explain, in particular, the change between 1460 bytes and 1480 bytes. Here are a few points that will help you to understand: uses the UDP protocol to send its messages and measure bandwidth; Efficacité Channel efficiency du canal 1 0,9 0,8 0,7 0,6 0,5 0,4 0,3 0,2 0,1 Trames 1024 debytes 1024 octets Frames Trames 512 de bytes 512 octets Frames Trames 256 bytes de 256 Frames octets Trames 128 de bytes 128 octets Frames Trames 64 bytes de 64Frames octets 1 2 4 8 16 32 64 128 256 Number Nombre of stations de attempting tentant d'emettre to transmit Figure 2: Efficiency of CSMA/CD UDP (like TCP) adds control bytes (called the header) to the data provided to it. These UDP packets (header + data) are passed to another protocol (IP), which also adds control bytes. This IP protocol then passes everything to the Ethernet protocol, which deals with physically sending the bytes over the cable. Ethernet also adds a header. For the moment, don t worry about understanding the signification of the fields of the various headers. Instead, just look at the packet length and header length fields. Reminder : Figure 2 shows the efficiency curves of the level 2 protocol used in Ethernet cards (CSMA/CD): State the curve bandwidth = function(packet size) that you obtain with one single piece of traffic (case of one single station attempting to send), and comment on it. Check the size of the packets that circulate in each case. 2.2 Measuring bandwidth on a loaded network Operation 2 Choose two stations, S1 and S2, to be used for loading the network (continuous transmission of UDP packets). As before, start between these two stations. Then run between the remaining two stations, as shown in Figure 3. Build the average bandwidth curves, varying the size of packets as previously. What do you notice? Compare the results with those obtained previously. What do you deduce about network capacity? 3 Figure 3: 2 streams 4

Operation 3 Restart the same operation, but first replace the hub with a switch (see Figure4). When the LEDs are active, start the measurements (if the LEDs do not illuminate, execute ping commands from each of the stations). Figure 6: 3 divergent traffic Switch Figure 4: 2 streams and a switch Build the average bandwidth curves for the two -generating stations. What do you notice? Compare these results with those obtained during the preceding operation. What do you deduce about the operation of a switch? Try to argue the benefits of a switch within a local area network. Operation 4 Replace the switch with a hub. Now run from three stations to a fourth, as shown in Figure 5. Figure 5: 3 convergent measurement streams Build the curves and compare them with the previous results. Operation 5 Now perform the experiment illustrated in Figure 6. 5 Build the curves and compare them with the others. What conclusions do you draw from all these measurements? 3 TCP / UDP interaction The purpose of this operation is to observe the differences of behavior between TCP and UDP. Operation 6 How do you explain the number of collisions that occur when a single TCP stream is present on the network? Start two tcpmt (Figure 3) sending TCP traffic. What can you say about the changes in the number of collisions on each interface, and about the sharing of the bandwidth between the various traffic streams? Replace one of the preceding two TCP traffic with UDP traffic. What do you observe? remark: tcpmt (respectively tcptarget) can be executed similarly as (respvt udptarget). 4 Virtual Networks - VLANs A Local Area Network (LAN) is defined as a single diffusion domain. If a hub interconnects all the LAN stations, the collision and flooding domains are identical. A switch has the strong asset to create one collision domain per port, or to eliminate it entirely if it supports full duplex communications and if one single station is plugged to each port (figure 7). Some switches (in particular the HP Procurve 6108 ) allows to create several virtual LAN (VLANs). One VLAN is a LAN that groups virtually together different stations: the station are grouped according to logical (and non physical) criteria (MAC address, port number, protocol, etc.). All these virtual LAN behave like a physical LAN. 6

Collision Domain Broadcast domain Collision domains Switch Broadcast domain Verify the current configuration with show running-config. If it is not, let reset its configuration. vlan 1 name "DEFAULT_VLAN" untagged 1-8 ip address 192.168.0.254 255.255.255.0 exit To enter in configuration mode, let enter configure terminal and the prompt will become : HP ProCurve Switch 6108(config)# Figure 7: Collision domain : /Switch Administering a switch consists in defining VLAN. By default, all the ports are attributed to one single VLAN. You can administer your switch via telnet, a serial line, or via a web interface. In the last case, you have naturally to define before its IP parameters. 4.1 Switch configuration You must verify that all the ports are assigned to the default VLAN (VLAN id=1). You can connect to the switch via telnet 192.168.0.254, the IP address of the switch. If it does not work, let do a reset as described below. Of course, a switch a layer 2 device (but it implements the layer 3, and the whole IP stack for its administration). telnet will allow a privileged connection: you can take a look on the configuration and pass in configuration mode. The prompt is then : HP ProCurve Switch 6108# Small howto (CLI) : There exists a hierarchy in the commands: each level becomes more and more specific. The? prints the available commands. The tabulation allows an automatic completion ; Shortcuts are allowed (if there does not exist any ambiguity): sh ru is equivalent to show running-configuration exit (ou ^z) exist from the current mode To cancel an action, let use no followed by the command When you use a serial line, you must configure the program with 9600 bauds, 8N1 parity, and deactivate the hardware flow control You can reinitialize the switch by maintaining the Reset button pressed and while rebooting the switch 7 4.2 VLAN management We will focus on level 1 VLAN (defined by port) and VLANs 802.1Q to tag frames according to their VLAN number. The reference configuration is described in figure 8. Figure 8: Reference Configuration Operation 7 Let configure the interfaces of, and in the same subnetwork. Let verify communications. What is the subnetwork so that stations can communicate with the switch? Let prove it. 4.2.1 Level 1 VLANs / ports VLANs A VLAN is here defined and one port is associated to one single VLAN. All the stations connected to this port will own to this VLAN. You must first define a new VLAN, and associate a given port to this new VLAN. To create a and add the port Y : 8

HP ProCurve Switch 6108(config)#vlan X HP ProCurve Switch 6108(vlan-X)#untagged Y The commands show vlans and show vlan X list respectively the existing VLANs and their associated ports. Operation 8 Let associate to a new VLAN (i.e. not the default VLAN). Let try a ping from to. What did you remark? Why? Operation 9 Assign to a different IP address (not in the original subnetwork. Let configure a new interface to allow / communications (cf. figure 9). the other side, the ports corresponding to and will not be tagged but associated to one single VLAN. If you want to configure the Port Y to accept frames from VLAN X, you must enter the command: HP ProCurve Switch 6108(vlan-X)#tagged Y Operation 10 We want to set up the topology described in figure 10 em1 vlan0 vlan1 & X Figure 10: VLANs 802.1Q Figure 9: Level 1 VLANs Let verify that the diffusion domains of the two VLANs are isolated. How do you proceed? With this approach, a port can only be assigned to a single VLAN. We will now try 802.1Q to tag the frames. Let verify that can ping and. Let take a look on the frames with wireshark (on,, and ). What do you observe? What is the VLAN field in the frame? 4.2.2 VLANs with tags We will now introduce the notion of virtual interface. We can associate one or several virtual interfaces to one single physical interface, connected to different VLANs. We will use two virtual interfaces over on to receive tagged frames. You must configure a virtual interface by assigning IP parameters, the vlandev, the physical interface it will use, the vlan (the tag id) (cf. man ifconfig). For instance: ifconfig vlan0 create ifconfig vlan0 vlan 1 vlandev ifconfig vlan0 10.0.0.2/24 up Naturally, the switch configuration must correspond to this installation. For instance, the port of the switch connected to must be tagged and own to both VLANs. On 9 10