<?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[Networks Adventure]]></title><description><![CDATA[Thoughts, stories and ideas.]]></description><link>https://blog.frommun.com/</link><image><url>https://blog.frommun.com/favicon.png</url><title>Networks Adventure</title><link>https://blog.frommun.com/</link></image><generator>Ghost 5.81</generator><lastBuildDate>Tue, 21 Apr 2026 19:22:04 GMT</lastBuildDate><atom:link href="https://blog.frommun.com/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Failover to Redundant ISP by 
Using PTP link]]></title><description><![CDATA[<p>In this article I would explain how to setup a failover to second ISP when you have multiple campuses with different ISPs.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blog.frommun.com/content/images/2024/04/StartingLayout.png" class="kg-image" alt loading="lazy" width="679" height="539" srcset="https://blog.frommun.com/content/images/size/w600/2024/04/StartingLayout.png 600w, https://blog.frommun.com/content/images/2024/04/StartingLayout.png 679w"><figcaption><span style="white-space: pre-wrap;">Starting Layout</span></figcaption></figure><p>To begin with we have two sites &quot;HQ&quot; and &quot;Branch&quot;. Each site has single ISP, NAT and DHCP. My &quot;ISPs&quot;</p>]]></description><link>https://blog.frommun.com/failover-to-redundant/</link><guid isPermaLink="false">662990899274380d81d0c67f</guid><dc:creator><![CDATA[Ruslan Mukhamediiarov]]></dc:creator><pubDate>Thu, 25 Apr 2024 01:28:23 GMT</pubDate><media:content url="https://blog.frommun.com/content/images/2024/04/00004-967541483.png" medium="image"/><content:encoded><![CDATA[<img src="https://blog.frommun.com/content/images/2024/04/00004-967541483.png" alt="Failover to Redundant ISP by 
Using PTP link"><p>In this article I would explain how to setup a failover to second ISP when you have multiple campuses with different ISPs.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blog.frommun.com/content/images/2024/04/StartingLayout.png" class="kg-image" alt="Failover to Redundant ISP by 
Using PTP link" loading="lazy" width="679" height="539" srcset="https://blog.frommun.com/content/images/size/w600/2024/04/StartingLayout.png 600w, https://blog.frommun.com/content/images/2024/04/StartingLayout.png 679w"><figcaption><span style="white-space: pre-wrap;">Starting Layout</span></figcaption></figure><p>To begin with we have two sites &quot;HQ&quot; and &quot;Branch&quot;. Each site has single ISP, NAT and DHCP. My &quot;ISPs&quot; are running BGP between each other. </p><p>With the current setup if uplink on one site goes down, that site would loose access to internet and would not be accessible.</p><p>To mitigate that we would add PTP link between our &quot;Edge&quot; routers and spin up dynamic routing, so when uplink goes down we would reach internet via other site&apos;s &quot;Edge&quot; router.</p><p></p><p><strong>Why Dynamic Routing?  </strong></p><p>Simple, with dynamic routing if we add another subnet routing information would update by itself, simplifying management of our &quot;Edge&quot; devices.</p><p>Choosing a right dynamic protocol can be a challenge. Depending on our needs we might want to use EIGRP, iBGP, OSPF or RIP(<em>please don&apos;t</em>).  Each protocol has benefits and drawbacks. In majority of a cases you would use OSPF, so that&apos;s what we are going to do in this example.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blog.frommun.com/content/images/2024/04/PTP-and-OSPF.png" class="kg-image" alt="Failover to Redundant ISP by 
Using PTP link" loading="lazy" width="667" height="532" srcset="https://blog.frommun.com/content/images/size/w600/2024/04/PTP-and-OSPF.png 600w, https://blog.frommun.com/content/images/2024/04/PTP-and-OSPF.png 667w"><figcaption><span style="white-space: pre-wrap;">PTP link added</span></figcaption></figure><p>And here is a code that I used to configure PTP with OSPF:</p><pre><code>enable
conf t
int gig0/2 ###interface of our PTP link
no shut 

ip address 192.168.254.1 255.255.255.252  ###ip for our PTP .2 for other side
ip nat inside ###would need this later when configuring NAT

router ospf 1111 ###starting OSPF with process id of 1111
network 192.168.254.0 255.255.255.252 area 0 
redistribute connected ###announce connected networks to OSPF

end
wr me</code></pre><p>After we configured OSPF on both ends it might take a few moments before we see this:</p><pre><code>00:52:08: %OSPF-5-ADJCHG: Process 1111, Nbr 192.168.254.1 on GigabitEthernet0/2 from LOADING to FULL, Loading Done</code></pre><p>This message tells us that we successfully exchanged routers with our OSPF neighbor. We can verify that we are see routes from OSPF by running:</p><pre><code>Edge-HQ#sh ip route ospf 
O E2 192.168.0.0 [110/20] via 192.168.254.2, 00:07:11, GigabitEthernet0/2</code></pre><p>Now we are exchanging information about our networks on different sites, but we still can&apos;t failover to other ISP. We need to tweak our NAT and allow OSFP to advertise default routes to neighbors. </p><p>My NAT is configured with following commands:</p><pre><code>###Edge-HQ

interface GigabitEthernet0/0
 ip address 1.1.1.2 255.255.255.252
 ip nat outside
 
interface GigabitEthernet0/1
 ip address 10.0.0.1 255.255.0.0
 ip nat inside
 
interface GigabitEthernet0/2
 ip address 192.168.254.1 255.255.255.252
 ip nat inside
 
ip nat inside source list 7 interface GigabitEthernet0/0 overload
access-list 7 permit 10.0.0.0 0.0.255.255

### &quot;7&quot; Here is a number of my access-list, you might want to change it


###Edge-Branch

interface GigabitEthernet0/0
 ip address 2.2.2.2 255.255.255.252
 ip nat outside

interface GigabitEthernet0/1
 ip address 192.168.0.1 255.255.255.0
 ip nat inside

interface GigabitEthernet0/2
 ip address 192.168.254.2 255.255.255.252
 ip nat inside

ip nat inside source list 7 interface GigabitEthernet0/0 overload
access-list 7 permit 192.168.0.0 0.0.0.255</code></pre><p>And to allow NAT of other site&apos;s network, I&apos;m going to add site network to access-list (ACL):</p><pre><code>###Edge-HQ
conf t
access-list 7 permit 192.168.0.0 0.0.0.255
end
wr me

#Edge-Branch
conf t
access-list 7 permit 10.0.0.0 0.0.255.255
end
wr me</code></pre><p>And finally adding advertisement for default routes via OSPF:</p><pre><code>###Apply this code to every &quot;Edge&quot; router
conf t
router ospf 1111
default-information originate
end
wr me</code></pre><p></p><p><strong>Testing failover</strong></p><p>Now when all the config is done, when I shut one of my uplinks I see following:</p><pre><code>Edge-Branch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Edge-Branch(config)#int gig
Edge-Branch(config)#int gigabitEthernet 0/0
Edge-Branch(config-if)#shut
Edge-Branch(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to administratively down
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to down
Edge-Branch#end
%SYS-5-CONFIG_I: Configured from console by console


Edge-Branch#sh ip route 
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is 192.168.254.1 to network 0.0.0.0

     192.168.0.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.0.0/24 is directly connected, GigabitEthernet0/1
L       192.168.0.1/32 is directly connected, GigabitEthernet0/1
     192.168.254.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.254.0/30 is directly connected, GigabitEthernet0/2
L       192.168.254.2/32 is directly connected, GigabitEthernet0/2
O*E2 0.0.0.0/0 [110/1] via 192.168.254.1, 00:08:38, GigabitEthernet0/2</code></pre><p>Default router for &quot;Edge-Branch&quot; changed to &quot;Edge-HQ&quot;. Branch router recognized that despite of not having uplink to ISP, it can reach internet via other edge router. </p><p>Another important note is that when packet is being received my ISP, it would come from public IP of site that sent said packet. In our case packet would have public IP of &quot;Edge-HQ&quot; router.</p><p>Another benefit of PTP link is that we can access resources in different site without S2S/L2L VPN tunnels. Here is me pinging &quot;Client-HQ&quot; from &quot;Client-Branch&quot;.</p><pre><code>C:\&gt;ping 192.168.0.2

Pinging 192.168.0.2 with 32 bytes of data:

Reply from 192.168.0.2: bytes=32 time=7ms TTL=128
Reply from 192.168.0.2: bytes=32 time=3ms TTL=128
Reply from 192.168.0.2: bytes=32 time=3ms TTL=128
Reply from 192.168.0.2: bytes=32 time=3ms TTL=128</code></pre><p></p><p><strong>Mitigating single point of failure for PTP link</strong></p><p>With current setup if our PTP link goes down we would loose access to recourses on other site.</p><p>There are a number of ways we can mitigate that:</p><p>1) Add another physical link and bond them in Etherchannel. </p><p>That would allow us to mitigate single link failure. Has a drawback of extra cost if we lease this link from provider, but no extra overhead.</p><p>2)Setup a GRE tunnel between edge routers across public internet. </p><p>While this would work and allow access to recourses, it does not provide encryption. And you would want encryption for your internal traffic. Slight overhead, might need to adjust MTU to 1476.</p><p>3)Setup a S2S/L2L VPN tunnel between edge routers across public internet.</p><p>This would work like a GRE tunnel with added benefit of encryption. Many decent enterprise or prosumer routers/firewalls have this option. Even more overhead, not only we need to receive traffic, we also need to decrypt it.</p><p></p><p><strong>VPN tunnels and routing</strong></p><p>When adding VPN tunnels to mitigate failure of PTP link, it is important to add choose  your routing accordingly. Now when you have two paths to choose from you need to determine primary. In my example choosing PTP for primary path is a natural choice, since it doesn&apos;t add overhead of encryption and requires less hops.</p><p>Here is when Administrative Distance (AD) comes in. Every route in router has AD, exact values are vendor dependent. When multiple routes exists for same network, route with lower AD is preferred.  </p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blog.frommun.com/content/images/2024/04/Cisco-AdministrativeDistance.JPG" class="kg-image" alt="Failover to Redundant ISP by 
Using PTP link" loading="lazy" width="400" height="340"><figcaption><span style="white-space: pre-wrap;">Cisco default AD table</span></figcaption></figure><p>Since a link with OSPF is my preferred path I need to make sure when adding static route for my tunnel I&apos;m going to use AD higher than 110. </p><pre><code>conf t
ip route 192.168.0.0 255.255.255.0 *tunnel IP* 250
end
wr me</code></pre><p>With that config when our PTP link goes down and routes are no longer learned via OSPF, we can reach &quot;Edge-Branch&quot; internal network via our tunnel. I would dive deeper into S2S/L2L VPN tunnels in my future guides.</p>]]></content:encoded></item><item><title><![CDATA[Mastering Network Traffic Control: A Guide to Influencing Traffic with BGP Attributes]]></title><description><![CDATA[<p><br>As a network engineer, one of the most powerful tools in your arsenal for managing and controlling network traffic is Border Gateway Protocol (BGP). BGP allows you to influence the flow of traffic within and across autonomous systems by manipulating various attributes associated with route advertisements. In this article, we&</p>]]></description><link>https://blog.frommun.com/mastering-network-traffic-control-a-guide-to-influencing-traffic-with-bgp-attributes/</link><guid isPermaLink="false">660624c49d9662182286c3c9</guid><dc:creator><![CDATA[Ruslan Mukhamediiarov]]></dc:creator><pubDate>Wed, 03 Apr 2024 22:36:59 GMT</pubDate><media:content url="https://blog.frommun.com/content/images/2024/04/00007-58383819.png" medium="image"/><content:encoded><![CDATA[<img src="https://blog.frommun.com/content/images/2024/04/00007-58383819.png" alt="Mastering Network Traffic Control: A Guide to Influencing Traffic with BGP Attributes"><p><br>As a network engineer, one of the most powerful tools in your arsenal for managing and controlling network traffic is Border Gateway Protocol (BGP). BGP allows you to influence the flow of traffic within and across autonomous systems by manipulating various attributes associated with route advertisements. In this article, we&apos;ll delve into the intricacies of BGP attributes and explore how you can use them effectively to shape and optimize network traffic according to your organization&apos;s needs.</p><p><br>Before we dive into the practical aspects of influencing network traffic, let&apos;s first establish a solid understanding of BGP attributes. BGP routes are accompanied by a set of attributes that describe various characteristics of the route. These attributes are crucial for BGP routers to make routing decisions. Some of the key BGP attributes include:</p><ol><li><strong>AS_Path:</strong> This attribute specifies the sequence of autonomous systems that a route has traversed. It helps prevent routing loops and influences the selection of the best path.</li><li><strong>Next Hop:</strong> The Next Hop attribute indicates the IP address of the next router along the path to the destination network.</li><li><strong>Weight:</strong> Weight is a Cisco-specific attribute used to influence the preferred route for outbound traffic from a router.</li><li><strong>Local Preference:</strong> Local Preference is an attribute used to influence the outbound routing decision within an autonomous system (AS).</li><li><strong>Multi-Exit Discriminator (MED):</strong> MED is used to influence the inbound routing decision when multiple entry points exist into an AS.</li><li><strong>Community:</strong> Communities are tags that can be attached to routes to influence routing policies within and across ASes.</li></ol><p><br>Now that we have a basic understanding of BGP attributes, let&apos;s explore how we can leverage them to influence network traffic:</p><p><strong>Inbound Traffic Management:</strong> Using attributes like AS_Path Prepending or MED, you can influence how traffic enters your network from external peers or providers. This allows you to control which entry points traffic takes into your network, thereby optimizing inbound traffic flows.</p><pre><code>router bgp 65001
  neighbor 203.0.113.1 remote-as 65002
  neighbor 203.0.113.1 route-map PrependAS out
  
route-map PrependAS permit 10
  match as-path 1
  set as-path prepend 65001 65001 65001 

This is an actual prepending, here we tell other AS how many ASes traffic would travesre until it reaches us. Traffic would choose path with less ASes.

clear ip bgp 203.0.113.1 soft

Here we gently clearing current sessions so traffic gently would choose new path 
when current sessions end</code></pre><p><strong>Outbound Traffic Control:</strong> By adjusting attributes like Local Preference or Weight, you can influence the selection of outbound routes from your network. This is particularly useful for directing traffic towards preferred egress points or optimizing the use of available network resources.</p><pre><code>router bgp 65001
  neighbor 192.0.2.1 remote-as 65002
  neighbor 192.0.2.1 route-map OutboundTrafficControl out
  
ip prefix-list Network-Prefixes seq 10 permit 10.0.0.0/24
route-map OutboundTrafficControl permit 10
  match ip address prefix-list Network-Prefixes
  set local-preference 200

Default local-preference 100. Traffic would choose path with higher local preference</code></pre><p><strong>Policy-based Routing:</strong> BGP communities provide a mechanism for implementing policy-based routing. By tagging routes with specific communities, you can apply routing policies based on predefined criteria such as geographic location, customer type, or service level agreements (SLAs).</p><p>Best Practices and Considerations:<br>While manipulating BGP attributes offers significant flexibility in controlling network traffic, it&apos;s essential to approach it with caution and adhere to best practices:</p><ul><li><strong>Document Your Changes:</strong> Keep detailed documentation of any BGP attribute modifications to ensure clarity and facilitate troubleshooting.</li><li><strong>Monitor and Analyze:</strong> Regularly monitor and analyze network traffic patterns to assess the effectiveness of your BGP attribute manipulations and make adjustments as necessary.</li><li><strong>Testing and Validation:</strong> Before implementing changes in a production environment, conduct thorough testing and validation to minimize the risk of disruptions. From my experience it is also a good idea to get a peer review.</li></ul><p>Conclusion:<br>In summary, BGP attributes are powerful tools that network engineers can use to influence the flow of traffic within and across their networks. By understanding the various BGP attributes and how they can be manipulated, you can effectively optimize network performance, improve reliability, and ensure efficient resource utilization. However, it&apos;s crucial to approach BGP attribute manipulation with care, following best practices and exercising caution to avoid unintended consequences. With careful planning and implementation, you can leverage BGP attributes to masterfully control network traffic according to your organization&apos;s specific requirements and objectives.</p>]]></content:encoded></item></channel></rss>