inter vlan routing with cisco switch and cisco router

in #cisco7 years ago (edited)

hi dear steemit friend today i want describe how config INTERVLAN ROUTING by use router in network ok lets go

in this scenario we have 2 vlans (10 , 20) and most pcs or laptop in these vlans we use for vlan 10 network (192.168.10.0/24) i start 192.168.10.1/24 for first pc and for another vlan number 20 i use 192.168.20.0/24 for network subnet and i use 192.168.20.1/24 for first pc and 192.168.20.2/24 for second pc .

intervlan routing 1.vsdx.jpg

for first step we must config SW(switch) like below commands . we must select fast 0/4 for TRUNK port to Router and i use encapsulation dot1q beetween switch and router then i use allowed command for more security just vlan i want selected and you cand use allowed vlan all command too .
vlanrouting 2.jpg

for next step we must config the router you know if we creat the ports on router with ip address all connected port or network on router by default see each other ok then we must creat 2 sub interfaces for 2 vlan

NOTICE: if you have more than 2 vlans you must creat subinterfaces for each vlan and select the ip address for all sub interfaces .
intervlanrouting3.jpg

after the creat subinterfaces on router you can use show ip route command for seeing routing table ok lets see all connected interfaces see each other you see the C alphabet befor the routing line the C means connected and in router AD connected port is 0 means connected network first choice for routing in the routing table.

intervlanrouting4.jpg
ok in this step lets go on pc in VLAN 10 and in the cmd (command line in windows) write bellow command for seeing how set the ip addresses in this pc.you must set 192.168.10.1 for ip address and 255.255.255.0 for subnet mask and 192.168.10.254 for default gateway ip .

intervlanrouting5.jpg

lets go on pc 2 and 3 in VLAN 20 use same command to see ip configuration you must use 192.168.20.1 for first pc and 192.168.20.2 for second pc and use 255.255.255.0 for subnet mask for all pcs and 192.168.20.254 for default gateway for all pc in thats vlan .
intrvlan routing 6.jpg

after set ip address you must test your routing and your connection between pcs in different vlan you can go in cmd(command line windows) and type bellow command ping for example in one of the pc in the vlan 20 you must ping pc in the vlan 10 ok maybe you ask me why i must use vlaning when we want all vlans see each other i answer the question you must separated traffics between to gather because you must increase broadcast domain and collision domain and you can use the access list between the vlans for control the traffic .

intervlanrouting7.jpg

THANKS FOR READING MY TEACHING ABOUT INTERVLAN ROUTING ALL DEVICES I USED ARE CISCO ROUTER AND SWITCHES .

THANKS FOR UP VOTE TO ME.

@aliarami