I have a wide scope of interests in IT, which includes hyper-v private cloud, remote desktop services, server clustering, PKI, network security, routing & switching, enterprise network management, MPLS VPN on enterprise network etc. Started this blog for my quick reference and to share technical knowledge with our team members.
Saturday, August 27, 2016
Setting Up Cisco L2 and L3 Devices with GNS3 (1.5.2) for CCNA/CCNP Preparations
Thursday, March 28, 2013
Cisco Flexible Packet Matching (FPM) in 15.x
Router(config)#load protocol system:fpm
%Complete file name to be loaded is required
Instead, you'll have to do this
Nested Access Control
Cisco FPM supports nested access control policy i.e. enforce a child policy on parent policy. You can define a "class-map type stack" to check on the protocol fields and use another "class-map type access-control" to check on the payload contents. For example, you want to check for a password on the payload on protocol number 17 (UDP) on port 1234. The example config would be:
!--- Define the values to be checked on UDP header port 1234
class-map type stack match-all UDP-CHECK
match field IP protocol eq 0x11 next UDP
match field UDP dest-port eq 1234 next UDP
!---- Ensure the payload to contain the password string. You can also use regular expression
class-map type access-control match-all PASSWORD-CHECK
match start UDP payload-start offset 0 size 100 string "password"
!---- Define the child policy and just log the packets if payload contains the password
policy-map type access-control CHILD-POLICY
class PASSWORD-CHECK
log
!---- Nested policy on Parent. Check on UDP header then the payload. Otherwise, drop the packet.
policy-map type access-control PARENT-POLICY
class UDP-CHECK
service-policy CHILD-POLICY
class class-default
log
drop
!--- Enforce the FPM policy on the router interface
interface GigabitEthernet0/0
service-policy type access-control output PARENT-POLICY
Friday, January 4, 2013
Cisco Multicast Expansion Table (MET) is Full
%MCAST-SP-4-MET_THRESHOLD_EXCEEDED: Multicast Expansion table has exceeded 98% of its capacity and is reaching its maximum
%MMLS-SP-6-MET_LIMIT_EXCEEDED: Failed to allocate MET entry, exceeded system limit of (32744) entries. Number of times MET limit is exceeded in the last 1 min : 1
%CONST_MFIB_LC-SP-6-MET_MCAST_ALLOC_FAILURE: Failed to allocate MET entries for IP multicast entry (S:*.*.*.*, G:*.*.*.*)
The router is configured PIM in sparse mode and an RP manually set.
(hostname)#show platform hardware capacity multicast
L3 Multicast Resources
Replication mode: egress
Replication capability: Module Mode
2 Egress
3 Egress
4 Egress
5 Egress
MET table Entries: Module Total Used %Used
3 65526 28 1%
4 65526 38 1%
5 32744 32744 100%
After-note: Packet replication can be performed either egress (default) or ingress. Strangely, after changing the direction (not rebooting), the clients are able to join the IGMP group. The direction can be changed using:
(config)# mls ip multicast replication-mode ingress or the newer command (IOS 15.x)
(config)# ip multicast hardware-switching replication-mode ingress
Update:
According to Cisco TAC, there was a known bug (CSCtg53299) whereby MET entries are not deleted properly, which in turn, led to the filling up of MET table. A solution is to upgrade the firmware to version 15.1(01)S1 and above.
Wednesday, December 5, 2012
Concept of Cisco Bridge Domain Interfaces (BDI)
"Bridge domain interface is a logical interface that allows bidirectional flow of traffic between a Layer 2 bridged network and a Layer 3 routed network traffic. Bridge domain interfaces are identified by the same index as the bridge domain. Each bridge domain represents a Layer 2 broadcast domain."
The physical interface can even join more than 1 bridge domain (up to 4096 per router). For example, connecting to VLAN 200 (also Bridge Domain 200) as well:
service instance 200 ethernet
Thursday, May 10, 2012
Making Changes to MST Config with Care
For more information, download this Cisco "Configuring MST" doc.
Monday, May 7, 2012
Ethernet over MPLS (EoMPLS) Cisco Configuration Makes Simple
Here, we assume that basic MPLS configuration has been put in place. Configuring EoMPLS would be pretty straightforward.
On both PE1 and PE2 routers:
!
interface GigabitEthernet0/1.10
encapsulation dot1Q 10
xconnect 10.1.1.x 10 encapsulation mpls
no shut
!
Replace above 'x' with the peer PE router ID i.e. on PE1 x = 2 and on PE2 x = 1. The router ID is determined by the "mpls ldp router-id" command on the router.
On both CE1 and CE2 switches, let's assume Gi0/1 switch interface is used to connect to their respective PE routers.
!
Vlan 10
name EoMPLS
!
interface GigabitEthernet0/1
switchport trunk encapsulation dot1Q
switchport mode trunk
!
interface GigabitEthernet0/2
description Host port
switchport mode access
switchport access vlan 10
!
To verify the EoMPLS connectivity, enter "show mpls l2transport vc" on both PE routers. The status should indicate UP. You can also perform "show spanning tree vlan 10" on both CE switches to ensure the sanity of spanning tree i.e. only one of the switches should be the root. And finally, both hosts should be able to ping each other on same IP subnet. For further details, refer to this Cisco article.
Thursday, February 16, 2012
BGP does not advertise iBGP-learned routes to eBGP peers?
Thursday, December 8, 2011
New Cisco L2 Catalyst 2960S supports static routes
Switch# config t
Switch(config)# sdm prefer lanbase-routing
Switch(config)# reload
Do note that the lanbase-routing template is only supported on C2960S LAN-based image and not on LAN-lite image. For more information, refer to this Cisco documentation.
Thursday, June 23, 2011
SDM Mismatch on Cisco Catalyst 3750 switches
To use the desktop template, perform the following commands on the stack master:
- For L2 configuration: sdm prefer vlan desktop
- For L3 configuration (enabled with ip routing): sdm prefer routing desktop
- Do a "show sdm prefer" to verify and reload.
Saturday, June 18, 2011
Server NIC Teaming with Cisco Nexus
In summary, these are the overall steps:
- Enable the vPC and LACP features.
- Create a vPC domain and enter vpc-domain mode.
- Configure the vPC peer keepalive link across the out-of-band management interfaces.
- Create the vPC peer link across both Nexus 5000 switch systems through the EtherChannel link.
- Create new EtherChannel for the server ports and assign it with the same vPC number on both switch systems.
N5k(config-if)# channel-group 10
N5k(config-if)# int po10
N5k(config-if)# vpc 10 (ensure this number must be the same on the other switch system)
N5k(config-if)# switchport access vlan 101
Commands to verify vPC configuration
Friday, June 3, 2011
Multicast for MPLS VPN Extranet
The source server (on PE1) is streaming on multicast mode. The VRF-Green, on the other side of PE2, would be able to join to the same multicast distribution tree (239.1.1.1) and recieve the multicast stream. For this Intranet Multicast VPN to work, the VRF-Green on both PE routers should share the basic common configuration as follows:
Router PE1 and PE2
ip vrf VRF-Green
mdt default 239.1.1.1
route-target export 65001:100
route-target import 65001:100
!
ip multicast-routing
ip multicast-routing vrf VRF-Green
ip pim rp-address 1.1.1.1
ip pim vrf VRF-Green rp-address 10.1.1.1
!
router bgp 55
address-family ipv4 mdt
neighbor x.x.x.x activate
neighbor x.x.x.x send-community extended
!
address-family vpnv4
neighbor x.x.x.x activate
neighbor x.x.x.x send-community extended
!
Configuring the Receiver MVRF on the Source PE (Option 1)
On PE1, add "route-target import 65001:100" on VRF-Blue, enable multicast routing "ip multicast-routing vrf VRF-Blue", and specify the same Rendezvous Point (RP) as VRF-Green for VRF-Blue using "ip pim vrf VRF-Blue rp-address 10.1.1.1".
Configuring the Source MVRF on the Receiver PE (Option 2)
Another option is to do the import on the reciever PE (PE 2 in this example). As mentioned earlier, I observed that the stream is slightly more stable if there is more than 1 reciever PE. You'll need to do the import on every reciever PE.
Troubleshooting
Ensure RPF and multicast routing is sound for GRT level on all PE and P routers, as well as VRF level for all PE. In this example (some outputs truncated):
GRT level
#sh ip mroute
(10.10.10.1, 239.1.1.1), 00:54:29/00:02:12, flags: TA
Incoming interface: Port-channel1, RPF nbr 10.10.0.1
Outgoing interface list:
Port-channel2, Forward/Sparse, 00:54:29/00:03:15
#sh ip mroute vrf VRF-Green
(192.168.1.1, 239.23.25.1), 00:54:29/00:02:12, flags: TA
Incoming interface: Tunnel1, RPF nbr 192.168.0.1
Outgoing interface list:
VLAN123, Forward/Sparse, 00:54:29/00:03:15
For further details, refer to the Cisco Multicast VPN Extranet support.
Multipath with Redundant Routers
If you have redundant paths with some load splitting or sharing, you may have to consider enabling multipath options using following steps on every router:
- enable
- configure terminal
- ip multicast multipath s-g-hash next-hop-based
- ip multicast vrf vrf-Name multipath s-g-hash next-hop-based
- end
- show ip rpf source-address group-address
- show ip route ip-address
Thursday, May 5, 2011
Load Sharing in MPLS VPN with Route Reflector
Monday, April 25, 2011
Using Anycast RP for Video Multicasting
Troubleshooting Summary
#show ip mroute 239.1.1.1
.....
(10.1.12.4, 239.1.1.1), 00:00:01/00:02:58, flags:
Incoming interface: Null, RPF nbr 0.0.0.0
Outgoing interface list:
Ethernet0/0, Forward/Dense, 00:00:02/00:00:00
Vlan111, Forward/Dense, 00:00:02/00:00:00
Take note of above output, if you see that the incoming interface is null and the neigbour is empty on a router (bold red), it usually means a missing "ip pim" on some interfaces or an issue on the underlying unicast routing issue. If it's latter, perform standard routing troubleshooting on the underlying IGP or static routes.
There is this good blog post that further elaborates the detailed steps on RPF troubleshooting.
Friday, April 8, 2011
Faster OSPF Convergence using iSPF
In many cases, the entire SPT need not be recomputed because most of the tree remains unchanged. Incremental SPF (iSPF) allows the system to recompute only the affected part of the tree. Recomputing only a portion of the tree rather than the entire tree results in faster OSPF convergence and saves CPU resources. Note that if the change to a Type-1 or Type-2 LSA occurs in the calculating router itself, then the full SPT is performed. Incremental SPF is scheduled in the same way as the full SPF. Routers enabled with incremental SPF and routers not enabled with incremental SPF can function in the same internetwork.
Given only pros and not cons, we should enable iSPF by default. iSPF can be easily enabled using ispf command under each router ospf process.
- router ospf 1
- ispf
- !
- show ip ospf 1 | inc SPF
- ........
- Incremental-SPF enabled
- .......
Tuesday, April 5, 2011
VRF-aware Dynamic Multipoint VPN
- On all Routers
- !
- crypto keyring ciscokey vrf outer
- pre-shared-key address 172.16.0.0 255.255.0.0 key cisco123
- !
- crypto isakmp profile isaDMVPN
- keyring ciscokey
- match identity address 172.16.0.0 255.255.0.0 outer
- !
- crypto ipsec transform-set tfDMVPN esp-aes esp-sha-hmac
- mode transport
- !
- crypto ipsec profile proDMVPN
- set security-association lifetime seconds 900
- set transform-set tfDMVPN set isakmp-profile isaDMVPN
- !
- interface Tunnel1
- ip vrf forwarding inner
- tunnel protection ipsec profile proDMVPN #apply protection on tunnel
To verify, perform the following commands and check the status in bold:
- Router1#sh crypto isakmp sa
- IPv4 Crypto ISAKMP SA
- dst src state conn-id slot status
- 172.16.1.1 172.16.1.2 QM_IDLE 1001 0 ACTIVE
- ......
- Router1#sh crypto session
- Crypto session current status
- Interface: Tunnel1
- Profile: isaDMVPN
- Session status: UP-ACTIVE
- ......
Monday, April 4, 2011
VRF-aware Multipoint GRE Tunnel
Assuming that the outer VRF (including the loopback interfaces) is already made routable (e.g. OSPF, BGP etc) within this network. We are setting up another VRF on the inner for network management purposes. - On Hub CE Router A:
- interface Tunnel1
- ip vrf forwarding inner
- ip address 192.168.1.1 255.255.255.0
- ip nhrp authentication cisco #ensure matching key for all spokes
- ip nhrp map multicast dynamic
- ip nhrp network-id 123 #also ensure network-id can match
- ip ospf network broadcast
- ip ospf priority 10
- tunnel source Loopback0 #note that the destination is not defined
- tunnel mode gre multipoint
- tunnel key 123 # and the tunnel key as well
- tunnel vrf outer # create a tunnel on the outer vrf
- !
- router ospf 120 vrf inner
- network 172.16.1.1 0.0.0.0 area 0
- network 192.168.1.0 0.0.0.255 area 0
- On spoke router B
- interface Tunnel1
- ip vrf forwarding inner
- ip address 192.168.1.2 255.255.255.0
- ip nhrp authentication cisco
- ip nhrp map 192.168.1.1 10.1.1.1 #map inner vrf to outer vrf on hub router
- ip nhrp map multicast 10.1.1.1 #register with nhrp hub using multicast
- ip nhrp network-id 123
- ip nhrp nhs 192.168.1.1 #define hub router as next hop
- ip ospf network broadcast
- ip ospf priority 0
- tunnel source Loopback0
- tunnel mode gre multipoint
- tunnel key 123
- tunnel vrf outer
- !
- router ospf 120 vrf inner
- network 172.16.1.2 0.0.0.0 area 0
- network 192.168.1.0 0.0.0.255 area 0
- On spoke router C
- interface Tunnel1
- ip vrf forwarding inner
- ip address 192.168.1.3 255.255.255.0
- ip nhrp authentication cisco
- ip nhrp map 192.168.1.1 10.1.1.1 #map inner vrf to outer vrf on hub router
- ip nhrp map multicast 10.1.1.1 #register with nhrp hub using multicast
- ip nhrp network-id 123
- ip nhrp nhs 192.168.1.1 #define hub router as next hop
- ip ospf network broadcast
- ip ospf priority 0
- tunnel source Loopback0
- tunnel mode gre multipoint
- tunnel key 123
- tunnel vrf outer
- !
- router ospf 120 vrf inner
- network 172.16.1.3 0.0.0.0 area 0
- network 192.168.1.0 0.0.0.255 area 0
If you have a second Hub router on the headend, you can setup another multippoint tunnel for redundancy like the following diagram:
Nevertheless, the newly created overlay VPN remains in plain. You may also wish to protect it using IPSec. Cisco calls this combination of IPSec and Multipoint GRE as "Dynamic Multipoint VPN" or "DMVPN", which I should blog about it in my next post.
Friday, April 1, 2011
Cisco Performance Routing (PfR)
Saturday, March 26, 2011
Route filtering using route tags
To implement such routing policy using route-tag: - Router A
- access-list 1 permit 1.1.1.0 255.255.255.0
- access-list 1 permit 2.2.2.0 255.255.255.0
- access-list 2 permit 3.3.3.0 255.255.255.0
- !
- route-map route-tag permit 10
- match ip address 1
- set tag 111 --tag the 1st two remote sites with 111
- !
- route-map route-tag permit 20
- match ip address 2
- set tag 222 -- tag the 3rd remote site with 222
- !
- route-map route-tag permit 30 -- without this, all other routes will be dropped
- !
- router ospf 1
- redistribute bgp 65001 subnets route-map route-tag -- redistribute ISP routes into IGP
- ...
- ...
- Router B
- route-map tag-filter deny 10
- match tag 111 -- filter off sites with tag 111
- !
- route-map tag-filter permit 20
- match tag 222 --permit only sites with tag 222
- !
- router ospf 2
- distribute-list route-map tag-filter in
To verify, perform the necessary "show ip route" commands on both router A and B to ensure the route entries are in order. Do note that tagging does not work with BGP. The alternative in BGP is to use community string in AA:NN format (e.g. 100:300). For the adverting routers (typically on customer edge), use "set community" in place of "set tag" in the route-map statement. For the recieving routers (typically on provider edge), use "ip community-list" to describe the community string and "match community". For further example on using BGP community, see this Cisco example.
Friday, March 25, 2011
Verifying Cisco IOS Image Checksum
Once you have uploaded the new image and before you reload the router, run this command:
#verify /md5 ‹ ios image location ›
example: verify /md5 flash:c1841-adventerprisek9-mz.124-25e.bin
Compare the output value with the MD5 sum that you noted earlier.
Saturday, February 26, 2011
Dell PowerConnect VLAN Interoperability with Cisco
I have just recieved confirmation from Cisco saying this:
Unfortunately, GVRP is not supported on Catalyst 3560 or 3750 switches. GVRP is only supported on the CatOS releases on Cat4000 and Cat6500 platfroms (on select releases - Only 6000s, 5000s and 4000 switches running CatOS software support this feature.)
If you connect a 3560 or 3750 switch to a device that supports GVRP you will see unsupported messages on the switch, telling you that the device itself is not able to process the GVRP information from the hosts/neighbours and therefore it drop it.
Nevertheless, GVRP is supported on IOS Router (cGVRP):
http://www.cisco.com/en/US/partner/docs/ios/12_2sr/12_2srb/feature/guide/srbcgvrp.html
What's the hell?! CatOS is already obsolete. And IOS routers being at L3 do not even need to pass VLAN trunking information. Does it mean Cisco lock-in?









