I was trying to configure BGP peers on sample topologies, Now considering that BGP is the protocol that routes the internet it must not be possible to establish thousands of EBGP peers by such manual configuration using CLI commands. So I was wondering is there a way to automate this process and how to do it?

On a related topic, BGP I read that BGP exchanges RIB information and updates once the peer group is established. Can someone point out what exactly are the contents of that RIB and how is policy implemented through them.?