Just summarize what others have said and hopefully provide more clarity:
1. I still did not get the master thing . Is it that it is the active router (when we have a active and a standby router ?)
{master:0} - You will see this on the EX Series switch when you have enabled virtual chassis (or after even if you disable VC and run then as standalone switches). All the switches in the VC no longer operate independently, but as one big switch. If you 2 or 10 divices, they all appear as 1 switch to other Layer 2 devices. The Routing Engine on the other hand operate independently, so you have one as Master and the other as Backup and they operate one at a time- the master keeps the Backup synchronized. Once you synchronize the configuration the Master copy is copied to all the line cards in the VC. They all have the same configuration, one console port to manage, one management IP address to manage. Do not confuse this with Clustering on the SRX. In clustering, the two devices operate as independent devices but synchrosised with the same configuration. They can both be operating at the same time (active/active) or only one operating and the other sitting by passively waiting for the Primary to fail before it takes over. Like the VC, only one RE is acting as the Master at any time.
2. Also I have not used Juniper switches earlier but I need to parse a output. What command can I use to get the forwarding table ? Is it "show route forwarding-table" ?
Yes- "show route forwarding-table" The ? reveals possible combination knobs you can add; and you can use | (pipe), with the 'find" and "match" too, multiple times to further refine the output. You use the question mark anywhere at anytime to get an output of the possible completions. (Some are hidden and you will just have to know what to enter, they wil not be revealed by the ?)
3. Also is the entry in forwarding table entry added when the first packet is handled by the CPU and then the entry is added? or any entry when added in the Routing Information Base is also updated in the Forwarding Information Base.
The Forwarding Table aka FIB, is needed for the packet to be routed/forwarded. It gets populated as soon as the RIB selects the active route, there will be minimal latency while it makes it selection, but essentially yes.
4. Also there is a update like
172.21.224.0/19 *[Direct/0] 5w1d 10:42:22
> via vlan.570
[Static/5] 6w5d 14:54:02
> to 172.20.47.22 via vlan.91
Now in this case what route will be installed in the forwarding table ?
The route to the 172.21.224.0/19 network; the asterisk * is used to indicate Protocol selected based on the preference, that is Active and Last active (last used) for the for the given destination. This output shows that I can get the the 172.21.224.0/19 over the vlan.570 - it is directly connected, and also over the vlan.91 interface via a static route which you have configured. The Direct protocol was selected over the Static route Protocol ( They are actualy pseudo protocol) because it is directly connected with Direct Protocol preference of 0 over the Static with preference with 5. Lower is better.
The > (greater than) symbol simply indicates that this is the next-hop that was selected from this protocol. In this case only one next-hop was available for both protocol so it was selected.
In the follwoing example, notice that only one nexthop was selected randomly (it is different if it was BGP) :
172.20.114.0/24 *[Static/20] 00:04:02
to 172.20.77.2 via ge-0/0/1.0
> to 172.20.66.2 via ge-0/0/2.0
This output can be misleading though if one does not have the complete configuration to tell which will be installed into the FIB. If you have ECM/load-balancing, configured, then both, in this case will be installed in the FIB/Forwarding table. But as a general rule, the one with > will be installed in the FIB.
You can view the output of the inet.0 route table or any other table for that matter by specifiyin it by name for example:
>show route table inet.0
>show route table mpls.0
>show route table routing_instance_name.inet.0
Want to see some internal hidden route table
>show route table all
or better yet
#run show route all extensive