0% found this document useful (0 votes)
67 views

Creating Vlans, First Determine The Ports Range For Each Vlan?

The document provides instructions for creating VLANs on a switch and configuring routing between the VLANs. It describes assigning port ranges to three VLANs, reserving ports for trunking, creating the VLANs on the switch, assigning access ports, and connecting a router with subinterfaces for each VLAN to provide IP addresses and routing.

Uploaded by

Abdullah Aslam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views

Creating Vlans, First Determine The Ports Range For Each Vlan?

The document provides instructions for creating VLANs on a switch and configuring routing between the VLANs. It describes assigning port ranges to three VLANs, reserving ports for trunking, creating the VLANs on the switch, assigning access ports, and connecting a router with subinterfaces for each VLAN to provide IP addresses and routing.

Uploaded by

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

Creating Vlans, first determine the ports range for each vlan?

If 3 vlans are to be created:


>> A Switch has ports from fa0/1 to fa0/24
>> Assign port ranges to each vlan:
1. Vlan 10 has fa0/2-7 (suppose net-id is: 10.0.0.0)
2. Vlan 20 has fa0/8-12 (suppose net-id is: 20.0.0.0)
3. Vlan 30 has fa0/13-18 (suppose net-id is: 30.0.0.0)
>> Reserve fa0/1 for switch-to-router connection and fa0/24 for switch-toswitch connection. Set trunk mode to both these ports early on:
Go to the switch.
Go in Enable mode and Configuration Terminal.
Write for both reserved ports the following:
o Int fa0/1
o Switchport mode trunk
o Exit
o Int fa0/24
o Switchport mode trunk
o Exit
>> Now create vlan on the switch:
In switchs config terminal
Write vlan <vlan id> in this case we have vlan 10
Do the following:
o Vlan 10
o Name HR
o Vlan 20
o Name admin
o Vlan 30
o Name office
>> Once the vlan ids are created. It is time to set their interfaces for the port
ranges we just mentioned at the top.
Inside switchs config terminal
Write int range fa0/2-7 (in this case for vlan 10). Do the following
o Int range fa0/2-7
o Switchport mode access
o Switchport access vlan 10
o Exit
o Int range fa0/8-12
o Switchport mode access
o Switchport access vlan 20
o Exit
o Int range fa0/13-18

o
o
o

Switchport mode access


Switchport access vlan 30
Exit

>> Now we have set the interfaces for the ranges of vlans. Simply provide the IP
addresses to all the PCs connected with the switch (make sure you check the
ports of each switch-to-PC connection).
>> You can only ping within one vlan. Vlan-to-Vlan ping is restricted.
>> Connect another switch with the previous switch. The connection line will be
copper-crossover (dotted line). Make sure the connection of both switch is b/w
their fa0/24 port.
>> Configure the above steps on the new switch.
>> Make sure you switchport mode trunk on the reserved ports.
>> Now you should be able to ping same vlans across the switches.

Switch-to-Router Configuration:
>> Set-up a router with the initial switch on fa0/1 port of the switch.
>> We have already trunk the reserved port on the switch so we skip this step.
>> Go to Routers configuration terminal.
>>For each vlan, we need a separate gateway ip but we have only one connection
with router-to-switch i.e. fa0/0 from Router.
>> First things first. Go to int fa0/0, and enter no shut command and exit.
>> We can assign each vlan ips on the same routers port simply by the following
sub-interface.
Command: int fa0/0.<vlan-id>
Encapsulation dot1Q <vlan-id>
ip add
no shut
exit
>> Do the following to setup the router interfaces:

Int fa0/0.10
Encapsulation dot1Q 10
Ip add 10.0.0.1 255.0.0.0
No shut
Exit
Int fa0/0.20

Encapsulation dot1Q 20
Ip add 20.0.0.1 255.0.0.0
No shut
Exit
Int fa0/0.30
Encapsulation dot1Q 30
Ip add 30.0.0.1 255.0.0.0
No shut
Exit.

>> Configure Telnet on the router with line vty 0 15, password iba, login, exit.
>> Now you should be able to ping PCs with the router.
>> If you add multiple routers, make sure that you should enter all the vlan net
ids on the router rip protocol of the router connected with vlans switch.

You might also like