If i would like to do a BGP peering with someone do i need to have a direct connection to him? Meaning that we are in the same segment?

If not, would i be able to do a peering with someone even if i use a standard DSL connection (with static ip address).

What i don't understand here that when i announce my AS to someone and i have for instance the ip on my DSL link. If i now announce to someone, he will start sending packages addressed to this subnet to my DSL ip address. But does my DSL provider not throw away those packages as the are addressed to someone else, or if they are addressed to me, how do i know where they were originally addressed to?

  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer.
    – Ron Maupin
    Aug 15 '17 at 17:58

You can bring up a BGP session (though you will likely have to override the default TTL limit), the problem is actually sending the data.

"next hop IP address" is a local concept, used to look up the interface and MAC address (or equivilent for other interface types), sometimes used to look up a route in other routing protocols (for ibgp used with an igp) it never actually appears on the wire.

So to have meaningful peering you really want a connection between you and your peer that lets you send IP packets to each other without any intermediate routers looking at their IP headers and making routing descisions. That connection could be a dedicated point to point link. It could be a peering lan provided by an exchange point. It could be a tunnel of some sort.

Note that peering over tunnels has it's downsides, particularly if you ever get any downstreams it can easily cause loops.

  • Sounds like your answer has lost some packages at the end. Could you please try to send them again? Jan 10 '17 at 23:09

You must have IP connectivity to the BGP peer. It is unnecessary for the BGP peer to be adjacent; it can be several hops away.

  • What is about Peter Green saying that routers in between will look at the IP header? Is this not the case i am describing in my question that if i peer with someone to which i don't have i direct connection there will always be routers in between. Could you please edit your answer to be more specific in this point? Jan 10 '17 at 23:16

You need to peer with your ISP, or you need to create a tunnel to the network with which you want to peer. ASes (Autonomous Systems) are, by definition, autonomous, so you will have no control over what the other AS will or will not send to you. All you can do is advertise some or all of your prefixes to the other AS, and use any of the prefixes the other AS advertises to you.


Remember that BGP is an application that merely advertises prefixes between peers and rides on top of IP/TCP port 179. There already needs to be 'underlay' reachability between peers either by connected routes or other dynamic/static routing protocols.

eBGP requires directly-connected peers as the TTL=1 for those hellos. This can be overridden with the 'ebgp-multihop #' to set a different TTL. eBGP is by definition between two different autonomous systems (AS). This is typical for ISP connections

iBGP has a TTL of 255 so this can be peered across the enterprise within the same AS. This is typical for enterprise remote site connections or internal BGP as the main routing protocol of the enterprise.

With BGP you peer directly via IP address and not by multicasted hellos so static IP addressing is preferred as both sides of the peering need to match as it requires a TCP handshake for the peering to establish.

You are correct in that when you advertise a prefix to your ISP, the updates include your IP next-hop to point to your edge IP address. This is how the internet routers will route back to you.

If someone else in the internet advertises the same prefix via BGP, hopefully this does not happen as there is not much to do other than rely on backbone ISP filtering that will disregard the advertisement from other enterprises. As long as you have the route advertised first, oldest route wins between multiple paths from the ISP's perspective.

  • If would like to advertise addresses which have been assigned to me as a LIR i need a AS number for this right? And if i know do a BGP peering with someone i always peer with other AS numbers right? Jan 10 '17 at 23:12
  • Correct, the ISP can give you a private AS to peer to them or you can register for a public AS if you are large enough. Yes for an eBGP peering typically for an ISP you peer to their AS number. Jan 11 '17 at 17:40

Looks like you are trying to hijack another persons traffic? Otherwise, peer with your ISP (even if its dsl), as long as they accept and announce your AS/network.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.