Some terms that you will need to understand with regards to routing protocols
include Autonomous System, Interior Gateway Protocol or Internal Gateway Protocol
Exterior Gateway Protocol or External Gateway Protocol.
The first term AS or Autonomous System is a grouping of networks
under a single administrative domain
in other words, the routers within an autonomous system
such as AS 1 are under the control of a group of people or a company.
As an example, this autonomous system on the left could be Coke's autonomous System,
this autonomous system could be Pepsi’s autonomous system
it's very unlikely that Coke are going to allow Pepsi to manage their network
or that Pepsi are going to allow Coke to manage their network.
They are separate autonomous systems under different people's control
or different administrative control or under a different companies control.
Routers in the Coke AS are under the control of Coca-Cola Employees
rather than Pepsi employees, this is a separate autonomous system.
Various interior or Internal Gateway Protocols or IGPs
can be used within an Autonomous System.
Example would include RIP, EIGRP, OSPF and ISIS.
EGPs or Exterior Gateway Protocols are used between Autonomous Systems.
The EGP that’s in used today between autonomous system is BGP or Border Gateway Protocol.
So if this autonomous system was a Company that needed to connect to the Internet
they would connect to their ISP or Internet Service Provider using BGP
within the Autonomous System, they may be using OSPF
as the Interior Gateway Protocol but BGP is the protocol used
between their Autonomous Systems and the ISP
they will be learning about Internet routes through BGP.
Now only very large companies generally run BGP
and receive routes from their ISP using BGP.
However, ISP’s which carry routes of customers in the Internet run BGP.
So we may have an ISP on the left-hand side
and an ISP on the right-hand side
and they would be running BGP between them.
Internally in their Autonomous Systems
or AS's they may be running different routing protocols.
So as an example, OSPF could be used in autonomous system 1
and ISIS could be used in Autonomous System 2.
Each ISP determines which routing protocol to use internally
but they connect to one another using BGP.
Now autonomous systems are registered numbers
in a similar way to IP addresses on the Internet.
You can't just use any autonomous system when connecting to the Internet.
So before you connect to the Internet using BGP
you would register an Autonomous System number.
There are private Autonomous System numbers that can be used without registration
so within an Autonomous System you could use a private AS number
or you could use any other number as long as you're not connecting to the Internet
but as soon as you connect to the Internet
you will need to use a publicly registered Autonomous System number
or an Autonomous System number allocated to you by your ISP.
Now this wouldn’t apply to you if you're using static routes
or once again if a private Autonomous System number has been allocated to you by your ISP
but for very large networks or if you want to create your own Internet Service Provider
the Autonomous System number that you use will need to be registered.