Assuming I have BGP forwarding from my ISP, a BGP capable router and an ASN. What stops me from advertising IP ranges not belonging to me? Do routers check if an IP address belongs to the correct ASN from RIR databases ?
Do router routing tables contain the ASN? Or just IP ranges, metrics and interface names?
Does every router connected to the internet with more than one upstream provider know the complete internet routing table?
- The networks you connect to should set up filters to accept routes from you only if they are "yours" or those of your customer(s). Some ISPs build filters from various databases (RIR or IRR). Not all networks do this.
- BGP tables (RIB) do contain ASNs. Forwarding tables (FIB) do not.
- Not necessarily. It depends on your needs. You could also accept just a default route from each provider, or a subset of the routes your upstreams know, or a complete table form one upstream and partial routes from another.
- You would find no one willing to peer with you. The Internet connections between ASs is cooperative, and, if you don't cooperate, you don't get in.
- As far as Cisco routers go, the routing table contains the best route for a given prefix from all the routing protocol tables. In other words, "No." Each routing protocol maintains its own table, and the routing table chooses its content from those tables.
- Not necessarily. It is the universal networking answer: "It depends..." You really need to know what you are trying to accomplish in what way to answer that question for any particular design.