Creating Vlans, First Determine The Ports Range For Each Vlan?
Creating Vlans, First Determine The Ports Range For Each Vlan?
o
o
o
>> 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.