<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[exp-Networks]]></title><description><![CDATA[Yet another networks engineer's blog]]></description><link>https://www.exp-networks.be/</link><image><url>https://www.exp-networks.be/favicon.png</url><title>exp-Networks</title><link>https://www.exp-networks.be/</link></image><generator>Ghost 4.48</generator><lastBuildDate>Fri, 30 Jan 2026 17:33:20 GMT</lastBuildDate><atom:link href="https://www.exp-networks.be/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Back on-line]]></title><description><![CDATA[<p>After few years, &quot;thanks to COVID-19&quot;, I&apos;m bringing back on-line my blog. </p><p>I&apos;ve first brought back my most popular posts. </p><p>I hope to take time to write new ones. </p><h2 id="the-platforms">The platforms</h2><p>For those who are interested, this time the blog is running on <a href="https://ghost.org">Ghost</a></p>]]></description><link>https://www.exp-networks.be/back-on-line/</link><guid isPermaLink="false">5f8043691134a500014ffa83</guid><category><![CDATA[Company]]></category><dc:creator><![CDATA[Christophe Lemaire]]></dc:creator><pubDate>Sat, 03 Oct 2020 16:25:54 GMT</pubDate><content:encoded><![CDATA[<p>After few years, &quot;thanks to COVID-19&quot;, I&apos;m bringing back on-line my blog. </p><p>I&apos;ve first brought back my most popular posts. </p><p>I hope to take time to write new ones. </p><h2 id="the-platforms">The platforms</h2><p>For those who are interested, this time the blog is running on <a href="https://ghost.org">Ghost</a> behind an <a href="https://www.nginx.com">NGINX</a>. </p><p>My first intent was to use <a href="https://ghost.org">Ghost</a> as headless CMS but as it is not my job to write frontend (AKA I&apos;m too lazy) and <a href="https://ghost.org">Ghost</a> built-in front-end was more thant OK, I&apos;ve decided to &quot;re&quot;start with <a href="https://ghost.org">Ghost</a> only... </p><p><a href="https://www.nginx.com">NGINX</a> is used as front-end to ensure some security features like: </p><ul><li>SSL layer, it is responsible to redirect clients to https URLs and to renew the <a href="https://letsencrypt.org/">Let&apos;s Encrypt</a> certificate</li><li>It protects the admin URLs of &#xA0;<a href="https://ghost.org">Ghost</a> back-end with client certificate authentication</li><li>Redirect error pages</li></ul><p><a href="https://ghost.org">Ghost</a> is mainly used as back-end but with the integrated front-end features. </p><ul><li>From day-1, very few tuning as been done</li><li>In the future, I might work on a different theme but it is certainly not the main goal... I&apos;m a Network Engineer before all... ;) </li></ul><h2 id="learnt-from-past-">Learnt from past... </h2><p>Everything is running on virtualized environments</p><ul><li>NGINX is running on a qemu VM dedicated to security. All the config is backed up on my home NAS</li><li>Ghost is running on a private multi-purpose Docker host and content is backed up to my home NAS</li></ul>]]></content:encoded></item><item><title><![CDATA[Some bookmarks]]></title><description><![CDATA[<p>On this post, I&apos;ll keep track of some pages I found very helpfull. </p><h2 id="security">Security</h2><p>If you struggle with SELinux but you don&apos;t want to simply disable it, here is a good start</p><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://www.nginx.com/blog/using-nginx-plus-with-selinux/"><div class="kg-bookmark-content"><div class="kg-bookmark-title">Modifying SELinux Settings for Full NGINX and NGINX Plus Functionality</div><div class="kg-bookmark-description">When Security-Enhanced Linux (SELinux)</div></div></a></figure>]]></description><link>https://www.exp-networks.be/some-bookmarks/</link><guid isPermaLink="false">5f8043691134a500014ffa81</guid><dc:creator><![CDATA[Christophe Lemaire]]></dc:creator><pubDate>Fri, 02 Oct 2020 09:57:36 GMT</pubDate><content:encoded><![CDATA[<p>On this post, I&apos;ll keep track of some pages I found very helpfull. </p><h2 id="security">Security</h2><p>If you struggle with SELinux but you don&apos;t want to simply disable it, here is a good start</p><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://www.nginx.com/blog/using-nginx-plus-with-selinux/"><div class="kg-bookmark-content"><div class="kg-bookmark-title">Modifying SELinux Settings for Full NGINX and NGINX Plus Functionality</div><div class="kg-bookmark-description">When Security-Enhanced Linux (SELinux) is enabled for Red Hat Enterprise Linux (RHEL) and related distros, its default settings prevent NGINX and NGINX Plus from performing some operations. This article explains how to modify SELinux settings to permit full functionality.</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://www.nginx.com/wp-content/uploads/2019/10/favicon-64x46.ico"><span class="kg-bookmark-author">NGINX</span><span class="kg-bookmark-publisher">Owen Garrett of F5</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://www.nginx.com/wp-content/uploads/2018/09/iStock_000037095652_Small.jpg"></div></a></figure><p>Here is a post that shows how easy it is to use client-side certificate authentication with NGINX. I used it to protect the admin pages of this blog... It took me less than 15 minutes to set it up... </p><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://fardog.io/blog/2017/12/30/client-side-certificate-authentication-with-nginx/"><div class="kg-bookmark-content"><div class="kg-bookmark-title">Client-Side Certificate Authentication with nginx</div><div class="kg-bookmark-description">Authentication in applications is tough. If you decide to roll your own, security issues are nearly guaranteed. Most anyone who writes software for a living will tell you to use something you didn&#x2019;t write; that&#x2019;s battle-tested and in wide use. Open source is even better; hopefully that many eyes and&#x2026;</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://fardog.io/favicon.ico"><span class="kg-bookmark-publisher">Nathan Wittstock</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://fardog.io/img/profile.jpg"></div></a></figure><h2 id="system">System</h2><p>Some interesting info about systemd services...</p><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://linuxconfig.org/how-to-create-systemd-service-unit-in-linux"><div class="kg-bookmark-content"><div class="kg-bookmark-title">How to create systemd service unit in Linux - LinuxConfig.org</div><div class="kg-bookmark-description">In this tutorial we analyze the structure of systemd &#x201D;.service&#x201D; units, and examine the most commonoptions which can be used to modify how the service behaves. We see how to set dependencies for a service and how can wespecify the commands to be executed when it is started stopped or reloaded. The &#x2026;</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://linuxconfig.org/templates/it_headlines/favicon.ico"><span class="kg-bookmark-author">Linux Tutorials - Learn Linux Configuration</span><span class="kg-bookmark-publisher">Egidio Docile</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://linuxconfig.org/plugins/system/lazyloadforjoomla/assets/images/blank.gif"></div></a></figure>]]></content:encoded></item><item><title><![CDATA[JunOS RPM probes]]></title><description><![CDATA[How to configure Cisco’s IP SLA equivalent on Juniper equipments? Juniper call them Real-time Performance Monitoring probes. The only usage of RPM I’ve found so far is to inject a static route into the routing table or to disable/enable an interface when the probes fail.]]></description><link>https://www.exp-networks.be/junos-rpm-probes/</link><guid isPermaLink="false">5f8043691134a500014ffa76</guid><category><![CDATA[Juniper]]></category><category><![CDATA[Networks]]></category><dc:creator><![CDATA[Christophe Lemaire]]></dc:creator><pubDate>Sun, 29 Dec 2013 23:00:00 GMT</pubDate><content:encoded><![CDATA[<p>Ever wondered how to configure Cisco&#x2019;s IP SLA equivalent on Juniper equipments? Juniper call them RPM probes or Real-time Performance Monitoring probes. The only usage of RPM I&#x2019;ve found so far is to inject a static route into the routing table or to disable/enable an interface when the probes fail. If you know another usage of RPM, please leave a comment.</p><p>RPM probes can be icmp, tcp, udp or HTTP based. The lasts three require the target to be configured to respond to the probes. The probes can measure packet loss, jitter, egress or ingress jitter, RTT, egress or ingress delay, deviation of the RTT or deviate of egress or ingress delay. Based on those measures, the RPM test can be marked successful or failed.</p><h2 id="rpm-configuration">RPM configuration</h2><p>Here is an exemple of RPM test using icmp-ping. The test consists in 3 icmp-ping sent to 12.12.12.12 with 1 second interval between each ping and then it start again after an interval of 5 seconds. The test is failed if the three pings are not answered.</p><!--kg-card-begin: html--><pre>[edit services]
rpm {
    probe my-rpm {
        test my-test {
            probe-type icmp-ping;
            target address 12.12.12.12;
            probe-count 3;
            probe-interval 1;
            test-interval 5;
            thresholds {
                successive-loss 3;
            }
        }
    }
}</pre><!--kg-card-end: html--><p>You can check the probe results as follow:</p><!--kg-card-begin: html--><pre>
root@srx11&gt; show services rpm probe-results
    Owner: my-rpm, Test: my-test
    Target address: 12.12.12.12, Probe type: icmp-ping, Test size: 3 probes
    Probe results:
      Response received, Mon Dec 30 22:27:20 2013, No hardware timestamps
      Rtt: 1708 usec
    Results over current test:
      Probes sent: 2, Probes received: 2, Loss percentage: 0
      Measurement: Round trip time
        Samples: 2, Minimum: 1707 usec, Maximum: 1708 usec, Average: 1708 usec,
        Peak to peak: 1 usec, Stddev: 0 usec, Sum: 3415 usec
    Results over last test:
      Probes sent: 3, Probes received: 3, Loss percentage: 0
      Test completed on Mon Dec 30 22:27:12 2013
      Measurement: Round trip time
        Samples: 3, Minimum: 1720 usec, Maximum: 1855 usec, Average: 1776 usec,
        Peak to peak: 135 usec, Stddev: 57 usec, Sum: 5329 usec
    Results over all tests:
      Probes sent: 3305, Probes received: 3278, Loss percentage: 0
      Measurement: Round trip time
        Samples: 3278, Minimum: 1482 usec, Maximum: 22378 usec,
        Average: 1928 usec, Peak to peak: 20896 usec, Stddev: 495 usec,
        Sum: 6318709 usec</pre><!--kg-card-end: html--><p>You can see the current ongoing test results followed by the last test completed results followed by the consolidated results of all the past tests.</p><p>You may also see the history of the last 50 tests.</p><!--kg-card-begin: html--><pre>root@srx11&gt; show services rpm history-results
    Owner, Test                 Probe received              Round trip time
    my-rpm, my-test             Mon Dec 30 22:28:27 2013             1957 usec
    my-rpm, my-test             Mon Dec 30 22:28:30 2013             1799 usec
    my-rpm, my-test             Mon Dec 30 22:28:35 2013             1881 usec
    my-rpm, my-test             Mon Dec 30 22:28:38 2013             1887 usec
    my-rpm, my-test             Mon Dec 30 22:28:41 2013             1988 usec
    my-rpm, my-test             Mon Dec 30 22:28:46 2013             1844 used
(...)
</pre><!--kg-card-end: html--><h2 id="rpm-usage">RPM usage</h2><p>RPM results can be used to influence the routing by injecting a static route into the routing table if the RPM probe fails. This is done with an ip-monitoring policy as follow.</p><!--kg-card-begin: html--><pre>[edit services]
ip-monitoring {
    policy default-route {
        match {
            rpm-probe my-rpm;
        }
        then {
            preferred-route {
                route 0.0.0.0/0 {
                    next-hop 10.11.21.21;
                }
            }
        }
    }
}
</pre><!--kg-card-end: html--><p>As long as the probe is successful, the default route is the static route configured under routing-option (next-hop 10.11.12.12).</p><!--kg-card-begin: html--><pre>root@srx11&gt; show services ip-monitoring status

Policy - default-route (Status: PASS)
  RPM Probes:
    Probe name             Test Name       Address          Status
    ---------------------- --------------- ---------------- ---------
    my-rpm                 my-test         12.12.12.12      PASS
  Route-Action:
    route-instance    route             next-hop         state
    ----------------- ----------------- ---------------- -------------
    inet.0            0.0.0.0/0         10.11.21.21      NOT-APPLIED

root@srx11&gt; show route 0/0 exact

inet.0: 23 destinations, 23 routes (19 active, 0 holddown, 4 hidden)
+ = Active Route, - = Last Active, * = Both

0.0.0.0/0          *[Static/5] 04:29:32
                    &gt; to 10.11.12.12 via fe-0/0/7.1112
</pre><!--kg-card-end: html--><p>As soon as the probes fail, a new default route is injected into the routing table (next-hop 10.11.21.21)</p><!--kg-card-begin: html--><pre>root@srx11&gt; show services ip-monitoring status

Policy - default-route (Status: FAIL)
  RPM Probes:
    Probe name             Test Name       Address          Status
    ---------------------- --------------- ---------------- ---------
    my-rpm                 my-test         12.12.12.12      FAIL
  Route-Action:
    route-instance    route             next-hop         state
    ----------------- ----------------- ---------------- -------------
    inet.0            0.0.0.0/0         10.11.21.21      APPLIED

root@srx11&gt; show route 0/0 exact

inet.0: 23 destinations, 24 routes (19 active, 0 holddown, 4 hidden)
+ = Active Route, - = Last Active, * = Both

0.0.0.0/0          *[Static/1] 00:00:47, metric2 0
                    &gt; to 10.11.21.21 via fe-0/0/3.1121
                    [Static/5] 04:32:36
                    &gt; to 10.11.12.12 via fe-0/0/7.1112
</pre><!--kg-card-end: html--><p>That&#x2019;s all folks!</p>]]></content:encoded></item><item><title><![CDATA[Playing with BGP graceful restart on SRX]]></title><description><![CDATA[<p>Have you ever wanted to do a transparent failover with Juniper SRX cluster firewalls? When the redundancy group 0 switch from one box to the other, the route-engine has to be restarted and all the dynamic routing protocols have to be restarted. Usually this means huge impact on the traffic&</p>]]></description><link>https://www.exp-networks.be/playing-with-bgp-graceful-restart-on-srx/</link><guid isPermaLink="false">5f71ebb1d0c45900011ba64e</guid><category><![CDATA[Juniper]]></category><category><![CDATA[Design]]></category><category><![CDATA[Firewall]]></category><category><![CDATA[Networks]]></category><dc:creator><![CDATA[Christophe Lemaire]]></dc:creator><pubDate>Sun, 17 Feb 2013 23:00:00 GMT</pubDate><media:content url="https://www.exp-networks.be/content/images/2020/09/BGP-graceful-restart-1.png" medium="image"/><content:encoded><![CDATA[<img src="https://www.exp-networks.be/content/images/2020/09/BGP-graceful-restart-1.png" alt="Playing with BGP graceful restart on SRX"><p>Have you ever wanted to do a transparent failover with Juniper SRX cluster firewalls? When the redundancy group 0 switch from one box to the other, the route-engine has to be restarted and all the dynamic routing protocols have to be restarted. Usually this means huge impact on the traffic&#x2026;</p><p>Graceful restart is a feature designed exactly to avoid this. When enabled, the firewall (or router in this case) keeps the dynamically learned routes into forwarding table until the route-engine and the dynamic protocols are restarted. Graceful restart must be enabled on all the devices to work properly. If, for whatever reason, the route-engine or the protocol fail to restart, there is a timer after which the neighbouring router flushes the routes from their forwarding tables to avoid blackholing traffic.</p><p>The test setup is very simple, one router, one firewall cluster, one device to ping through the firewall cluster from the router.</p><figure class="kg-card kg-image-card"><img src="https://www.exp-networks.be/content/images/2020/09/BGP-graceful-restart.png" class="kg-image" alt="Playing with BGP graceful restart on SRX" loading="lazy" width="718" height="695" srcset="https://www.exp-networks.be/content/images/size/w600/2020/09/BGP-graceful-restart.png 600w, https://www.exp-networks.be/content/images/2020/09/BGP-graceful-restart.png 718w"></figure><p>Let&#x2019;s test a failover without graceful-restart first.</p><!--kg-card-begin: html--><pre>routing-options {
    autonomous-system 65000;
}
protocols {
    bgp {
        export CON2BGP;
        inactive: graceful-restart;
        group EX {                      
            type internal;
            neighbor 100.100.100.1;
        }
    }
}</pre><!--kg-card-end: html--><p>Ping from the router while executing the command &#x201C;<code>request chassis cluster failover redundancy-group 0 node 1</code>&#x201D;.</p><!--kg-card-begin: html--><pre>{master:0}
root@ex1&gt; ping 41.41.41.41 interval 0.1 count 10000000   
PING 41.41.41.41 (41.41.41.41): 56 data bytes
64 bytes from 41.41.41.41: icmp_seq=0 ttl=63 time=4.021 ms
64 bytes from 41.41.41.41: icmp_seq=1 ttl=63 time=1.654 ms
(...)
64 bytes from 41.41.41.41: icmp_seq=241 ttl=63 time=1.739 ms
64 bytes from 41.41.41.41: icmp_seq=242 ttl=63 time=4.399 ms
ping: sendto: No route to host       ^
ping: sendto: No route to host       |
(...)                              17.4s
ping: sendto: No route to host       |
ping: sendto: No route to host       v
64 bytes from 41.41.41.41: icmp_seq=416 ttl=63 time=1.580 ms
64 bytes from 41.41.41.41: icmp_seq=417 ttl=63 time=1.477 ms
</pre><!--kg-card-end: html--><p>Traffic has been interrupted for 17.4s&#x2026; An eternity in a decent network.</p><p>Now, let&#x2019;s enable BGP graceful restart on the firewalls and on the router. As you can see it is pretty straightforward.</p><!--kg-card-begin: html--><pre>set routing-options graceful-restart
set protocols bgp graceful-restart
</pre><!--kg-card-end: html--><p>Let&#x2019;s do the same ping test again.</p><!--kg-card-begin: html--><pre>{master:0}
root@ex1&gt; ping 41.41.41.41 interval 0.1 count 10000000    
PING 41.41.41.41 (41.41.41.41): 56 data bytes
64 bytes from 41.41.41.41: icmp_seq=0 ttl=63 time=4.729 ms
64 bytes from 41.41.41.41: icmp_seq=1 ttl=63 time=4.436 ms
(...)
64 bytes from 41.41.41.41: icmp_seq=1789 ttl=63 time=4.403 ms
64 bytes from 41.41.41.41: icmp_seq=1790 ttl=63 time=8.459 ms
</pre><!--kg-card-end: html--><p>This time, there is no visible impact!</p><p>During the route-engine restart, on the facing router you can see the route is going to &#x201C;<code>stale</code>&#x201D; status. This means the route is kept in the forwarding table during the BGP restart on the firewalls.</p><!--kg-card-begin: html--><pre>{master:0}
root@ex1&gt; show route 41.41.41.0 table inet.0 detail    

inet.0: 13 destinations, 16 routes (13 active, 0 holddown, 0 hidden)
Restart Complete
41.41.41.0/24 (1 entry, 1 announced)
        *BGP    Preference: 170/-101
                Next hop type: Indirect
                Next-hop reference count: 3
                Source: 100.100.100.6
                Next hop type: Router, Next hop index: 1414
                Next hop: 100.100.100.6 via vlan.100, selected
                Protocol next hop: 100.100.100.6
                Indirect next hop: 284f4b0 131073
                State: &lt;Active Int Ext&gt;
                Local AS: 65000 Peer AS: 65000
                Age: 3:41       Metric2: 0 
                Task: BGP_65000.100.100.100.6
                Announcement bits (3): 0-KRT 1-BGP RT Background 2-Resolve tree 1 
                AS path: I
                Stale Accepted
                Localpref: 100
                Router ID: 41.41.41.1
</pre><!--kg-card-end: html--><p>You can also see on the neighbour details that graceful restart is enabled</p><!--kg-card-begin: html--><pre>{master:0}
root@ex1&gt; show bgp neighbor 100.100.100.6 
Peer: 100.100.100.6+57493 AS 65000 Local: 100.100.100.1+179 AS 65000
  Type: Internal    State: Established  (route reflector client)Flags: 
  Last State: OpenConfirm   Last Event: RecvKeepAlive
  Last Error: None
  Export: [ CON2BGP ] 
  Options: <preference gracefulrestart logupdown cluster addressfamily refresh>
  Address families configured: inet-unicast inet6-unicast
  Holdtime: 90 Preference: 170
  Number of flaps: 3
  Last flap event: Restart
  Error: &apos;Cease&apos; Sent: 0 Recv: 1
  Peer ID: 41.41.41.1       Local ID: 1.1.1.1          Active Holdtime: 90
  Keepalive Interval: 30         Peer index: 2   
  BFD: disabled, down
  NLRI for restart configured on peer: inet-unicast inet6-unicast
  NLRI advertised by peer: inet-unicast
  NLRI for this session: inet-unicast
  Peer supports Refresh capability (2)
  Restart time configured on the peer: 120
  Stale routes from peer are kept for: 300
  Restart time requested by this peer: 120
  Restart flag received from the peer: Restarting
  NLRI that peer supports restart for: inet-unicast
  NLRI peer can save forwarding state: inet-unicast
  NLRI that peer saved forwarding for: inet-unicast
  NLRI that restart is negotiated for: inet-unicast
  NLRI of received end-of-rib markers: inet-unicast
  NLRI of all end-of-rib markers sent: inet-unicast
  Peer supports 4 byte AS extension (peer-as 65000)
  Peer does not support Addpath
  Table inet.0 Bit: 10000
    RIB State: BGP restart is complete
    Send state: in sync
    Active prefixes:              1
    Received prefixes:            1
    Accepted prefixes:            1
    Suppressed due to damping:    0
    Advertised prefixes:          5
  Last traffic (seconds): Received 1    Sent 8    Checked 14  
  Input messages:  Total 11     Updates 2       Refreshes 0     Octets 286
  Output messages: Total 14     Updates 5       Refreshes 0     Octets 534
  Output Queue[0]: 0
</preference></pre><!--kg-card-end: html--><p>As you can see, enabling graceful-restart is very easy to configure and can reduce dramatically the downtime in your network&#x2026; So do not hesitate to activate it!</p>]]></content:encoded></item><item><title><![CDATA[Cold ACE ?]]></title><description><![CDATA[<p>Ever seen an ACE in standby cold state? This means the standby ACE has not been able to synchronize properly with the active ACE. It usually happen when the standby ACE is missing some certificates, keys or script files referrenced by the active ACE. This usually happen after an RMA.</p>]]></description><link>https://www.exp-networks.be/cold-ace/</link><guid isPermaLink="false">5f72d535d0c45900011ba718</guid><category><![CDATA[ACE]]></category><category><![CDATA[Cisco]]></category><dc:creator><![CDATA[Christophe Lemaire]]></dc:creator><pubDate>Sun, 12 Aug 2012 22:00:00 GMT</pubDate><content:encoded><![CDATA[<p>Ever seen an ACE in standby cold state? This means the standby ACE has not been able to synchronize properly with the active ACE. It usually happen when the standby ACE is missing some certificates, keys or script files referrenced by the active ACE. This usually happen after an RMA. In that state, the ACE won&#x2019;t be able to perform a stateful failover and all the sessions would be lost should a failover occur.</p><!--kg-card-begin: html--><pre>axsl01/Admin# <strong><font color="blue">sh ft group status</font></strong>
FT Group                     : 1
Configured Status            : in-service
Maintenance mode             : MAINT_MODE_OFF
My State                     : FSM_FT_STATE_ACTIVE
Peer State                   : FSM_FT_STATE_STANDBY_HOT
Peer Id                      : 1
No. of Contexts              : 1
Running cfg sync status      : Running configuration sync has completed
Startup cfg sync status      : Startup configuration sync has completed

FT Group                     : 2
Configured Status            : in-service
Maintenance mode             : MAINT_MODE_OFF
My State                     : FSM_FT_STATE_ACTIVE
Peer State                   : <strong><font color="red">FSM_FT_STATE_STANDBY_COLD</font></strong>
Peer Id                      : 1
No. of Contexts              : 1
Running cfg sync status      : Peer in Cold State. Incremental Sync Failure: script file not configured

Startup cfg sync status      : Peer in Cold State. Incremental Sync Failure: script file not configured
</pre><!--kg-card-end: html--><p>First step is, of course, to copy the missing files to the standby ACE. Script files have to be copied via tftp, certificates and keys may be copied via tftp or terminal copy/paste. In newer firmware releases you can easily identified what caused the ACE to go into that cold state:</p><!--kg-card-begin: html--><pre>axsl02/C1# <strong><font color="blue">sh ft config-error</font></strong>
Mon Aug 13 09:19:18 UTC 2012

`script file 2 test.tcl`
<strong><font color="red">Error: Unable to locate the script file &apos;test.tcl&apos;</font></strong></pre><!--kg-card-end: html--><p>Once the files are copied, you have to bring back the standby ACE to the standby hot state. As of now, I know four ways to do that. Actually only three are working, the fourth one (provided by Cisco) never worked for me.</p><h2 id="hard-way">Hard way</h2><ol><li>Reboot the standby ACE.</li></ol><!--kg-card-begin: html--><pre>axsl01/Admin# <strong><font color="blue">reload</font></strong>
This command will reboot the system
Save configurations for all the contexts. Save? [yes/no]: [yes] <strong><font color="blue">yes</font></strong>
Perform system reload. [yes/no]: [yes] <strong><font color="blue">yes</font></strong></pre><!--kg-card-end: html--><p>In this case, you have to ensure all the contexts are active or at least in standby hot state on the other ACE. It takes a &#x201C;very&#x201D; long time (ACE boot time is +/- 10 minutes) before you can validate it worked.</p><h2 id="quick-and-dirty-way-aka-i-m-feeling-lucky-today">Quick and dirty way &#x2013; aka I&#x2019;m feeling lucky today</h2><ol><li>Go to the Admin context on the active ACE.</li><li>Quickly deactivate/activate the ft group of the context you want to fix.</li></ol><!--kg-card-begin: html--><pre>axsl01/Admin# <strong><font color="blue">conf t</font></strong>
Enter configuration commands, one per line.  End with CNTL/Z.
axsl01/Admin(config)# <strong><font color="blue">ft group 2</font></strong>
axsl01/Admin(config-ft-group)# <strong><font color="blue">no inservice</font></strong>
axsl01/Admin(config-ft-group)# <strong><font color="blue">inservice</font></strong>
axsl01/Admin(config-ft-group)# <strong><font color="blue">end</font></strong>
axsl01/Admin# <strong><font color="blue">sh ft group 2 status</font></strong>

FT Group                     : 2
Configured Status            : in-service
Maintenance mode             : MAINT_MODE_OFF
My State                     : FSM_FT_STATE_ACTIVE
Peer State                   : <strong><font color="red">FSM_FT_STATE_STANDBY_BULK</font></strong>
Peer Id                      : 1
No. of Contexts              : 1
Running cfg sync status      : <strong><font color="red">Running configuration sync has completed</font></strong>
Startup cfg sync status      : <strong><font color="red">Startup configuration sync has completed</font></strong>
axsl01/Admin# <font color="blue"><strong>sh ft group 2 status </strong>            (after some time)</font>

FT Group                     : 2
Configured Status            : in-service
Maintenance mode             : MAINT_MODE_OFF
My State                     : FSM_FT_STATE_ACTIVE
Peer State                   : <strong><font color="red">FSM_FT_STATE_STANDBY_HOT</font></strong>
Peer Id                      : 1
No. of Contexts              : 1
Running cfg sync status      : Running configuration sync has completed
Startup cfg sync status      : Startup configuration sync has completed</pre><!--kg-card-end: html--><p>If you&#x2019;re quick enough, the active ACE will keep serving the active sessions, only the new sessions will be refused during the period of time the context is not in service, few ms if you&#x2019;re quick enough.</p><p>This method may still be unacceptable in some case and might be catastrophic if you (or your terminal client) are not quick enough.</p><h2 id="cautious-way-aka-exp-networks-way">Cautious way &#x2013; aka exp-Networks way</h2><ol><li>Make the Admin context active on the standby ACE, perform a switchover of the Admin context if required.</li><li>Disable the running-config synchronization for the Admin context.</li><li>Deactivate the ft group of the context you want to fix. Since you&#x2019;ve disabled the running-config synchronization, the command only take effect locally, in other words the active context on the other ACE remains active.</li><li>Activate the ft group again and wait until the context stabilize in standby hot state.</li><li>Enable the running-config synchronization for the Admin context again.</li><li>Perform a switchover of the Admin context if required.</li></ol><!--kg-card-begin: html--><pre>axsl02/Admin# <strong><font color="blue">sh ft group brief</font></strong>

FT Group ID: 1  My State:<strong><font color="red">FSM_FT_STATE_STANDBY_HOT</font></strong>       
                Peer State:FSM_FT_STATE_ACTIVE
                Context Name: Admin
                Context Id: 0   Running Cfg Sync Status: Successful
                
FT Group ID: 2  My State:FSM_FT_STATE_STANDBY_COLD
                Peer State:FSM_FT_STATE_ACTIVE
                Context Name: C1
                Context Id: 1   Running Cfg Sync Status: Successful

axsl02/Admin# <strong><font color="blue">ft switchover 1</font></strong>
This command will cause card to switchover (yes/no)?  [no] <strong><font color="blue">yes</font></strong>
axsl02/Admin#

NOTE: Configuration mode is enabled on all sessions
NOTE: Configuration mode has been disabled on all sessions
NOTE: Configuration mode is enabled on all sessions

axsl02/Admin# <strong><font color="blue">sh ft group brief</font></strong>

FT Group ID: 1  My State:<strong><font color="red">FSM_FT_STATE_ACTIVE</font></strong>
                Peer State:FSM_FT_STATE_STANDBY_HOT
                Context Name: Admin
                Context Id: 0   Running Cfg Sync Status: Successful

FT Group ID: 2  My State:FSM_FT_STATE_STANDBY_COLD
                Peer State:FSM_FT_STATE_ACTIVE
                Context Name: C1
                Context Id: 1   Running Cfg Sync Status: Successful

axsl02/Admin# <strong><font color="blue">conf t</font></strong>
Enter configuration commands, one per line.  End with CNTL/Z.
axsl02/Admin(config)# <strong><font color="blue">no ft auto-sync running-config</font></strong>
axsl02/Admin(config)# <strong><font color="blue">ft group 2</font></strong>
axsl02/Admin(config-ft-group)# <strong><font color="blue">no inservice</font></strong>
axsl02/Admin(config-ft-group)# <strong><font color="blue">do sh ft group brief</font></strong>

FT Group ID: 1  My State:FSM_FT_STATE_ACTIVE
                Peer State:FSM_FT_STATE_STANDBY_HOT
                Context Name: Admin
                Context Id: 0   Running Cfg Sync Status: Successful

FT Group ID: 2  My State:<strong><font color="red">FSM_FT_STATE_INIT</font></strong>
                Peer State:FSM_FT_STATE_UNKNOWN
                Context Name: C1
                Context Id: 1   Running Cfg Sync Status: Successful</pre><!--kg-card-end: html--><p>We can check on the other ACE that context C1 is still active.</p><!--kg-card-begin: html--><pre>axsl01/Admin# <strong><font color="blue">sh ft group brief</font></strong>

FT Group ID: 1  My State:FSM_FT_STATE_STANDBY_HOT
                Peer State:FSM_FT_STATE_ACTIVE
                Context Name: Admin
                Context Id: 0   Running Cfg Sync Status: Successful

FT Group ID: 2  My State:<strong><font color="red">FSM_FT_STATE_ACTIVE</font></strong>
                Peer State:<strong><font color="red">FSM_FT_STATE_INIT</font></strong>
                Context Name: C1
                Context Id: 1   Running Cfg Sync Status: Successful</pre><!--kg-card-end: html--><p>Back on the other ACE to bring the context back into service.</p><!--kg-card-begin: html--><pre>axsl02/Admin(config-ft-group)# <strong><font color="blue">inservice</font></strong>
axsl02/Admin(config-ft-group)# <strong><font color="blue">ft auto-sync running-config</font></strong>
axsl02/Admin(config)#

NOTE: Configuration mode has been disabled on all sessions
NOTE: Configuration mode is enabled on all sessions

axsl02/Admin(config)# <strong><font color="blue">do sh ft group brief</font></strong>

FT Group ID: 1  My State:FSM_FT_STATE_ACTIVE
                Peer State:FSM_FT_STATE_STANDBY_HOT
                Context Name: Admin
                Context Id: 0   Running Cfg Sync Status: Successful

FT Group ID: 2  My State:<strong><font color="red">FSM_FT_STATE_STANDBY_HOT</font></strong>
                Peer State:FSM_FT_STATE_ACTIVE
                Context Name: C1
                Context Id: 1   Running Cfg Sync Status: Successful

axsl02/Admin(config)# <strong><font color="blue">end</font></strong>
axsl02/Admin# <font color="blue">ft switchover 1</font>
This command will cause card to switchover (yes/no)?  [no] <strong><font color="blue">yes</font></strong>

NOTE: Configuration mode has been disabled on all sessions</pre><!--kg-card-end: html--><h2 id="cisco-way"><a href="http://docwiki.cisco.com/wiki/Cisco_Application_Control_Engine_(ACE)_Troubleshooting_Guide_--_Troubleshooting_Redundancy#STANDBY_COLD">Cisco way</a></h2><ol><li>Go to the context you want to fix on the active ACE, disable running-config and startup-config synchronization</li><li>Then enable them back.</li></ol><p>Every time I&#x2019;ve tried this, there has been indeed a resynchronization but the standby ACE ended back to standby cold state.</p><!--kg-card-begin: html--><pre>axsl01/C1# <strong><font color="blue">sh ft group brief</font></strong>

FT Group ID: 2  My State:FSM_FT_STATE_ACTIVE
                Peer State:<strong><font color="red">FSM_FT_STATE_STANDBY_COLD</font></strong>
                Context Name: C1
                Context Id: 1   Running Cfg Sync Status: Successful

axsl01/C1(config)# <strong><font color="blue">no ft auto-sync running-config</font></strong>
axsl01/C1(config)# <strong><font color="blue">no ft auto-sync startup-config</font></strong>
axsl01/C1(config)# <strong><font color="blue">ft auto-sync startup-config</font></strong>
axsl01/C1(config)# <strong><font color="blue">ft auto-sync running-config</font></strong>

NOTE: Configuration mode has been disabled on all sessions
NOTE: Configuration mode is enabled on all sessions

axsl01/C1(config)# <strong><font color="blue">do sh ft group brief</font></strong>

FT Group ID: 2  My State:FSM_FT_STATE_ACTIVE
                Peer State:<strong><font color="red">FSM_FT_STATE_STANDBY_COLD</font></strong>
                Context Name: C1
                Context Id: 1   Running Cfg Sync Status: Successful</pre><!--kg-card-end: html--><p>That&#x2019;s all folks! Leave a comment if you liked, disliked, have additional inputs, queries, want to hire our services, want just say hello&#x2026;</p>]]></content:encoded></item><item><title><![CDATA[Playing with BGP Local-AS]]></title><description><![CDATA[<p>In some situation you might have to change the BGP AS number used by a router. When the router peers with several other routers it is not always easy to change all the peering at the same time&#x2026; Luckily you may do it one by one with the &#x201C;</p>]]></description><link>https://www.exp-networks.be/playing-with-bgp-local-as/</link><guid isPermaLink="false">5f72e54bd0c45900011ba8bc</guid><category><![CDATA[Cisco]]></category><category><![CDATA[Networks]]></category><dc:creator><![CDATA[Christophe Lemaire]]></dc:creator><pubDate>Fri, 18 May 2012 22:00:00 GMT</pubDate><media:content url="https://www.exp-networks.be/content/images/2020/09/BGP-no-Local-AS-1.png" medium="image"/><content:encoded><![CDATA[<img src="https://www.exp-networks.be/content/images/2020/09/BGP-no-Local-AS-1.png" alt="Playing with BGP Local-AS"><p>In some situation you might have to change the BGP AS number used by a router. When the router peers with several other routers it is not always easy to change all the peering at the same time&#x2026; Luckily you may do it one by one with the &#x201C;local-as&#x201D; neighbor command under bgp process.</p><p>This small article shows the different options of local-as command and their impact on the received and advertised routes.</p><p>First let&#x2019;s have a look at the test setup before we use local-as</p><figure class="kg-card kg-image-card kg-width-wide"><img src="https://www.exp-networks.be/content/images/2020/09/BGP-no-Local-AS.png" class="kg-image" alt="Playing with BGP Local-AS" loading="lazy" width="1474" height="460" srcset="https://www.exp-networks.be/content/images/size/w600/2020/09/BGP-no-Local-AS.png 600w, https://www.exp-networks.be/content/images/size/w1000/2020/09/BGP-no-Local-AS.png 1000w, https://www.exp-networks.be/content/images/2020/09/BGP-no-Local-AS.png 1474w" sizes="(min-width: 1200px) 1200px"></figure><p>Now let&#x2019;s say we want to change the local AS from 12 to 1200 without having to reconfigure the complete AS&#x2026; We can achieve this with local-as. With local-as alone, the real AS# and the local AS# are in the AS_PATH</p><figure class="kg-card kg-image-card kg-width-wide"><img src="https://www.exp-networks.be/content/images/2020/09/BGP-Local-AS-1.png" class="kg-image" alt="Playing with BGP Local-AS" loading="lazy" width="1474" height="460" srcset="https://www.exp-networks.be/content/images/size/w600/2020/09/BGP-Local-AS-1.png 600w, https://www.exp-networks.be/content/images/size/w1000/2020/09/BGP-Local-AS-1.png 1000w, https://www.exp-networks.be/content/images/2020/09/BGP-Local-AS-1.png 1474w" sizes="(min-width: 1200px) 1200px"></figure><!--kg-card-begin: html--><pre>R2(config-router)#do sh run | s router bgp
router bgp 12
 no synchronization
 bgp log-neighbor-changes
 neighbor 10.10.12.1 remote-as 12
 neighbor 10.10.23.3 remote-as 34
 neighbor 10.10.23.3 local-as 1200
 no auto-summary
R1(config-router)#do sh ip bgp
BGP table version is 11, local router ID is 11.11.11.11
Status codes: s suppressed, d damped, h history, * valid, &gt; best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 11.11.11.11/32   0.0.0.0                  0         32768 i
*&gt; 44.44.44.44/32   10.10.12.2               0             0 1200 34 i
R4(config-router)#do sh ip bgp
BGP table version is 10, local router ID is 44.44.44.44
Status codes: s suppressed, d damped, h history, * valid, &gt; best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 11.11.11.11/32   10.10.34.3               0             0 1200 12 i
*&gt; 44.44.44.44/32   0.0.0.0                  0         32768 i
</pre><!--kg-card-end: html--><p>With local-as no-prepend, same results for the advertise routes. Received routes&#x2019;s AS_PATH do not contain the &#x201C;fake&#x201D; AS number. &#x201C;no-prepend&#x201D; is used to prevent incoming eBGP updates to be prepended with the configured local AS#. From that perspective, it looks a bit like confederations.</p><figure class="kg-card kg-image-card kg-width-wide"><img src="https://www.exp-networks.be/content/images/2020/09/BGP-Local-AS-2.png" class="kg-image" alt="Playing with BGP Local-AS" loading="lazy" width="1474" height="460" srcset="https://www.exp-networks.be/content/images/size/w600/2020/09/BGP-Local-AS-2.png 600w, https://www.exp-networks.be/content/images/size/w1000/2020/09/BGP-Local-AS-2.png 1000w, https://www.exp-networks.be/content/images/2020/09/BGP-Local-AS-2.png 1474w" sizes="(min-width: 1200px) 1200px"></figure><!--kg-card-begin: html--><pre>R2(config-router)#do sh run | s router bgp
router bgp 12
 no synchronization
 bgp log-neighbor-changes
 neighbor 10.10.12.1 remote-as 12
 neighbor 10.10.23.3 remote-as 34
 neighbor 10.10.23.3 local-as 1200 no-prepend
 no auto-summary
R1(config-router)#do sh ip bgp
BGP table version is 11, local router ID is 11.11.11.11
Status codes: s suppressed, d damped, h history, * valid, &gt; best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 11.11.11.11/32   0.0.0.0                  0         32768 i
*&gt; 44.44.44.44/32   10.10.12.2               0             0 34 i
R4(config-router)#do sh ip bgp
BGP table version is 10, local router ID is 44.44.44.44
Status codes: s suppressed, d damped, h history, * valid, &gt; best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 11.11.11.11/32   10.10.34.3               0             0 1200 12 i
*&gt; 44.44.44.44/32   0.0.0.0                  0         32768 i
</pre><!--kg-card-end: html--><p>With local-as no-prepend replace-as, received routes&#x2019;s AS_PATH do not contain the &#x201C;fake&#x201D; AS number. The real AS number do not appear in the AS_PATH of the advertised routes, it is replaced by the configure local AS#. In that perspective, it looks a bit like confederations&#x2026;</p><figure class="kg-card kg-image-card kg-width-wide"><img src="https://www.exp-networks.be/content/images/2020/09/BGP-Local-AS-3.png" class="kg-image" alt="Playing with BGP Local-AS" loading="lazy" width="1474" height="490" srcset="https://www.exp-networks.be/content/images/size/w600/2020/09/BGP-Local-AS-3.png 600w, https://www.exp-networks.be/content/images/size/w1000/2020/09/BGP-Local-AS-3.png 1000w, https://www.exp-networks.be/content/images/2020/09/BGP-Local-AS-3.png 1474w" sizes="(min-width: 1200px) 1200px"></figure><!--kg-card-begin: html--><pre>R2(config-router)#do sh run | s router bgp
router bgp 12
 no synchronization
 bgp log-neighbor-changes
 neighbor 10.10.12.1 remote-as 12
 neighbor 10.10.23.3 remote-as 34
 neighbor 10.10.23.3 local-as 1200 no-prepend replace-as
 no auto-summary
R1(config-router)#do sh ip bgp
BGP table version is 11, local router ID is 11.11.11.11
Status codes: s suppressed, d damped, h history, * valid, &gt; best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 11.11.11.11/32   0.0.0.0                  0         32768 i
*&gt; 44.44.44.44/32   10.10.12.2               0             0 34 i
R4(config-router)#do sh ip bgp
BGP table version is 10, local router ID is 44.44.44.44
Status codes: s suppressed, d damped, h history, * valid, &gt; best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 11.11.11.11/32   10.10.34.3               0             0 1200 i
*&gt; 44.44.44.44/32   0.0.0.0                  0         32768 i
</pre><!--kg-card-end: html-->]]></content:encoded></item><item><title><![CDATA[BGP between ScreenOS and IOS]]></title><description><![CDATA[<p>There are some times where using static routing on firewalls is simply not scalable&#x2026; As long as the routing is inside a trusted network, I do not see any reason to avoid dynamic routing. Juniper devices (Junos and ScreenOS) can even use virtual routers to split the routing domain</p>]]></description><link>https://www.exp-networks.be/bgp-between-screenos-and-ios/</link><guid isPermaLink="false">5f72e230d0c45900011ba853</guid><category><![CDATA[Firewall]]></category><category><![CDATA[Cisco]]></category><category><![CDATA[Juniper]]></category><category><![CDATA[Networks]]></category><category><![CDATA[Security]]></category><dc:creator><![CDATA[Christophe Lemaire]]></dc:creator><pubDate>Tue, 25 Oct 2011 22:00:00 GMT</pubDate><content:encoded><![CDATA[<p>There are some times where using static routing on firewalls is simply not scalable&#x2026; As long as the routing is inside a trusted network, I do not see any reason to avoid dynamic routing. Juniper devices (Junos and ScreenOS) can even use virtual routers to split the routing domain into several domains. In the example here below, we will only show how to build a BGP peering between a ScreenOS cluster and two Cisco routers.</p><p>Firewalls J1 and J2 are in cluster, only one device is actively forwarding traffic. The eBGP peering will be done with the active device via a virtual IP called VSI in ScreenOS jargon. The cluster is in AS 64999. As the active device is J1 the traffic will be forced through C1 which is connected to the same switch.</p><p>C1 and C2 are core routers running BGP in AS 65000, they have an iBGP session between them and will form an eBGP peering with the cluster&#x2019;s VSI.</p><h2 id="cisco-ios-configuration">Cisco IOS configuration</h2><p>Cisco routers have a very basic BGP configuration.</p><h3 id="c1">C1</h3><!--kg-card-begin: html--><pre>interface Vlan644
 ip address 10.6.44.1 255.255.255.248

interface Vlan645
 ip address 10.6.45.1 255.255.255.248

router bgp 65000
 neighbor 10.6.45.2 remote-as 65000
 neighbor 10.6.45.2 password exp-networks
 neighbor 10.6.44.4 remote-as 64999
 neighbor 10.6.44.4 password exp-networks
 network 10.6.45.0 mask 255.255.255.248
</pre><!--kg-card-end: html--><h3 id="c2">C2</h3><!--kg-card-begin: html--><pre>interface Vlan644
 ip address 10.6.44.2 255.255.255.248

interface Vlan645
 ip address 10.6.45.2 255.255.255.248

router bgp 65000
 neighbor 10.6.45.1 remote-as 65000
 neighbor 10.6.44.1 password exp-networks
 neighbor 10.6.44.4 remote-as 64999
 neighbor 10.6.44.4 password exp-networks
 network 10.6.45.0 mask 255.255.255.248
</pre><!--kg-card-end: html--><h2 id="juniper-screenos-configuration">Juniper ScreenOS configuration</h2><p>Only the active ScreenOS device needs to be configured, the configuration will be replicated to the standby device thanks to NSRP. For demonstration purpose the cluster will send the default route to the routers and refuse it from the routers&#x2026; As the active node is connected to C1 the traffic will be forced to go through that router with the help of MED and weight.</p><h3 id="j1">J1</h3><!--kg-card-begin: html--><pre>set interface &quot;aggregate1.644&quot; tag 644 zone &quot;Trust&quot;
set interface aggregate1.644 ip 10.6.44.4/29
set interface aggregate1.644 route
set interface aggregate1.644 manage-ip 10.6.44.5
set interface aggregate1.644 protocol bgp

set vrouter &quot;trust-vr&quot;
set protocol bgp 64999
set enable
set neighbor 10.6.44.1 remote-as 65000
set neighbor 10.6.44.1 enable
set neighbor 10.6.44.1 md5-authentication exp-networks
set neighbor 10.6.44.2 remote-as 65000
set neighbor 10.6.44.2 enable
set neighbor 10.6.44.2 md5-authentication exp-networks
set ipv4 neighbor 10.6.44.1 activate
set ipv4 neighbor 10.6.44.1 med 10
set ipv4 neighbor 10.6.44.1 advertise-def-route
set ipv4 neighbor 10.6.44.1 reject-default-route
set ipv4 neighbor 10.6.44.1 weight 200
set ipv4 neighbor 10.6.44.2 activate
set ipv4 neighbor 10.6.44.2 med 20
set ipv4 neighbor 10.6.44.2 advertise-def-route
set ipv4 neighbor 10.6.44.2 reject-default-route
exit
exit
</pre><!--kg-card-end: html--><h3 id="j2">J2</h3><p>To be complete, J2 is configured with its own manage-ip.</p><!--kg-card-begin: html--><pre>set interface aggregate1.644 manage-ip 10.6.44.6
</pre><!--kg-card-end: html--><h2 id="verifications">Verifications</h2><p>Few second after the configuration the BGP peering should be established.</p><h3 id="check-bgp-peering-on-screenos">Check BGP peering on ScreenOS</h3><p>On Juniper devices</p><!--kg-card-begin: html--><pre>J1(M)-&gt; get vrouter trust-vr protocol bgp neighbor
Peer AS Remote IP   Local IP      Wt Status   State     ConnID Up/Down
-----------------------------------------------------------------------
  65000 10.6.44.1   10.6.44.4    100 Enabled  ESTABLISH   1020 00:18:18
  65000 10.6.44.2   10.6.44.4    100 Enabled  ESTABLISH   1043 00:00:19

total 2 BGP peers shown
</pre><!--kg-card-end: html--><p>On Cisco routers</p><!--kg-card-begin: html--><pre>C1# sh ip bgp summary
BGP router identifier 10.6.45.1, local AS number 65000
BGP table version is 96, main routing table version 96
2 network entries using 274 bytes of memory
3 path entries using 204 bytes of memory
7/3 BGP path/bestpath attribute entries using 980 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
2 BGP extended community entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 1530 total bytes of memory
BGP activity 15/9 prefixes, 51/44 paths, scan interval 15 secs

Neighbor   V    AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.6.44.4  4 64999    5964    7607     96   0    0 00:35:02        1
10.6.45.2  4 65000     974     925     96   0    0 00:35:06        1
</pre><!--kg-card-end: html--><h3 id="check-the-bgp-table">Check the bgp table</h3><p>On Juniper devices</p><!--kg-card-begin: html--><pre>J1(M)-&gt; get vrouter trust-vr protocol bgp rib-in
i: IBGP route, e: EBGP route, &gt;: best route, *: valid route
               Prefix         Nexthop    Wt  Pref   Med Orig    AS-Path
-----------------------------------------------------------------------
Total ipv4 routes in rib-in: 2 (0 in flap-damping history)
-----------------------------------------------------------------------
&gt;e*      10.6.45.0/29       10.6.44.1   200   100     0  IGP   65000
 e       10.6.45.0/29       10.6.44.2   100   100     0  IGP   65000
Total no. of ipv4 entries shown: 2
</pre><!--kg-card-end: html--><p>Or to see all the details</p><!--kg-card-begin: html--><pre>J1(M)-&gt; get vrouter trust-vr protocol bgp rib-in 10.6.45.0/29
Prefix: 10.6.45.0/29
Nexthop: 10.6.44.1, Weight: 200, Local Pref: 100, MED: 0, Flags: 0x486 0x88, Orig: IGP
AS segment type: AS_SEQ, AS path:65000

Prefix: 10.6.45.0/29
Nexthop: 10.6.44.2, Weight: 100, Local Pref: 100, MED: 0, Flags: 0x404 0x88, Orig: IGP
AS segment type: AS_SEQ, AS path:65000
</pre><!--kg-card-end: html--><p>On Cisco devices. C1 should only see the default route from J1 while C2 should see it from C1 and J1 and select the one through C1 due to the better MED.</p><!--kg-card-begin: html--><pre>C1#sh ip bgp 
BGP table version is 96, local router ID is 10.10.254.164
Status codes: s suppressed, d damped, h history, * valid, &gt; best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*&gt; 0.0.0.0          10.6.44.4               10             0 64999 i
* i10.6.45.0/29     10.6.45.2                0    100      0 i
*&gt;                  0.0.0.0                  0         32768 i

C2#sh ip bgp
BGP table version is 152, local router ID is 10.10.254.201
Status codes: s suppressed, d damped, h history, * valid, &gt; best, i - internal,
              S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*&gt;i0.0.0.0          10.6.45.1               10    100      0 64999 i
*                   10.6.44.4               20             0 64999 i
*&gt; 10.6.45.0/29     0.0.0.0                  0         32768 i
* i                 10.6.45.1                0    100      0 i
</pre><!--kg-card-end: html--><p>Or to see all the details (on C2 only)</p><!--kg-card-begin: html--><pre>C2# sh ip bgp 0.0.0.0/0
BGP routing table entry for 0.0.0.0/0, version 148
Paths: (2 available, best #1)
  Advertised to update-groups:
     2
  64999
    10.6.45.1 from 10.6.45.1 (10.6.45.1)
      Origin IGP, metric 10, localpref 100, valid, internal, best
  64999
    10.6.44.4 from 10.6.44.4 (10.6.44.4)
      Origin IGP, metric 20, localpref 100, valid, external
</pre><!--kg-card-end: html--><p>That&#x2019;s it&#x2026; Not very complex and it may ease your life a lot.</p>]]></content:encoded></item><item><title><![CDATA[ACE Stickyness]]></title><description><![CDATA[<p>Load-balancers like ACE are used &#x2013; as their name says &#x2013; to balance traffic among several servers able to serve the same content. The easiest case is to load-balance web static content. In that particular case, when a client get a page composed of several objects (e.g. style sheets,</p>]]></description><link>https://www.exp-networks.be/ace-stickyness/</link><guid isPermaLink="false">5f71e821d0c45900011ba61f</guid><category><![CDATA[Load-balancer]]></category><category><![CDATA[ACE]]></category><category><![CDATA[Cisco]]></category><dc:creator><![CDATA[Christophe Lemaire]]></dc:creator><pubDate>Sun, 23 Oct 2011 22:00:00 GMT</pubDate><content:encoded><![CDATA[<p>Load-balancers like ACE are used &#x2013; as their name says &#x2013; to balance traffic among several servers able to serve the same content. The easiest case is to load-balance web static content. In that particular case, when a client get a page composed of several objects (e.g. style sheets, images) it does not really matter which server is providing the different objects because each server has a local copy of the same content. So if the server farm is composed of four servers, it does not matter if server 1 is providing the html code, server 2 some images, server 3 the style sheet and server 4 nothing&#x2026; It is completely transparent to the end user.</p><p>Now, what happen when the content is dynamic? The best example is a shopping cart on an e-commerce website, you browse a catalog and add stuffs you want to purchase. At any time you may consult the content of your shopping cart. Usually, the shopping cart is created on one and only one application server. So now, even if we have a server farm of four servers, every request related to the shopping cart (e.g. add or remove items, view the content) must go to the same application server. If the request goes to another application server, this one won&#x2019;t be able to treat the request because it has no knowledge about that shopping cart instance&#x2026;</p><p>To tackle that problem, the ACE use a technique called stickiness. A particular client is stick to a specific server. The ACE allows several methods to track the association client/server.</p><ul><li>source IP</li><li>destination IP</li><li>source and destination IP</li><li>HTTP Cookie</li><li>HTTP Header</li><li>HTTP Content</li><li>Generic layer 4 parsing</li><li>RADIUS</li><li>SIP</li></ul><p>Let&#x2019;s examine the most common ones based on the following starting config.</p><!--kg-card-begin: html--><pre>reserver host <font color="red">A</font>
  ip address 10.10.10.1
  inservice
reserver host <font color="red">B</font>
  ip address 10.10.10.2
  inservice

serverfarm host <font color="blue">AB</font>
  rserver <font color="red">A</font> 80
    inservice
  rserver <font color="red">B</font> 80
    inservice

class-map match-all <font color="green">VIP-80</font>
  match virtual-address 100.100.100.1 tcp eq www

policy-map type loadbalance first-match <font color="purple">LB-80</font>
  class class-default
    serverfarm <font color="blue">AB</font>

policy-map multi-match <font color="pink">VIP</font>
  class <font color="green">VIP-80</font>
    loadbalance vip inservice
    load balance policy <font color="purple">LB-80</font>

interface vlan100
  service-policy input <font color="pink">VIP</font>
</pre><!--kg-card-end: html--><p>With this configuration, the ACE will load-balance all the requests in a round-robin fashion between rservers A and B.</p><h2 id="source-ip-based-stickiness">Source IP based stickiness</h2><p>This method well suited only if the ACE sees enough different source IP. If all your traffic goes through a reverse-proxy this method is not for you since the ACE will see all the clients coming from the same IP and will therefore send everybody to the same application server.</p><p>On the other hand, the more different source IP the ACE sees, the more memory it will use to keep track of all the sticky sessions. If memory usage becomes an issue, you may chose a smaller netmask or go for another method.</p><!--kg-card-begin: html--><pre>sticky ip-netmask 255.255.255.255 address source <font color="orange">sticky-ip</font>
 replicate sticky
 serverfarm <font color="blue">AB</font>
 
 class-map match-all <font color="green">VIP-81</font>
   match virtual-address 100.100.100.1 tcp eq 81

 policy-map type loadbalance first-match <font color="purple">LB-81</font>
   class class-default
     sticky-serverfarm <font color="orange">sticky-ip</font>
     
  policy-map multi-match <font color="pink">VIP</font>
   class <font color="green">VIP-81</font>
     loadbalance vip inservice
     load balance policy <font color="purple">LB-81</font></pre><!--kg-card-end: html--><p>To check to which real server a client is associated, just issue the command &#x201C;show sticky database type ip-netmask&#x201D;.</p><!--kg-card-begin: html--><pre>ACE# show sticky database type ip-netmask source
sticky group : <font color="orange">sticky-ip</font>
type         : IP    
timeout      : 1440          timeout-activeconns : FALSE
  sticky-entry          rserver-instance                 time-to-expire flags   
  ---------------------+--------------------------------+--------------+-------+
  175735071             A:80                             85962          - 
sticky group : <font color="orange">sticky-ip</font>
type         : IP    
timeout      : 1440          timeout-activeconns : FALSE
  sticky-entry          rserver-instance                 time-to-expire flags   
  ---------------------+--------------------------------+--------------+-------+
  175669553             B:80                             86373          - 
</pre><!--kg-card-end: html--><p>The numbers under sticky-entry are the source IP converted into decimal.</p><h2 id="http-cookie-based-stickiness">HTTP Cookie based stickiness</h2><p>In the Web world the usage of cookies is well known. The ACE can use them or even generate its own cookie to achieve session stickiness. In the example here below, we will make the ACE to generate its own cookie. The main advantage of that method is the low memory consumption as the ACE built the cookie-rserver mapping in advance. Only one entry per real server is required. With cookies generated by the application, the ACE needs to create a dynamic entry per cookie value and, therefore, might consume more memory.</p><!--kg-card-begin: html--><pre>sticky http-cookie myCookie <font color="orange">sticky-cookie</font>
 cookie insert browser-expire
 serverfarm <font color="blue">AB</font>
  
  class-map match-all <font color="green">VIP-82</font>
    match virtual-address 100.100.100.1 tcp eq 82
 
  policy-map type loadbalance first-match <font color="purple">LB-82</font>
    class class-default
      sticky-serverfarm <font color="orange">sticky-cookie</font>
      
  policy-map multi-match <font color="pink">VIP</font>
    class <font color="green">VIP-82</font>
      loadbalance vip inservice
      load balance policy <font color="purple">LB-82</font></pre><!--kg-card-end: html--><p>As our serverfarm AB contains only two rservers, the <a href="http://docwiki.cisco.com/wiki/Session_Persistence_Using_Cookie_Insert_on_the_Cisco_Application_Control_Engine_Configuration_Example#TCL_Script_for_calculating_Cookie_Values">ACE will generate only two cookie values based on serverfarm name, rserver name and rserver port</a>. To check which value is assiciated to which rserver, issue the command &#x2018;show sticky cookie-insert group&#x2019;.</p><!--kg-card-begin: html--><pre>ACE# show sticky cookie-insert group <font color="orange">sticky-cookie</font>
     Cookie   |        HashKey       |           rserver-instance   
  ------------+----------------------+----------------------------------------+
  R7072362623 | 15959351102845316184 | AB/A:80
  R1637696807 | 14926835405428408087 | AB/B:80
</pre><!--kg-card-end: html--><h2 id="http-header-base-stickiness">HTTP Header base stickiness</h2><p>Instead of using a cookie, you may want to use application specific HTTP header (e.g. MSISDN in the mobile world). The usage is almost the same as with the application generated cookie.</p><!--kg-card-begin: html--><pre>sticky http-header myHeader <font color="orange">sticky-header</font>
 replicate sticky
 serverfarm <font color="blue">AB</font>
  
  class-map match-all <font color="green">VIP-83</font>
    match virtual-address 100.100.100.1 tcp eq 83
 
  policy-map type loadbalance first-match <font color="purple">LB-83</font>
    class class-default
      sticky-serverfarm <font color="orange">sticky-header</font>
      
  policy-map multi-match <font color="pink">VIP</font>
    class <font color="green">VIP-83</font>
      loadbalance vip inservice
      load balance policy <font color="purple">LB-83</font>

ACE# show sticky database http-header myHeader
</pre><!--kg-card-end: html-->]]></content:encoded></item><item><title><![CDATA[HA Load-balancing with IP Anycast]]></title><description><![CDATA[<p>Nowadays, having a load-balancer in datacenters is more and more crucial not only to assure an easy scalability but also to assure high availability (HA). If properly configured, the load-balancer will be able to detect a failed application server, will remove it from its resource pool and will eventually reassign</p>]]></description><link>https://www.exp-networks.be/ha-load-balancing-with-ip-anycast/</link><guid isPermaLink="false">5f71e3b3d0c45900011ba5f5</guid><category><![CDATA[Load-balancer]]></category><category><![CDATA[ACE]]></category><category><![CDATA[Cisco]]></category><category><![CDATA[Design]]></category><dc:creator><![CDATA[Christophe Lemaire]]></dc:creator><pubDate>Tue, 06 Sep 2011 22:00:00 GMT</pubDate><media:content url="https://www.exp-networks.be/content/images/2020/09/LB-Anycast-1-1.png" medium="image"/><content:encoded><![CDATA[<img src="https://www.exp-networks.be/content/images/2020/09/LB-Anycast-1-1.png" alt="HA Load-balancing with IP Anycast"><p>Nowadays, having a load-balancer in datacenters is more and more crucial not only to assure an easy scalability but also to assure high availability (HA). If properly configured, the load-balancer will be able to detect a failed application server, will remove it from its resource pool and will eventually reassign clients to other available servers.</p><p>Now, the load-balancer should not become the single point of failure, that&#x2019;s why most of the vendor propose clustered load-balancers where one node is in hot standby mode waiting for the opportunity to take over the traffic handled by its active peer. But what happen if you have two datacenters? Stretched cluster across the two DC would need stretched L2 domain which is definitely not a good idea&#x2026;</p><p>High end load-balancers like Cisco&#x2019;s ACE or F5&#x2032;s LTM can influence the IP routing to attract the traffic for a particular VIP. Cisco&#x2019;s ACE is able to inject static routes on the Supervisor&#x2019;s MSFC when a VIP is considered operational. F5&#x2032;s LTM can do almost the same by running BGP. Let see how it can help to meet cross datacenter HA</p><h2 id="client-to-load-balancer">Client to load-balancer</h2><p>The main goal is to avoid the client to have to take any action in case of failure. We will then use the same VIP in both datacenters and let the IP routing protocol decide to which load-balancer a particular client will go. This principle is known as Anycasting, the client goes always to the closest load-balancer from a routing point of view. The trick here is to make sure the client will always go to the same load-balancer for a given session, this require a properly set IGP metric to avoid route load-balancing between the two load-balancers from anywhere in the network.</p><figure class="kg-card kg-image-card kg-width-wide"><img src="https://www.exp-networks.be/content/images/2020/09/LB-Anycast-1.png" class="kg-image" alt="HA Load-balancing with IP Anycast" loading="lazy" width="1476" height="1287" srcset="https://www.exp-networks.be/content/images/size/w600/2020/09/LB-Anycast-1.png 600w, https://www.exp-networks.be/content/images/size/w1000/2020/09/LB-Anycast-1.png 1000w, https://www.exp-networks.be/content/images/2020/09/LB-Anycast-1.png 1476w" sizes="(min-width: 1200px) 1200px"></figure><p>In a steady state, Client 1 and Client 2 are always going to ACE 1, Client 3 and Client 4 are always going to ACE 3 even though they are all using the same VIP.</p><figure class="kg-card kg-image-card kg-width-wide"><img src="https://www.exp-networks.be/content/images/2020/09/LB-Anycast-3.png" class="kg-image" alt="HA Load-balancing with IP Anycast" loading="lazy" width="1476" height="1287" srcset="https://www.exp-networks.be/content/images/size/w600/2020/09/LB-Anycast-3.png 600w, https://www.exp-networks.be/content/images/size/w1000/2020/09/LB-Anycast-3.png 1000w, https://www.exp-networks.be/content/images/2020/09/LB-Anycast-3.png 1476w" sizes="(min-width: 1200px) 1200px"></figure><blockquote>In case of failure of both ACE in DC1, Client 1 and Client 2 are redirected to the ACE in DC2 by the IGP.</blockquote><blockquote>Failure of ACE 1 only would trigger a local failover to ACE 2. In that case, there are no impact at all on the flows.</blockquote><h2 id="load-balancer-to-application-servers">Load-balancer to application servers</h2><p>We have to make sure the application servers will always respond to the load-balancer who has initiated the connection regardless to the server location in the network. This is achieved by using different NAT pool for each load-balancers. That way, the application servers &#x201C;know&#x201D; which ACE has initiated a particular session.</p><figure class="kg-card kg-image-card kg-width-wide"><img src="https://www.exp-networks.be/content/images/2020/09/LB-Anycast-2.png" class="kg-image" alt="HA Load-balancing with IP Anycast" loading="lazy" width="1476" height="1287" srcset="https://www.exp-networks.be/content/images/size/w600/2020/09/LB-Anycast-2.png 600w, https://www.exp-networks.be/content/images/size/w1000/2020/09/LB-Anycast-2.png 1000w, https://www.exp-networks.be/content/images/2020/09/LB-Anycast-2.png 1476w" sizes="(min-width: 1200px) 1200px"></figure><p>Sessions initiated by ACE 1 (or ACE 2) are using N1 as source IP while sessions initiated by ACE 3 (or ACE 4) are sourced from N2 IP.</p><figure class="kg-card kg-image-card kg-width-wide"><img src="https://www.exp-networks.be/content/images/2020/09/LB-Anycast-4.png" class="kg-image" alt="HA Load-balancing with IP Anycast" loading="lazy" width="1476" height="1287" srcset="https://www.exp-networks.be/content/images/size/w600/2020/09/LB-Anycast-4.png 600w, https://www.exp-networks.be/content/images/size/w1000/2020/09/LB-Anycast-4.png 1000w, https://www.exp-networks.be/content/images/2020/09/LB-Anycast-4.png 1476w" sizes="(min-width: 1200px) 1200px"></figure><p>In case of failure of both ACE in DC1, all flows going through ACE 3 are not affected at all. Sessions going through ACE 1 / ACE 2 would need to be restarted.</p><h2 id="conclusion">Conclusion</h2><p>With this kind of setup, the challenge reside in the ACE configuration. The two clusters configuration must be aligned but it won&#x2019;t be done automagically&#x2026; Network administrator has to be very cautious&#x2026;</p><p>Another approach is the use of intelligent DNS like Cisco&#x2019;s GSS or F5&#x2032;s 3DNS but it isn&#x2019;t in the scope of this post.</p><p>Thanks to leave a small comment if you like or if you don&#x2019;t like&#x2026; You may also &#x2018;+1&#x2032; if you like.</p>]]></content:encoded></item><item><title><![CDATA[Dynamic Multipoint VPN – Dual hub]]></title><description><![CDATA[<p>In a previous article, I exposed <a href="https://www.exp-networks.be/dynamic-multipoint-vpn/">how to setup a basic DMVPN network with one hub router</a> in a central location and several spoke routers negotiating a dynamically built IPSec protected GRE tunnel. I also explained the central site should be secured by deploying two hub routers&#x2026; Here is</p>]]></description><link>https://www.exp-networks.be/dynamic-multipoint-vpn-dual-hub/</link><guid isPermaLink="false">5f71f3b7d0c45900011ba69b</guid><category><![CDATA[Cisco]]></category><category><![CDATA[Networks]]></category><category><![CDATA[Security]]></category><category><![CDATA[VPN]]></category><dc:creator><![CDATA[Christophe Lemaire]]></dc:creator><pubDate>Fri, 05 Mar 2010 23:00:00 GMT</pubDate><media:content url="https://www.exp-networks.be/content/images/2020/09/DMVPN-dual-5.png" medium="image"/><content:encoded><![CDATA[<img src="https://www.exp-networks.be/content/images/2020/09/DMVPN-dual-5.png" alt="Dynamic Multipoint VPN &#x2013; Dual hub"><p>In a previous article, I exposed <a href="https://www.exp-networks.be/dynamic-multipoint-vpn/">how to setup a basic DMVPN network with one hub router</a> in a central location and several spoke routers negotiating a dynamically built IPSec protected GRE tunnel. I also explained the central site should be secured by deploying two hub routers&#x2026; Here is one solution among others using DMVPN and OSPF. (Should you need another solution you can always contact our professional services)</p><figure class="kg-card kg-image-card kg-width-wide"><img src="https://www.exp-networks.be/content/images/2020/09/DMVPN-dual-4.png" class="kg-image" alt="Dynamic Multipoint VPN &#x2013; Dual hub" loading="lazy" width="1368" height="960" srcset="https://www.exp-networks.be/content/images/size/w600/2020/09/DMVPN-dual-4.png 600w, https://www.exp-networks.be/content/images/size/w1000/2020/09/DMVPN-dual-4.png 1000w, https://www.exp-networks.be/content/images/2020/09/DMVPN-dual-4.png 1368w" sizes="(min-width: 1200px) 1200px"></figure><p>In this scenario, the spoke routers will have two GRE tunnels, one ending on each hub routers.</p><p>First we configure the hub routers with mGRE interfaces and OSPF.</p><p>The tunnel interfaces use point-to-point OSPF network type by default, we will need to reconfigure them with &#xA0;NBMA OSPF network type as we will have several spoke routers ending their tunnel on them. We will also set the OSPF costs in order to have R0 acting as the preferred hub router and R1 as the backup hub router.</p><p>Hub router R0&#x2032;s config</p><!--kg-card-begin: html--><pre>interface Tunnel0
 ip address 10.0.0.1 255.255.255.0
 no ip redirects
 ip nhrp network-id 1
 ip ospf network non-broadcast
 ip ospf cost 10
 tunnel source FastEthernet2/1
 tunnel mode gre multipoint
 tunnel key 1
!
interface FastEthernet2/0
 ip address 10.10.10.1 255.255.255.0
!
interface FastEthernet2/1
 ip address 10.4.0.1 255.255.255.0
!
router ospf 1
 log-adjacency-changes
 network 10.0.0.0 0.0.0.255 area 10
 network 10.10.10.0 0.0.0.255 area 10
!
ip route 0.0.0.0 0.0.0.0 10.4.0.2</pre><!--kg-card-end: html--><p>Hub router R0&#x2032;s config</p><!--kg-card-begin: html--><pre>interface Tunnel1
 ip address 10.1.1.1 255.255.255.0
 no ip redirects
 ip nhrp network-id 1
 ip ospf network non-broadcast
 ip ospf cost 100
 tunnel source FastEthernet2/1
 tunnel mode gre multipoint
 tunnel key 1
!
interface FastEthernet2/0
 ip address 10.10.10.2 255.255.255.0
!
interface FastEthernet2/1
 ip address 10.4.1.1 255.255.255.0
!
router ospf 1
 log-adjacency-changes
 network 10.0.0.0 0.0.0.255 area 10
 network 10.10.10.0 0.0.0.255 area 10
!
ip route 0.0.0.0 0.0.0.0 10.4.1.2</pre><!--kg-card-end: html--><p>Then we can start to add spoke routers. The spoke routers will use point-to-point GRE (as we don&#x2019;t want spoke-to-spoke direct communication) with NBMA OSPF network type in order to be compatible with the hub routers&#x2019; settings. We also need to define the neighbors as we&#x2019;re on an NBMA network. I&#x2019;ve chosen to do that on the spoke routers as &#xEC; don&#x2019;t want to have to touch the hub routers config when new spoke routers are added.</p><p>Spoke router R2&#x2032;s config</p><!--kg-card-begin: html--><pre>interface Loopback0
 ip address 2.2.2.2 255.255.255.255
!
interface Tunnel0
 ip address 10.0.0.2 255.255.255.0
 ip nhrp map 10.0.0.1 10.4.0.1
 ip nhrp network-id 1
 ip nhrp nhs 10.0.0.1
 ip ospf network non-broadcast
 ip ospf cost 10
 ip ospf priority 0
 tunnel source FastEthernet1/0
 tunnel destination 10.4.0.1
 tunnel key 1
!
interface Tunnel1
 ip address 10.1.1.2 255.255.255.0
 ip nhrp map 10.1.1.1 10.4.1.1
 ip nhrp network-id 1
 ip nhrp nhs 10.1.1.1
 ip ospf network non-broadcast
 ip ospf cost 100
 ip ospf priority 0
 tunnel source FastEthernet1/0
 tunnel destination 10.4.1.1
 tunnel key 1
!
interface FastEthernet1/0
 ip address 10.4.2.1 255.255.255.0
!
router ospf 1
 log-adjacency-changes
 network 2.2.2.2 0.0.0.0 area 10
 network 10.0.0.0 0.0.0.255 area 10
 network 10.1.1.0 0.0.0.255 area 10
 neighbor 10.0.0.1
 neighbor 10.1.1.1
!
ip route 0.0.0.0 0.0.0.0 10.4.2.2
</pre><!--kg-card-end: html--><p>Same config is applied on spoke router R3, only the IP change.</p><p>To check the GRE tunnels are operational, we only have to ping the tunnels&#x2019; internal IP from one router to the others three.</p><p>From spoke router R2 :</p><!--kg-card-begin: html--><pre>R2#ping 10.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/8/8 ms
R2#ping 10.1.1.3

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/17/24 ms
R2#ping 10.0.0.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/11/24 ms
R2#ping 10.0.0.3

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.0.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/20/32 ms</pre><!--kg-card-end: html--><p>If we check the NHRP entries on the hubs R0 or R1, we can see the two entries have been learned dynamically and the public IP used by the remote routers.</p><!--kg-card-begin: html--><pre>R1#sh ip nhrp
10.1.1.2/32 via 10.1.1.2, Tunnel1 created 02:08:37, expire 01:38:57
  Type: dynamic, Flags: authoritative unique registered used
  NBMA address: 10.4.2.1 
10.1.1.3/32 via 10.1.1.3, Tunnel1 created 02:08:36, expire 01:38:57
  Type: dynamic, Flags: authoritative unique registered used
  NBMA address: 10.4.3.1 

R0#sh ip nhrp
10.0.0.2/32 via 10.0.0.2, Tunnel0 created 02:15:15, expire 01:53:44
  Type: dynamic, Flags: authoritative unique registered
  NBMA address: 10.4.2.1
10.0.0.3/32 via 10.0.0.3, Tunnel0 created 02:11:04, expire 01:53:44
  Type: dynamic, Flags: authoritative unique registered
  NBMA address: 10.4.3.1 
</pre><!--kg-card-end: html--><p>Now, check OSPF is doing what we want. First we check the ospf neighbors on spoke router R2</p><!--kg-card-begin: html--><pre>R2#sh ip ospf neighbor 

Neighbor ID     Pri   State           Dead Time   Address        Interface
10.10.10.2        1   FULL/DR         00:01:54    10.1.1.1       Tunnel1
10.10.10.1        1   FULL/DR         00:01:55    10.0.0.1       Tunnel0</pre><!--kg-card-end: html--><p>Then we can check corporate subnet 10.10.10.0/24 and other spokes (here R3&#x2032;s Loopback 3.3.3.3) are reachable via the primary hub router R0.</p><!--kg-card-begin: html--><pre>R2#sh ip route ospf
     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/11] via 10.0.0.3, 00:42:46, Tunnel0
     10.0.0.0/24 is subnetted, 4 subnets
O       10.10.10.0 [110/11] via 10.0.0.1, 00:42:46, Tunnel0
</pre><!--kg-card-end: html--><p>On the hub routers we can check the spoke routers are always reached via R0.</p><!--kg-card-begin: html--><pre>R0#sh ip route ospf
     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/11] via 10.0.0.2, 00:49:41, Tunnel0
     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/11] via 10.0.0.3, 00:49:41, Tunnel0
     10.0.0.0/24 is subnetted, 4 subnets
O       10.1.1.0 [110/101] via 10.10.10.2, 00:49:41, FastEthernet2/0

R1#sh ip route ospf
     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/12] via 10.10.10.1, 00:50:52, FastEthernet2/0
     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/12] via 10.10.10.1, 00:50:52, FastEthernet2/0
     10.0.0.0/24 is subnetted, 4 subnets
O       10.0.0.0 [110/11] via 10.10.10.1, 00:50:52, FastEthernet2/0</pre><!--kg-card-end: html--><p>Now that we have IP connectivity, we can <a href="https://www.exp-networks.be/dynamic-multipoint-vpn/">enable IPSec</a> exactly as we did last time.</p><!--kg-card-begin: html--><pre>crypto isakmp policy 10
authentication pre-share
crypto isakmp key cisco123 address 0.0.0.0 0.0.0.0
!
crypto ipsec transform-set mySet esp-aes esp-sha-hmac
!
crypto ipsec profile myDMVPN
set security-association lifetime seconds 120
set transform-set mySet
set pfs group2

interface Tunnel0
tunnel protection ipsec profile myDMVPN

interface Tunnel1
tunnel protection ipsec profile myDMVPN
</pre><!--kg-card-end: html--><p>That&#x2019;s all folks! Now we have a DMVPN setup with redundant hub routers&#x2026;</p>]]></content:encoded></item><item><title><![CDATA[ACE software upgrade]]></title><description><![CDATA[<p>Cisco Application Control Engine Module (ACE) load-balancers are designed to work in standalone mode or in cluster mode. When running in standalone mode, software upgrade has obviously a great impact on the traffic going through the load-balancer. All the sessions will be dropped and no new session will be accepted</p>]]></description><link>https://www.exp-networks.be/ace-software-upgrade/</link><guid isPermaLink="false">5f72ddf1d0c45900011ba7d7</guid><category><![CDATA[ACE]]></category><category><![CDATA[Cisco]]></category><category><![CDATA[Load-balancer]]></category><dc:creator><![CDATA[Christophe Lemaire]]></dc:creator><pubDate>Tue, 09 Feb 2010 23:00:00 GMT</pubDate><content:encoded><![CDATA[<p>Cisco Application Control Engine Module (ACE) load-balancers are designed to work in standalone mode or in cluster mode. When running in standalone mode, software upgrade has obviously a great impact on the traffic going through the load-balancer. All the sessions will be dropped and no new session will be accepted until the ACE restarts with the new image (up to 8 minutes).</p><p>Now, in cluster mode, you can do the software upgrade with no or very limited impact if you follow the correct sequence of operations. Here are the steps I used last time and it went perfectly and transparent for the users.</p><blockquote>Note this procedure has been tested on ACE modules for Catalyst 6500 only but it should stay valid for the ACE 4710 appliances.</blockquote><h2 id="step-1">Step 1</h2><p>First you need to make sure all the contexts are properly synchronized and the standby contexts are in STANDBY_HOT state.</p><!--kg-card-begin: html--><pre>ACE_1/Admin# sh ft group brief
FT Group ID: 1  My State:FSM_FT_STATE_ACTIVE
                Peer State:FSM_FT_STATE_STANDBY_HOT
                Context Name: Admin     Context Id: 0
FT Group ID: 2  My State:FSM_FT_STATE_ACTIVE
                Peer State:FSM_FT_STATE_STANDBY_COLD
                Context Name: C1        Context Id: 4
FT Group ID: 3  My State:FSM_FT_STATE_ACTIVE
                Peer State:FSM_FT_STATE_STANDBY_HOT
                Context Name: C2        Context Id: 3</pre><!--kg-card-end: html--><p>Here as you can see context C1 is stuck in STANDBY_COLD state. Usually put that context out of service on the <strong>standby ACE </strong>and then put it back in service solve the issue. If it is not the case you won&#x2019;t have a fully transparent software upgrade for that context; current session will be dropped but new session will be accepted after the failover. If it is acceptable for you, go on with the upgrade otherwise try to find out why it is not in STANDBY_HOT state.</p><p>Note it might take several minutes to leave the STANDBY_BULK state (it took 2 minutes during my tests).</p><!--kg-card-begin: html--><pre>ACE_2/Admin(config)# ft group 2
ACE_2/Admin(config-ft-group)# no inservice
ACE_2/Admin(config-ft-group)# do sh ft group 2 detail

FT Group                     : 2
No. of Contexts              : 1
Context Name                 : C1
Context Id                   : 4
Configured Status            : out-of-service
Maintenance mode             : MAINT_MODE_OFF
My State                     : FSM_FT_STATE_INIT
My Config Priority           : 90
My Net Priority              : 90
My Preempt                   : Enabled
Peer State                   : FSM_FT_STATE_UNKNOWN
Peer Config Priority         : Unknown
Peer Net Priority            : Unknown
Peer Preempt                 : Unknown
Peer Id                      : 1
Last State Change time       : Wed Feb  3 14:35:36 2010
Running cfg sync enabled     : Enabled
Running cfg sync status      :
Startup cfg sync enabled     : Enabled
Startup cfg sync status      :
Bulk sync done for ARP: 0
Bulk sync done for LB: 0
Bulk sync done for ICM: 0
ACE_2/Admin(config-ft-group)# inservice

NOTE: Configuration mode has been disabled on all sessions

ACE_2/Admin(config-ft-group)# do sh ft group 2 detail

FT Group                     : 2
No. of Contexts              : 1
Context Name                 : C1
Context Id                   : 4
Configured Status            : in-service
Maintenance mode             : MAINT_MODE_OFF
My State                     : FSM_FT_STATE_STANDBY_BULK
My Config Priority           : 90
My Net Priority              : 90
My Preempt                   : Enabled
Peer State                   : FSM_FT_STATE_ACTIVE
Peer Config Priority         : 120
Peer Net Priority            : 120
Peer Preempt                 : Enabled
Peer Id                      : 1
Last State Change time       : Wed Feb  3 14:36:02 2010
Running cfg sync enabled     : Enabled
Running cfg sync status      : Running configuration sync has completed
Startup cfg sync enabled     : Enabled
Startup cfg sync status      : Startup configuration sync has completed
Bulk sync done for ARP: 1
Bulk sync done for LB: 0
Bulk sync done for ICM: 0
ACE_2/Admin(config-ft-group)# do sh ft group 1 detail

FT Group                     : 2
No. of Contexts              : 1
Context Name                 : C1
Context Id                   : 4
Configured Status            : in-service
Maintenance mode             : MAINT_MODE_OFF
My State                     : FSM_FT_STATE_STANDBY_HOT
My Config Priority           : 90
My Net Priority              : 90
My Preempt                   : Enabled
Peer State                   : FSM_FT_STATE_ACTIVE
Peer Config Priority         : 120
Peer Net Priority            : 120
Peer Preempt                 : Enabled
Peer Id                      : 1
Last State Change time       : Wed Feb  3 14:37:51 2010
Running cfg sync enabled     : Enabled
Running cfg sync status      : Running configuration sync has completed
Startup cfg sync enabled     : Enabled
Startup cfg sync status      : Startup configuration sync has completed
Bulk sync done for ARP: 1
Bulk sync done for LB: 2
Bulk sync done for ICM: 2</pre><!--kg-card-end: html--><h2 id="step-2">Step 2</h2><p>On the ACE, preemption is enabled by default for all the &#xA0;contexts. It needs to be disabled to perform a manual failover.</p><!--kg-card-begin: html--><pre>ACE_1/Admin(config)# ft group 1
ACE_1/Admin(config-ft-group)# no preempt
ACE_1/Admin(config-ft-group)# ft group 2
ACE_1/Admin(config-ft-group)# no preempt
ACE_1/Admin(config-ft-group)# ft group 3
ACE_1/Admin(config-ft-group)# no preempt
ACE_1/Admin(config-ft-group)# end
</pre><!--kg-card-end: html--><h2 id="step-3">Step 3</h2><p>Download the new software image to the active and standby ACEs. Here I&#x2019;ve chosen to use tftp because I hadn&#x2019;t a ftp server configured in the lab&#x2026; ftp can be used and is definitely faster.</p><!--kg-card-begin: html--><pre>ACE_1/Admin# copy tftp: image:
Enter source filename[]? c6ace-t1k9-mz.A2_2_3.bin
Enter the destination filename[]? [c6ace-t1k9-mz.A2_2_3.bin]
Address of remote host[]? 10.1.1.1
Trying to connect to tftp server......
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
(&#x2026;)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
TFTP get operation was successful
 31361516 bytes copied
ACE_1/Admin#
ACE_1/Admin# dir image:
 30788103  Apr 15 13:14:48 2009 c6ace-t1k9-mz.A2_1_4a.bin
 31361516  Feb  3 14:43:45 2010 c6ace-t1k9-mz.A2_2_3.bin
          Usage for image: filesystem
          461848576 bytes total used
          577126400 bytes free
         1038974976 total bytes
</pre><!--kg-card-end: html--><p>Check the file size is correct&#x2026;</p><h2 id="step-4">Step 4</h2><p>Change the boot string on the active ACE, it will be synced to the standby ACE. By the way, configuration mode is disabled on the standby ACE therefore it is the only option&#x2026;</p><!--kg-card-begin: html--><pre>ACE_1/Admin# sh run | i boot
Generating configuration....
<strong>boot system image:c6ace-t1k9-mz.A2_1_4a.bin</strong>
ACE_1/Admin# conf t
Enter configuration commands, one per line.  End with CNTL/Z.
ACE_1/Admin(config)# <strong>no boot system image:c6ace-t1k9-mz.A2_1_4a.bin</strong>
ACE_1/Admin(config)# <strong>boot system image:c6ace-t1k9-mz.A2_2_3.bin</strong>
ACE_1/Admin(config)# exit
ACE_1/Admin# wr mem all
Generating configuration....
running config of context Admin saved
Generating configuration....
running config of context C2 saved
Generating configuration....
running config of context C1 saved
Please wait ... sync to compact flash in progress.

This may take a few minutes to complete

<strong>Sync Done</strong>
</pre><!--kg-card-end: html--><h2 id="step-5-optional-"><strong>Step 5 (optional)</strong></h2><p>Create checkpoint in all contexts on active and standby devices</p><!--kg-card-begin: html--><pre>ACE_2/Admin# checkpoint create 20100203
Generating configuration....
Created configuration checkpoint &apos;20100203&apos;
ACE_2/Admin# changeto C2

NOTE: Configuration mode has been disabled on all sessions

ACE_2/C2# checkpoint create 20100203
Generating configuration....
Created configuration checkpoint &apos;20100203&apos;
ACE_2/C2# changeto C1

NOTE: Configuration mode has been disabled on all sessions

ACE_2/C1# checkpoint create 20100203
Generating configuration....
Created configuration checkpoint &apos;20100203&apos;
ACE_2/C1# changeto Admin
</pre><!--kg-card-end: html--><h2 id="step-6">Step 6</h2><p>Reload the standby device</p><!--kg-card-begin: html--><pre>ACE_2/Admin# reload
This command will reboot the system
Save configurations for all the contexts. Save? [yes/no]: [yes] no 
<font color="blue">(already done in step 4)</font>
Perform system reload. [yes/no]: [yes]

NOTE: Configuration mode is enabled on all sessions

Connection to ACE_2 closed by remote host.
Connection to ACE_2 closed.
</pre><!--kg-card-end: html--><h2 id="step-7">Step 7</h2><p>Check the standby device is running the new software version.</p><!--kg-card-begin: html--><pre>ACE_2/Admin# sh ver
Cisco Application Control Software (ACSW)
TAC support: http://C2 .cisco.com/tac
Copyright (c) 2002-2009, Cisco Systems, Inc. All rights reserved.
The copyrights to certain works contained herein are owned by
other third parties and are used and distributed under license.
Some parts of this software are covered under the GNU Public
License. A copy of the license is available at
http://C2 .gnu.org/licenses/gpl.html.

Software
  loader:    Version 12.2[120]
  system:    Version <strong>A2(2.3)</strong> [build 3.0(0)A2(2.3)]
  system image file: [LCP] disk0:c6ace-t1k9-mz.A2_2_3.bin
  installed license: ACE-VIRT-020

Hardware
  Cisco ACE (slot: 6)
  cpu info:
    number of cpu(s): 2
    cpu type: SiByte
    cpu: 0, model: SiByte SB1 V0.2, speed: 700 MHz
    cpu: 1, model: SiByte SB1 V0.2, speed: 700 MHz
  memory info:
    total: 827128 kB, free: 256000 kB
    shared: 0 kB, buffers: 1824 kB, cached 0 kB
  cf info:
    filesystem: /dev/cf
    total: 1014624 kB, used: 451040 kB, available: 563584 kB

last boot reason:  reload command by Admin
configuration register:  0x1
ACE_2 kernel uptime is 0 days 0 hour 8 minute(s) 45 second(s)
</pre><!--kg-card-end: html--><h2 id="step-8">Step 8</h2><p>Wait until <strong>all the contexts</strong> on the standby devices stabilize in STANDBY_WARM or STANDBY_HOT state.</p><!--kg-card-begin: html--><pre>ACE_2/Admin# sh ft group brief

FT Group ID: 1  My State:FSM_FT_STATE_STANDBY_WARM
                Peer State:FSM_FT_STATE_ACTIVE
                Context Name: Admin     Context Id: 0
FT Group ID: 2  My State:FSM_FT_STATE_STANDBY_WARM
                Peer State:FSM_FT_STATE_ACTIVE
                Context Name: C1        Context Id: 4
FT Group ID: 3  My State:FSM_FT_STATE_STANDBY_WARM
                Peer State:FSM_FT_STATE_ACTIVE
                Context Name: C2        Context Id: 3
</pre><!--kg-card-end: html--><p>For your information, <a href="http://docwiki.cisco.com/wiki/Cisco_Application_Control_Engine_%28ACE%29_Module_Troubleshooting_Guide,_Release_A2%28x%29_--_Troubleshooting_Redundancy#About_WARM_COMPATIBLE_and_STANDBY_WARM">here is what Cisco says about STANDBY_WARM state</a> :</p><blockquote>In the STANDBY_WARM state, as with the STANDBY_HOT state, configuration mode is disabled on the standby ACE and configuration and state synchronization continues. A failover from the active to the standby based on priorities and preempt can still occur while the standby is in the STANDBY_WARM state. However, <strong>while stateful failover is possible for a WARM standby, it is not guaranteed</strong>. In general, modules should be allowed to remain in this state only for a short period.</blockquote><h2 id="step-9">Step 9</h2><p>Perform a failover from the active ACE to the standby ACE for all the contexts.</p><!--kg-card-begin: html--><pre>ACE_1/Admin# ft switchover all
This command will cause card to switchover (yes/no)?  [no] yes

NOTE: Configuration mode has been disabled on all sessions
</pre><!--kg-card-end: html--><h2 id="step-10">Step 10</h2><p>Check the newly upgraded ACE is well become active.</p><!--kg-card-begin: html--><pre>ACE_1/Admin# sh ft group brief

FT Group ID: 1  My State:FSM_FT_STATE_STANDBY_BULK
                Peer State:FSM_FT_STATE_ACTIVE
                Context Name: Admin     Context Id: 0
FT Group ID: 2  My State:FSM_FT_STATE_STANDBY_BULK
                Peer State:FSM_FT_STATE_ACTIVE
                Context Name: C1        Context Id: 4
FT Group ID: 3  My State:FSM_FT_STATE_STANDBY_BULK
                Peer State:FSM_FT_STATE_ACTIVE
                Context Name: C2        Context Id: 3
</pre><!--kg-card-end: html--><h2 id="step-11">Step 11</h2><p>Reload the 2<sup>nd</sup> ACE (previously active).</p><!--kg-card-begin: html--><pre>ACE_1/Admin# reload
This command will reboot the system
Save configurations for all the contexts. Save? [yes/no]: [yes] no
Perform system reload. [yes/no]: [yes]

NOTE: Configuration mode is enabled on all sessions

Connection to ACE_1 closed by remote host.
Connection to ACE_1 closed.
</pre><!--kg-card-end: html--><h2 id="step-12">Step 12</h2><p>When the 2<sup>nd</sup> ACE state stabilize to FSM_FT_STATE_STANDBY_HOT state, perform again a failover for all the contexts.</p><!--kg-card-begin: html--><pre>ACE_2/Admin# sh ft group brief

FT Group ID: 1  My State:FSM_FT_STATE_ACTIVE
                Peer State:FSM_FT_STATE_STANDBY_HOT
                Context Name: Admin     Context Id: 0
FT Group ID: 2  My State:FSM_FT_STATE_ACTIVE
                Peer State:FSM_FT_STATE_STANDBY_HOT
                Context Name: C1        Context Id: 4
FT Group ID: 3  My State:FSM_FT_STATE_ACTIVE
                Peer State:FSM_FT_STATE_STANDBY_HOT
                Context Name: C2        Context Id: 3
</pre><!--kg-card-end: html--><h2 id="step-13-if-you-re-not-superstitious-">Step 13 (If you&#x2019;re not superstitious)</h2><p>Reconfigure preemption if it is in your standard&#x2026; (personally I don&#x2019;t like preemption because if a device has failed I prefer to check exactly why before activating it again)</p><!--kg-card-begin: html--><pre>ACE_1/Admin(config)# ft group 1
ACE_1/Admin(config-ft-group)# preempt
ACE_1/Admin(config-ft-group)# ft group 2
ACE_1/Admin(config-ft-group)# preempt
ACE_1/Admin(config-ft-group)# ft group 3
ACE_1/Admin(config-ft-group)# preempt
ACE_1/Admin(config-ft-group)# end
ACE_1/Admin# wr mem
</pre><!--kg-card-end: html--><p>And that&#x2019;s it, you have upgraded your ACE cluster with no or limited impact. If you find this post helpful you may leave a comment to encourage me to publish more articles&#x2026;</p>]]></content:encoded></item><item><title><![CDATA[Dynamic Multipoint VPN]]></title><description><![CDATA[<p>Ever wonder how to provision several hundreds of VPNs from remote offices with dynamic IP to a central site with minimal configuration? <a href="http://www.cisco.com/">Cisco </a>offer an elegant &#xA0;solution called Dynamic Multipoint VPN. With DMVPN the central site does not need to know the remote site IP in advance, it will</p>]]></description><link>https://www.exp-networks.be/dynamic-multipoint-vpn/</link><guid isPermaLink="false">5f71f2ccd0c45900011ba687</guid><category><![CDATA[Cisco]]></category><category><![CDATA[Networks]]></category><category><![CDATA[Security]]></category><category><![CDATA[VPN]]></category><dc:creator><![CDATA[Christophe Lemaire]]></dc:creator><pubDate>Tue, 22 Sep 2009 14:28:00 GMT</pubDate><media:content url="https://www.exp-networks.be/content/images/2020/09/DMVPN-single-1.png" medium="image"/><content:encoded><![CDATA[<img src="https://www.exp-networks.be/content/images/2020/09/DMVPN-single-1.png" alt="Dynamic Multipoint VPN"><p>Ever wonder how to provision several hundreds of VPNs from remote offices with dynamic IP to a central site with minimal configuration? <a href="http://www.cisco.com/">Cisco </a>offer an elegant &#xA0;solution called Dynamic Multipoint VPN. With DMVPN the central site does not need to know the remote site IP in advance, it will learn it via NHRP protocol when the remote router will come up.</p><figure class="kg-card kg-image-card kg-width-wide"><img src="https://www.exp-networks.be/content/images/2020/09/DMVPN-single.png" class="kg-image" alt="Dynamic Multipoint VPN" loading="lazy" width="1368" height="852" srcset="https://www.exp-networks.be/content/images/size/w600/2020/09/DMVPN-single.png 600w, https://www.exp-networks.be/content/images/size/w1000/2020/09/DMVPN-single.png 1000w, https://www.exp-networks.be/content/images/2020/09/DMVPN-single.png 1368w" sizes="(min-width: 1200px) 1200px"></figure><p>First we will create IP connectivity via GRE tunnels and NHRP then we will secure the GRE tunnels with IPSec.</p><p>The hub router will use a multipoint GRE interface for ease of management. That way we do not need to provision a new tunnel interface per remote office. In fact, the central router will not need to be reconfigured at all for any additional remote site.</p><p>Hub router R1:</p><blockquote><code>interface Tunnel0</code><br><code>ip address 10.10.10.1 255.255.255.0</code><br><code>ip nhrp network-id 1</code><br><code>tunnel source FastEthernet0/0</code><br><code>tunnel mode gre multipoint</code><br><code>tunnel key 1</code></blockquote><blockquote><code>interface Fa0/0</code><br><code>ip address 1.1.1.2 255.255.255.0</code></blockquote><blockquote><code>ip route 0.0.0.0 0.0.0.0 1.1.1.1</code></blockquote><p>Spoke routers (R2 and R3 in this example) will use point-to-point GRE tunnel pointing to central site&#x2019;s hub router R1. NHRP will be configured to use R1 as next-hop server. With this setup, spoke-to-spoke traffic will flow through the hub making the hub a central point where you can enforce security&#x2026;</p><p>Spoke router R2:</p><blockquote><code>interface Tunnel0</code><br><code>ip address 10.10.10.2 255.255.255.0</code><br><code>ip nhrp map 10.10.10.1 1.1.1.2</code><br><code>ip nhrp network-id 1</code><br><code>ip nhrp nhs 10.10.10.1</code><br><code>tunnel source FastEthernet0/0</code><br><code>tunnel destination 1.1.1.2</code><br><code>tunnel key 1</code><br><br><code>interface Fa0/0</code><br><code>ip address 2.2.2.2 255.255.255.0</code><br><br><code>ip route 0.0.0.0 0.0.0.0 2.2.2.1</code></blockquote><p>Spoke router R3</p><blockquote><code>interface Tunnel0</code><br><code>ip address 10.10.10.3 255.255.255.0</code><br><code>ip nhrp map 10.10.10.1 1.1.1.2</code><br><code>ip nhrp network-id 1</code><br><code>ip nhrp nhs 10.10.10.1</code><br><code>tunnel source FastEthernet0/0</code><br><code>tunnel destination 1.1.1.2</code><br><code>tunnel key 1</code><br><br><code>interface Fa0/0</code><br><code>ip address 3.3.3.2 255.255.255.0</code><br><br><code>ip route 0.0.0.0 0.0.0.0 3.3.3.1</code></blockquote><p>At this stage, if the router can communicate with each others via their Fa0/0 interface then the GRE tunnels are usable. In this example, &#x201C;Internet&#x201D; router is directly connected to all the routers and the routers R1, R2 and R3 simply have a default route pointing to the &#x201C;Internet&#x201D; router.</p><p>To check the GRE tunnels are operational, we only have to ping the tunnels&#x2019; internal IP from one router to the others two.</p><blockquote><code>R2#ping 10.10.10.1</code></blockquote><blockquote><code>Type escape sequence to abort.</code><br><code>Sending 5, 100-byte ICMP Echos to 10.10.10.1, timeout is 2 seconds:</code><br><code>!!!!!</code><br><code>Success rate is 100 percent (5/5), round-trip min/avg/max = 272/313/420 ms</code><br><code>R2#ping 10.10.10.3</code></blockquote><blockquote><code>Type escape sequence to abort.</code><br><code>Sending 5, 100-byte ICMP Echos to 10.10.10.3, timeout is 2 seconds:</code><br><code>!!!!!</code><br><code>Success rate is 100 percent (5/5), round-trip min/avg/max = 312/564/876 ms</code></blockquote><p>If we check the NHRP entries on the hub R1, we can see the two entries have been learned dynamically and the public IP used by the remote routers.</p><blockquote><code>R1#sh ip nhrp</code><br><code>10.10.10.2/32 via 10.10.10.2, Tunnel0 created 00:11:31, expire 01:48:28</code><br><code>Type: <strong>dynamic</strong>, Flags: authoritative unique registered used</code><br><code>NBMA address: <strong>2.2.2.2</strong></code><br><code>10.10.10.3/32 via 10.10.10.3, Tunnel0 created 00:08:19, expire 01:51:52</code><br><code>Type: <strong>dynamic</strong>, Flags: authoritative unique registered used</code><br><code>NBMA address: <strong>3.3.3.2</strong></code></blockquote><p>Same info without the timers&#x2026;</p><blockquote><code>R1#sh ip nhrp brief</code><br><code>Target &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0;Via &#xA0; &#xA0; &#xA0; &#xA0; NBMA &#xA0; &#xA0; &#xA0; &#xA0;Mode &#xA0; Intfc &#xA0; Claimed</code><br><code>10.10.10.2/32 &#xA0; &#xA0; 10.10.10.2 &#xA0;2.2.2.2 &#xA0; &#xA0; dynamic &#xA0;Tu0 &#xA0; &#xA0;&lt; &#xA0;&gt;</code><br><code>10.10.10.3/32 &#xA0; &#xA0; 10.10.10.3 &#xA0;3.3.3.2 &#xA0; &#xA0; dynamic &#xA0;Tu0 &#xA0; &#xA0;&lt; &#xA0;&gt;</code></blockquote><p>Statistics about the NHRP protocol itself</p><blockquote><code>R1#sh ip nhrp traffic</code><br><code>Tunnel0</code><br><code>Sent: Total 3</code><br><code>0 Resolution Request &#xA0;0 Resolution Reply &#xA0;0 Registration Request</code><br><code>3 Registration Reply &#xA0;0 Purge Request &#xA0;0 Purge Reply</code><br><code>0 Error Indication</code><br><code>Rcvd: Total 3</code><br><code>0 Resolution Request &#xA0;0 Resolution Reply &#xA0;3 Registration Request</code><br><code>0 Registration Reply &#xA0;0 Purge Request &#xA0;0 Purge Reply</code><br><code>0 Error Indication</code><br><br><code>R1#sh ip nhrp summary</code><br><code>IP NHRP cache 2 entries, 496 bytes</code><br><code>0 static &#xA0;2 dynamic &#xA0;0 incomplete</code></blockquote><p>On the spoke routers we can check the same&#x2026; Here we can see the NHRP entry is statically defined</p><blockquote><code>R3#sh ip nhrp</code><br><code>10.10.10.1/32 via 10.10.10.1, Tunnel0 created 00:13:31, never expire</code><br><code>Type: <strong>static</strong>, Flags: authoritative</code><br><code>NBMA address: <strong>1.1.1.2</strong></code></blockquote><blockquote><code>R3#sh ip nhrp summary</code><br><code>IP NHRP cache 1 entry, 248 bytes</code><br><code>1 static &#xA0;0 dynamic &#xA0;0 incomplete</code></blockquote><p>And we can check the NHRP&#x2019;s next-hop server used.</p><blockquote><code>R3#sh ip nhrp nhs</code><br><code>Legend:</code><br><code>E=Expecting replies</code><br><code>R=Responding</code><br><br><code>Tunnel0:</code><br><code>10.10.10.1 &#xA0; &#xA0; &#xA0; RE</code><br></blockquote><p>Should you want to allow spoke-to-spoke tunnels to be built dynamically, you only need to replace the &#xA0;<code>tunnel destination 1.1.1.2</code> command on the spokes by <code>tunnel mode gre multipoint</code> making the spokes&#x2019; tunnel interface an mGRE interface. For the remaining of this article, we won&#x2019;t use mGRE interfaces on the spokes.</p><p>Now that we have IP connectivity, we still have to secure those dynamically created GRE tunnels with IPSec. Here for simplicity we will use pre-shared key as authentication method which is not recommended for production deployment&#x2026;</p><p>On the hub and spoke routers, just configure ISAKMP/IPSec parameters and enable IPSec on the tunnel insterfaces.</p><blockquote><code>crypto isakmp policy 10</code><br><code>authentication pre-share</code><br><code>crypto isakmp key cisco123 address 0.0.0.0 0.0.0.0</code><br><code>!</code><br><code>crypto ipsec transform-set mySet esp-aes esp-sha-hmac</code><br><code>!</code><br><code>crypto ipsec profile myDMVPN</code><br><code>set security-association lifetime seconds 120</code><br><code>set transform-set mySet</code><br><code>set pfs group2</code></blockquote><blockquote><code>interface Tunnel0</code><br><code>tunnel protection ipsec profile myDMVPN</code><br></blockquote><p>Check IPSec SA are well negotiated</p><blockquote><code>R1#sh crypto ipsec sa</code><br><br><code>interface: Tunnel0</code><br><code>Crypto map tag: Tunnel0-head-0, local addr 1.1.1.2</code><br><br><code>protected vrf: (none)</code><br><code>local &#xA0;ident (addr/mask/prot/port): (1.1.1.2/255.255.255.255/47/0)</code><br><code>remote ident (addr/mask/prot/port): (2.2.2.2/255.255.255.255/47/0)</code><br><code>current_peer 2.2.2.2 port 500</code><br><code>PERMIT, flags={origin_is_acl,}</code><br><code>#pkts encaps: 121, #pkts encrypt: 121, #pkts digest: 121</code><br><code>#pkts decaps: 121, #pkts decrypt: 121, #pkts verify: 121</code><br><code>#pkts compressed: 0, #pkts decompressed: 0</code><br><code>#pkts not compressed: 0, #pkts compr. failed: 0</code><br><code>#pkts not decompressed: 0, #pkts decompress failed: 0</code><br><code>#send errors 0, #recv errors 0</code><br><br><code>local crypto endpt.: 1.1.1.2, remote crypto endpt.: 2.2.2.2</code><br><code>path mtu 1500, ip mtu 1500, ip mtu idb FastEthernet0/0</code><br><code>current outbound spi: 0xA2BC2FED(2730242029)</code><br><br><code>inbound esp sas:</code><br><code>spi: 0x2884EDEA(679800298)</code><br><code>transform: esp-aes esp-sha-hmac ,</code><br><code>in use settings ={Tunnel, }</code><br><code>conn id: 2005, flow_id: SW:5, crypto map: Tunnel0-head-0</code><br><code>sa timing: remaining key lifetime (k/sec): (4463708/83)</code><br><code>IV size: 16 bytes</code><br><code>replay detection support: Y</code><br><code>Status: ACTIVE</code><br><br><code>inbound ah sas:</code><br><br><code>inbound pcp sas:</code><br><br><code>outbound esp sas:</code><br><code>spi: 0xA2BC2FED(2730242029)</code><br><code>transform: esp-aes esp-sha-hmac ,</code><br><code>in use settings ={Tunnel, }</code><br><code>conn id: 2004, flow_id: SW:4, crypto map: Tunnel0-head-0</code><br><code>sa timing: remaining key lifetime (k/sec): (4463708/82)</code><br><code>IV size: 16 bytes</code><br><code>replay detection support: Y</code><br><code>Status: ACTIVE</code><br><br><code>outbound ah sas:</code><br><br><code>outbound pcp sas:</code></blockquote><p>That&#x2019;s it! The DMVPN setup is ready for wide deployment&#x2026; Of course central hub router should be duplicated for redundancy, it will exposed in a future post.</p><p>Thanks for leaving a comment if you found this useful</p>]]></content:encoded></item></channel></rss>