I was reading about how a packet is send from one host to another. I am confused about entries that will be made in layer-3 switch routing table. Does it contain the entries for layer two switches or does it contain the entries for all the hosts (A,B,C,D ... etc).
Layer2 won't understand ip address , layer2 switch will only forward traffic on basis of mac-addres table
Let have example
Packet forwarding to host A from layer3 switch
Once the packet reaches layer3 switch as host A as destination , layer3 devices process this packet by varyfying routing table , in routing table it found that this network was directly connected networks .hence packet is forwarded on interfàce where network is connected so in this case packet is forwarded to access-switch layer2 Switch1 from this switch frame is forwarded to correct destionation based on mac -address table present in Switch1.
A routing table will have entries for the directly connected networks, any static routes you have configured, and any routes learned through routing protocols that you may be running to exchange routes with other routers.
The routing table entries for each network will include the interface to which traffic destined for that network should be sent.
Based on you drawing: You could have three routes for the directly connected networks. You probably have a statically configured default route for the Internet, or you may be running BGP with the ISP router to which your layer-3 switch connects, in which case, you may have other routes learned from the ISP router.