Unformatted text preview:

Pre Lab 4 LAN Switching Part 1 1 2 Review the Linux man pages for traceroute at www linuxmanpages com Review LAN switching and virtual LANs at the LAN Switching link on the course web page Pre Lab 4 Questions 1 Describe the difference between a LAN switch bridge and a router 2 What is the difference between an Ethernet switch and an Ethernet hub Which is more suitable for a network with a high traffic load a switch or a hub Explain LAB FOUR LAN Switching Part 1 2 LAB 4 A bridge or LAN switch is a device that interconnects two or more local area networks LANs and forwards packets between these networks Different from IP routers bridges and LAN switches operate at the data link layer I e bridges and LAN switches forward packets based on MAC addresses whereas IP routers forward packets based on IP addresses The term bridge was coined in the early 1980s Today when referring to data link layer interconnection devices the terms LAN switch or Ethernet switch in the context of Ethernet are much more common Since many of the concepts configuration commands and protocols for LAN switches in this lab use the old term bridge remember to keep in mind that for the most part the terms switch and bridge are interchangeable NOTE Remember to reboot the PCs and to save all your files in root labdata user and your floppy or usb drive Network Setup for lab 4 The configuration of the equipment is changed several times during the course of this lab The IP addresses of the PCs stay relatively constant however so you can set them now according to the table below Note that this lab is unusual in that both Ethernet interfaces of the machines are on the same subnet This is a result of the Layer 2 focus of the lab PC PC1 PC2 PC3 PC4 IP address of eth0 10 0 1 11 24 10 0 1 21 24 10 0 1 31 24 10 0 1 41 24 IP address of eth1 10 0 1 12 24 10 0 1 22 24 10 0 1 32 24 10 0 1 42 24 Exercise 1 Configuring a Linux PC as a bridge In this exercise you will learn how to configure a Linux PC as a bridge Ethernet bridging functionality is integrated in all recent versions of Linux The configuration of bridging functions in Linux is done with configuration commands and tools In this lab we will use the bridge configuration tool gbrctl The network configuration for this exercise is shown in the figure below PC1 and PC3 are hosts in this network and PC2 is a bridge that connects the two together Notice the need for crossover cables when connecting two network interface cards directly together a crossover cable must be used In the lab these cables are orange 4 1 Topology for Lab 4 Exercise 1 PART A IP configuration of the PCs A 1 Connect the PCs as illustrated in Figure 4 1 A 2 Set up the IP addresses of PC1 PC2 and PC3 as shown in Figure 4 1 Disable interfaces eth1 on PC1 and PC3 You can do this by typing ifconfig eth1 down on those PCs 2 LAB FOUR LAN Switching Part 1 3 A 3 Since you will need to recognize the MAC addresses of the PCs frequently in this lab use ifconfig a on each PC to display them and record them in the table below PC PC1 MAC address of eth0 MAC address of eth1 PC2 PC3 PC4 PART B Configuring the Linux PC bridge Now it s time to configure PC2 as a bridge that forwards packets between the two hosts in Figure 4 1 The bridge configuration on the Linux PCs is done with the tool gbrctl The gbrctl tool has a graphical user interface to configure bridging functions on a Linux PC B 1 Start gbrctl by typing the following command in a terminal window on PC2 PC2 gbrctl The command displays the main gbrctl window as shown in Figure 6 2 which is used to configure the bridging functions The gbrctl tool is terminated by selecting File and then Exit 4 2 Main gbrctl window B 2 It is possible to configure multiple independently operating bridges on the same PC provided there are enough network interface cards on the PC to do so Each bridge is assigned a name and is associated with a set of interfaces Here you configure one bridge on PC2 and assign the bridge the name Bridge1 To start the configuration of PC2 select Add Bridge in the gbrctl main window in Figure 4 2 A window pops up as shown in Figure 4 3 which asks for a name for the new bridge Enter the name Bridge1 When you click OK the newly created bridge is displayed in the gbrctl main window 4 3 Prompt to add new bridge 3 LAB FOUR LAN Switching Part 1 4 B 3 After the bridge is created it is configured in the following steps a b c d e From the gbrctl main window select the bridge name Bridge1 and then select Edit Bridge This displays the Bridge Configuration window which is shown in Figure 4 4 The first part of the configuration is the assignment of network interfaces to the bridge Interfaces are assigned by clicking on the Interfaces tab and selecting Add Interface Then type the name of the interface to be added For PC2 add the interfaces eth0 and eth1 The next part of the configuration sets the parameters of the spanning tree protocol STP Select the Settings tab in the Bridge Configuration window see Figure 4 4 In this exercise the spanning tree protocol is not used Therefore you need to disable the spanning tree protocol by toggling the button next to the STP label so that it shows the label Disabled When the interfaces and the spanning tree protocol parameters are configured terminate the gbrctl application In the last part of the bridge configuration you activate the bridge Bridge1 from a terminal window On a Linux PC each created bridge is represented as a network interface Therefore if you type the command ifconfig a on PC2 the command shows an interface named Bridge1 in addition to the other interfaces eth0 eth1 and lo The bridge is activated by enabling the interface associated with the bridge This is done with the following command PC2 ifconfig Bridge1 up 4 4 Bridge Configuration window Interfaces NOTE Activating a bridge disables the IP configuration of the interfaces assigned to it Hence it is no longer possible to issue ping commands to these interfaces 4 5 Bridge Configuration window Settings PART C Observing the bridge in operation When the bridge configuration of PC2 is complete PC2 forwards packets between PC1 and PC3 This exercise asks you to observe the forwarding of packets C 1 When bridging is activated on PC2 the configured IP addresses on PC2 should be disabled To verify this issue a ping command to interfaces eth0 and eth1 of PC2 from PC1 and PC3 respectively 4 …


View Full Document

UCSC CMPE 150 - Lab 4 LAN Switching Part 1

Documents in this Course
Load more
Loading Unlocking...
Login

Join to view Lab 4 LAN Switching Part 1 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lab 4 LAN Switching Part 1 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?