Sie sind auf Seite 1von 3

Routeron-a-Stick Inter-VLAN Configuration

from the topology above, VLANs 10 and 20 will be created on switch SW1 using the vlan 10 and vlan 20
commands.

Example switch configuration command:

SW1#config t
SW1(config)#vlan 10
SW1(config-vlan)#vlan 20
SW1(config-vlan)#exit
The fastethernet (fa0/3) will be set to trunk mode:
SW1(config)#interface fa0/3
SW1(config-if)#switchport mode trunk
SW1(config-if)#end
SW1#

As seen above, because switch port F0/3 will been configured as a trunk port, you
do not have to assign any VLANs to the port. And VLANs 10 and 20 had been
created too.

You cannot use the switchport mode dynamic auto or switchport mode
dynamic desirable commands because the router does not support dynamic
trunking protocol.
Dont forget save the configuration so that it is not lose after a reload of the switch,
use the copy running-config startup-config command in privileged EXEC mode
to back up the running configuration to the startup configuration.
Next, the router can be configured to perform the inter-VLAN routing
Example of router R1 configuration command:

R1#config t
R1(config)#interface fa0/0.10
R1(config-subif)#encapsulation dot1q 10
R1(config-subif)#ip address 192.168.1.1 255.255.255.0
R1(config-subif)#interface fa0/0.20
R1(config-subif)#encapsulation dot1q 20
R1(config-subif)#ip address 192.168.2.1 255.255.255.0
R1(config-subif)#interface fa0/0
R1(config-if)#no shut
R1(config-if)#end

As you can see from the above, the configuration of multiple subinterfaces is
different than when physical interfaces are used.
Each subinterface is created using the interface interface_id.Subinterface_id
global configuration mode command. After that, VLAN ID is assigned using the
encapsulation dot1q vlan_id subinterface configuration mode command.
Next, you assign the IP address for the subinterface using the ip address
ip_address subnet_mask subinterface configuration mode command.
This process is repeated for all the router subinterfaces that are needed to route
between the VLANs configured on the network. Each router subinterface needs to
be assigned an IP address on a unique subnet for routing to occur.
Note:
You do not need to execute a no shutdown command at the subinterface level
because it does not enable the physical interface. Cisco routers are configured to
route traffic between the local subinterfaces by default, as a result, routing does not
specifically need to be enabled
Next, use the show ip route command from privileged EXEC mode to examine the
routing table.

To verify the router configuration, use the show running-config command in


privileged EXEC mode. The show running-config command displays the current
operating configuration of the router.:
Interface
VLAN ID
Fa0/0
Fa0/0

Subinterface
Gateway IP Address/Mask
Router Encapsulation
fa0/0.10
VLAN 10
fa0/0.20
VLAN 20

192.168.1.1/24
encapsulation dot1q 10
192.168.2.1/24
encapsulation dot1q 20

- See more at: http://www.orbit-computer-solutions.com/How-to-Configure-Router-on-aStick-InterVLAN-Routing.php#sthash.ebQ8VtZ9.dpuf

Das könnte Ihnen auch gefallen