hi
on layer 2 in the header portion(H2) contains source and destination physical addresses...(means all the computers which are in the same network can communicate.......)
while on layer 3 in the header portion(H3) contains logical ip of the source and in the destination portion it contains logical ip of gateway of that(of source) network. and then in the second pass in H3 it contains in the source portion address of the gateway and in the destination portion address of the real destination.( packet can be trasferred though source and the destination are of the different networks)
source 192.168.0.12 subnet255.255.255.0 (here n/w id 192.168.0.0.0)
destination 100.100.100.13 subnet 255.255.255.0 (here n/w id 100.100.0.0)
so with layer 3 switch
pass1----source(192.168.0.12) to gateway(192.168.0.1)
pass2----gateway(100.100.100.1) to destination(100.100.100.13)
where gateway contains both ip addresses of both the networks.