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

02 Lab Intel-VLAN Router On Stick

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)
12 views6 pages

02 Lab Intel-VLAN Router On Stick

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

Inter-VLAN Router on stick

Topology

Objective: Configuring Inter-VLAN Routing by Router on stick

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/1 and G0/2 to be access ports and belonging to VLAN 10

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

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

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

SW(config-if-range)#

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

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

SW(config-if)#switchport mode access

SW(config-if)#switchport access vlan 20

SW(config-if)#

7. Assign Ports G1/0 to be access port and belonging to VLAN 30

SW(config-if)#int g1/0

SW(config-if)#sw mode access


SW(config-if)#switchport access vlan 30

SW(config-if)#

8. Configure port G0/0 as trunk port

SW(config)#int g0/0

SW(config-if)#switchport trunk encapsulation dot1q

SW(config-if)#switchport mode trunk

SW(config-if)#

9. Save configuration

SW(config-if)#exit

SW(config)#exit

SW#copy run start

Destination filename [startup-config]?

Building configuration...

Compressed configuration from 3726 bytes to 1722 bytes[OK]

SW#

10. On Router, execute the following command to enable its G0/0 interface.

Router#

Router#conf t

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

Router(config)#int g0/0

Router(config-if)#no ip add

Router(config-if)#no shut

Router(config-if)#exit

11. On Router, execute the following commands to enable the dot1q encapsulation protocol (along with the VLAN
ID) and to configure 192.168.10.1/24 IP address on its G0/ 0.10 virtual sub-interface.

Router(config-if)#int g0/0.10

Router(config-subif)#encapsulation dot1Q 10

Router(config-subif)#ip add 192.168.10.1 255.255.255.0

Router(config-subif)#

12. On Router, execute the following commands to enable the dot1q encapsulation protocol (along with the VLAN
ID) and to configure 192.168.20.1/24 IP address on its G0/ 0.20 virtual sub-interface.
Router(config-subif)#int g0/0.20

Router(config-subif)#encapsulation dot1Q 20

Router(config-subif)#ip add 192.168.20.1 255.255.255.0

Router(config-subif)#

13. On Router, execute the following commands to enable the dot1q encapsulation protocol (along with the VLAN
ID) and to configure 192.168.20.1/24 IP address on its G0/ 0.20 virtual sub-interface.

Router(config-subif)#int g0/0.30

Router(config-subif)#encapsulation dot1Q 30

Router(config-subif)#ip add 192.168.30.1 255.255.255.0

Router(config-subif)#

14. Save configuration

Router(config-subif)#exit

Router(config)#exit

Router#copy r s

Destination filename [startup-config]?

15. Configure PC1:

PC1> ip 192.168.10.10/24 192.168.10.1

16. Configure PC2

PC2> ip 192.168.10.20/24 192.168.10.1

17. Configure PC3

PC3> ip 192.168.20.10/24 192.168.20.1

18. Configure PC4

PC4> ip 192.168.30.10/24 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/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/1, Gi0/2

20 IT active Gi0/3
30 ENG active Gi1/0
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 trunk a-full auto RJ45

Gi0/1 connected 10 a-full auto RJ45

Gi0/2 connected 10 a-full auto RJ45

Gi0/3 connected 20 a-full auto RJ45

Gi1/0 connected 30 a-full auto RJ45

Gi1/1 notconnect 1 a-full auto RJ45

Gi1/2 notconnect 1 a-full auto RJ45

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