Wednesday, 30 October 2013

OSPF LSAs and Area Types

I know this is a fairly large set up but believe me it teach you practically everything you need to know about LSAs and different ospf area types. I have to admit this is not something I’ve created myself. I stumbled upon this video on youtube http://www.youtube.com/watch?v=7LzrvCvb-Ro&list=PLC6197249373E47E9 made by one of the best network instructors out there Keith Barker and then thought it would be great to lab it up and configure everything with Keith.


 OSPF LSAs and Area Types

  
I also thought of adding another ospf area number 3 and connect it to area 1 where then we would have discontiguous areas ! and for a fix we would have to use either GRE Tunnel or Virtual Link but as you can see I did not do it just to avoid having too many devices to work with and Virtual link and GRE Tunnel I will explain in another post.

Please go ahead and download following net file and build your topology
OSPF LSAs and Area Types
Please download following basic config , copy and paste them into relevant devices
basic_config_files
As a side note: if you’ve already visited my other post http://ccie4all.wordpress.com/2012/11/03/ccie_gns3_topology_/ and managed to built you topology presented in CCIE GNS TOPOLOGY post  then YOU DO NOT have to use the files provided in this post and build the topology from scratch cause you will easily be able to recreate above set up once you’ve got CCIE GNS TOPOLOGY running on your machine. You will have to use few subinterfaces on your routers , add few vlans on switches but believe me it saves hell lot of time and most importantly it teaches you many important configuration and troubleshooting skills what you will have to face in yur R&S lab exam and the real world also that way you only have one gns3 network on your PC that DOES IT ALL for you
Check out this cisco tutorial about OSPF area types (although it does not explain the Not So Totally Stubby area)
http://www.cisco.com/E-Learning/bulk/public/ccnp/QLM_Configuring_OSPF_Special_Area_Types_BSCI/player.html
Thought it’d be good to add LSA types and various stub configuration.
Type 1 – Represents a router
Type 2 – Represents the pseudonode (designated router) for a multiaccess link
Type 3 – A network link summary (internal route)
Type 4 – Represents an ASBR
Type 5 – A route external to the OSPF domain
Type 7 – Used in stub areas in place of a type 5 LSA
Stub Areas
A stub area allows Type 2 and Type 3 LSAs. Type 5 LSAs are NOT  passed into the area. The ABR injects a type 3 LSA containing a default route into the stub area.Filters the LSA-type 4 and 5.You will just have inter-area routes inside this area (routes with the “IO” code)
ABR(config-router)#area 51 stub
ABR(config-router)#area 51 default-cost 10
Defines the cost of a default route sent into the stub area. Default is 1.
INTERNAL(config-router)#area 51 stub
  • Note
    All routers in the stub area must be configured with the area x stub command, including the Area Border Router (ABR).
  • Stub= No type 5 LSAs and default route
Totally Stubby Areas
This is Cisco proprietary.Like stub areas, totally stubby areas do not receive type-3 , type-4 or type-5 LSAs from their ABRs . All routing out of the area relies on the single default route injected by the ABR
ABR(config-router)#area 51 stub no-summary
INTERNAL(config-router)#area 51 stub
  • Note
    Whereas all internal routers in the area are configured with the area x stub command, the ABR is configured with the area x stub no-summary command
  • Totally Stubby – ONLY Type 2 LSAs and default route

Not-So-Stubby Areas (NSSA)
This area is used when you are redistributing external routes. An NSSA makes use of type 7 LSAs, which are essentially type 5 LSAs in disguise. You will see “IO” routes (they are in the routing table because of the type-3 LSAs) also “N1/2″ routes which represents the NSSA area. This allows an ASBR to advertise external links to an ABR, which converts the type 7 LSAs into type 5 before flooding them to the rest of the OSPF domain.Type 3 LSAs will pass into and out of the area. Unlike a normal stub area, the ABR will NOT  inject a default route into an NSSA unless explicitly configured to do so with
ABR(config-router)#area x nssa default-information originate
As traffic cannot be routed to external destinations without a default route, you’ll probably want to include above command.
ABR(config-router)#area 1 nssa
INTERNAL(config-router)#area 1 nssa
  • Note
    All routers in the NSSA stub area must be configured with the area x nssa command.
  • NSSA – Type 2, 3, and 7 LSAs with default route

Totally stub not-so-stubby area (totally NSSA)
This is Cisco proprietary.Filters type-3 ,type-4 and 5 LSAs, so inside the area you will only have a default route, besides the “N1/2″ routes that are normal on that type of area.
ABR(config-router)#area 11 nssa no-summary
INTERNAL(config-router)#area 11 nssa
  • Note
    Whereas all internal routers in the area are configured with the area x nssa command, the ABR is configured with the area x nssa no-summary command.
  • Totally NSSA – Only Type 2 and 7 LSAs and default route







Confusion about voice vlan

The main reason why I decide to create posts like this one despite the fact that there are millions if not more similar posts, explanations and websites out there on the internet is mainly because I simply enjoy gathering all relevant information from various sources then combine it all into a single unit so we do not have to jump from one website to another in order to find whatever we’re after, this relates to Cisco and Cisco only of course :)
This set up is most definitely how it all looks like in your office environment, go ahead and first check and see how your PC connects with your desk phone then from the phone trace the cable which most likely connects to RJ45 floor port which most likely is located under your desk then it all goes through the walls of your company all the way back to your Company’s Comms Room (Data Centre) where it connects into a patch panel in one of the network cabinets and from there directly to L2 switch which then goes to your business’s L3 Core switches, routers,firewalls etc …
voice

I have spent really long hours on this one, especially the one that involves  802.1p tag
I have been looking into this like a madman and must admit that Voice combined with QOS is not the easiest to understand.
The reason why it takes so long top prepare for the LAB is because you never know what Cisco is going to ask you to configure or troubleshoot and this is because we need to know and understand it all !!
The upstream switch communicates with the Cisco IP phone using CDP to set up an interconnection link that allows the Cisco IP phone to send VoIP packets on its uplink port back to the switch, either in the VoIP VLAN or in the data VLAN
So there are 4 modes to set up a switch port you expect to plug a phone into (Interface Ethernet 4/0 connects to the phone)
===============================================================================
===============================================================================
1. First you can just use a regular access port. In this mode, both the phone traffic and pc data both land on the same access vlan and there is no way to distinguish between the two. Two things to note, because the traffic will use the same vlan then you have a security risk as well as having no ability to provide QOS priority to only the phone. Any QOS is applied to ALL traffic coming in that switch port.
Rack5SW2(config)#int ethernet 4/0
Rack5SW2(config-if)#switchport mode access
Rack5SW2(config-if)#switchport access vlan 79
or
Rack5SW2(config)#int ethernet 4/0
Rack5SW2(config-if)#switchport mode access
Rack5SW2(config-if)#switchport voice vlan none

MPLS QOS EXPERIMENTAL BITS

After the first unsuccessful CCIE R&S lab attempt in Belgium in my last post I said I was having a little trouble with the MPLS VPN configuration and it most certainly was not because I did not know what ingredients were necessary in order to configure the tunnel between the sites but because the way Cisco asked me to configure it and manipulate the traffic  , it made me think really hard for a long while during the exam (almost 1hr) and it cost me very dearly in the end !
Windows-Logic



Below topology is from INE SPv3 (Service Provider) video series with Brian McGahan who I’m sure we all know and love to listen to.
mpls_exce_sp_ine
This is how it is presented to us in GNS3
mpls_exce_sp

GNS3_NET_FILE  : MPLS_QOS_NET_FILE
GNS3 INITIAL CONFIGS : impls_initial_configs
Cisco 12000 series router’s XR_1 and XR_2 are simulated by 3745 routers – these devices are not supported in GNS3 so rack rental is a must.  exam_funny
Some of you might be asking yourself right now why would I create a post that revolves around MPLS QOS ?? Well , short answer is “be prepare to get stuck in your lab exam ” because even if you get really simple MPLS requirements  , they will definitely confuse you with something else. CCIE lab as we all know is not about best practises and myself having finally experienced it , it is miles away from there , it is about whether you can accomplish given task and meet the requirements or not !
One more thing , make sure you experiment with as many commands as possible (some of the I’ve listed below) and understand how they work and affect the network because even if you manage to get your MPLS VPN Tunnel up and running but you do it not how they asked you to , you will fail the whole section !
mpls ldp router-id Loopback0
mpls ip propagate-ttl
mpls ldp autoconfig
bgp default ipv4-unicast
address-family vpnv4
address-family ipv4 vrf
redistribution within MPLS backbone – especially when you have two different IGPs running inside where you first have to correctly redistribute between them in order to make you BGP/MPLS operational then most likely you will need to do some more redistribution between PE-CE to make it all work !

Fake DHCPv6 Attack


DHCPv6 relies on stateless UDP communication using UDP 546 and UDP 547 ports. As stated in the RFC 3315 this makes DHCPv6 particularly vulnerable to fake attack, in which SOLICIT messages are generated with random source prefixes.
Using DHCPv6 Rapid-Commit mode, ONLY two messages are exchanged between the client and the server to get an IPv6 prefix.
Picture1: lab topology – IOS 12.4(24)T implemented in GNS3


DHCPv6 server configuration:

ipv6 dhcp pool SLAAC-POOL
address prefix 2001:DB8:5AB::/64 lifetime infinite infinite
dns-server 2001:DB8:5AB::57
domain-name nouri.com
!
interface FastEthernet1/0
ip address 192.168.0.202 255.255.255.0
ipv6 address 2001:DB8::202/64
ipv6 enable

ipv6 dhcp server pool0 rapid-commit
end
Layer2 Switch configuration:

interface FastEthernet1/0
switchport access vlan 10
!
interface FastEthernet1/1
switchport mode trunk
Below is the Scapy script used for the attack, though awkward, but do the job.
You can enter manually the DHCPv6 sever MAC address from the local neighbor table of through a script by pinging all DHCP agents multicast address FF02::1:2.
SOLCIT messages are sent blindly without even expecting any responses.

Tuesday, 29 October 2013

How Multi is MP-BGP in IOS-XR?

This caught me on surprise. I had an impression that IOS-XR as an advanced operating system would support all kinds of multi-protocol transferability over BGP.

As it seems, there is an issue when transferring IPv6 prefixes over an IPv4 peering or IPv4 prefixes over an IPv6 peering. This happens for sure on ASR9k running latest 4.1.0, but i haven't verified it on the CRS yet.






IPv4 prefixes over IPv6 peering
This doesn't seem to be supported based on the available configuration options.
What is even more worrying, is that no other address family is supported too.

RP/0/RSP0/CPU0:ASR#conf t
RP/0/RSP0/CPU0:ASR(config)#router bgp 100
RP/0/RSP0/CPU0:ASR(config-bgp)#neighbor 2001::1:2:3
RP/0/RSP0/CPU0:ASR(config-bgp-nbr)#address-family ?
  ipv6  IPv6 Address Family

IPv6 prefixes over IPv4 peering
This is supported according to the configuration options, but it doesn't work.
Cisco also insists that this is definitely supported.

RP/0/RSP0/CPU0:ASR#conf t
RP/0/RSP0/CPU0:ASR(config)#router bgp 100
RP/0/RSP0/CPU0:ASR(config-bgp)#neighbor 10.11.254.37
RP/0/RSP0/CPU0:ASR(config-bgp-nbr)#address-family ?
  ipv4   IPv4 Address Family
  ipv6   IPv6 Address Family
  l2vpn  L2VPN Address Family
  vpnv4  VPNv4 Address Family
  vpnv6  VPNv6 Address Family

As soon as you enable the IPv6 address family under the IPv4 neighbor, the BGP session is dropped and it never comes up.

RP/0/RSP0/CPU0:ASR#sh bgp sum
BGP router identifier 10.11.254.38, local AS number 100
BGP generic scan interval 60 secs
BGP table state: Active
Table ID: 0xe0000000   RD version: 1
BGP main routing table version 1
BGP scan interval 60 secs

BGP is operating in STANDALONE mode.


Process       RcvTblVer   bRIB/RIB   LabelVer  ImportVer  SendTblVer  StandbyVer
Speaker               1          1          1          1           1           1

Neighbor        Spk    AS MsgRcvd MsgSent   TblVer  InQ OutQ  Up/Down  St/PfxRcd
10.11.254.37      0  100        0       0        0    0    0 00:00:00 Idle

Also, debug shows that there are no tries of BGP to establish a session. It's like BGP gets disabled.

The only doc that refers such a limitation (in IOS-XR 3.3 for CRS) is the one in http://www.cisco.com/en/US/docs/ios_xr_sw/iosxr_r3.3/conversion/reference/guide/cn33main.html#wp1028960

A given address family is only supported with a neighbor whose address is from that address family. For instance, IPv4 neighbors support IPv4 unicast and multicast address families, and IPv6 neighbors support IPv6 unicast and multicast address families. However, you cannot exchange IPv6 routing information with an IPv4 neighbor and vice versa.

I searched all CCO for more information, but i didn't manage to find something useful. Does anyone have extra information to share? TAC is struggling (as usual) to find an answer...

Update #1
Cisco verified once more that this is a supported configuration. Arie Vayner (and later tac) proposed to add an IPv6 address to the interface being used as an IPv4 next-hop. Indeed, this solved the problem and the BGP session came up. But then it became even more interesting...

Two IPv6 prefixes are learned from the IPv4 neighbor. Next-hop is an IPv6 address.

RP/0/RSP0/CPU0:ASR#sh bgp ipv6 uni 
BGP router identifier 10.11.254.38, local AS number 100
BGP generic scan interval 60 secs
BGP table state: Active
Table ID: 0xe0800000   RD version: 5
BGP main routing table version 5
BGP scan interval 60 secs

Status codes: s suppressed, d damped, h history, * valid, > best
i - internal, r RIB-failure, S stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network            Next Hop            Metric LocPrf Weight Path
* i2001::1:2:3/128    2003::1:2:3              0    100      0 ?
* i2003::/64          2003::1:2:3              0    100      0 ?

Processed 2 prefixes, 2 paths

If i remove the IPv6 address from the interface that is being used as next-hop (the one i added before), then i automatically get an IPv6 prefix with an IPv4 next-hop!!!

RP/0/RSP0/CPU0:core-distr-kln-02#sh bgp ipv6 uni 
BGP router identifier 10.11.254.38, local AS number 100
BGP generic scan interval 60 secs
BGP table state: Active
Table ID: 0xe0800000   RD version: 6
BGP main routing table version 6
BGP scan interval 60 secs

Status codes: s suppressed, d damped, h history, * valid, > best
i - internal, r RIB-failure, S stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network            Next Hop            Metric LocPrf Weight Path
*>i2001::1:2:3/128    10.11.254.41             0    100      0 ?

Processed 1 prefixes, 1 paths

The BGP session stays up, until something happens that will reset it. Then it will stay down forever, as it was happening in the beginning.

I must say that i cannot endorse such an implementation. Using exactly the same configuration, you get different results, depending on the order of (un)configuring things. Also, i cannot understand why the establishment of an IPv4 BGP session that is going to negotiate IPv4/IPv6 address-family capabilities should depend on whether an IPv6 next-hop exists or not. That should be left for the NLRI exchange routine.

IPv6 multicast over IPv6 IPSec VTI

IPv4 IPSec doesn’t support multicast, we need to use GRE (unicast) to encapsulate multicast traffic and encrypt it. As a consequence, more complication and an additional level of routing, so less performance.
One of the advantages of IPv6 is the support of IPSec authentication and encryption (AH, ESP) right in the extension headers, which makes it natively support IPv6 multicast.
In this lab we will be using IPv6 IPSec site-to-site protection using VTI to natively support IPv6 multicast.
The configuration involves three topics: IPv6 routing, IPv6 IPSec and IPv6 multicast. Each process is built on the top the previous one, so before touching IPsec, make sure you have local connectivity for each segment of the network and complete reachability through IPv6 routing.
Next step, you can move to IPv6 IPSec and change routing configuration accordingly (through VTI).
IPv6 multicast relies on a solid foundation of unicast reachability, so once you have routes exchanged between the two sides through the secure connection you can start configuring IPv6 multicast (BSR, RP, client and server simulation).
Picture1: Lab topology
IPv6 multicast over IPv6 IPSec VTI

Lab outline

  • Routing
    • OSPFv3
    • EIGRP for IPv6
  • IPv6 IPSec
    • Using IPv6 IPSec VTI
    • Using OSPFv3 IPSec security feature
  • IPv6 Multicast
    • IPv6 PIM BSR
  • Offline lab
  • Troubleshooting cases
  • Performance testing

Routing

Note:
IPv6 Routing relies on link-local addresses, so for troubleshooting purpose, link-local IPs are configured to be similar to their respective global addresses, so they are easily recognisable. This will be of a tremendous help during troubleshooting. Otherwise you will find yourself trying to decode the matrix : )
OSPFv3

Needs an interface configured with IPv4 address for Router-id
OSPFv3 offloads security to IPv6 native IPv6, so you can secure OSPFv3 communications on purpose: per- interface or per-area basis.