This is going to be a bit of a long post, but I think it’s necessary to be as clear as possible, so bear with me…
Let’s look at a single AS. Within the AS there is either static routing or an IGP that distributes routes among the routers within. The network has converged and all devices within the AS are able to reach all destinations within the AS. BGP plays no part in this.
Now imagine that around this AS, we have several other AS’es. Each AS is isolated from all the others and no static or IGP routing is learned from one AS to another. There must be a way to allow this to happen. This is where BGP comes in.
Within each AS you enable BGP on the routers. Routers within the AS peer with each other in a full mesh, and they don’t need to be directly connected (iBGP). Routers on the edge of the AS peer with routers on the edge of other AS’es and they need to be directly connected by default (eBGP).
Now with all of this configured, BGP will not yet share any routes! You must “inject” the routes into the BGP table. Once there they can be shared among BGP routers.
Routes will get into the BGP table in one of two ways. Either by being learned via BGP (from other BGP routers, either within the AS or from other AS’es) or by being manually added by using the network, aggregate, or redistribute commands.
When using the network command, you are essentially telling BGP “add this route” manually. The aggregate command works similarly. When using the redistribute command, you are telling BGP “add these routes leaned via another routing protocol” In all cases, there are conditions as to if it will actually be added to the BGP table or not, the primary one being that the specific destination should already be in the routing table.You can find out more about that in these lessons:
So you see, these commands actually add already learned (by the local router) destinations to the BGP table to be shared with other BGP routers, either iBGP or eBGP peers.
So to answer your question, the network aggregate and redistribute commands don’t have to do with routes learned from other BGP peers, either local or remote (iBGP or eBGP) but have to do with the action that actually adds prefixes to the BGP realm for sharing via BGP.
I hope this has been helpful!