Thursday, August 30, 2012

A simple example of EIGRP route manipulation using change in metric OR applying offset list.




In this example we have taken a setup which is more or less a simulation from cisco example but I have done a little modification to it.

We have 4 routers and 1 ether router/switch. The router R1 is connected to R2 && R2 connects to R3 and R4 over different subnets. R3 f0/0 shares 4.4.4.1 /24 subnet with R4 f0/1, 4.4.4.2 and interface SVI vlan 3 with IP 4.4.4.3 /24.

The connection style is given below:
R1(f0/0    {.1})<->R2(f0/0   {.2})= 1.1.1.0/24
R2(f0/1    {.1})<->R3(f0/1  {.2})=2.2.2.0 /24
R2(f1/0    {.1})<->R4(f0/0  {.2})=3.3.3.0 /24
R3(f0/0    {.1})<->R5(f1/1  {.3}{SVI})=4.4.4.0 /24
R4(f0/1    {.2})<->R5(f1/2  {.3}{SVI})=4.4.4.0 /24

Objective:
To learn the 4.4.4.3 sub-network IP  from R5 and making the R2-R3-R5 as preferred route and R2-R4-R5 as backup one. 

R1 set up:
interface FastEthernet0/0
 ip address 1.1.1.1 255.255.255.252
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 192.168.1.254 255.255.255.0
 duplex auto
 speed auto

router eigrp 100
 network 1.1.1.0 0.0.0.3
 network 192.168.1.0
 auto-summary

R2 Set up:

interface FastEthernet0/0
 ip address 1.1.1.2 255.255.255.252
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 2.2.2.1 255.255.255.252
 duplex auto
 speed auto

interface Vlan2
 ip address 3.3.3.1 255.255.255.252
!
 router eigrp 100
 network 1.1.1.0 0.0.0.3
 network 2.2.2.0 0.0.0.3
 network 3.3.3.0 0.0.0.3
 auto-summary

Above in R2 I had only one routed port and other one was switch port so I chose to do something usually different and made one SVI 2 0f 3.3.3.1 putting the vlan 2 on f1/0 of R2 which then will connect router R4 port f0/0 IP 3.3.3.2 as above.

R3  Set up:

interface FastEthernet0/0
 ip address 4.4.4.1 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 2.2.2.2 255.255.255.252
 duplex auto
 speed auto

router eigrp 100
 network 2.2.2.0 0.0.0.3
 network 4.4.4.0 0.0.0.255
 no auto-summary

R4 Set up:

interface FastEthernet0/0
 ip address 3.3.3.2 255.255.255.252
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 4.4.4.2 255.255.255.0
 delay 18                                                     //This delay was used to manipulate the path by delay. change.
 duplex auto
 speed auto

router eigrp 100
 offset-list 99 out 300 FastEthernet0/0
 network 3.3.3.0 0.0.0.255
 network 4.4.4.0 0.0.0.255
 no auto-summary
!
ip http server
ip classless
!
!
access-list 99 permit 4.4.4.0 0.0.0.255

R5 Set up:

interface FastEthernet1/1
 switchport access vlan 3
 no ip address
 speed 100
!
interface FastEthernet1/2
 switchport access vlan 3
 no ip address
!
interface Vlan3
 ip address 4.4.4.3 255.255.255.0
!
router eigrp 100
 network 4.4.4.0 0.0.0.255
 auto-summary

Identified solution to make R2-R3-R5 as preferred route:

1.  Check the FD/AD of the route to network 4.4.4.0 with sh ip eigrp topology command

R2#sh ip eigrp topology
IP-EIGRP Topology Table for AS(100)/ID(3.3.3.1)

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status

P 1.0.0.0/8, 1 successors, FD is 28160
        via Summary (28160/0), Null0
P 1.1.1.0/30, 1 successors, FD is 28160
        via Connected, FastEthernet0/0
P 2.0.0.0/8, 1 successors, FD is 28160
        via Summary (28160/0), Null0
P 2.2.2.0/30, 1 successors, FD is 28160
        via Connected, FastEthernet0/1
P 3.0.0.0/8, 1 successors, FD is 2816
        via Summary (2816/0), Null0
P 3.3.3.0/30, 1 successors, FD is 2816
        via Connected, Vlan2
P 4.0.0.0/8, 1 successors, FD is 30464
        via 3.3.3.2 (30464/30208), Vlan2   //**This goes in routing table to reach net of 4.4.4.0 /24- from R4
        via 2.2.2.2 (30720/28160), FastEthernet0/1
P 192.168.1.0/24, 1 successors, FD is 30720
        via 1.1.1.1 (30720/28160), FastEthernet0/0

One way is to change one of the metric used in route selection of 5; Bandwidth, load, delay, reliability and MTU.
For ex. if we change the delay of interface f0/1 of R4 the metric will become poor the traffic over R3 will be preferred.  Go on to the interface and change the metric to any(in tens of microsec) like delay 20.
This will spoil R4 to be the best route to reach network 4.4.4.0 and R3 thus will be preferred.

Note: One often should consider while changing Bandwidth as it will have a huge impact on route calculation and might ruin all possibility of either becoming backup route OR no route at all.

Second way, is through manipulation of sum up of all metrics using offset list.

If we go back to set up of R4 you will observed there I've used access-list:
access-list 99 permit 4.4.4.0 0.0.0.255

This states that a standard ACL will permit all route with source 4.4.4.0.

Now this ACL is to be called in eigrp subcommand of R4,

router eigrp 100
 offset-list 99 out 300 FastEthernet0/0

The above states that ACL 99 passes out with a modified composite metric  and added with value 300. So earlier the FD/AD of R2 was

4.0.0.0/8, 1 successors, FD is 30464
        via 3.3.3.2 (30464/30208), Vlan2
        via 2.2.2.2 (30720/28160), FastEthernet0/1

Now it is,

4.0.0.0/8, 1 successors, FD is 30464
        via 3.3.3.2 (30464/30208), Vlan2
        via 2.2.2.2 (30720/28160), FastEthernet0/1

oops!!!!!  It didn't change. 

Wow, I just happened to have found out the reason. The ACL above has 4.4.4.0 as source but my R4 is summarizing the whole route to class A boundary because we all know EIGRP's romance with summarization. So all you need is to add the command no auto summary and the problem is solved or the other way change the ACL with 4.0.0.0  255.0.0.0 cmd. Either way you achieve the same result.

Output now on R2 after disabling auto-summarization is below:

P 4.4.4.0/24, 1 successors, FD is 30564
        via 2.2.2.2 (30720/28160), FastEthernet0/1        //**best path via R3
        via 3.3.3.2 (30764/30508), Vlan2                       //** path via R4 as backup now

Now path via R3 become the best path.

This way you can have some fun with change in metric or applying offset list to tell that I will spoil this route. Remember MTU as metric is a container and not used in route calc for best path.

Share, If you have something new or to disagree.
Cheers!!



Sunday, August 12, 2012

LW Access Point registry with WLC

The WLC management interface is used for L2 communication between WLC and APs.

A WLC has one or more AP manager interface for L3 communication between WLC and LAP after AP discovers the controller.

Sequential events for LAP to register with WLC:
1. The LAP issues a DHCP discovery reequest to get an IP address unless it has previously had a static IP address.
2. The LAP sends LWAPP(Light Weight Access Point Protocol) dicovery request to WLC.
3. Any WLC the receives LWAPP discovery request responds with an LWAPP discovery response message.
4. From multiple discovery responses LAP chooses the WLC to join(The WLC with least connection is preferred).
5. The LAP then sends an LWAPP join reuqest to the WLC & expects a LWAPP join response.
6. The WLC validates the LAP & then sends an LWAPP join response to the LAP.
7. The LAP validates the WLC which completes the discovery & join process. The LWAPP join process includes mutual authentication and encryption key derived.
8. The LAP registers with the controller.

Hope I could make it easier as it is. :)

Saturday, August 11, 2012

LACP SIM

First we have to configure the vlans on the switches.
To make a switch  root use the following command and understand what it does to switch A or switch B spanning tree database:
Spanning-tree vlan 11 root primary
By using above command on the switch,  it will try to become the root for vlan 11 by reducing its bridge priority by 8192 default. Try it for as many vlans as you need on the switch you want.

First check the vtp config on both the switches and if either is server than create vlan on server and it will be propagated to client provided domain name and md5 matches. If both are in transparent mode please add vlan to their respective databases by getting into global command
config# vlan 21 name engineering      etc....

create/Verify if vlan 21,22,23 exist on switch A/B, if yes then good or else create it.
Assign ports properly to their respective vlans.
All the ports that should transition to forwarding must be port fast enabled. This saves the switch-port transition which normally takes 30 sec of blocking to listening to learning and then forwarding. Use the interface range command for quick configuration or use individual but you need to be quick.

Make the vtp mode of B same as that of switch A.
For Switch B to be in same spanning-tree mode as switch A, run a show spanning-tree command or show run on Switch A will also show the configured spanning-tree .

Configure svi vlan 1 on switch B if it doesn't exist and assign it the required IP  and use no shut.

Interswitch connectivity:
1. For trunking use dot1q as it requires tagging unlike isl which encapsulates and is cisco prop.
2. Allow vlan on the trunk link only by using switchport trunk allowed vlan vlan_number. This needs to be run on port which has to be configured for trunking purpose be it one port or bundles of port.
3. For maximum use of available bandwidth one can combine many port under one port-channel so that the spanning tree is not required as loop won't happen and collective capacity of the link also is increased many times.
For the above to work do following:
1. Configure individual port which then is to be trunked but on port-channel only.
2. use show run to check if it has any configuration done on it that is not in line with config of other port it has to be bundled with. Make sure it is not in any access-mode otherwise it will make a port channel for that vlan only and not multi-vlan. Normally we don't make configuration on member but we do it on the etherchannel which is then applicable to members as whole. This is always the good way.
3. Use non proprietary protocol LACP. It can bundle up-to 16 ports as such.
Use following cmd on member interface;
channel-protocol lacp
channel-group xyz(number) mode (active/passive)
Then create a port-channel interface with xyz(number) on config mode and do trunking configuration on it. Make sure you assign right native vlan to the port channel interface.
Do the same config on the other side of the switch. It is up to you to decide which switch will initiate lacp bundling by choosing right mode.

Good luck!

VTP LAB SIM 1


For lab of vtp lab sim-1 the interface connecting both switches ALS and DLS must be in trunking mode to support vtp and updates. So first of all you should configure them in trunk. 
Secondly, place all config of vlan creation/add/deletion etc. on DLS switch as it is in distribution layer and is in server mode by default as per any campus style architecture. The DLS is server and ALS is client. ALS will take all vlan config via VTP updates from DLS. The vtp messgage type includes:
-Summary advertisements
-Subset advertisement
-Advertisement requests
-VTP join messages


Use the same domain name for it to run with MD5 match if provided.  Always don't forget to check the md5 hex value which should be same.
Run ip routing command for DLS switch to make it understand that the switch will be used as multi layer switch. So that it will route packets from one vlan to other.  Subsequently, create vlan SVI with proper vlan id and give them their IP address. At least one port must belong to that vlan SVI to come up otherwise the protocol will always show down while L1 connectivity remains up.