cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5256
Views
17
Helpful
9
Replies

802.1Q VLAN Trunk Configuration

s76602061
Level 1
Level 1

I think there are 2 ways 802.1Q VLAN Trunk Configuration as following.

My understanding is just configuration is different but function is same,

and [Pattern 1] is used for L3 port, and [Pattern 2] is used for L2 port.

Does my understanding is correct?

[Pattern 1]
interface GigabitEthernet1.1
encapsulation dot1Q 100
ip address xx.xx.xx.xx xx.xx.xx.xx


[Pattern 2]
interface GigabitEthernet1
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 100
switchport mode trunk
!
interface Vlan100
ip address xx.xx.xx.xx xx.xx.xx.xx

9 Replies 9

Joseph W. Doherty
Hall of Fame
Hall of Fame

Disclaimer

The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.

Liability Disclaimer

In no event shall Author be liable for any damages wha2tsoever (including, without limitation, damages for loss of use, data or profit) arising  out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.

Posting

Are you talking switches or routers?

On a switch, pattern 2 can support L3, as the switch might be hosting SVIs.

On a router, a variation of pattern 1 would be used.  The encapsulation would be applied to the main interface, and then you can define subinterfaces with IPs (although the main interface can have an IP too).

Hi, thank you so much for your comment. It is really appreciated.

You are most welcome,

Masoud

Hello,

I am just adding to Joseph answer.

Pattern 1 is configured on the router interfaces while pattern 2 is cofigured on switch interfaces. In both case, the main interface (interface GigabitEthernet1) is trunk.  interface GigabitEthernet1.1 in pattern 1 is called subinterface and interface Vlan100 in pattern2 is called SVI.

On higher level switches and routers, you can find both configurations depending on the types of interfaces.

subinterface is a division of one physical interface into multiple logical interfaces.

SVI is a virual L3 interface.

Masoud

Thank you very much for your additional comment. It is really helpful for detail understanding.

mehulnangru
Level 1
Level 1

[Pattern 1] is used for L3 port -

Yes , this kind of configuration for a sub interface and this is done on routers only and yes router is a layer 3 device,

[Pattern 2] is used for L2 port. -

I slightly contradict with you here . First part of pattern 2 could be for a Trunk link between a switch<>Router or may be a switch<>switch .

HOWEVER 

part 2 of pattern 2 is a layer 3 interface on a switch (called as SVI - switches virtual interface).

Hope I have been able to explain in simple language .

Thank you very much for your detailed comment, I have also agreed that your comment for [Pattern2].

Ganesh Hariharan
VIP Alumni
VIP Alumni

Hello,

[Pattern 1]
interface GigabitEthernet1.1
encapsulation dot1Q 100
ip address xx.xx.xx.xx xx.xx.xx.xx

GI :- Yes , It is router main interface which is L3 and used for sub interface configuration.


[Pattern 2]
interface GigabitEthernet1
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 100
switchport mode trunk
!
interface Vlan100
ip address xx.xx.xx.xx xx.xx.xx.xx

GI:- You are making Gig1 port as layer 2 port with trunking VLANS till router port.

Having interface Vlan 100 , you are creating L3 SVI to route traffic to other Layer 3 interface thus eliminating the need for a physical router.

Hope it Helps..

-GI

thank you for your detailed answer, it same as my understanding. thank you.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card