Skip navigation
Cisco Learning Home > Learning Center > Discussions

_Communities

48280 Views 1 Reply Latest reply: Jun 8, 2010 6:56 AM by Jared RSS

Currently Being Moderated

VLAN ON ROUTER

Jun 8, 2010 5:06 AM

avi 73 posts since
Apr 25, 2010

Hi,

 

How can we create a vlan on a router  ? Is there any particular configuration for that or it is the similar as we create it on a switch?

 

Rgrds,

 

Avi

  • Jared 5,502 posts since
    Jul 27, 2008
    Currently Being Moderated
    1. Jun 8, 2010 6:56 AM (in response to avi)
    Re: VLAN ON ROUTER

    A vlan configuration on a router is slightly different than on a switch.  On a switch, you would create the vlan and then the routed vlan interface.

     

    On a router you tie a vlan to a subinterface.  You need to create the subinterface and then do the encapsulation dot1q <vlan ID> command.  This command basically assigned the vlan to the subinterface.  In this example, there are 2 vlans, vlan 100 and 201.  On the eth 0/0 interface, I created two subinterfaces.  fastethernet0/0.100 and f0/0.201.  Notice that I matched the subinterface number with the vlan ID.  You do not have to do this, but it is a best practice and really helps you as the administrator keep things organized.  So, under f0/0.100, there is the encapsulation dot1q 100, which basically binds vlan 100 to subinterface f0/0.100, then I assigned the IP.  The same is for the other subinterface.  So the router is trunking two vlans on its f0/0 interface, vlan's 100 and 201.

     

    interface FastEthernet0/0
    no ip address
    speed 100
    full-duplex
    !
    interface FastEthernet0/0.100
    description test Network
    encapsulation dot1Q 100
    ip address 192.168.102.1 255.255.255.128
    no snmp trap link-status
    !
    interface FastEthernet0/0.201
    description  Office
    encapsulation dot1Q 201
    ip address 205.127.102.129 255.255.255.128
    no snmp trap link-status

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)