0% found this document useful (0 votes)
23 views6 pages

01 Lab Inter-VLAN

Lab

Uploaded by

eye.shop.sa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views6 pages

01 Lab Inter-VLAN

Lab

Uploaded by

eye.shop.sa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Lab: Inter-VLAN

Topology

Objective: Configure Inter-VLAN

Steps:

1. Set host name on the switch to "SW“

Switch>

Switch>en

Switch#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#host SW

SW(config)#

2. Create VLNA 10 and name it “Sales”

SW(config)#vlan 10

SW(config-vlan)#name Sales
SW(config-vlan)#

3. Create VLNA 20 and name it “IT”

SW(config)#vlan 20

SW(config-vlan)#name IT

SW(config-vlan)#

4. Create VLNA 10 and name it “ENG”

SW(config)#vlan 30

SW(config-vlan)#name ENG

SW(config-vlan)#

5. Assign Ports G0/0 and G0/1 to be access ports and belonging to VLAN 10

SW(config)#int range g0/0-1

SW(config-if-range)#switchport mode access

SW(config-if-range)#switchport access vlan 10

SW(config-if-range)#

6. Assign Ports G0/2 to be access port and belonging to VLAN 20

SW(config-if-range)#int g0/2

SW(config-if)#switchport mode access

SW(config-if)#switchport access vlan 20

SW(config-if)#

7. Assign Ports G0/3 to be access port and belonging to VLAN 30

SW(config-if)#int g0/3

SW(config-if)#sw mode access

SW(config-if)#switchport access vlan 30

SW(config-if)#

8. Create interface VLAN 10 and assign IP 192.168.10.1/24


SW(config)#interface vlan 10

SW(config-if)#ip address 192.168.10.1 255.255.255.0

SW(config-if)#no shut

SW(config-if)#

9. Create interface VLAN 20 and assign IP 192.168.20.1/24

SW(config)#interface vlan 20

SW(config-if)#ip add 192.168.20.1 255.255.255.0

SW(config-if)#no shut

SW(config-if)#

10. Create interface VLAN 30 and assign IP 192.168.30.1/24

SW(config-if)#int vlan 30

SW(config-if)#ip add 192.168.30.1 255.255.255.0

SW(config-if)#no shut

SW(config-if)#

11. Save configuration

SW(config-if)#exit

SW(config)#exit

SW#

*Jun 6 00:59:04.123: %SYS-5-CONFIG_I: Configured from console by console

SW#copy run start

Destination filename [startup-config]?

Building configuration...

Compressed configuration from 3726 bytes to 1722 bytes[OK]

SW#

*Jun 6 00:59:17.841: %GRUB-5-CONFIG_WRITING: GRUB configuration is being updated on disk.


Please wait...

*Jun 6 00:59:18.570: %GRUB-5-CONFIG_WRITTEN: GRUB configuration was written to disk


successfully.

SW#

12. Configure PC1:


root@PC-1:~# ifconfig eth0 192.168.10.10 netmask 255.255.255.0

root@PC-1:~# route add default gw 192.168.10.1

13. Configure PC2

root@PC-2:~# ifconfig eth0 192.168.10.20 netmask 255.255.255.0

root@PC-2:~# route add default gw 192.168.10.1

14. Configure PC3

root@PC-3:~# ifconfig eth0 192.168.20.10 netmask 255.255.255.0

root@PC-3:~# route add default gw 192.168.20.1

15. Configure PC4

root@PC-4:~# ifconfig eth0 192.168.30.10 netmask 255.255.255.0

root@PC-4:~# route add default gw 192.168.30.1

Verifying VLAN Configuration


To show VLANs configured on the router with their ports, use “show vlan” command

SW#sh vlan

VLAN Name Status Ports

---- -------------------------------- --------- -------------------------------

1 default active Gi1/0, Gi1/1, Gi1/2, Gi1/3

Gi2/0, Gi2/1, Gi2/2, Gi2/3

Gi3/0, Gi3/1, Gi3/2, Gi3/3

10 Sales active Gi0/0, Gi0/1


20 IT active Gi0/2
30 ENG active Gi0/3
1002 fddi-default act/unsup

1003 token-ring-default act/unsup

1004 fddinet-default act/unsup

1005 trnet-default act/unsup

To display the status of ports, use “show interfaces status” command


SW#show interfaces status

Port Name Status Vlan Duplex Speed Type

Gi0/0 connected 10 a-full auto RJ45

Gi0/1 connected 10 a-full auto RJ45

Gi0/2 connected 20 a-full auto RJ45

Gi0/3 connected 30 a-full auto RJ45

Gi1/0 notconnect 1 a-full auto RJ45

Gi1/1 notconnect 1 a-full auto RJ45

Gi1/2 notconnect 1 a-full auto RJ45

To display IP assigned to interfaces, use “sh ip int b” command

Interface IP-Address OK? Method Status Protocol

GigabitEthernet0/0 unassigned YES unset up up

GigabitEthernet0/1 unassigned YES unset up up

GigabitEthernet0/2 unassigned YES unset up up

GigabitEthernet0/3 unassigned YES unset up up

GigabitEthernet1/0 unassigned YES unset down down

GigabitEthernet1/1 unassigned YES unset down down

GigabitEthernet1/2 unassigned YES unset down down

GigabitEthernet1/3 unassigned YES unset down down

GigabitEthernet2/0 unassigned YES unset down down

GigabitEthernet2/1 unassigned YES unset down down

GigabitEthernet2/2 unassigned YES unset down down

GigabitEthernet2/3 unassigned YES unset down down

GigabitEthernet3/0 unassigned YES unset down down

GigabitEthernet3/1 unassigned YES unset down down

GigabitEthernet3/2 unassigned YES unset down down

GigabitEthernet3/3 unassigned YES unset down down


Vlan10 192.168.10.1 YES manual up up

Vlan20 192.168.20.1 YES manual up up

Vlan30 192.168.30.1 YES manual up up

Test connectivity between all PCs

One PC1

Ping PC2

Ping 192.168.10.20

Ping PC3

Ping 192.168.20.10

Ping PC4

Ping 192.168.30.10

You might also like