Configuring traditional inter-VLAN routing

 

Configuring traditional inter-VLAN routing




========================================================
command line on switch
Vlan 10

Switch(config)#hostname S1
S1(config)#vlan 10
S1(config-vlan)#name IT
S1(config-vlan)#ex
S1(config)#vlan 20
S1(config-vlan)#name HR
S1(config-vlan)#ex
S1(config)#interface fastEthernet 0/1
S1(config-if)#switchport mode access
S1(config-if)#switchport access vlan 10
S1(config-if)#ex
S1(config)#interface fastEthernet 0/2
S1(config-if)#switchport mode access
S1(config-if)#switchport access vlan 10
S1(config-if)#interface fastEthernet 0/5
S1(config-if)#switchport mode access
S1(config-if)#switchport access vlan 10
S1(config-if)#ex
===========================================================

Vlan 20

S1(config)#interface fastEthernet 0/3
S1(config-if)#switchport mode access
S1(config-if)#switchport access vlan 20
S1(config-if)#ex
S1(config)#interface fastEthernet 0/4
S1(config-if)#switchport mode access
S1(config-if)#switchport access vlan 20
S1(config-if)#exit
S1(config)#interface fastEthernet 0/6
S1(config-if)#switchport mode access
S1(config-if)#switchport access vlan 20
S1(config-if)#ex
S1(config-if)#write
===========================================================
command line on router

R1(config)#interface fastEthernet 0/0
R1(config-if)#ip add 192.168.1.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#ex
R1(config)#interface fastEthernet 0/1
R1(config-if)#ip add 192.168.2.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#ex
R1(config-if)#write

Comments