Lab 3.4.2 Configuring a Trunk Port to Connect Switches

Objectives

•  Observe default switch VLAN configuration and operation.

•  Configure static VLANs on a switch.

•  Verify VLAN configuration and operation.

•  Configure trunking between switches.

Background / Preparation

This lab focuses on the basic VLAN configuration of the Cisco 2960 switch (or similar) using Cisco IOS commands. The information in this lab applies to other switches; however, command syntax may vary. Depending upon the switch model, the interface designations may differ. For example, modular switches have multiple slots; therefore, the Fast Ethernet ports may be Fast Ethernet 0/1 or Fast Ethernet 1/1, depending on the slot and port.

The following resources are required:

•  Two Cisco 2960 switches or equivalent switches

•  Two Windows-based PCs with a terminal emulation program

•  At least one RJ-45-to-DB-9 connector console cable to configure the switch and the router

•  Three straight-through Ethernet cables to connect from the PCs to the switches

•  One crossover Ethernet cable to connect S1 to S2

NOTE: Make sure that the routers and the switches have been erased and have no startup configurations. Instructions for erasing both switch and router are provided in the Lab Manual, located on Academy Connection in the Tools section.

Step 1: Connect the equipment

a.  Connect Switch 1 Fa0/1 interface to Switch 2 Fa0/1 interface with a crossover cable.

b.  Connect Host 1a Ethernet interface with a straight-through cable to Switch 1 Fa0/2 interface.

c.  Connect Host 1b Ethernet interface with a straight-through cable to Switch 1 Fa0/3 interface.

d.  Connect Host 2 Ethernet interface with a straight-through cable to Switch 2 Fa0/2 interface.

e.  Connect a PC with a console cable to perform configurations on the router and switches.

f.  Configure IP addresses on the hosts as shown in the chart.

Step 2: Perform basic configuration of Switch 1 and Switch 2

a.  Connect a PC to the console port of the switches to perform configurations using a terminal emulation program.

b.  Configure Switch 1 with a hostname and console, Telnet, and privileged passwords according to the table diagram. Save the configuration.

c.  Configure Switch 2 with a hostname and console, Telnet, and privileged passwords according to the table diagram. Save the configuration.

Step 3: Configure host PCs

Configure the host PCs according to the information in the table and diagram.

Step 4: Verify default VLAN configuration and connectivity

a.  When directly connecting some switches, as in this lab, the switch ports automatically configure themselves for trunking. To prevent this, manually configure the switch ports for normal operation on

S1 and S2.

S1(config)#interface fa0/1

S1(config-if)#

S2(config)#

switchport mode access

interface fa0/1

S2(config-if)#switchport mode access

b.  Verify default VLAN configurations on both switches with the show vlan command.

S1#show vlan

S2#show vlan

Is every switch port assigned to a VLAN?

Jawaban = ya

Which VLAN do the ports appear in?  switch 1 Fa0/1

Should any host or switch be able to ping any other host or switch at this time?

c.  Verify this by pinging from Host 1a to all the other hosts and switches.  Are all the pings successful?

Jawaban = ya, berhasil karena masih didalam 1 kelas.

 

Step 5: Create and verify VLAN configuration

a.  Create and name VLANs 2 and 3 on both switches.

S1(config)#vlan 2

S1(config-vlan)#name fred

S1(config-vlan)#exit

S1(config)#vlan 3

S1(config-vlan)#name wilma

S1(config-vlan)#exit

S2(config)#vlan 2

S2(config-vlan)#name fred

S2(config-vlan)#

S2(config)#

exit

vlan 3

S2(config-vlan)#name wilma

S2(config-vlan)#exit

 

b.  Assign switch ports to VLANs. The ports connecting Hosts 1a and 2 will be assigned to VLAN 2 and the port connecting Host 1b will be assigned to VLAN 3. Save the configurations.

S1(config)#int fa0/2

S1(config-if)#switchport access vlan 2

S1(config-if)#exit

S1(config)#interface fa0/3

S1(config-if)#switchport access vlan 3

S1(config-if)#end

S1#copy running-config startup-config

S2(config)#int fa0/2

S2(config-if)#switchport access vlan 2

S2(config-if)#

S2#copy running-config startup-config

End

c.  Test connectivity between devices.

1)  Ping from S1 to S2.

Are the pings successful? berhasil

To what VLAN do the management interfaces of S1 and S2 belong? Host 1a

 

2)  Ping from Host 1a to Host 2.

Are the pings successful? Ya berhasil

To what VLAN do Hosts 1a and 2 belong?  Switch 1 (s1)

To what VLAN do the Fa0/1 interfaces of the switches belong? Sebagai interface S1 dan S2

If Hosts 1a and 2 belong to the same VLAN, why can’t they ping each other? Karena tidak adanya konfigurasi yang menentukan siapa yang akan menjadi gatewaynya.

 

3)  Ping from host 1a to S1.

Are the pings successful? tidak

Why can’t Host 1a ping S1? Karena Switch 1 berfungsi hanya sebagai penerus dari S2.

 

Step 6: Configure and verify trunking

To allow connectivity within multiple VLANs across multiple switches, trunking can be configured. Without trunking, each VLAN requires a separate physical connection between switches.

a.  Configure trunking on S1 and S2. Port Fa0/1 on S1 is already connected to port Fa0/1 on S2.

S1(config)#int Fa0/1

S1(config-if)#switchport mode trunk

S1(config-if)#end

 

S2(config)#int Fa0/1

S2(config-if)#switchport mode trunk

S2(config-if)#end

b.  Verify the creation of the trunk with the show interfaces trunk command.

S1#show interfaces trunk

 

S2#show interfaces trunk

Do the trunk interfaces appear in the output? Ya, muncul

What VLAN is set as the native VLAN? 1a

What VLANs are allowed to communicate over the trunk? 1b

c.  View the VLAN configuration on both switches with the show vlan command.

S1#show vlan

S2#show vlan

Do the S1 and S2 Fa0/1 interfaces appear in a VLAN? Why or why not?

Jawaban = ya muncul, karena telah diberikan perintah konfigurasi untuk memunculkan kedua swtich

d.  Retest the connectivity between devices.

1)  Ping from S1 to S2.

Are the pings successful? Ya berhasil

2)  Ping from Host 1a to Host 2.

Are the pings successful? Ya, berhasil

3)  Ping from Host 1b to Host 2.

Are the pings successful? Ya berhasil

4)  Ping from Host 1a to S1.

Are the pings successful? Ya berhasil

e.  The ping test should show that devices that belong to the same VLAN can now communicate with each other across switches, but devices in different VLANs cannot communicate with each other. What would have to be configured to allow devices in different VLANs to communicate with each other?

Jawaban = ayng harus dikonfigurasi ialah alamat pada NIC address

Step 7: Observe the default trunking behavior of switches

a.  Previously in this lab, the Fa0/1 interfaces on the switches were manually configured for trunking. Remove that configuration with the no switchport mode trunk command.

S1(config)#int Fa0/1

S1(config-if)#no switchport mode trunk

S1(config-if)#end

 

S2(config)#int Fa0/1

S2(config-if)#no switchport mode trunk

S2(config-if)#end

b.  View the trunking status of the switch ports.

S1#show interfaces trunk

 

S2#show interface trunk

Are Fa0/1 on S1 and S2 in trunking mode? ya

What trunking mode did they default to?

What trunking encapsulation did they default to?

 

 

Step 8: Reflection

a.  Why would trunking be configured in a network?

Jawaban= untuk menentukan switch mana yang berfungsi sebagai VLAN atau switch yang berfungsi hanya sebagai jalur transmisi dan bias memanfaat kan setiap switch yagn dimiliki untuk membentuk VLAN.

 

b.  Does trunking allow for communication between VLANS?

Ya, itu mendukung.

c.  With no configuration, from which VLAN are frames forwarded across the trunk without VLAN tagging added?  Jawaban= jika tampa dikonfigurasi maka, Pc yang hanay dlam satu jalur yang bis berkomunikasi.