{"id":436,"date":"2026-06-27T10:18:17","date_gmt":"2026-06-27T10:18:17","guid":{"rendered":"https:\/\/ip4.market\/blog\/436-2\/"},"modified":"2026-06-27T10:18:18","modified_gmt":"2026-06-27T10:18:18","slug":"ipv4-bgp-best-practices-a-configuration-guide","status":"publish","type":"post","link":"https:\/\/ip4.market\/blog\/ipv4-bgp-best-practices-a-configuration-guide\/","title":{"rendered":"IPv4 BGP Best Practices: A Configuration Guide"},"content":{"rendered":"<p>Run <strong>IPv4 BGP Best Practices<\/strong> right and you sleep better. Get them wrong, and well\u2014you know the drill. Outages, route leaks, the works. For network engineers and IT managers, the Border Gateway Protocol is essentially the glue holding the internet together. But it\u2019s fragile. This guide cuts through the theory to give you actionable advice on optimizing your configuration for IPv4 blocks, keeping your enterprise network from becoming a case study.<\/p>\n<div class=\"tools-toc\">\n<strong>In this article:<\/strong><\/p>\n<ol>\n<li><a href=\"#planning-and-preparation\">Planning and Preparation<\/a><\/li>\n<li><a href=\"#security-and-authentication\">Security and Authentication<\/a><\/li>\n<li><a href=\"#route-filtering-and-policy\">Route Filtering and Policy<\/a><\/li>\n<li><a href=\"#optimizing-route-selection\">Optimizing Route Selection<\/a><\/li>\n<li><a href=\"#monitoring-and-validation\">Monitoring and Validation<\/a><\/li>\n<\/ol>\n<\/div>\n<h2 id=\"planning-and-preparation\">Planning and Preparation<\/h2>\n<p>Don&#8217;t touch a command line yet. Proper planning comes first. It starts with your IP space\u2014how you acquire it and how you manage it. Maybe you&#8217;re bringing your own addresses (BYOIP) to a cloud setup, or perhaps you&#8217;re establishing multi-homing with different ISPs. Either way, the cleanliness of your IPv4 block is non-negotiable.<\/p>\n<div class=\"result-box\">\n<strong>Tip:<\/strong> Check your registration. Make sure your IPv4 addresses are correctly registered in regional internet registries (RIRs) like ARIN, RIPE, or APNIC. Bad WHOIS data? Upstream providers will filter you, and it\u2019s a headache to fix.\n<\/div>\n<p>Expanding the network often means acquiring more blocks. It&#8217;s a messy market. Working with a trusted marketplace like <a href=\"https:\/\/ip4.market\">IP4 Market<\/a> simplifies this. You get verified blocks from reputable sellers, which streamlines the transfer process and, honestly, saves you from the nightmare of administrative rejection during the RIR transfer.<\/p>\n<h2 id=\"security-and-authentication\">Security and Authentication<\/h2>\n<p>Security is the bedrock of <strong>IPv4 BGP Best Practices<\/strong>. Let&#8217;s be honest: BGP was designed in a trusting era. The internet isn&#8217;t like that anymore. You need rigid controls to stop route hijacking and unauthorized peering before they start.<\/p>\n<h3>TTL Security and MD5<\/h3>\n<p>Some of the best fixes are the oldest ones. Enable TCP MD5 signatures for your BGP sessions. It adds a cryptographic checksum to the segments. Spoofed TCP packets can&#8217;t tear down a session if they don&#8217;t have the key.<\/p>\n<p>Then, turn on TTL Security (BGP TTL Security Check). Standard EBGP uses a TTL of 1. TTL Security checks for a TTL of 255\u2014the maximum. This means the packet must have originated from a directly connected neighbor. It shuts down remote attackers trying to inject routes.<\/p>\n<div class=\"result-box warning\">\n<strong>Warning:<\/strong> Don&#8217;t get lazy with security. Plain BGP communities aren&#8217;t enough. Implement MD5 passwords and, if your hardware supports it, use AO (Authentication Option) key chains. It&#8217;s worth the extra config time.\n<\/div>\n<h2 id=\"route-filtering-and-policy\">Route Filtering and Policy<\/h2>\n<p>You have to filter. It\u2019s that simple. Otherwise, you risk becoming a transit for traffic you shouldn&#8217;t carry, or worse, accepting bogus routes from the wild west of the internet.<\/p>\n<h3>Inbound Filtering<\/h3>\n<p>Be strict about what you accept from peers. Use prefix-lists to force your ISP to send only what they&#8217;re supposed to.<\/p>\n<ul>\n<li><strong>Max-length:<\/strong> If you own a \/24, don&#8217;t let your ISP send you a \/23 or a \/25 of that space. It breaks things.<\/li>\n<li><strong>RFC 1918 Filtering:<\/strong> Explicitly deny private ranges (10.0.0.0\/8, 192.168.0.0\/16, 172.16.0.0\/12) from external peers. They shouldn&#8217;t be there.<\/li>\n<li><strong>Bogon Filtering:<\/strong> Drop routes that have no business on the internet (martian addresses).<\/li>\n<\/ul>\n<h3>Outbound Filtering<\/h3>\n<p>Be a good neighbor. Advertise only the prefixes you actually own.<\/p>\n<ul>\n<li><strong>Prefix Summarization:<\/strong> Advertise aggregates where possible. It keeps the global routing tables manageable.<\/li>\n<li><strong>No Export:<\/strong> Make sure your customers aren&#8217;t using your network as a free ride to your other upstream providers, unless they paid for transit.<\/li>\n<\/ul>\n<div class=\"comparison-table\">\n<table>\n<thead>\n<tr>\n<th>Filter Type<\/th>\n<th>Purpose<\/th>\n<th>Recommendation<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Prefix-list<\/td>\n<td>Permits\/Denies specific IP prefixes<\/td>\n<td>Use for both inbound and outbound prefix limits.<\/td>\n<\/tr>\n<tr>\n<td>Route-map<\/td>\n<td>Modifies attributes (Local Pref, MED)<\/td>\n<td>Use for influencing path selection and tagging routes.<\/td>\n<\/tr>\n<tr>\n<td>AS-path Filter<\/td>\n<td>Filtering based on AS number path<\/td>\n<td>Use to prevent accepting routes containing your own ASN.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2 id=\"optimizing-route-selection\">Optimizing Route Selection<\/h2>\n<p>BGP path selection is a beast. It uses a complex algorithm of attributes. If you&#8217;re multi-homed, you need to ensure your traffic is actually using the most efficient exit point, not just the first one it sees.<\/p>\n<h3>Local Preference<\/h3>\n<p>The <strong>Local Preference<\/strong> (Local Pref) is the heavy hitter for outbound traffic inside your Autonomous System (AS). It&#8217;s standard <strong>IPv4 BGP Best Practice<\/strong> to use Local Pref to dictate which ISP handles your traffic.<\/p>\n<p>Here&#8217;s a common setup: set a higher Local Pref (say, 100) on routes from your primary ISP\u2014the cheaper or faster one. Set a lower one (like 50) on the backup. Traffic flows out the primary pipe. If that fails, you flip to the backup.<\/p>\n<h3>MED and AS-Path Prepending<\/h3>\n<p>Local Pref controls how you leave. <strong>MED (Multi-Exit Discriminator)<\/strong> and <strong>AS-Path Prepending<\/strong>? Those control how you come in.<\/p>\n<ul>\n<li><strong>MED:<\/strong> This suggests to a neighbor how to enter your AS. Use it when you have multiple connections to the <em>same<\/em> ISP.<\/li>\n<li><strong>AS-Path Prepending:<\/strong> You make your route look &#8220;longer&#8221; by adding your own ASN multiple times. It\u2019s a hack, but it works to de-prioritize a link for inbound traffic from a different ISP.<\/li>\n<\/ul>\n<div class=\"result-box\">\n<strong>Tip:<\/strong> When you grab new IPv4 blocks from a place like IP4 Market, check the reputation. You don&#8217;t want blacklisted IPs. Clean reputation means other ISPs will accept your routes without filtering them out due to past abuse.\n<\/div>\n<h2 id=\"monitoring-and-validation\">Monitoring and Validation<\/h2>\n<p>Configuration isn&#8217;t a &#8220;set it and forget it&#8221; task. Anyone who tells you otherwise is selling something. You need continuous monitoring to keep things honest.<\/p>\n<h3>RPKI (Resource Public Key Infrastructure)<\/h3>\n<p>RPKI is quickly becoming the industry standard. It cryptographically signs route origins so routers can validate that an ISP is actually authorized to advertise a specific prefix.<\/p>\n<p>Deploy RPKI validation on your edge routers. Configure the network to drop &#8220;Invalid&#8221; routes. It&#8217;s one of the most effective shields against route hijacks targeting your IPv4 blocks.<\/p>\n<h3>Looking Glasses and Route Collectors<\/h3>\n<p>Get into the habit of checking external looking glass servers. See how the internet views your prefixes. Ensure your announcements are propagating globally and aren&#8217;t getting filtered because of malformed attributes.<\/p>\n<div class=\"faq-block\">\n<h3>Frequently Asked Questions<\/h3>\n<p><strong>Q: Do I need a Public ASN to configure BGP?<\/strong><br \/>\nA: Yes. For direct public internet peering, you need a Public ASN (2-byte or 4-byte) and provider-independent (PI) IP space. Or, provider-aggregable (PA) space, but only with your ISP&#8217;s permission.<\/p>\n<p><strong>Q: Can I use BGP for internal routing?<\/strong><br \/>\nA: You can. iBGP is used within an AS, often in large enterprises or MPLS VPNs. That said, OSPF or IS-IS usually wins out for internal topology because they converge faster.<\/p>\n<\/div>\n<h2>Conclusion<\/h2>\n<p>Mastering <strong>IPv4 BGP Best Practices<\/strong> isn&#8217;t a destination; it&#8217;s an ongoing process. It takes rigorous security, precise filtering, and smart traffic engineering. As the IPv4 space dries up and the value of clean blocks goes up, keeping your routing environment stable is more critical than ever.<\/p>\n<p>Whether you&#8217;re expanding or swapping out hardware, sourcing your infrastructure from verified partners like <strong>IP4 Market<\/strong> gives you a solid foundation. Stick to these guidelines, and you keep your network resilient, secure, and running fast.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Run IPv4 BGP Best Practices right and you sleep better. Get them wrong, and well\u2014you know the drill. Outages, route leaks, the works. For network engineers and IT managers, the&#8230;<\/p>\n","protected":false},"author":1,"featured_media":438,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-436","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-networking"],"_links":{"self":[{"href":"https:\/\/ip4.market\/blog\/wp-json\/wp\/v2\/posts\/436","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ip4.market\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ip4.market\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ip4.market\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ip4.market\/blog\/wp-json\/wp\/v2\/comments?post=436"}],"version-history":[{"count":1,"href":"https:\/\/ip4.market\/blog\/wp-json\/wp\/v2\/posts\/436\/revisions"}],"predecessor-version":[{"id":437,"href":"https:\/\/ip4.market\/blog\/wp-json\/wp\/v2\/posts\/436\/revisions\/437"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ip4.market\/blog\/wp-json\/wp\/v2\/media\/438"}],"wp:attachment":[{"href":"https:\/\/ip4.market\/blog\/wp-json\/wp\/v2\/media?parent=436"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ip4.market\/blog\/wp-json\/wp\/v2\/categories?post=436"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ip4.market\/blog\/wp-json\/wp\/v2\/tags?post=436"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}