Showing posts with label VLAN. Show all posts
Showing posts with label VLAN. Show all posts
Fun with QinQ tunnels - Part 4: Never trunk a tunnel VLAN

Fun with QinQ tunnels - Part 4: Never trunk a tunnel VLAN

We are back to playing with QinQ tunnels. This time solving a Layer 2 loop issue.

If you recall from part 1 we have had to do a bit of a McGyver and loop a cable in and out of our switch to bring up the tunnel. It worked well in that post, but now it's time to open up the tunnel a bit more and allow more vlans through it.

Our QinQ trunk port is configured as follows:
3750#sh run int fa1/0/1
Building configuration...

Current configuration : 263 bytes
!
interface FastEthernet1/0/1
 description **** QinQ vlan ****
 switchport access vlan 500
 switchport trunk encapsulation dot1q
 switchport mode dot1q-tunnel
 ip access-group 101 in
 no keepalive
 l2protocol-tunnel cdp
 l2protocol-tunnel stp
 no cdp enable
end
And our access port is configure as:
3750#sh run int fa1/0/17
Building configuration...

Current configuration : 177 bytes
!
interface FastEthernet1/0/17
 description **** Cust trunk ****
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 4,10,11,61,62,63
 switchport mode trunk
end
So the logical solution to allow all our vlans to communicate over the QinQ would be to change the allowed VLAN list to "all", this should do it, right?

Not so much, and behold the problem when we do this:
3750(config-if)#int fa1/0/17
3750(config-if)#switchport trunk allowed vlan all
3750(config-if)#exit
3750(config)#exit
03:34:26: %PM-4-ERR_DISABLE: l2ptguard error detected on Fa1/0/1, putting Fa1/0/1 in err-disable state
3750#
03:34:27: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0/1, changed state to down
03:34:27: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0/17, changed state to down
03:34:27: %SYS-5-CONFIG_I: Configured from console by console
03:34:28: %LINK-3-UPDOWN: Interface FastEthernet1/0/1, changed state to down
03:34:28: %LINK-3-UPDOWN: Interface FastEthernet1/0/17, changed state to down
3750#
Immediately we find that our switch detects a layer 2 loop and is error disabled: "%PM-4-ERR_DISABLE: l2ptguard error detected on Fa1/0/1, putting Fa1/0/1 in err-disable state".

This is because we are allowing the QinQ vlan (vlan 500) to be trunked. We can either specify all the vlans we want to allow (1,4,5,6,7, etc etc) or instead we can use the much cleaner way below:
3750(config)#int fa1/0/17
3750(config-if)#switchport trunk allowed vlan ?
  WORD    VLAN IDs of the allowed VLANs when this port is in trunking mode
  add     add VLANs to the current list
  all     all VLANs
  except  all VLANs except the following
  none    no VLANs
  remove  remove VLANs from the current list

3750(config-if)#switchport trunk allowed vlan except 500
3750(config-if)#exit
Using the "except" command we can specify which VLANs we don't want to trunk, and the IOS will trunk everything that's not in the list. So your mileage will vary depending on whether you want to allow or restrict more, but its a cleaner approach for this example.
We have to remember to shut and no shut our QinQ interface to bring up the tunnel:
3750(config)#int fa1/0/1
3750(config-if)#shut
3750(config-if)#no shut
3750(config-if)#exit
3750(config)#exit
03:35:31: %LINK-5-CHANGED: Interface FastEthernet1/0/1, changed state to administratively down
3750#
03:35:33: %SYS-5-CONFIG_I: Configured from console by console
03:35:33: %LINK-3-UPDOWN: Interface FastEthernet1/0/1, changed state to up
03:35:34: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0/1, changed state to up
03:35:35: %LINK-3-UPDOWN: Interface FastEthernet1/0/17, changed state to up
03:35:37: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0/17, changed state to up
And now we should be able to see the other side of the network (the 3560), which should be listed twice - once for the trunk link between the two (port 48) and again on port 17.
3750#sh cdp neigh
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
                  S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone

Device ID Local Intrfce         Holdtme   Capability    Platform   Port ID
3560      Fas 1/0/17            132            S I      WS-C3560-4Fas 0/17
3560      Fas 1/0/48            143            S I      WS-C3560-4Fas 0/48
3550-B    Fas 1/0/12            138           R S I     WS-C3550-2Fas 0/12
3750#
No more l2ptguard errors!

The BIG lab - Part 1 - Trunking, EtherChannel and Load-Balancing

I kind of feel that I really need to spend more time on my studies at the moment. So while the boys are down for their afternoon nap (but not sleeping) it's a good chance to get some work done.

In the real lab there will be a fairly large selection of switches and routers, and although you will have a number of specific tasks to complete both for the troubleshooting portion and the configuration portion it's important to understand that one task can greatly impact on another.

So instead of having little posts concentrating on one particular topic I have decided to make a number of posts but all sharing the same topology so that the impact of one design decision can be shown throughout the network.

So let's have a look at the things that I want to cover, and start building our topology.

Starting at the top of the CCIE exam topics we can cover:
Now you will have to excuse my drawing skills, I am using a Wacom Bamboo tablet and still getting used to it, but I think we'll end up with something like this:



So we have a number of routing protocols, a bit of frame relay, some trunking, etherchannel, well throw in some dialup technology, tunnelling and some IPv6 as well, and lets throw in some VTP for good measure. I think that this series will be very organic and will change and grow as we progress.

Let's start creating the netmap, as always I start by numbering the devices from left to right. and working out the connections from there. Apart from getting the R10 to SW1 interfaces round the wrong way, once I corrected it I ended up with this:


Cisco IOU netmap



If you are interested, the netmap looks like this:

1:0/0 2:0/0
2:0/1 3:0/0
2:0/2 4:0/0
4:0/1 5:0/0
5:0/1 6:0/0
6:0/1 7:0/1
4:0/2 8:0/0
5:0/2 9:0/0
8:0/1 9:0/1
8:0/2 10:1/0
10:0/1 11:1/1
11:0/0 12:0/0
11:0/1 12:0/1
11:0/2 13:1/0
13:0/0 14:0/0
13:0/1 14:0/1
12:1/0 14:1/0

So lets start at the top of our list and work our way down. I might just cover some trunking today as the kids have not gone to sleep, but they did get up at 8:30 this morning instead of their usual 7am, so it's not surprising really.

Switch basic configuration

Lets start by setting up a VTP domain and have the switches as either a master or a client, along with some different VLANs. If the switches support it we might even get to do some HSRP, but I am not sure if they do. To be honest I don't even know if they do etherchannel, but I guess we'll find out whether this is a limitation of the software (IOU) or not.

Trunking - VTP and 802.1Q trunks

We'll start by creating a bunch of VLANs on SW1, and set up VTP.

So in SW1 we set up a bunch of VLANs, (10,20,30, and 40 using the "vlan 10" etc command), and then set the vtp mode to server (which is the default but I still like to know that I have set it manually), and set the domain from null to 802101:


VTP Server setup cisco switch

Now we can set up a trunk to SW3, we will only use 802.1Q for our trunks because the other trunking protocol (ISL) isnt used much anymore.

We arnt going to do anything fancy with our trunk (at least not yet) so its a basic configuration:


802.1Q trunking on a Cisco Switch

And I have set SW3 as a VTP client for the 802101 domain:


Cisco switch vtp client

Usually its worth heading back to the server to make an amendment to the VLAN database on the server to force it to send the updates to the clients. So I added VLAN 50 on to SW1, and then running "sh vtp status" on SW3 I can see that the two are talking:


cisco vtp status

OK, so thats the link between SW1 and three done. Lets set up SW2 and 4 in the same way:


setting up vtp client and trunking


setting up vtp client and trunking

Now we can set up our etherchannel links between SW1 and SW2 (PAgP) and between SW3 and SW4 (LACP).

EtherChannel - Setting up PAgP and LACP

I said earlier that I wasn't going to bother with ISL for our trunks because it's no longer used much, well the same does not hold true for the etherchannel protocols. Both are used and both have a very good chance of being included in the exam. Therefore I will be doing both. PAgP (Port Aggregation Protocol) is the Cisco standard, whilst LACP is the industry standard. 

For any type of etherchannel to work the settings on the interfaces within the port-channel group must match identically, so you can't mix duplex or speed for example. I prefer to set mine up using the interface range command ("interface range ethernet 0/0 - 1"). First I shut down the interfaces (you don't have to, I just like to know I have got everything set before I try and bring the port-channel up), then set them up as trunks, adding them to the port-channel group 1. I have set SW1 as "auto" for PAgP:


pagp etherchannel cisco

and SW2 as "desirable" for PAgP:


setting up vtp client and trunking

Lastly i did a "no shut" on the interfaces. 

The basic config is:

SW(config)#interface range ethernet 0/0 - 1
SW(config-if-range)#shut
SW(config-if-range)#switchport trunk encapsulation dot1q
SW(config-if-range)#switchport mode trunk
SW(config-if-range)#channel-protocol <protocol>
SW(config-if-range)#channel-group 1 mode <mode>
SW(config-if-range)#no shut

Lets have a look at the last two lines in a bit more detail.

We start by setting the protocol, this is either PAgP or LACP:


cisco etherchannel

And then we set the mode


cisco etherchannel channel group mode

Both sides could have been made desirable for PAgP, or active for LACP, and would have formed a channel-group, but if both were set to auto (PAgP) or passive (LACP) then no channel-group would form, as neither would be actively seeking to make a channel-group.

Here is a sh run from both sides:


port channels and load balancing


port channels and load balancing

And as if by magic if we do a "sh vlan" on SW2 we can see that by the magic of VTP we have our VLANs now:


vtp in action

Now let's turn our attention to SW3 and SW4.

There isn't much different between the setups, the same commands have been used to create the trunk links:


port channels and load balancing


port channels and load balancing

And lastly on SW4 we check to see if our VLANs are all present and correct:


vtp over port channel
And they are.

From now on our port-channel operates pretty much just like any normal interface, We can do a "sh int po 1" and see the following:


show port channel

The interesting thing here is that we can see the members of the port-channel (in the last line).

We can also check on our neighbor switches:


port channels and load balancing neighbor

Load-balancing

I did set up src-dst-mac load balancing on SW1 and SW2, it is a global statement 


port-channel load-balancing
I chose src-dst-mac


port-channel-load-balancing

Load balancing is pretty simple really.

And that about covers it for today. The boys didn't sleep at all this afternoon, so now its half past eight at night and its time for a snack. 

Next up we'll cover the PPP link between R1 and R2.

VTP - VLAN Trunking Protocol (1.20)

Configuring VLANs on one or two switches is easy enough, but as the scope of the VLANs increases managing each switch's VLANs individually can become an administrative headache, and prone to mistakes and inconsistencies. Therefore a VLAN management protocol can make this much, much easier.

VTP is one of a couple of VLAN management protocols, the others being GARP VLAN Registration Protocol (GVRP) these are defined in 802.1D (GARP) and 802.1Q (clause 11) for GVRP. These others are not currently supported by Cisco and are therefore not part of the Switch exam, or the CCIE exam.

VTP manages the addition, deletion and renaming of VLANs across the network from a centralised point.

VTP uses domains (areas with common VLAN requirements). A switch can only belong to one VTP domain.

To participate in a VTP domain each switch must be in one of the following modes:

1. Server mode - this has full control over VLAN creation, deletion and modification, this is the default mode for switches.
2. Client mode - cannot create, change or delete and VLANs. Clients listen to VTP advertisements from other switches and modify their own VLAN configuration. Also acts as a relay, forwarding VTP information to other switches.
3. Transparent mode - does not participate in VTP, and does not advertise its own VLAN configuration. With VTP version 1 it does not relay VTP information from other switches unless the VTP domain names and numbers match. In VTP version 2 they can still act as relays regardless of the VTP domain name.

VTP advertisements are sent using multicast and reference an index called the configuration revision number. The revision number starts at zero and increments by one with any change, at which point the update is sent to all VTP listening switches.

New switches should always be cleared of all VTP information before being introduced into the network.

VTP configuration

Head back into the PacketTracer lab we created earlier and add the following:

Management domain:

switch0(config)# vtp domain vtptest

switch1(config)# vtp domain vtptest

Mode:

switch0(config)# vtp mode server
switch0(config)# vtp version 2
switch0(config)# vtp password vtppassword

switch1(config)# vtp mode client
switch1(config)# vtp version 2

switch1(config)# vtp password vtppassword

Setting a VTP server

Setting a VTP client

Now we can add a couple of VLANs - so on Switch0 add VLANs 4 and 5, then do a sh vlan on Switch1

Create a VLAN

Without adding anything to Switch1 you should see 

show vlan

Running a show vtp status on switch0 you should see

show vtp status

VTP Pruning

VTP Pruning makes more efficient use of trunk bandwidth by reducing unnecessary flooded traffic.

To implement this it is just a case of typing "vtp pruning" in config mode. But this is not supported in PacketTracer, at least not in the version I am running. It might be supported in future releases.

switch(config)# vtp pruning

Once this is added on server it is also enabled on the VTP clients.

Troubleshooting VTP

Check the mode if updates are not being received - make sure not in transparent.
Makes sure at least one switch is set as the server.
Make sure trunks are used as VTP advertisement are only sent over trunk links.
Make sure VTP domain name is identical across all switches.
VTP versions should be compatible.
Passwords should match for VTP.