{"id":1716,"date":"2020-10-31T17:43:00","date_gmt":"2020-10-31T16:43:00","guid":{"rendered":"https:\/\/blog.mhasin.eu\/?p=1716"},"modified":"2020-11-07T13:07:13","modified_gmt":"2020-11-07T12:07:13","slug":"windows-dns-anycast","status":"publish","type":"post","link":"https:\/\/blog.mhasin.eu\/?p=1716","title":{"rendered":"Windows DNS anycast"},"content":{"rendered":"\n<p>3 servery:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/docs.microsoft.com\/en-us\/windows-server\/networking\/media\/anycast\/anycast-lab.png\" alt=\"Lab setup for native BGP Anycast DNS demo\"\/><\/figure>\n\n\n\n<p>NS1 a NS2  node:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$primary_interface = (Get-NetAdapter |?{$_.Status -eq \"Up\" -and !$_.Virtual}).Name\n$loopback_ipv4 = '51.51.51.51'\n$loopback_ipv4_length = '32'\n$loopback_name = 'Loopback'\nInstall-Module -Name LoopbackAdapter -MinimumVersion 1.2.0.0 -Force\nImport-Module -Name LoopbackAdapter\nNew-LoopbackAdapter -Name $loopback_name -Force\n$interface_loopback = Get-NetAdapter -Name $loopback_name\n$interface_main = Get-NetAdapter -Name $primary_interface\nSet-NetIPInterface -InterfaceIndex $interface_loopback.ifIndex -InterfaceMetric \"254\" -WeakHostReceive Enabled -WeakHostSend Enabled -DHCP Disabled\nSet-NetIPInterface -InterfaceIndex $interface_main.ifIndex -WeakHostReceive Enabled -WeakHostSend Enabled\nSet-NetIPAddress -InterfaceIndex $interface_loopback.ifIndex -SkipAsSource $True\nGet-NetAdapter $loopback_name | Set-DNSClient \u2013RegisterThisConnectionsAddress $False\nNew-NetIPAddress -InterfaceAlias $loopback_name -IPAddress $loopback_ipv4 -PrefixLength $loopback_ipv4_length -AddressFamily ipv4\nDisable-NetAdapterBinding -Name $loopback_name -ComponentID ms_msclient\nDisable-NetAdapterBinding -Name $loopback_name -ComponentID ms_pacer\nDisable-NetAdapterBinding -Name $loopback_name -ComponentID ms_server\nDisable-NetAdapterBinding -Name $loopback_name -ComponentID ms_lltdio\nDisable-NetAdapterBinding -Name $loopback_name -ComponentID ms_rspndr<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>GW:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Install-WindowsFeature RemoteAccess\nInstall-WindowsFeature RSAT-RemoteAccess-PowerShell\nInstall-WindowsFeature Routing\nInstall-RemoteAccess -VpnType RoutingOnly\nAdd-BgpRouter -BgpIdentifier \u201c10.10.10.254\u201d -LocalASN 8075\nAdd-BgpPeer -Name \"DC001\" -LocalIPAddress 10.10.10.254 -PeerIPAddress 10.10.10.1 -PeerASN 65511 \u2013LocalASN 8075<\/code><\/pre>\n\n\n\n<p>NS1:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Install-WindowsFeature RemoteAccess\nInstall-WindowsFeature RSAT-RemoteAccess-PowerShell\nInstall-WindowsFeature Routing\nInstall-RemoteAccess -VpnType RoutingOnly\nAdd-BgpRouter -BgpIdentifier \u201c10.10.10.1\u201d -LocalASN 65511\nAdd-BgpPeer -Name \"Labgw\" -LocalIPAddress 10.10.10.1 -PeerIPAddress 10.10.10.254 -PeerASN 8075 \u2013LocalASN 65511\nAdd-BgpCustomRoute -Network 51.51.51.0\/24\n<\/code><\/pre>\n\n\n\n<p>NS2:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Install-WindowsFeature RemoteAccess\nInstall-WindowsFeature RSAT-RemoteAccess-PowerShell\nInstall-WindowsFeature Routing\nInstall-RemoteAccess -VpnType RoutingOnly\nAdd-BgpRouter -BgpIdentifier \"10.10.10.2\" -LocalASN 65511\nAdd-BgpPeer -Name \"Labgw\" -LocalIPAddress 10.10.10.2 -PeerIPAddress 10.10.10.254 -PeerASN 8075 \u2013LocalASN 65511\nAdd-BgpCustomRoute -Network 51.51.51.0\/24\n<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#47;&#47;the-packet-thrower.com\/2017\/05\/13\/fun-with-windows-bgp-routing\/\n<\/code><\/pre>\n<div class=\"pdf24Plugin-cp\"> \t<form name=\"pdf24Form0\" method=\"post\" action=\"https:\/\/doc2pdf.pdf24.org\/wordpress.php\" target=\"pdf24PopWin\" onsubmit=\"var pdf24Win = window.open('about:blank', 'pdf24PopWin', 'resizable=yes,scrollbars=yes,width=600,height=250,left='+(screen.width\/2-300)+',top='+(screen.height\/3-125)+''); pdf24Win.focus(); if(typeof pdf24OnCreatePDF === 'function'){void(pdf24OnCreatePDF(this,pdf24Win));}\"> \t\t<input type=\"hidden\" name=\"blogCharset\" value=\"Cw1x07UAAA==\" \/><input type=\"hidden\" name=\"blogPosts\" value=\"MwQA\" \/><input type=\"hidden\" name=\"blogUrl\" value=\"yygpKSi20tdPyslP18vNSCzOzNNLLQUA\" \/><input type=\"hidden\" name=\"blogName\" value=\"c\/LxdwcA\" \/><input type=\"hidden\" name=\"blogValueEncoding\" value=\"gzdeflate base64\" \/><input type=\"hidden\" name=\"postId_0\" value=\"MzQ3NAMA\" \/><input type=\"hidden\" name=\"postTitle_0\" value=\"C8\/MS8kvL1Zw8QtWSMyrTE4sLgEA\" \/><input type=\"hidden\" name=\"postLink_0\" value=\"yygpKSi20tdPyslP18vNSCzOzNNLLdW3L7A1NDc0AwA=\" \/><input type=\"hidden\" name=\"postAuthor_0\" value=\"y00syfcwNAIA\" \/><input type=\"hidden\" name=\"postDateTime_0\" value=\"MzIwMtA1NNA1NlQwNLcyNLAyMAAA\" \/><input type=\"hidden\" name=\"postContent_0\" value=\"5VbNbuM2EL7rKVjVaNoDJcuJm2LruHDsJmsgcY0oTY4GLY1twhTJJal4jW6BvEOv7cvlSTqy\/BfHXmyQAj2sIVgS54cz8818otfQzWNiwTyAmb9rhLrp4a8x4uPcAEkEs\/bMn2k6FCqZUp6xMfjNBs\/GJIVEpVyOz3xm5zLxiTXJmT9xTtt3YZiqxAYZT4y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\/gU=\" \/> \t\t<a href=\"https:\/\/www.pdf24.org\" target=\"_blank\" title=\"www.pdf24.org\" rel=\"nofollow\"><img src=\"https:\/\/blog.mhasin.eu\/wp-content\/plugins\/pdf24-post-to-pdf\/img\/pdf_32x32.png\" alt=\"\" border=\"0\" height=\"32\" \/><\/a> \t\t<span class=\"pdf24Plugin-cp-space\">&nbsp;&nbsp;<\/span> \t\t<span class=\"pdf24Plugin-cp-text\">Send article as PDF<\/span> \t\t<span class=\"pdf24Plugin-cp-space\">&nbsp;&nbsp;<\/span> \t\t<input class=\"pdf24Plugin-cp-input\" style=\"margin: 0px;\" type=\"text\" name=\"sendEmailTo\" placeholder=\"Enter email address\" \/> \t\t<input class=\"pdf24Plugin-cp-submit\" style=\"margin: 0px;\" type=\"submit\" value=\"Send\" \/> \t<\/form> <\/div>","protected":false},"excerpt":{"rendered":"3 servery: NS1 a NS2 node: GW: NS1: NS2: &nbsp;&nbsp; Send article as PDF &nbsp;&nbsp;\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"arc_restricted_post":false,"footnotes":""},"categories":[20,6],"tags":[],"class_list":["post-1716","post","type-post","status-publish","format-standard","hentry","category-active-directory","category-windows"],"_links":{"self":[{"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=\/wp\/v2\/posts\/1716","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1716"}],"version-history":[{"count":7,"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=\/wp\/v2\/posts\/1716\/revisions"}],"predecessor-version":[{"id":1736,"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=\/wp\/v2\/posts\/1716\/revisions\/1736"}],"wp:attachment":[{"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1716"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1716"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1716"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}