SPOTO is a unique IT training institute and has a 16-year experience in CCIE, CCNA, CCNP, AWS certification, etc, we will provide you with all kinds of technical support. now, we will introduce BGP.
The full name of BGP is the Border Gateway Protocol, and the corresponding Chinese is the Border Gateway Protocol. The name is more abstract, and the wiki Chinese explanation I think is better (the wiki English does not even have a similar explanation). BGP is a core decentralized autonomous routing protocol on the Internet. From this explanation, first of all, this is a routing protocol for the Internet. Its status is core (currently the most important, the only routing protocol used on the Internet), and its purpose is to decentralize to achieve various network autonomy. But still a bit abstract? Let's take a look at a few related concepts:
AS (Autonomous system): An autonomous system that refers to the entirety of all IP networks and routers under the jurisdiction of one (sometimes multiple) organizations that enforce a common routing policy for the Internet. That is to say, for the Internet, an AS is an independent overall network. Network autonomy implemented by BGP also refers to AS autonomy. Each AS has its own unique number.
IGP (Interior Gateway Protocol): An internal gateway protocol, a routing protocol used within an AS. Multiple routers can also manage multiple networks within an AS. Routing information is required between each router to know the reachability information of the sub-network. IGP is used to manage these routes. Representative implementations are RIP and OSPF.
EGP (Exterior Gateway Protocol): An external gateway protocol, a routing protocol used between multiple ASs, has now been phased out and replaced by BGP.
Since BGP was created to replace EGP, its status is similar to EGP. But BGP can also be applied inside an AS. Therefore, BGP can be further divided into IBGP (Interior BGP: the connection between the same AS) and EBGP (Exterior BGP: BGP connection between different ASs). Since EGP has been replaced, the existence of EBGP is better understood, but the IGP protocol is still alive (in this case, OSPF). What is the significance of IBGP? The IGP protocol is designed for the same AS network. The size of an autonomous network is generally small, so the design of the large-scale network is not considered. When an autonomous network is large enough, OSPF has a performance bottleneck (described later). BGP itself is designed to work on the Internet. It is designed to meet the requirements of large networks, so IBGP can be used inside large private IP networks. In general, these types of routing protocols, small-scale private network IGP, large-scale private network IBGP, Internet EBGP.
Why do you need BGP
BGP claims to be the protocol that makes the Internet work. It seems to be very important. Why is there little contact in normal life? It seems that there is no mention of BGP in the cloud. Let's take a look at the reasons.
Suppose you are building a cloud environment that provides virtual machine services.
The virtual machine in the cloud needs Internet access capability, so you apply for a public network IP to the ISP (Internet service provider), where the ISP can be Unicom, mobile, telecommunications, and so on. Virtual machines can convert their private IP to this public IP through the NAT/PAT (Network / Port address translation) of the router, and then you set the address of the ISP router as the default route on the router in the cloud. The IP packets after the address translation are sent to the ISP and sent to the Internet (this is also the principle that our home router can make the home device online). This way your version 1.0 cloud is simply online. You don't need BGP here.
What should I do after the version goes online? Of course, the next version is developed! The next version of the demand is to access virtual machines over the Internet (that is, accessing our home computers from the Internet). This is not difficult. Port forwarding can be used to map a port of a virtual machine to a port of a public network IP. For example, if the 22 port of the virtual machine is mapped to the 1122 port of the public network IP, then you can log in to the virtual machine through the Internet ssh to the public network IP: 1122. This part of the work is still done in the router in your cloud. In this way, your version 2.0 cloud is online, and you still don't need BGP here.
Version 2.0 supports access to virtual machines from the Internet, but there are still problems:
Each virtual machine needs to be mapped once for each open port.
Public network IP ports are limited
In order to solve these problems, you applied to the Unicom for some public IP addresses and assigned virtual network IPs to virtual machines that need to be accessed from the external network. So your version 3.0 cloud is online, and you still don't need BGP. because:
Unicom is the only ISP connected to your cloud. You can only access the Internet through China Unicom. Therefore, the default route of your router in the cloud can only be set to the address of the ISP router.
The public IP in your cloud is allocated by China Unicom. Unicom certainly knows which IP address to use as the next hop to access those IP addresses.
Unicom's IP is limited after all, and China Unicom is still disconnected. This is released in 3 versions.
First, you applied for your own public IP pool to the IANA (Internet Assigned Numbers Authority). Because you have your own public IP, you must also consider applying for an AS number. The AS number is a 16-bit number that shares more than 60,000 numbers worldwide. 1 – 64511 is the only one in the world, and 64512 – 65535 is self-contained, similar to the private network segment. Each autonomous network needs to apply for its own AS number. The AS a number of China Unicom is 9800.
Then, you bought the line separately from China Unicom and Telecom, so even if Unicom is disconnected, you can use telecommunications.
Now the question is coming:
· How does China Unicom or Telecom know what IP address you are applying for? In other words, I dialed in Unicom broadband now, how can I access the public IP of your cloud?
· Is the default route of your router in the cloud set to Unicom's ISP router, or is it telecommunications?
Finally, on your 4.0 version of the cloud, you need to use BGP. Through BGP, you can send routing information in your own cloud to China Unicom and Telecom, so that ISPs know how to access Xiao Ming's public network virtual machine, which means that our ordinary users can access your network through ISP. On the other hand, by running BGP services in the cloud, you can manage the default routes for routers in the cloud.