Sei sulla pagina 1di 7

Aim : To create Simple Virtual Local Area Network (VLAN).

Cables : 1 Cross-Over Cable 4 Straight- Through Cables Devices :

2 4

Test: Successful ping between same 2 PC of same network connected through different Switch. Configuration : 1) First creating basic physical connection of 2 switch & 4 computer using cabals.

Figure 1 : Physical Connection

2) Assigning IP address for each PC. Lets assume 2 Department such as Sales & Marketing. 1st PC connected to Switch 1 from Sales & also 1st PC connected to Switch 2 from Sales Dept. Also Marketing department had remaining PC. So scenario will Look like following

Note: IP address of each department belonging to same network.

3) Creating Virtual database on Switch 1. Go to privileged mode of switch

Switch_1# Switch_1#vlan database % Warning: It is recommended to configure VLAN from config mode, as VLAN database mode is being deprecated. Please consult user documentation for configuring VTP/VLAN in config mode. Switch_1(vlan)#vlan [vlan no] name [vlan name] Switch_1(vlan)#vlan 2 name sales VLAN 2 added: Name: sales Switch_1(vlan)#vlan 3 name mkt VLAN 3 added: Name: mkt Switch_1(vlan)# To view VLAN database. Go to privileged mode of switch then type. Switch_1# Switch_1#show vlan brief VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4 Fa0/5, Fa0/6, Fa0/7, Fa0/8 Fa0/9, Fa0/10, Fa0/11, Fa0/12 Fa0/13, Fa0/14, Fa0/15, Fa0/16 Fa0/17, Fa0/18, Fa0/19, Fa0/20 Fa0/21, Fa0/22, Fa0/23, Fa0/24 Gig1/1, Gig1/2 2 sales active 3 mkt active 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active Switch_1#

4) Creating exact same Virtual database on Switch 2. Go to privileged mode of switch

Switch_2# Switch_2#vlan database % Warning: It is recommended to configure VLAN from config mode, as VLAN database mode is being deprecated. Please consult user documentation for configuring VTP/VLAN in config mode. Switch_2(vlan)#vlan [vlan no] name [vlan name] Switch_2(vlan)#vlan 2 name sales VLAN 2 added: Name: sales Switch_2(vlan)#vlan 3 name mkt VLAN 3 added: Name: mkt Switch_2(vlan)# To view VLAN database. Go to privileged mode of switch then type. Switch_2# Switch_2#show vlan brief VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4 Fa0/5, Fa0/6, Fa0/7, Fa0/8 Fa0/9, Fa0/10, Fa0/11, Fa0/12 Fa0/13, Fa0/14, Fa0/15, Fa0/16 Fa0/17, Fa0/18, Fa0/19, Fa0/20 Fa0/21, Fa0/22, Fa0/23, Fa0/24 Gig1/1, Gig1/2 2 sales active 3 mkt active 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active Switch_2#

5) Create Trunk Link between two switches. So select switch 1

Switch_1>en Switch_1#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Switch_1(config)#int f 0/10 Switch_1(config-if)#switchport mode trunk %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/10, changed state to down %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/10, changed state to up Switch_1(config-if)#

To check trunk status of port use command #show interfaces trunk Switch_1#show interfaces trunk Port Mode Encapsulation Fa0/10 on 802.1q Port Vlans allowed on trunk Fa0/10 1-1005 Port Vlans allowed and active in management domain Fa0/10 1,2,3,1002,1003,1004,1005 Port Vlans in spanning tree forwarding state and not pruned Fa0/10 1,2,3,1002,1003,1004,1005 Switch_1#

Status trunking

Native vlan 1

6) Assigning Switch port to VLAN a. Vlan 2 on Switch 1 Switch_1#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Switch_1(config)# interface fastEthernet 0/1 Switch_1(config-if)#switchport mode access Switch_1(config-if)#switchport access vlan 2 Switch_1(config-if)#exit

b. Vlan 2 on Switch 2 Switch_2>en Switch_2#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Switch_2(config)# interface fastEthernet 0/1 Switch_2(config-if)#switchport mode access Switch_2(config-if)#switchport access vlan 2 Switch_2(config-if)# 7) Follow above procedure a. Vlan 3 on switch 1 Switch_1# Switch_1#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Switch_1(config)# interface fastEthernet 0/2 Switch_1(config-if)#switchport mode access Switch_1(config-if)#switchport access vlan 3 Switch_1(config-if)# b. Vlan 3 on switch 2 Switch_2# Switch_2#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Switch_2(config)# interface fastEthernet 0/2 Switch_2(config-if)#switchport mode access Switch_2(config-if)#switchport access vlan 3 Switch_2(config-if)#

8) Check Vlan database on each Switch a. Switch 1 Switch_1# Switch_1#show vlan brief VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------1 default active Fa0/3, Fa0/4, Fa0/5, Fa0/6 Fa0/7, Fa0/8, Fa0/9, Fa0/11 Fa0/12, Fa0/13, Fa0/14, Fa0/15 Fa0/16, Fa0/17, Fa0/18, Fa0/19 Fa0/20, Fa0/21, Fa0/22, Fa0/23 Fa0/24, Gig1/1, Gig1/2 2 sales active Fa0/1 3 mkt active Fa0/2 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active Switch_1# b. Switch 2 Switch_2# Switch_2#show vlan brief VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------1 default active Fa0/3, Fa0/4, Fa0/5, Fa0/6 Fa0/7, Fa0/8, Fa0/9, Fa0/11 Fa0/12, Fa0/13, Fa0/14, Fa0/15 Fa0/16, Fa0/17, Fa0/18, Fa0/19 Fa0/20, Fa0/21, Fa0/22, Fa0/23 Fa0/24, Gig1/1, Gig1/2 2 sales active Fa0/1 3 mkt active Fa0/2 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active Switch_2#

9) Test connection between 2 PC of same department connected to different Switch a. Ping from 192.168.10.1 To 192.168.10.2 Packet Tracer PC Command Line 1.0 PC>ping 192.168.10.2 Pinging 192.168.10.2 with 32 bytes of data: Reply Reply Reply Reply from from from from 192.168.10.2: 192.168.10.2: 192.168.10.2: 192.168.10.2: bytes=32 bytes=32 bytes=32 bytes=32 time=176ms TTL=128 time=78ms TTL=128 time=94ms TTL=128 time=78ms TTL=128

Ping statistics for 192.168.10.2: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 78ms, Maximum = 176ms, Average = 106ms PC> b. Ping from 192.168.20.1 To 192.168.20.2 Packet Tracer PC Command Line 1.0 PC>ping 192.168.20.2 Pinging 192.168.20.2 with 32 bytes of data: Reply Reply Reply Reply from from from from 192.168.20.2: 192.168.20.2: 192.168.20.2: 192.168.20.2: bytes=32 bytes=32 bytes=32 bytes=32 time=172ms TTL=128 time=78ms TTL=128 time=78ms TTL=128 time=93ms TTL=128

Ping statistics for 192.168.20.2: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 78ms, Maximum = 172ms, Average = 105ms

10)

Inter VLAN communication not possible.


Ping from 192.168.10.1 to 192.168.20.1 Packet Tracer PC Command Line 1.0 PC>ping 192.168.20.1 Pinging 192.168.20.1 with 32 bytes of data: Request Request Request Request timed timed timed timed out. out. out. out.

Ping statistics for 192.168.20.1: Packets: Sent = 4, Received = 0, Lost = 4 (100% loss), PC>

Potrebbero piacerti anche