Home > Articles > Cisco Network Technology > Routing & Switching > Cisco LAN Switching Fundamentals: Configuring Switches

Cisco LAN Switching Fundamentals: Configuring Switches

  • Sample Chapter is provided courtesy of Cisco Press.
  • Date: Dec 23, 2004.

Chapter Description

This chapter provides guidance and configuration examples for connecting switches running both native and hybrid software configurations, and offers examples of both Layer 3 and Layer 2 connectivity between switches.

Connecting the Switches

Now that a good portion of the "housekeeping" configuration items are complete, connections between the four switches in Figure 7-4 can be configured. All the physical connections between the switches are already in place.

Figure 4Figure 7-4 Physical Links Between Switches

IOS Port/Interface Types

Because a combination of platforms is being used in the examples throughout this chapter, it is important to understand the different types of port/interface types that can be configured on a switch running IOS. Table 7-5 outlines the types of port/interfaces and their uses.

Configuring the Connections

The first connection to bring up is the Gigabit connection between SW1 and SW2. This connection is a single Gigabit link and will not be configured as a trunk, but as a routed physical interface. All interfaces on Catalyst 6000/6500s running native IOS default to routed physical interfaces.

Table 7-5 Port/Interface Types in IOS

Port/Interface Type

Function

Sample Configuration

Routed Physical Interface

Traditional Cisco IOS routed interface. Each interface represents a unique Layer 3 network.

interface gigabitethernet 1/1

no switchport

ip address 172.16.100.1 255.255.255.0

Routed Switch Virtual Interface (SVI)

Single routed interface for all the switchports assigned to a VLAN.

interface vlan 901

ip address 172.16.200.1 255.255.255.0

Access Switch-Port Interface

To group a range of Layer 2 ports into a single VLAN.

interface range fastethernet 2/1-48

switchport mode access

switchport access vlan 130


In Example 7-20, the current configuration of the GigabitEthernet1/2 interface shows the interface is shut down and no IP address is assigned. In Example 7-20, a /30 IP address is assigned from the range for point-to-point links defined in Table 7-3, earlier in this chapter.

Example 7-20 Configuring the GigabitEthernet Link on SW1

SW1#show run interface gigabitethernet 1/2
Building configuration...

Current configuration : 61 bytes
!
interface GigabitEthernet1/2
 no ip address
 shutdown
end

SW1#config t
Enter configuration commands, one per line. End with CNTL/Z.
SW1(config)#interface gigabitethernet 1/2
SW1(config-if)#ip address 172.16.240.5 255.255.255.252
SW1(config-if)#no shutdown
SW1(config-if)#end
SW1#

In Example 7-21, the GigabitEthernet interface on SW2 is configured.

Example 7-21 Configuring the GigabitEthernet Link on SW2

SW2#show run interface gig
SW2#show run interface gigabitethernet 1/1
Building configuration...

Current configuration : 61 bytes
!
interface GigabitEthernet1/1
 no ip address
 shutdown
end

SW2#config t
Enter configuration commands, one per line. End with CNTL/Z.
SW2(config)#interface GigabitEthernet1/1
SW2(config-if)#ip address 172.16.240.6 255.255.255.252
SW2(config-if)#no shut
SW2(config-if)#end
SW2#
1w6d: %SYS-5-CONFIG_I: Configured from console by console

In Example 7-22, a show interface gigabitethernet1/1 command is issued to determine if the interface is now UP/UP, and a ping command is issued to the IP address of the GigabitEthernet1/2 interface on SW1 to determine success.

Example 7-22 Testing the Connection Between SW1 and SW2

SW2#show interface gigabitethernet 1/1
GigabitEthernet1/1 is up, line protocol is up
 Hardware is C6k 1000Mb 802.3, address is 0001.6471.d968 (bia 0001.6471.d968)
 Internet address is 172.16.240.6/30
!output truncated

SW2#ping 172.16.240.5

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.240.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
SW2#

Figure 7-5 shows the network as it is configured at this stage, and the IP addressing information assigned thus far.

Figure 5Figure 7-5 Link Operational Between SW1 and SW2

Next, the connection between SW2 and SW3 is configured, as shown in Example 7-23.

Example 7-23 Configuring the Connection on SW2 to SW3

SW2#config t
Enter configuration commands, one per line. End with CNTL/Z.
SW2(config)#interface fastEthernet 3/37
SW2(config-if)#ip address 172.16.240.9 255.255.255.252
SW2(config-if)#no shutdown
SW2(config-if)#end
SW2#

Because SW3 is running hybrid software, the Layer 2 connection in Catalyst OS is configured first, and then the switched virtual interface (SVI) on the RSM is configured. VLAN 901 is selected from the range of VLANs allocated to point-to-point Layer 2 links. Example 7-24 shows VLAN 901 being created and port 7/1 assigned to VLAN 901. The next step is to configure the RSM with a VLAN 901 interface.

Example 7-24 Configuring the Connection on SW3 to SW2 (Catalyst OS)

SW3> (enable) set vlan 901
Vlan 901 configuration successful
SW3> (enable) set vlan 901 7/1
VLAN 901 modified.
VLAN 1 modified.
VLAN Mod/Ports
---- -----------------------
901  7/1

SW3> (enable)
SW3> (enable) show port 7/1
Port Name        Status   Vlan    Level Duplex Speed Type
----- ------------------ ---------- ---------- ------ ------ ----- ------------
 7/1           connected 901    normal a-full a-100 10/100BaseTX
!Output truncated
SW3> (enable)

Example 7-25 shows VLAN 901 being configured on the RSM of SW3.

Example 7-25 Configuring VLAN 901 on the RSM on SW3

RSM1>en
RSM1#config t
Enter configuration commands, one per line. End with CNTL/Z.
RSM1(config)#interface vlan901
RSM1(config-if)#ip address 172.16.240.10 255.255.255.252
RSM1(config-if)#no shut
RSM1(config-if)#end
RSM1#

In Example 7-26, the show interface vlan901 command is issued to determine if the interface is now UP/UP, and a ping is issued to the IP address of the FastEthernet3/37 interface on SW2 to determine success.

Example 7-26 Testing the Connection Between SW3 and SW2

RSM1#show interface vlan901
Vlan901 is up, line protocol is up
 Hardware is Cat5k Virtual Ethernet, address is 0010.f6b3.4800 (bia 0010.f6
800)
 Internet address is 172.16.240.10/30
!output truncated

RSM1#ping 172.16.240.9

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.240.9, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/9/40 ms
RSM1#

Figure 7-6 shows the network as it looks at this stage, and the IP addressing information assigned thus far.

Figure 6Figure 7-6 Link Operational Between SW3 and SW2

Next, the connection between SW3 and SW1 is configured (see Example 7-27). Again, the Layer 2 connection in Catalyst OS is configured first, followed by the SVI on the RSM. VLAN 902 is used for this link.

Example 7-27 Configuring the Connection on SW3 to SW1 (Catalyst OS)

SW3> (enable) set vlan 902
Vlan 902 configuration successful
SW3> (enable) set vlan 902 7/2
VLAN 902 modified.
VLAN 1 modified.
VLAN Mod/Ports
---- -----------------------
902  7/2

SW3> (enable) show port 7/2
Port Name        Status   Vlan    Level Duplex Speed Type
----- ------------------ ---------- ---------- ------ ------ ----- ------------
 7/2           connected 902    normal a-full a-100 10/100BaseTX
!output truncated

The next step is to configure the RSM with a VLAN902 interface, as shown in Example 7-28.

Example 7-28 Configuring VLAN902 on the RSM on SW3

RSM1#config t
Enter configuration commands, one per line. End with CNTL/Z.
RSM1(config)#interface VLAN902
RSM1(config-if)#ip address 172.16.240.13 255.255.255.252
RSM1(config-if)#no shutdown
RSM1(config-if)#end

Now that the SW3 side of the connection is configured, the other side is configured on SW1 (see Example 7-29).

Example 7-29 Configuring the Connection Between SW1 and SW3

SW1#show run interface FastEthernet10/23
Building configuration...

Current configuration : 60 bytes
!
interface FastEthernet10/23
 no ip address
 shutdown
end

SW1#config t
Enter configuration commands, one per line. End with CNTL/Z.
SW1(config)#interface FastEthernet10/23
SW1(config-if)#ip address 172.16.240.14 255.255.255.252
SW1(config-if)#no shutdown
SW1(config-if)#end
SW1#

In Example 7-30, a show interface FastEthernet10/23 command is issued to determine if the interface is now UP/UP, and a ping is issued to the IP address of the VLAN902 interface on SW3 to determine success.

Example 7-30 Testing the Connection Between SW1 and SW3

SW1#show interface FastEthernet10/23
FastEthernet10/23 is up, line protocol is up
 Hardware is C6k 100Mb 802.3, address is 0005.7418.048a (bia 0005.7418.048a)
 Internet address is 172.16.240.14/30
!output truncated

SW1#ping 172.16.240.13

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.240.13, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
SW1#

Figure 7-7 shows the network as it looks at this stage, and the IP addressing information assigned thus far.

Figure 7Figure 7-7 Link Operational Between SW3 and SW1

Next, the connection between SW1 and SW4 is configured, as shown in Example 7-31.

Example 7-31 Configuring the Connection on SW1 to SW4

SW1#show run interface gigabitethernet 1/1
Building configuration...

Current configuration : 61 bytes
!
interface GigabitEthernet1/1
 no ip address
 shutdown
end

SW1#config t
Enter configuration commands, one per line. End with CNTL/Z.
SW1(config)#interface gigabitethernet 1/1
SW1(config-if)#ip address 172.16.240.17 255.255.255.252
SW1(config-if)#no shutdown
SW1(config-if)#end
SW1#

Next, the connection between SW1 and SW4 is configured, as shown in Example 7-32.

Example 7-32 Configuring the Connection on SW4 to SW1

SW4#show run interface gigabitethernet 1/2
Building configuration...

Current configuration : 36 bytes
!
interface GigabitEthernet1/2
end

SW4#config t
Enter configuration commands, one per line. End with CNTL/Z.
SW4(config)#interface gigabitethernet 1/2
SW4(config-if)#no switchport
SW4(config-if)#ip address 172.16.240.18 255.255.255.252
SW4(config-if)#end
SW4#

It is important to understand that the Catalyst 4500 series switch defaults to all interfaces being configured as Access Port Switch Interfaces. To convert the gigabitethernet1/2 interface from a Layer 2 switchport to a Layer 3 routed physical interface, the no switchport command must be used prior to assigning the IP address in Example 7-32.

In Example 7-33, the show interface gigabitethernet1/2 command is issued to determine if the interface is now up/up and a ping is issued to the IP address of the GigabitEthernet 1/1 interface on SW1 to determine success.

Figure 7-8 shows the network as it looks at this stage, and the IP addressing information assigned thus far.

Example 7-33 Testing the Connection Between SW4 and SW1

SW4#show interface gigabitethernet 1/2
GigabitEthernet1/2 is up, line protocol is up (connected)
 Hardware is Gigabit Ethernet Port, address is 000b.fdd5.62bf (bia 000b.fdd5
bf)
 Internet address is 172.16.240.18/30
!output truncated

SW4#ping 172.16.240.17

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.240.17, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms
SW4#

Figure 8Figure 7-8 Link Operational Between SW1 and SW4

Finally, the connection between SW4 and SW2 is configured, starting with SW4. (See Example 7-34.)

Example 7-34 Configuring the Connection from SW4 to SW2

SW4#show run interface GigabitEthernet1/1
Building configuration...

Current configuration : 36 bytes
!
interface GigabitEthernet1/1
end

SW4#config t
Enter configuration commands, one per line. End with CNTL/Z.
SW4(config)#interface GigabitEthernet1/1
SW4(config-if)#no switchport
SW4(config-if)#ip address 172.16.240.21 255.255.255.252
SW4(config-if)#end
SW4#

The connection is completed by configuring the GigabitEthernet1/2 interface on SW2, as shown in Example 7-35.

Example 7-35 Configuring the Connection from SW2 to SW4

SW2#show run interface GigabitEthernet1/2
Building configuration...

Current configuration : 61 bytes
!
interface GigabitEthernet1/2
 no ip address
 shutdown
end

SW2#config t
Enter configuration commands, one per line. End with CNTL/Z.
SW2(config)#interface GigabitEthernet1/2
SW2(config-if)#ip address 172.16.240.22 255.255.255.252
SW2(config-if)#no shutdown
SW2(config-if)#end
SW2#

In Example 7-36, the show interface gigabitethernet 1/2 command is issued to determine if the interface is now UP/UP, and a ping is issued to the IP address of the GigabitEthernet 1/1 interface on SW4 to determine success.

Example 7-36 Testing the Connection Between SW2 and SW4

SW2#show interface gigabitethernet 1/2
GigabitEthernet1/2 is up, line protocol is up
 Hardware is C6k 1000Mb 802.3, address is 0001.6471.d969 (bia 0001.6471.d969)
 Internet address is 172.16.240.22/30
!output truncated

SW2#ping 172.16.240.21

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.240.25, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms
SW2#

Figure 7-9 shows the completed switch connections, and all the network addresses assigned.

Figure 9xFigure 7-9 Completed Connections Between All Four Switches

Now that the basic connections between switches have been established, ports to be used for access layer devices, such as workstations and servers, will be configured.

5. Configuring the Access Layer | Next Section Previous Section

Cisco Press Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from Cisco Press and its family of brands. I can unsubscribe at any time.

Overview

Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about Cisco Press products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information

To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites; develop new products and services; conduct educational research; and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@ciscopress.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information

Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security

Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children

This site is not directed to children under the age of 13.

Marketing

Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information

If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out

Users can always make an informed choice as to whether they should proceed with certain services offered by Cisco Press. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.ciscopress.com/u.aspx.

Sale of Personal Information

Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents

California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure

Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links

This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact

Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice

We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020