DMVPN is documented under "Security and VPN", for IOS 12.4T it can be found here.
TIP: If you need to clear the NHRP cache because you changed something in the configuration, bounce all the tunnels.
TIP: It's crucial that you decide if you need to use 1 or 2 Hubs in the Phase 1 of DMVPN based on your actual needs.
Let´s start by defining DMVPN. From a high level DMVPN a Point to Multipoint (PMP) Tunnel, and it's an Overlay Tunnel, which means that it's not a Peer to Peer VPN, but a Tunnel which is independent on the underlying transport. Basically DMVPN is a GRE over IPsec site-to-site tunnel, that allows you to use Dynamic Routing Protocols.
DMVPN is a Hub and Spoke network based on an Overlay, where each one of the Spokes establishes a GRE tunnel with the Hub. Spokes can then run EIGRP, OSPF or BGP over the tunnel with the Hub. Spokes communicate with the Hub using the Tunnel (static configuration), as a normal P2P GRE Tunnel. Spokes will be communicating with the other Spokes using Dynamic, ON-DEMAND Tunnels. Therefore we don't need a full mesh of Tunnels, so that's a relieve.
Advantages of DMVPN (taken from INEs DMVPN Introduction, that can be found on YouTube):
- Simple configuration, where Spokes use the standard template configuration.
- Scalable (new spokes easily added, and hub doesn't need to be reconfigured).
- Supports MULTIPLE Transport Protocols inside of the tunnel (IPv4, IPv6, Multicast, Routing Protocols).
- Independent of the Transport, you just need any kind of IP connectivity between sites.
- In newer IOS version, DMVPN supports NAT.
- Spoke-to-Spoke tunnels are only formed if they are needed (on Demand), they are logically "dialing" each other.
- For large scalability GET VPN is supported on top of DMVPN, so we can use GROUP encryption if we have many devices.
When would we actually use DMVPN, instead of simple Static IPsec tunnels?
- When the number of sites is too big for static IPsec, because we need to manually specify source, destination and define the traffic that goes through the tunnel.
- When the number of sites is changing, so DMVPN is better cause of the Scalability.
- MPLS L3VPN adds too much routing complexity, because CE needs to run a protocol (typically MP-BGP) with PE, so we probably need to redistribute our LAN prefixes to the providers network. On DMVPN we're only running the tunnel on top of the IP infrastructure we already have, so we can just extend the routing protocol we're using within our LAN.
- MPLS sometimes needs inter-operability between providers, if your offices are not all in the countries where a certain provider is available. DMVPN uses Internet as an underlying transport, so we're safe here.
- MPLS L2VPN with VPLS (Virtual Private LAN Services) limits the connectivity options, like - only Ethernet. With DMVPN you can use any type of connectivity, including DSL.
Ok, now we're reaching an actual technical part. Let's start by defining the components of DMVPN:
1. Traffic Routing over the DMVPN Tunnels, where two main protocols are involved:
mGRE (Multipoint GRE)
NHRP (Next Hop Resolution Protocol)
2. Traffic Encryption (optional, but strongly recommended because you might be using a public network, such as Internet, as an underlay network)
IPsec
DMVPN Hub is considered NHRP Server and DMVPN Spokes are NHRP Servers. Clients (Spokes) manually specify the Hubs IP address in the configuration, while the Hub dynamically learns Spokes VPN address (PRIVATE address, the one that's inside of the tunnel) and NMBA address (PUBLIC address).
Spoke-to-Spoke Routing is not simple, because the Spokes (R4, R6, R7) do not know about other Spokes, the IPs of the other Spokes are not in their routing tables, they just know about the statically configured Hub (R5). This is where NHRP comes in. Hub should be in charge of sending the other Spokes details to each of the Spokes, so that spokes don't need to know each other addresses unless they need to actually send something to each other. Hub is therefore used only for the control plane exchange, ergo - NHRP, while the data plane goes from the Spoke to Spoke directly.
PHASE 1: When the Spokes do not communicate directly, but need to send the traffic to Hub in order to be forwarded to other Spokes.
PHASE 2 and 3:
What we want is the Spoke to send the traffic DIRECTLY to other Spokes, and this is considered DMVPN Phase 2, or Phase 3. Spokes actually only need to make a tunnel to the other Spokes if they require to send some traffic, that is why it's considered to be On-Demand Tunnel.
If you choose to use one Hub per DMVPN tunnel (the simplest design), each hub router is the NHRP server for the subnet it controls, and propagates routing information between spokes. The problem with this is the following: Spokes should learn the other Spokes routes via IGP via the Tunnel established with the Hub. The Spokes do not know the other Spokes REAL address, so there has to be a way to MAP the PRIVATE address (VPN) to a Public address (NBMA). This resolution is done using the NHRP Protocol, which kinda works like the Frame-Relay IP to DLCI mapping.
GRE keys are mandatory in Phase 2 deployments (otherwise the spokes cannot decipher which tunnel the other spoke router was using), causing performance degradation if the hub routers don’t support GRE keys in hardware (Catalyst 6500 doesn’t). This problem is solved in the multiple hubs in a single DMVPN tunnel architecture (All hub routers act as NHRP servers, and propagate routing information between the spokes), while the downside is that implementing primary/backup hub routers is a tricky task (you have to use routing protocol tricks like per-neighbour cost in OSPF or per-interface offset lists with EIGRP). Another pretty important down side of a one-hub-per-tunnel design is that when you lose a hub router, NHRP registrations on the tunnel fail completely and the routing across the affected tunnel stops after the spoke routers figure out their routing protocol neighbour is gone.[from ipspace.net]
DMVPN Configuration
First we need to make sure that we have basic connectivity over the Public Network. Public Network will be using some Public Routable addresses (NBMA addresses), while behind our Hub and Spokes we will have the Private addressing (VPN addresses).
TIP: Since the configuration is pretty standard, the easiest way is to just copy the Hub and Spoke configuration example from Cisco Docs, remove the IPsec configuration as it should be configured in the end, and adjust them to your own topology.
HUB Configuration:
*MTU is normally set to 1400 if you are using GRE+IPsec, in order to avoid additional CPU usage for the fragmentation on the other end.
interface Tunnel0
ip address 10.165.55.1 255.255.255.0
!
The following 3 parameters are mandatory, and they need to match on HUB and all the SPOKEs:
ip nhrp authentication AUTHENT_PASSWORD
ip nhrp network-id 99
tunnel key 100000 <- must match on all nodes that want to use this mGRE tunnel
ip nhrp map multicast dynamic
tunnel source Ethernet0
tunnel mode gre multipoint <- Defining the type of the tunnel to be mGRE
SPOKE Configuration:
interface Tunnel0
bandwidth 1000
ip address 10.0.0.2 255.255.255.0
ip nhrp authentication AUTHENT_PASSWORD
ip nhrp map multicast 200.17.0.1
ip nhrp network-id 99
ip nhrp nhs 10.0.0.1 <-Next Hop Server (HUBs Private Address)
ip nhrp map 10.0.0.1 200.17.0.1 <- Static Mapping using the Public Address
tunnel source Ethernet0
tunnel mode gre multipoint
tunnel key 100000 <-must match on all nodes that want to use this mGRE tunnel
To check the VPN to NBMA mapping and see the destination of the tunnel, do:
#show ip nhrp
On the SPOKE do:
#show ip nhrp dynamis [IP of the other Spokes]
The problem with the routing protocol such as EIGRP updates between the SPOKEs is that since the update is received from the Tunnel - due to the Split Horizon the update will not go back through the same interface (the Tunnel interface). This is why when we're using EIGRP, the Split Horizon needs to be switched off under the Tunnel interface:
(config-if)#no ip split-horizon eigrp 100
PHASE 1: The Hub is in the Data Plane for all of the traffic. No traffic goes from Spoke to Spoke directly. If you need the SPOKE-TO-SPOKE traffic to be routed directly, and not send everything via the Hub - you need the PHASE 2.
In order to implement an actual Phase 2, the Next Hop needs to be set to the IP of the other Spoke (cannot be modified into the HUB IP, as it would by default because the traffic is coming from the Hub). The key here is that the Hub is ONLY in the Control plane, and it's not used for traffic forwarding, only for NHRP resolution between the SPOKEs. The procedure will be more or less like this:
1. Spoke that wants to send the traffic to another Spoke starts by sending a NHRP query request with the Private IP to the Hub
2. Hub answers with the Public IP of the other Spoke
3. The ON-DEMAND tunnel is formed between the Spokes. This tunnel expires, and it's defined by NHRP "hold-time", it's 2 hours by default.
IPsec Configuration
IPsec is not required from the designing point of view, and it creates certain scalability problems if you reach some number of tunnels (Maybe you should consider Get VPN if you need much scalability), but it should be configured, because DMVPN is running as an overlay over a non-secure public IP network, such as Internet.
The Crypto config is made of 4 different steps, which is the same on the Hub and all of the Spokes:
Step 1. Key Negotiation (Tunnel Encryption Negotiation). In an actual production network you would issue the certificates, but something like this will not be required on the exam.
crypto isakmp policy 1
encr aes
authentication pre-share
group 14 <-How big and complicated is the KEY
crypto isakmp key PASSWORD_PHASE1 address 0.0.0.0
!
Step 2: Specify the algorithm you're using when you do the encryption/decryption:
crypto IPsec transform-set trans2 esp-des esp-md5-hmac
mode transport
!
Step 3: Sreate a Crypto Profile:
crypto IPsec profile vpnprof
set transform-set trans2
!
Step 4: Apply the profile under the tunnel interface:
interface Tunnel0
tunnel protection ipsec profile vpnprof
There will be a static IPsec tunnel going from each one of the Spokes to the Hub.
To check out the Security Associations (SAs):
#show crypto isakmp sa
OR
#show crypto ipsec sa
OSPF over Frame-Relay, focus on Network Types
Don't forget that in Frame-Relay "broadcast"
is defined ONLY DIRECTLY HUB AND A SPOKE, ON BOTH SIDES of the pvc!!! What this
does is tell the routers “Hey if you have any broadcast messages, go ahead and
send them down this DLCI as a unicast” So basically it is a way to send
broadcast messages on a non-broadcast medium. Don't include
"broadcast" between the SPOKEs, as the Hellos won't be able to
traverse the HUB.
Type 1: NON-BROADCAST
- use "neighbor" command on HUB to use
UNICAST for OSPF
OSPF uses Multicast, which Router considers to be a
kind of Broadcast. Due to the non-broadcast nature of Frame-Relay it can be
assumed that this is the DEFULT OSPF network type over FR.
- Set the OSPF Priority to 0 on all the SPOKEs, so HUB
is elected as the DR, and SPOKEs neither DR nor BDR
- Non-broadcast
network type in OSPF uses “slow” timers meaning 30 second hello and 120
second dead-time. Here it will not affect us, as all neighbor types match.
Type 2: BROADCAST -
two important things:
- As BROADCAST is meant to be FASTER timers are 10/40
seconds by default
- Include the "broadcast" when mapping DLCI
to IP. Also set the SPOKEs OSPF Priority to 0, we don’t want them to be DR
Type 3: POINT-TO-POINT
- Really simple, POINT-TO-XXX (P2P or P2MP) does not
do the DR/BDR election
- Timers 10/40 seconds
TIP: When doing a HUB-AND-SPOKE,
configure Point-to-Multipoint on a HUB, and ADJUST THE TIMERS!!!
Type 4:
POINT-TO-MULTIPOINT
No DR, no "neighbor" command. Slow timers
(120/30 seconds). "broadcast" is mandatory on FR Mappings!!!
HUB will just advertise the learned routes from ONE
SPOKE to the other, like if it were the DR.
!!!HUB must have .multipoint Sub-interface, while on
SPOKES you can do .multipoint or Physical Interface.
Type 5: POINT-TO-MULTIPOINT
NON-BROADCAST
Cisco Proprietary, like P2MP, with NO BROADCASTS
ALLOWED! Timers are still slow, 30 and 120 Seconds.
Next hop is ALWAYS the router you are directly
connected to.
(config-if)#ip ospf network
point-to-multipoint non-broadcast
ADVANCED Access Lists (ACL) Configuration
TIP: ACL is applied directly to the interface using the "ip access-group" command:
(config-subif)#ip access-group EXTENDED_OR_STANDARD_ACL [in | out]
TIP: Watch out not to ban the routing protocol traffic!!! You might need to add this to your filter ACL:
(config-ext-nacl)#permit ospf any any
TIP: deny any any doesn't affect the locally generated traffic on the router
It's enough to configure the extended ACL, and hit a question mark when you want to define a PORT, just to realize that there is an entire world of ACL configuration options that we never knew about.
One of the awesome features is playing with the ESTABLISHED attribute, which means - allow back the traffic from the hosts TCP session has already been established with. In this example we're allowing back in the TELNET and HTTP traffic to HOST 10.187.12.1:
TIME-BASED ACL
STEP 1: define the time range using the "time-range TIMERANGE" command in the global configuration mode
*be sure the Clock is correct using the "show clock", and if not - set it using the "clock set", or with NTP server
STEP 2: attach the time-range to the ACL:
DYNAMIC ACL (aka Lock and key ACL)
Special Feature used for AUTHENTICATION of other devices
Like the time-range, but instead of the time we permit or deny ACLs actions based on Authentication.
The ACL is defined using "access-list 102 dynamic..."
STEP 1: Create and EXTENDED ACL, but be sure to allow all the needed protocols before you apply it on the interface:
STEP 2: Create a DYNAMIC entry in the defined ACL, which will create a Dynamic ACL called DYN_ACL:
STEP 3: Apply the ACL on the interface:
(config-if)#ip access-group 100 in
STEP 4: Configure the VTY line for the dynamic ACL using the AUTOCOMMAND feature:
(config-line)#autocommand access-enable host
*"access-enable" is an EXEC, it doesnt appear when "?" is pressed
**AUTOCOMMAND links the DYNAMIC ACL to TELNET AUTHENTICATION
*"rotary" command under the VTY changes the telnet port to that line. "rotary 5" sets the port on that line to 3005
REFLEXIVE ACL - For Session Filtering
Applied on the outbound interface of the router, we're taking care of the outgoing traffic, and then
we CHECK THE RETURNING TRAFFIC, meaning - we are making sure that the returning traffic is opposite of what went out.
When configuring, you need 2 ACLs:
STEP 1 - OUTBOUND ACL, For the outbound within the extended ACL configure:
(config)#ip access-list extended OUT_ACL
(config-ext-nacl)#permit tcp host any any eq www reflect REFLECT_ACL
(config-ext-nacl)#permit tcp host any any eq telnet reflect REFLECT_ACL
(config-ext-nacl)#permit tcp host any any eq https reflect REFLECT_ACL
(config-ext-nacl)#permit ospf any any
STEP 2: And on the inbound ACL within the extended ACL configuration:
(config)#ip access-list extended IN_ACL
(config-ext-nacl)#permit ospf any any
(config-ext-nacl)#evaluate REFLECT_ACL
STEP 3: Then apply the first one outbound, and the second one inbound on the same interface.
(config-subif)#ip access-group OUT_ACL out
(config-subif)#ip access-group IN_ACL in
After 5 minutes of inactivity the entries expire. it can be modified using the command "ip reflexive-list timeout X":
(config)#ip reflexive-list timeout 120 <-TIME REFLEXIVE ACL EXISTS WHEN NO PACKETS ARE DETECTED (default 300 seconds)
(config-subif)#ip access-group EXTENDED_OR_STANDARD_ACL [in | out]
TIP: Watch out not to ban the routing protocol traffic!!! You might need to add this to your filter ACL:
(config-ext-nacl)#permit ospf any any
TIP: deny any any doesn't affect the locally generated traffic on the router
It's enough to configure the extended ACL, and hit a question mark when you want to define a PORT, just to realize that there is an entire world of ACL configuration options that we never knew about.
One of the awesome features is playing with the ESTABLISHED attribute, which means - allow back the traffic from the hosts TCP session has already been established with. In this example we're allowing back in the TELNET and HTTP traffic to HOST 10.187.12.1:
(config-ext-nacl)#permit tcp any range 80 23 host 10.187.12.1 established
TIME-BASED ACL
STEP 1: define the time range using the "time-range TIMERANGE" command in the global configuration mode
*be sure the Clock is correct using the "show clock", and if not - set it using the "clock set", or with NTP server
STEP 2: attach the time-range to the ACL:
(Config)#access-list 120 permit tcp any any eq 23 time-range TIMERANGE
DYNAMIC ACL (aka Lock and key ACL)
Special Feature used for AUTHENTICATION of other devices
Like the time-range, but instead of the time we permit or deny ACLs actions based on Authentication.
The ACL is defined using "access-list 102 dynamic..."
STEP 1: Create and EXTENDED ACL, but be sure to allow all the needed protocols before you apply it on the interface:
(config)#access-list 100 permit eigrp any any
(config)#access-list 100 permit icmp any any
STEP 2: Create a DYNAMIC entry in the defined ACL, which will create a Dynamic ACL called DYN_ACL:
(config)#access-list 100 dynamic DYN_ACL permit ip any any
STEP 3: Apply the ACL on the interface:
(config-if)#ip access-group 100 in
STEP 4: Configure the VTY line for the dynamic ACL using the AUTOCOMMAND feature:
(config-line)#autocommand access-enable host
*"access-enable" is an EXEC, it doesnt appear when "?" is pressed
**AUTOCOMMAND links the DYNAMIC ACL to TELNET AUTHENTICATION
*"rotary" command under the VTY changes the telnet port to that line. "rotary 5" sets the port on that line to 3005
REFLEXIVE ACL - For Session Filtering
Applied on the outbound interface of the router, we're taking care of the outgoing traffic, and then
we CHECK THE RETURNING TRAFFIC, meaning - we are making sure that the returning traffic is opposite of what went out.
When configuring, you need 2 ACLs:
STEP 1 - OUTBOUND ACL, For the outbound within the extended ACL configure:
(config)#ip access-list extended OUT_ACL
(config-ext-nacl)#permit tcp host any any eq www reflect REFLECT_ACL
(config-ext-nacl)#permit tcp host any any eq telnet reflect REFLECT_ACL
(config-ext-nacl)#permit tcp host any any eq https reflect REFLECT_ACL
(config-ext-nacl)#permit ospf any any
STEP 2: And on the inbound ACL within the extended ACL configuration:
(config)#ip access-list extended IN_ACL
(config-ext-nacl)#permit ospf any any
(config-ext-nacl)#evaluate REFLECT_ACL
STEP 3: Then apply the first one outbound, and the second one inbound on the same interface.
(config-subif)#ip access-group OUT_ACL out
(config-subif)#ip access-group IN_ACL in
After 5 minutes of inactivity the entries expire. it can be modified using the command "ip reflexive-list timeout X":
(config)#ip reflexive-list timeout 120 <-TIME REFLEXIVE ACL EXISTS WHEN NO PACKETS ARE DETECTED (default 300 seconds)
CCIE Blueprint v5 announced
As we've been waiting for, the new v5 Blueprint has been announced.
Starting from June the 4th 2014 the CCIE exam content changes, so if you've been preparing it for a while - you might want to set a date! I've got 3rd of March booked, so wich me luck :)
More details about the CCIE Exam content updates:
http://www.cisco.com/web/learning/certifications/expert/ccie_rs/docs/ccieRS_examUpdates4-5.pdf
Starting from June the 4th 2014 the CCIE exam content changes, so if you've been preparing it for a while - you might want to set a date! I've got 3rd of March booked, so wich me luck :)
More details about the CCIE Exam content updates:
http://www.cisco.com/web/learning/certifications/expert/ccie_rs/docs/ccieRS_examUpdates4-5.pdf
IP SLA - Monitor the Network Performance
Probably most typical usage of IP SLA is to measure the and UDP Jitter and Echo, to make sure that the path is good enough to send the sensitive VoIP traffic. Two sides need to be configured, CLIENT and SERVER (RESPONDER).
IP SLA can be configured without configuring a specific PROBE, just configure sending a generated packet to the RESPONDER, where the RESPONDER is configured to respond with a TIME STAMP information, so the source can calculate the performance values. CAREFULL with the times, configure NTP if you're not certain the devices are synced.
To configure the RESPONDER with the IP and PORT of the RESPONDER:
(config)#ip sla monitor responder
Make sure you configure the CLIENT device in accordance with these defined parameters:
(config)#ip sla monitor 10
(config-sla-monitor)#type udpEcho dest-ipaddr 10.187.122.2 dest-port 500
(config-sla-monitor-udp)#frequency 5 <- IN SECONDS
(config-sla-monitor-udp)#hours-of-statistics-kept 1 <-HOW MUCH TIME THE STATISCICS ARE KEPT
(config-sla-monitor-udp)#request-data-size 1500 <- PACKET SIZE
And then just START the IP SLA on the CLIENT (in this case starts immediately and lasts for 100 seconds only):
(config)#ip sla monitor schedule 10 start-time now life 100
Check the statistics:
#sh ip sla moni statistics
Round trip time (RTT) Index 10
Latest RTT: 2 ms <- THIS IS WHAT YOU WANT TO KNOW, ROUND TRIP TIME (RTT)
Latest operation start time: *14:47:06.923 UTC Fri Dec 6 2013
Latest operation return code: OK
Number of successes: 10
Number of failures: 0
Operation time to live: 52 sec
And on the RESPONDER:
#sh ip sla monit responder
IP SLA Monitor Responder is: Enabled
Number of control message received: 17 Number of errors: 0
Recent sources:
10.187.122.1 [14:25:11.241 UTC Fri Dec 6 2013]
10.187.122.1 [14:25:06.241 UTC Fri Dec 6 2013]
10.187.122.1 [14:25:01.237 UTC Fri Dec 6 2013]
10.187.122.1 [14:24:56.237 UTC Fri Dec 6 2013]
10.187.122.1 [14:24:51.237 UTC Fri Dec 6 2013]
If you are using IP SLA for ROUTING, meaning - you want to TRACK a certain route using ICMP (ping), and depending on the result - "tune" the routing table, you have 2 options:
OPTION 1: Use a TRACK object and attach it to the STATIC ROUTE:
(config)#track 10 ip route 10.1.12.0 255.255.255.0 reachability
(config)#ip route 1.0.0.0 255.0.0.0 10.1.12.2 track 10
Check the status of the TRACK 10 object, and based on that - you can know if your STATIC route is UP:
#sh track 10
Track 10
IP route 10.1.12.0 255.255.255.0 reachability
Reachability is Up (connected)
3 changes, last change 00:04:04
First-hop interface is Serial0/1/0
Tracked by:
STATIC-IP-ROUTING 0
IMPORTANT: Make sure that the prefix you are tracking isn't available using some other protocol, like OSPF:
#sh track 10
Track 10
IP route 10.1.12.0 255.255.255.0 reachability
Reachability is Up (OSPF) <- THIS IS NOT WHAT WE WANTED TO ACHIEVE HERE
3 changes, last change 00:03:59
First-hop interface is FastEthernet0/0
Tracked by:
STATIC-IP-ROUTING 0
OPTION 2: Use the IP SLA ICMP ECHO (ipIcmpEcho) to monitor end-to-end response
STEP 1: DEFINE THE IP SLA OBJECT
(config)#ip sla monitor 10
(config-sla-monitor)#$type echo protocol ipIcmpEcho 10.1.12.2 source-ipaddr 10.1.12.1
(config-sla-monitor-echo)#frequency 5
STEP 2: DONT FORGET TO LAUNCH THE IP SLA:
(config)#ip sla monitor schedule 10 start-time now life forever
STEP 3: DEFINE THE TRACK Object using the defined IP SLA:
(config)#track 15 rtr 10 reachability <- 15 is RTR NUMBER, 10 is the IP SLA we're attaching
*Make sure the TRACK is UP before you attach it to the route:
#sh track 15
Track 15
Response Time Reporter 10 reachability
Reachability is Up
2 changes, last change 00:00:18
Latest operation return code: OK
Latest RTT (millisecs) 36
Tracked by:
STATIC-IP-ROUTING 0
STEP 4: Attach the TRACK OBJECT to the STATIC ROUTE, like in the option 1:
IP SLA can be configured without configuring a specific PROBE, just configure sending a generated packet to the RESPONDER, where the RESPONDER is configured to respond with a TIME STAMP information, so the source can calculate the performance values. CAREFULL with the times, configure NTP if you're not certain the devices are synced.
To configure the RESPONDER with the IP and PORT of the RESPONDER:
(config)#ip sla monitor responder
Make sure you configure the CLIENT device in accordance with these defined parameters:
(config)#ip sla monitor 10
(config-sla-monitor)#type udpEcho dest-ipaddr 10.187.122.2 dest-port 500
(config-sla-monitor-udp)#frequency 5 <- IN SECONDS
(config-sla-monitor-udp)#hours-of-statistics-kept 1 <-HOW MUCH TIME THE STATISCICS ARE KEPT
(config-sla-monitor-udp)#request-data-size 1500 <- PACKET SIZE
And then just START the IP SLA on the CLIENT (in this case starts immediately and lasts for 100 seconds only):
(config)#ip sla monitor schedule 10 start-time now life 100
Check the statistics:
#sh ip sla moni statistics
Round trip time (RTT) Index 10
Latest RTT: 2 ms <- THIS IS WHAT YOU WANT TO KNOW, ROUND TRIP TIME (RTT)
Latest operation start time: *14:47:06.923 UTC Fri Dec 6 2013
Latest operation return code: OK
Number of successes: 10
Number of failures: 0
Operation time to live: 52 sec
And on the RESPONDER:
#sh ip sla monit responder
IP SLA Monitor Responder is: Enabled
Number of control message received: 17 Number of errors: 0
Recent sources:
10.187.122.1 [14:25:11.241 UTC Fri Dec 6 2013]
10.187.122.1 [14:25:06.241 UTC Fri Dec 6 2013]
10.187.122.1 [14:25:01.237 UTC Fri Dec 6 2013]
10.187.122.1 [14:24:56.237 UTC Fri Dec 6 2013]
10.187.122.1 [14:24:51.237 UTC Fri Dec 6 2013]
If you are using IP SLA for ROUTING, meaning - you want to TRACK a certain route using ICMP (ping), and depending on the result - "tune" the routing table, you have 2 options:
OPTION 1: Use a TRACK object and attach it to the STATIC ROUTE:
(config)#track 10 ip route 10.1.12.0 255.255.255.0 reachability
(config)#ip route 1.0.0.0 255.0.0.0 10.1.12.2 track 10
Check the status of the TRACK 10 object, and based on that - you can know if your STATIC route is UP:
#sh track 10
Track 10
IP route 10.1.12.0 255.255.255.0 reachability
Reachability is Up (connected)
3 changes, last change 00:04:04
First-hop interface is Serial0/1/0
Tracked by:
STATIC-IP-ROUTING 0
IMPORTANT: Make sure that the prefix you are tracking isn't available using some other protocol, like OSPF:
#sh track 10
Track 10
IP route 10.1.12.0 255.255.255.0 reachability
Reachability is Up (OSPF) <- THIS IS NOT WHAT WE WANTED TO ACHIEVE HERE
3 changes, last change 00:03:59
First-hop interface is FastEthernet0/0
Tracked by:
STATIC-IP-ROUTING 0
OPTION 2: Use the IP SLA ICMP ECHO (ipIcmpEcho) to monitor end-to-end response
STEP 1: DEFINE THE IP SLA OBJECT
(config)#ip sla monitor 10
(config-sla-monitor)#$type echo protocol ipIcmpEcho 10.1.12.2 source-ipaddr 10.1.12.1
(config-sla-monitor-echo)#frequency 5
STEP 2: DONT FORGET TO LAUNCH THE IP SLA:
(config)#ip sla monitor schedule 10 start-time now life forever
STEP 3: DEFINE THE TRACK Object using the defined IP SLA:
(config)#track 15 rtr 10 reachability <- 15 is RTR NUMBER, 10 is the IP SLA we're attaching
*Make sure the TRACK is UP before you attach it to the route:
#sh track 15
Track 15
Response Time Reporter 10 reachability
Reachability is Up
2 changes, last change 00:00:18
Latest operation return code: OK
Latest RTT (millisecs) 36
Tracked by:
STATIC-IP-ROUTING 0
STEP 4: Attach the TRACK OBJECT to the STATIC ROUTE, like in the option 1:
(config)#ip route 1.0.0.0 255.0.0.0 10.1.12.2 track 15
PBR - Policy Based Routing
!!!Most Important: To DEBUG the Policy Map:
#debug ip policy
To match the SOURCE IP use the standard ACL:
(config)#access-list 2 permit host 100.1.1.1
To match the FLOW use the EXTENDED ACL:
(config)#ip access-list extended FLOW1
(config-ext-nacl)#permit ip host 1.1.1.1 host 2.2.2.2 <-TO MATCH THE FLOW
(config-ext-nacl)#permit tcp any any eq 23 <- TO MATCH THE PROTOCOL(PORT)
ROUTE-MAP can be applied GLOBALLY on a router, to change the Routing Table:
(config)#ip local policy route-map ROUTE_MAP
!!!This will not work for traffic transiting this router. For that you need to apply it on the interface
#debug ip policy
To match the SOURCE IP use the standard ACL:
(config)#access-list 2 permit host 100.1.1.1
To match the FLOW use the EXTENDED ACL:
(config)#ip access-list extended FLOW1
(config-ext-nacl)#permit ip host 1.1.1.1 host 2.2.2.2 <-TO MATCH THE FLOW
(config-ext-nacl)#permit tcp any any eq 23 <- TO MATCH THE PROTOCOL(PORT)
ROUTE-MAP can be applied GLOBALLY on a router, to change the Routing Table:
(config)#ip local policy route-map ROUTE_MAP
!!!This will not work for traffic transiting this router. For that you need to apply it on the interface
IPv6 Tunnels
First a reminder about a IPv4 GRE tunnel, the most simple and GENERIC one.
Configuration is really simple, create the Tunnel interface, define the MODE and assign the Source and Destination IP or Interface:
(Config)#Interface tunnel
(Config-if)#tunnel mode GRE IP
(Config-if)# tunnel source IP 10.1.1.2
(Config-if)#tunnel destination IP 172.26.182.15
Then define the GRE tunnel IP (needs to be in the same subnet on the both sides):
(Config-if)#ip address 15.4.4.6 255.255.255.0
By default GRE keep-alives are off, butt they can be turned on
Now the IPv6. There are 4 types of IPv6 Tunnels:
1. IPv6 over IPv6 GRE tunnel, the configuration similar as the IPv4 one:
(Config-tunnel)#tunnel source lo0
(Config-tunnel)#tunnel destination 10.187.166.15
(Config)#interface tunnel0
(Config-if)#ipv6 add 1:1:1:1::1/64
2. IPv6 over IPv6IP Tunnel
3. IPv6 over IPv4 UDP Teredo Tunnel
4. IPv4 over IPv6 GRE Tunnel
STATIC Tunnels: GRE, IPv6IP
AUTOMATIC Tunnels: 6to4 (IPv4 into IPv6 prefix), ISATAP - have a standard format of the IP address, so only the tunnel source and the IP address are configured in accordance to that standard - and the Tunnel goes UP.
When you configure them MANUALLY the Tunnel mode can be IPv6IP:
(config)#interface tunnel 0
(config-if)#tunnel mode ipv6ip <- DEFAULT IS GRE
GRE is Protocol 47, and IPV6IP is Protocol 41. You can check this by PINGING one side from another, and debuging
"ip packet details" on the other side:
IPv6IP - PROTOCOL 41:
*Nov 29 18:23:52.126: IP: tableid=0, s=10.1.12.1 (Serial0/1/0.21), d=10.1.12.2 (Serial0/1/0.21), routed via RIB
*Nov 29 18:23:52.126: IP: s=10.1.12.1 (Serial0/1/0.21), d=10.1.12.2 (Serial0/1/0.21), len 136, rcvd 3, proto=41
*Nov 29 18:23:52.126: IP: s=10.1.12.2 (Tunnel0), d=10.1.12.1 (Serial0/1/0.21), len 96, sending, proto=41
*Nov 29 18:23:53.110: IP: tableid=0, s=10.1.12.1 (Serial0/1/0.21), d=10.1.12.2 (Serial0/1/0.21), routed via RIB
*Nov 29 18:23:53.110: IP: s=10.1.12.1 (Serial0/1/0.21), d=10.1.12.2 (Serial0/1/0.21), len 120, rcvd 3, proto=41
GRE - PROTOCOL 47:
*Nov 29 18:25:30.506: IP: tableid=0, s=10.1.12.1 (Serial0/1/0.21), d=10.1.12.2 (Serial0/1/0.21), routed via RIB
*Nov 29 18:25:30.506: IP: s=10.1.12.1 (Serial0/1/0.21), d=10.1.12.2 (Serial0/1/0.21), len 140, rcvd 3, proto=47
*Nov 29 18:25:30.574: IP: s=10.1.12.2 (Tunnel0), d=10.1.12.1 (Serial0/1/0.21), len 140, sending, proto=47
*Nov 29 18:25:30.622: IP: tableid=0, s=10.1.12.1 (Serial0/1/0.21), d=10.1.12.2 (Serial0/1/0.21), routed via RIB
*Nov 29 18:25:30.622: IP: s=10.1.12.1 (Serial0/1/0.21), d=10.1.12.2 (Serial0/1/0.21), len 140, rcvd 3, proto=47
6to4 Tunnels: AUTOMATICALLY established, allowing IPv6 connection through IPv4. They require SPECIAL ADDRESSING:
IPv6 of 2002 followed by TRANSLATED IPv4 address. So, we need these steps:
Step 1:
Translate IPv4 into IPv6 address. For example 10.1.1.1:
10 1 1 1
0A 01 01 01
Step 2:
Identify tunnel source. IMPORTANT: Tunnel is AUTOMATIC, so DONT CONFIGURE THE DESTINATION
So using the 2002 which is the 6to4 marker, you get> 2002:A01:101::/128, so:
(config-if)#ipv6 add 2002:A01:101::/128
Step 3:
Configure the TUNNEL MODE as IPV6IP 6to4:
(config-if)#tunnel mode ipv6ip 6to4
Step 4:
Make sure that the Tunnel Interface is going UP/UP
*Nov 29 19:10:13.709: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel7, changed state to up
ISATAP Tunnel: It's a IETF transition mechanism that allows IPv6 networks to connect over IPv4 Networks. The IPv6 tunnel interface must be configured with a modified EUI-64 address because the last 32 bits in the interface identifier are constructed using the IPv4 tunnel source address. ISATAP also has it's own IPv6 Address Format, which is formed like this:
NETWORK PORTION: can be any IPv6 address
HOST PORTION: starts with 0000:5EFE, and the rest of host portion is TRANSLATED IPv4 of the TUNNEL SOURCE
Step 1:
Define the Tunnel SOURCE address
(config-if)#tunnel source 10.44:44:44
Step 2:
Sending of IPv6 router advertisements is disabled by default on tunnel interfaces. This command reenables the sending of IPv6 router advertisements to allow client autoconfiguration:
(config-if)# no ipv6 nd ra suppress
Step 3: ISATAP
The only difference from standard IPv6IP configuration is that the IPv6 address needs to be eui-64 generated, and that the MODE needs to be defined as ISATAP:
(config-if)#ipv6 address 46:1:46::/64 eui-64 <- EUI CONVERTS IPv4 TO IPv6 AUTOMATICALLY
(config-if)#tunnel mode ipv6ip isatap
Configuration is really simple, create the Tunnel interface, define the MODE and assign the Source and Destination IP or Interface:
(Config)#Interface tunnel
(Config-if)#tunnel mode GRE IP
(Config-if)# tunnel source IP 10.1.1.2
(Config-if)#tunnel destination IP 172.26.182.15
Then define the GRE tunnel IP (needs to be in the same subnet on the both sides):
(Config-if)#ip address 15.4.4.6 255.255.255.0
By default GRE keep-alives are off, butt they can be turned on
Now the IPv6. There are 4 types of IPv6 Tunnels:
1. IPv6 over IPv6 GRE tunnel, the configuration similar as the IPv4 one:
(Config-tunnel)#tunnel source lo0
(Config-tunnel)#tunnel destination 10.187.166.15
(Config)#interface tunnel0
(Config-if)#ipv6 add 1:1:1:1::1/64
2. IPv6 over IPv6IP Tunnel
3. IPv6 over IPv4 UDP Teredo Tunnel
4. IPv4 over IPv6 GRE Tunnel
STATIC Tunnels: GRE, IPv6IP
AUTOMATIC Tunnels: 6to4 (IPv4 into IPv6 prefix), ISATAP - have a standard format of the IP address, so only the tunnel source and the IP address are configured in accordance to that standard - and the Tunnel goes UP.
When you configure them MANUALLY the Tunnel mode can be IPv6IP:
(config)#interface tunnel 0
(config-if)#tunnel mode ipv6ip <- DEFAULT IS GRE
GRE is Protocol 47, and IPV6IP is Protocol 41. You can check this by PINGING one side from another, and debuging
"ip packet details" on the other side:
IPv6IP - PROTOCOL 41:
*Nov 29 18:23:52.126: IP: tableid=0, s=10.1.12.1 (Serial0/1/0.21), d=10.1.12.2 (Serial0/1/0.21), routed via RIB
*Nov 29 18:23:52.126: IP: s=10.1.12.1 (Serial0/1/0.21), d=10.1.12.2 (Serial0/1/0.21), len 136, rcvd 3, proto=41
*Nov 29 18:23:52.126: IP: s=10.1.12.2 (Tunnel0), d=10.1.12.1 (Serial0/1/0.21), len 96, sending, proto=41
*Nov 29 18:23:53.110: IP: tableid=0, s=10.1.12.1 (Serial0/1/0.21), d=10.1.12.2 (Serial0/1/0.21), routed via RIB
*Nov 29 18:23:53.110: IP: s=10.1.12.1 (Serial0/1/0.21), d=10.1.12.2 (Serial0/1/0.21), len 120, rcvd 3, proto=41
GRE - PROTOCOL 47:
*Nov 29 18:25:30.506: IP: tableid=0, s=10.1.12.1 (Serial0/1/0.21), d=10.1.12.2 (Serial0/1/0.21), routed via RIB
*Nov 29 18:25:30.506: IP: s=10.1.12.1 (Serial0/1/0.21), d=10.1.12.2 (Serial0/1/0.21), len 140, rcvd 3, proto=47
*Nov 29 18:25:30.574: IP: s=10.1.12.2 (Tunnel0), d=10.1.12.1 (Serial0/1/0.21), len 140, sending, proto=47
*Nov 29 18:25:30.622: IP: tableid=0, s=10.1.12.1 (Serial0/1/0.21), d=10.1.12.2 (Serial0/1/0.21), routed via RIB
*Nov 29 18:25:30.622: IP: s=10.1.12.1 (Serial0/1/0.21), d=10.1.12.2 (Serial0/1/0.21), len 140, rcvd 3, proto=47
6to4 Tunnels: AUTOMATICALLY established, allowing IPv6 connection through IPv4. They require SPECIAL ADDRESSING:
IPv6 of 2002 followed by TRANSLATED IPv4 address. So, we need these steps:
Step 1:
Translate IPv4 into IPv6 address. For example 10.1.1.1:
10 1 1 1
0A 01 01 01
Step 2:
Identify tunnel source. IMPORTANT: Tunnel is AUTOMATIC, so DONT CONFIGURE THE DESTINATION
So using the 2002 which is the 6to4 marker, you get> 2002:A01:101::/128, so:
(config-if)#ipv6 add 2002:A01:101::/128
Step 3:
Configure the TUNNEL MODE as IPV6IP 6to4:
(config-if)#tunnel mode ipv6ip 6to4
Step 4:
Make sure that the Tunnel Interface is going UP/UP
*Nov 29 19:10:13.709: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel7, changed state to up
ISATAP Tunnel: It's a IETF transition mechanism that allows IPv6 networks to connect over IPv4 Networks. The IPv6 tunnel interface must be configured with a modified EUI-64 address because the last 32 bits in the interface identifier are constructed using the IPv4 tunnel source address. ISATAP also has it's own IPv6 Address Format, which is formed like this:
NETWORK PORTION: can be any IPv6 address
HOST PORTION: starts with 0000:5EFE, and the rest of host portion is TRANSLATED IPv4 of the TUNNEL SOURCE
Step 1:
Define the Tunnel SOURCE address
(config-if)#tunnel source 10.44:44:44
Step 2:
Sending of IPv6 router advertisements is disabled by default on tunnel interfaces. This command reenables the sending of IPv6 router advertisements to allow client autoconfiguration:
(config-if)# no ipv6 nd ra suppress
Step 3: ISATAP
The only difference from standard IPv6IP configuration is that the IPv6 address needs to be eui-64 generated, and that the MODE needs to be defined as ISATAP:
(config-if)#ipv6 address 46:1:46::/64 eui-64 <- EUI CONVERTS IPv4 TO IPv6 AUTOMATICALLY
(config-if)#tunnel mode ipv6ip isatap
Subscribe to:
Posts (Atom)
Most Popular Posts
-
Follow @SnarchsCOM First let's establish the difference between the NFV and the VNF: VNF (Virtualized Network Function) refers to ...
-
Before we start, lets once again make sure we fully understand what Bridge Domain is. The bridge domain can be compared to a giant distribut...
-
Before I get into the Python for NX-OS, let me explain a few concepts that I've seen Network Engineers have been struggling with. Dev...
-
The VM-Series firewall for VMware NSX is jointly developed by Palo Alto Networks and VMware. NetX APIs are used to integrate the Palo Alto N...
-
Unified Fabric is a term for all of the equipment that makes LAN and SAN possible. There are two different networks (LAN as Front-end an...
-
Ever since Cisco bought Insieme and created Cisco ACI, and VMware bought Nicira and created NSX, I've been intensively deep-diving and b...
-
By know you should know the following facts about ACI: Cisco Nexus 9k Switches make the ACI Fabric, which is the Control and the Data pla...
-
Before we get deeper into the ACI (Application Centric Infrastructure) as the Cisco's official SDN solution, we need to clarify a few te...
-
Google has made their Cloud Platform (GCP) so that you can host your application any way your business requires. When we talk about the ...
-
First of all, I need to explain why I decided to write such a post. It's quite simple to everyone who ever tried to Deploy/Configure/Und...
