Options

intervlan routing

livenliven Member Posts: 918
Just a quick question

when setting up the subinterface on the router,

does the subinterface number:

int fa0/1.1

does the .1 tie the interface to the vlan, or is it the number

encapsulation dot1q 1

that associates them the subinterface with the particular vlan?

Did that make sense?
encrypt the encryption, never mind my brain hurts.

Comments

  • Options
    dtlokeedtlokee Member Posts: 2,378 ■■■■□□□□□□
    The encapsulation command ties the subinterface to the VLAN number, but for consistency you should use the same sub-interface number as the VLAN number also.
    The only easy day was yesterday!
  • Options
    PashPash Member Posts: 1,600 ■■■■■□□□□□
    int fa 0/0.1
    encap dot1q 1
    ip address 192.100.1.3 255.255.255.0
    no shut
    !
    int fa 0/0.5
    encap dot1q 5
    ip address 192.100.5.1 255.255.255.0
    no shut
    !
    int fa 0/0.10
    encap dot1q 10
    ip address 192.100.10.1 255.255.255.0
    no shut
    !
    int fa 0/0.20
    encap dot1q 20
    ip address 192.100.20.1 255.255.255.0
    no shut
    !

    I did something like this for a router on a stick lab for my ccna a while back ^^ As you say dot1q is for your vlan number, as dt says; the sub interface number is just for good housekeeping.
    DevOps Engineer and Security Champion. https://blog.pash.by - I am trying to find my writing style, so please bear with me.
  • Options
    livenliven Member Posts: 918
    Thanks gents!
    encrypt the encryption, never mind my brain hurts.
  • Options
    SlowhandSlowhand Mod Posts: 5,161 Mod
    I did the exact same thing as Pash did, for my router-on-a-stick setup. It's a good idea to assign the same numbered vlan to a particular subinterface, just for the sake of clarity. At my old job, everyone did the same thing on the production environment, even the CCIE-candidate Sr. Engineer. Anything to make your life/job easier is a good thing.

    Free Microsoft Training: Microsoft Learn
    Free PowerShell Resources: Top PowerShell Blogs
    Free DevOps/Azure Resources: Visual Studio Dev Essentials

    Let it never be said that I didn't do the very least I could do.
Sign In or Register to comment.