802.1q question

Unanswered Question
May 11th, 2007

Dear Sir,

we would like know the mean of following setting:

interface FastEthernet1

no ip address

full-duplex

!

interface FastEthernet1.1

encapsulation dot1Q 1 native

ip address 192.168.0.2 255.255.255.0

!

interface FastEthernet1.2

encapsulation dot1Q 2

ip address 192.168.1.1 255.255.255.0

what is the different between "dot1Q 1 native" and "dot1Q 2"?

Can we change to

interface FastEthernet1.1

encapsulation dot1Q 1

ip address 192.168.0.2 255.255.255.0

!

interface FastEthernet1.2

encapsulation dot1Q 2 native

ip address 192.168.1.1 255.255.255.0

what is the different between two setting?

thanks

Best regards

CM Leung

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
ankbhasi Fri, 05/11/2007 - 07:28

Hi Friend,

As you know when you configure trunk all vlan data are passed with vlan tag and when you configure dot1q trunk all vlan data will pass as tag but one vlan data will pass through the trunk as untag which means without any vlan tag and that vlan you can mention as Native vlan.

Bydefault vlan 1 is always a native vlan on cisco switches and if you want to change the native vlan on trunk you can definetely do the same by making other vlan as native vlan.

So in your first case your vlan 1 is a native vlan which means any data which comes from switch to the router will not have vlan tag for vlan 1 and for vlan 2 it will have vlan 2 tag.

In your second case it is reverse and it is ofcourse possible but make sure if you are changing native vlan on router subinterface you have to also change it on switch trunk interface/port with command "switchport trunk native vlan ".

HTH

Ankur

*Pls rate all helpfull post

carl_townshend Fri, 05/11/2007 - 08:08

why do we have this feature of untagged vlans ? why would we need it, what would we use it for ?

leungcm Sun, 05/13/2007 - 21:51

Dear Ankur,

if we connect two routers to single switch and both of router with "native" configuration. It means that there are two trunks, one is router A, other is router B.

Then is it problem in switch because there is only one "VLAN 1" act as native. How to solve it?

Best regards

CM Leung

smothuku Sun, 05/13/2007 - 22:37

Hi Leung ,

Suppose if you connect two routers to a single L2 switch u need to place both the trunk links in the same vlan by mentiong as a native vlan.

Create Vlan on L2 switch and place f0/1.1 of both routers in the same vlan by configuring it as encapsulation dot1q 11 native.

L2 config:

vlan 11

ip address 10.105.3.1 255.255.255.0

int f0/1---uplink to first router

switchport trunk native vlan 11

switchport mode trunk

speed 100

duplex full

int f0/2 ---uplink to second router

switchport trunk native vlan 11

switchport mode trunk

speed 100

duplex full

router config:

interface FastEthernet0/0

no ip address

duplex full

speed 100

!

interface FastEthernet0/0.1

encapsulation dot1Q 11 native

ip address 10.105.3.3 255.255.255.0

2'nd router config:

interface FastEthernet0/0

no ip address

duplex full

speed 100

!

interface FastEthernet0/0.1

encapsulation dot1Q 11 native

ip address 10.105.3.5 255.255.255.0

configure the HSRP between those two routers and configure the default gateway on switch which is HSRP IP.

It should work.

Thanks,

Satish

ankbhasi Sun, 05/13/2007 - 22:48

Hi Friend,

If you have 2 routers connected to single switch then you need a trunk or not that depends on your network requirement.

Now suppose you need a trunk then you have to configure 2 ports on single switch as trunk ports , one for each router and you can define native vlan 1 on one trunk and native vlan 2 on other trunk.

Each trunk configuration on single switch is independent of other trunk configuration on same switch.

so for example on switch 1

interface gig1/0/1

switchport trunk encapsulation dot1q

switchport mode trunk

switchport trunk native vlan 1

interface gig1/0/2

switchport trunk encapsulation dot1q

switchport mode trunk

switchport trunk native vlan 2

HTH

Ankur

*Pls rate all helpfull post

smothuku Sun, 05/13/2007 - 22:58

Hi Ankur ,

In case of L2 we can configure only one vlan.In that scenario how can we connect or place two routers in different vlans.

I mean we can make routers as L3 by creating subinterfaces on routers.

What could be the default gateway on L2 switch ?

We need to configure default gateway on L2 using ip default gateway command.Am i correct ?

Thanks,

Satish

ankbhasi Sun, 05/13/2007 - 23:08

Hi Satish,

We always configure default gateway on L2 switch for switch reachability through the network.

So when you have one default gateway on your switch which points to router 1 suppose and you can reach your router 1 from anywhere in your network you are good to go.

For all those clients whose default gateway points to router 2 interface ip address will hit router 2 and go out of network and for all those clients whose default gateway points to router 1 will hit router 1 and go out of network.

Default gateway on l2 switch isnot related to data traffic coming out from clients connected to the switch.

May be I understood your question in wrong way so my explaination may not exactly answer your question. Please come again if my explaination does not answer your question.

Regards,

Ankur

*Pls rate all helpfull post

smothuku Sun, 05/13/2007 - 23:32

Hi Ankur ,

Thanks for your valuable info...I have small doubt regarding default gateway on L2.

Is there any limitation on no.of default gateway's can be configured on L2.

Thanks,

Satish

ankbhasi Mon, 05/14/2007 - 00:30

Hi Satish,

Yes there is a limitation. You can only have one default gateway configured on your switches. If you already have a default gateway and you try to configure another one it will override the first one.

HTH

Ankur

*Pls rate all helpfull post

pavansuraj Mon, 05/14/2007 - 00:44

Hi Ankur,

Is the limitation only on L2 switches or both L2 and L3 switches. As I have read that a maximum of 3 gateways can be configured on Supervisor Engine on 6500 switch.

Please clarify.

Thanks,

Pavan

ankbhasi Mon, 05/14/2007 - 00:54

Hi Pavan,

It hold true for any switches including Cat6500. You can only have one default-gateway though you can have multiple default routes on L3 switches.

Can you attach the document from where you read the same? Which IOS version is mentioned on that doc?

Regards,

Ankur

ankbhasi Mon, 05/14/2007 - 01:51

Hi Pavan,

That's the behavior of CATOS and its not exactly same as default gateway behavior in IOS its basically setting a static route where you have to specify destination network also (you can configure default also) but in IOS default gateway you have no option to set a destination network.

HTH

Ankur

* Pls rate all helpfull post

pavansuraj Mon, 05/14/2007 - 02:36

Hi Ankur,

The purpose of reachability of the switch is served by the vlan interface with an IP address assigned to it. Does default gateway serves the same purpose or does it has other fuction to do?

Thanks,

Pavan

ankbhasi Mon, 05/14/2007 - 02:41

Hi Pavan,

Yes the purpose of reachability of the switch is served by the vlan interface with an IP address assigned to it but if you waan a access switch from some different network than your interface network on that switch you need to tell your switch where is your default gateway so that it can reply back to different subnet request.

But if you are managing your switch from same network what you assigned on your management interface then there is no need for default gateway.

HTH

Ankur

*Pls rate all helpfull post

pavansuraj Mon, 05/14/2007 - 02:50

Hi Ankur,

Thankyou very much for the details.

Best regards,

Pavan

smothuku Mon, 05/14/2007 - 00:51

Hi Ankur ,

Thank you very much....

One more doubt...Let us take your example only....We configured trunk link on switch for both the routers and we haven't specified defualt gateway on switch then how the lan users communicate with the routers...means how whould be the traffic flow for Vlan 1 and vlan 2 users ?

Thanks,

Satish

Thanks,

Satish

ankbhasi Mon, 05/14/2007 - 01:02

Hi Satish,

As I mentioned default gateway is only used for switch reachability and switch management purpose from remote network. It is not at all releated to data traffic which passes through the switch.

Any clients who are in vlan 1 or vlan 2 will be having a default gateway configured on their machine for router ethernet interface ip correct. Then clients will send arp request for any data packet which they want to send out of their network and router will respond and packets will hit router ethernet interface.

Switch being an l2 device will not play any role in ip packet going out of machines in vlan 1 or 2. Only condition which should hold true on switch is existance of vlan numbers in vlan database.

Even if you do not configure default gateway and ip address on any vlan on l2 switch still all your clients will be able to pass traffic fine.

HTH

Ankur

*Pls rate all helpfull post

Paul Webster Mon, 05/14/2007 - 03:56

It?s only a referential number, so you can identify quickly the vlan you are working or troubleshooting.

The native VLAN is the VLAN 1. We should use these VLAN only for an administrative issue.

And it always keep as native.

Actions

This Discussion