INTER VLAN ROUTING WITH ROUTER (CISCO)

in #cisco7 years ago (edited)

HI my dear steemit friend today i want talk about CISCO INTER VLAN ROUTING with ROUTER .

look at the this scenario:

INTERVLAN ROUTING.jpg

at this scenario we have 3 switches in access level and one switch in distribute level and one router in core level and we have 8 different vlan in our network and we want all vlan access together .

!!!NOTICE!!!: without intervlan routing all vlan don’t have access together .

STEP 1:

we must create vlans in switch each switch have different vlan .

SW1#conf t

SW1(config)# vlan 200

SW1(config)#name (you can choos the name for your vlan this step is optional)

SW1(config)# vlan 210

SW1(config)# vlan 220

SW1(config)# end
after this step you can see your creat vlan with this command

SW1#show vlan

ok now we creat vlans in sw1 and after this step we must creat a trunk port to distribute SW for this action you can follow this command:

SW1#conf t

SW1(config)#interface fast 0/1(for this action you can select each interface you want )

SW1(config-if)#switchport mode trunk

SW1(config-if)#switchport trunk encapsulation dot1Q

SW1(config-if)#end

after this step you can go to the another switch you must every switch like a SW1

after you can creat all vlan in switches you must go to the distribute SW and follow this command:

in this SW you must select one port connect to the Router and select 3 ports connect to the SW1-SW2-SW3 these ports must config trunk mode follow the command on SW1.

for the port connect to the router you must config trunk mode .

SW-EDGE#conf t
SW-EDGE(config)#interface fast 0/1
SW-EDGE(config-if)#description<<CONNECT-TO-ROUTER>>
SW-EDGE(config-if)#switchport mode trunk
SW-EDGE(config-if)#switchport trunk encapsulation dot1q
SW-EDGE(config-if)#exit


SW-EDGE(config)#interface fast 0/2
SW-EDGE(config-if)#description<<CONNECT-TO-SW1>>
SW-EDGE(config-if)#switchport mode trunk
SW-EDGE(config-if)#switchport trunk encapsulation dot1q
SW-EDGE(config-if)#exit


SW-EDGE(config)#interface fast 0/3
SW-EDGE(config-if)#description<<CONNECT-TO-SW2>>
SW-EDGE(config-if)#switchport mode trunk
SW-EDGE(config-if)#switchport trunk encapsulation dot1q
SW-EDGE(config-if)#exit


SW-EDGE(config)#interface fast 0/4
SW-EDGE(config-if)#description<<CONNECT-TO-SW3>>
SW-EDGE(config-if)#switchport mode trunk
SW-EDGE(config-if)#switchport trunk encapsulation dot1q
SW-EDGE(config-if)#exit


after this steps you can go to the router and follow these command:

ROUTER#conf t
ROUTER(config)#interface 0/1.200
!!!NOTICE!!! in this step you must connect one interface to the distribute switch in this scenario we connect interface fast 0/1 to the distribute switch on fast 0/1 and after this we must virtual interface under fast 0/1 like upper command.and we must creat virtual interface for all vlans in the router .

ROUTER(config)#interface 0/1.200
ROUTER(config-subif)#encapsulation dot1Q 200
ROUTER(config-subif)#ip address 192.168.200.1 255.255.255.0
ROUTER(config-subif)#exit


ROUTER(config)#interface 0/1.210
ROUTER(config-subif)#encapsulation dot1Q 200
ROUTER(config-subif)#ip address 192.168.210.1 255.255.255.0
ROUTER(config-subif)#exit


ROUTER(config)#interface 0/1.220
ROUTER(config-subif)#encapsulation dot1Q 220
ROUTER(config-subif)#ip address 192.168.220.1 255.255.255.0
ROUTER(config-subif)#exit


ROUTER(config)#interface 0/1.300
ROUTER(config-subif)#encapsulation dot1Q 300
ROUTER(config-subif)#ip address 192.168.130.1 255.255.255.0
ROUTER(config-subif)#exit


ROUTER(config)#interface 0/1.310
ROUTER(config-subif)#encapsulation dot1Q 310
ROUTER(config-subif)#ip address 192.168.131.1 255.255.255.0
ROUTER(config-subif)#exit


ROUTER(config)#interface 0/1.320
ROUTER(config-subif)#encapsulation dot1Q 320
ROUTER(config-subif)#ip address 192.168.132.1 255.255.255.0
ROUTER(config-subif)#exit


ROUTER(config)#interface 0/1.400
ROUTER(config-subif)#encapsulation dot1Q 400
ROUTER(config-subif)#ip address 192.168.140.1 255.255.255.0
ROUTER(config-subif)#exit


ROUTER(config)#interface 0/1.410
ROUTER(config-subif)#encapsulation dot1Q 410
ROUTER(config-subif)#ip address 192.168.141.1 255.255.255.0
ROUTER(config-subif)#exit


ROUTER(config)#interface 0/1.420
ROUTER(config-subif)#encapsulation dot1Q 420
ROUTER(config-subif)#ip address 192.168.142.1 255.255.255.0
ROUTER(config-subif)#exit


ok after these steps you must set the default gateway on your computers for example one of the pc in the vlan 200 must set the 192.168.200.1 for default gateway.

after these steps all vlan access together :) good luck my friend if you have any question about this scenario please contact to me .

Sort:  

This post received a 1.1% upvote from @randowhale thanks to @aliarami! For more information, click here!

that didn't even made it even for me :))