9.3.10

Inter VLAN configuration (Router on Stick)

In only one physical router interface. While it takes is two different subnets. Therefore necessary dirouter made subinterface for each vlan. Configuring the Router is:R0 (config-if) #R0 (config-if) #R0 (config-if) # int f0/0.10R0 (config-subif) # encapsulation dot1q 10R0 (config-subif) # ip address 192.168.1.1 255.255.255.0R0 (config-subif) #R0 (config-subif) # int f0/0.20R0 (config-subif) # encapsulation dot1q 20R0 (config-subif) # ip address 192.168.2.1 255.255.255.0R0 (config-subif) #R0 (config-subif) # ^ ZR0 #* March 1 00:25:49.183:% SYS 5 CONFIG_I: Configured from console byconsoleR0 #R0 # exitEncapsulation is used dot1Q.

Configuring the switches are:SW0 (config) # int f0 / 0SW0 (config-if) # switchport trunk encapsulation dot1qSW0 (config-if) # switchport mode trunkSW0 (config-if) #SW0 (config-if) # int f0 / 1SW0 (config-if) # switchport access vlan 10SW0 (config-if) # switchport mode accessSW0 (config-if) #SW0 (config-if) # int f0 / 2SW0 (config-if) # switchport access vlan 20SW0 (config-if) # switchport mode accessSW0 (config-if) # ^ ZSW0 #* March 1 00:09:52.107:% SYS 5 CONFIG_I: Configured from console by consoleSW0 # wrBuilding configuration ...[OK]SW0 (config) # endConfiguring the PC 1:IP 192.168.1.2Subnet Mask 255.255.255.0Default Gateway 192.168.1.1Configuring the PC 2:IP 192.168.2.2Subnet Mask 255.255.255.0Default Gateway 192.168.2.1

No comments:

Post a Comment