Pages

Monday, March 28, 2011

Embedded Event Manager

Embedded event manager is a very nice feature of the CISCO IOS. This feature will track the event which occur on a router and notify or automatically configure a router for us. EEM uses event detector and actions to provide the notification of those events.

Example of the events of EEM are as followings.

Router(config-applet)#event ?
  application   Application specific event
  cli                     CLI event
  counter             Counter event
  interface           Interface event
  ioswdsysmon    IOS WDSysMon event
  none                 Manually run policy event
  oir                    OIR event
  resource           Resource event
  snmp                SNMP event
  syslog               Syslog event
  timer                Timer event
  track                Tracking object event

Action that EEM provides are as followings.
 - generating syslog messages
 - reload the router
 - generate SNMP traps
 - Executing the Cisco IOS command 
 - etc



Sample Configuration of EEM


event manager applet TEST_EEM
 event none
 action 1.1 cli command "enable"
 action 1.2 cli command "conf t"
 action 1.3 cli command "int f0/1"
 action 1.4 cli command "ip address 192.168.1.1 255.255.255.0"
 action 1.5 cli command "exit"
!

When launching this command. " event manager run TEST_EEM", because the event is NONE, the router will immediately do actions according to the configured actions. 

So the interface f0/1 will be configured the IP address as 192.168.1.1/24.

Result
Router#sh ip int brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES unset  administratively down down
FastEthernet0/1            192.168.1.1     YES manual administratively down down
Router#

Thursday, March 24, 2011

Switch Database Template (SDM)

We can use SDM template to configure the switch to optimize support for specific features depending on how the switched is used in the network. There are 3 types of features.


  1. Routing : maximizes system resources for unicast routing.
  2. VLANs : Maximizes number of unicast MAC address.
  3. Default :  balancing to all functions
Here is the approximate number of feature resources allowed by each template.


Configuration 
In configuration mode.
-sdm prefer vlan 
-sdm prefer routing 

Verification
show sdm prefer

Test_switch#sh sdm prefer
 The current template is "desktop default" template.
 The selected template optimizes the resources in
 the switch to support this level of features for
 8 routed interfaces and 1024 VLANs.

  number of unicast mac addresses:                  6K
  number of IPv4 IGMP groups + multicast routes:    1K
  number of IPv4 unicast routes:                    8K
    number of directly-connected IPv4 hosts:        6K
    number of indirect IPv4 routes:                 2K
  number of IPv4 policy based routing aces:         0
  number of IPv4/MAC qos aces:                      0.75K
  number of IPv4/MAC security aces:                 1K





Wednesday, March 23, 2011

MPLS advertise lable

When enable mpls in an interface, the router tags all prefixes it has learnt from the routing table and advertises out via ldp message to its neighbors. This behavior is enabled by default. However, we can tune this behavior by specifying prefixes in an access-list and configure the router to advertise them only.

Configuration Example



In normal condition which mpls ldp advertise-lables enable by default. Prefixed learnt by R1 are all tagged.

R1#sh mpls forwarding-table
Local  Outgoing    Prefix            Bytes tag  Outgoing   Next Hop
tag    tag or VC   or Tunnel Id      switched   interface
16     Pop tag     2.2.2.2/32        0          Fa0/0      192.168.1.2
17     Pop tag     4.4.4.4/32        0          Fa0/0      192.168.1.2
R1#



Configuration
Configure Access-list to allow specific prefix being ldp advertised by the router.

R2
mpls ldp advertise-labels for 1
access-list 1 permit 2.2.2.0 0.0.0.255 


R1
mpls ldp advertise-labels for 1
access-list 1 permit 1.1.1.0 0.0.0.255 


R2#show mpls forwarding-table
Local  Outgoing    Prefix            Bytes tag  Outgoing   Next Hop
tag    tag or VC   or Tunnel Id      switched   interface
16     Pop tag     1.1.1.1/32        0          Fa0/0      192.168.1.1
17     Untagged    3.3.3.3/32        0          Fa0/0      192.168.1.1

R1#sh mpls forwarding-table
Local  Outgoing    Prefix            Bytes tag  Outgoing   Next Hop
tag    tag or VC   or Tunnel Id      switched   interface
16     Pop tag     2.2.2.2/32        0          Fa0/0      192.168.1.2
17     Untagged    4.4.4.4/32        0          Fa0/0      192.168.1.2


Now, after the configuration, the prefix 4.4.4.4 and 3.3.3.3 are not tagged anymore. They will be forwarded by the IP lookup as in the normal network.






Tuesday, March 22, 2011

VLAN Access control list (VACL)

VACL is used to permit and deny the traffic within the VLAN itself. Here is the example showing how this feature works.

Example

!
!
vlan access-map NO_HTTP 10
 action drop
 match ip address 111
vlan access-map NO_HTTP 20
 action forward
!
vlan filter NO_HTTP vlan-list 10

! 
!
access-list 111 deny   tcp any any eq www
access-list 111 permit ip any any




Monday, March 21, 2011

QoS Tunnel

Where to configure Qos-preclassify for tunneling

You can apply a service policy to either the tunnel interface or to the underlying physical interface. The decision of where to apply the policy depends on the QoS objectives. It also depends on which header you need to use for classification.
  • Apply the policy to the tunnel interface without qos-preclassify when you want to classify packets based on the pre-tunnel header.

  • Apply the policy to the physical interface without qos-preclassify when you want to classify packets based on the post-tunnel header. In addition, apply the policy to the physical interface when you want to shape or police all traffic belonging to a tunnel, and the physical interface supports several tunnels.

  • Apply the policy to a physical interface and enable qos-preclassify on a tunnel interface when you want to classify packets based on the pre-tunnel header.


Configuration of QoS tunnel

Router(config)# interface tunnel0
Router(config-if)# qos pre-classify





Voice Adaptive Traffic Shaping

Voice Adaptive Traffic Shaping is only acailable with MQC-based Frame-Relay traffic shaping, and only with LLQ enabled in sharper-queue. The goal of VATS is to throttle the PVC's sending rate once the system detected voice packets in the priority queue. The VATS feature is useful in the oversubscription scenaiio, where the customer sends traffic over the CIR. When the voice packet comes in the priority queue. the system will signal the shaper to slow its rate down to ensure router will never drop or delay any voice packets.

Command
policy-map class
shape fr-voice-adapt <deactivation N>
   where N = number of seconds to deactivate shaping after the last voice packet has been seen in the priority queue.

Referecence
CCIE R&S lab INE workbook I v5.0