Protocols of Tcp/ip and

Dear Users
i have one question about osi layers, as in book icnd1 (cisco press)(page 27 after table 2-3) is written that first two layers application and transport just send the traffic to network layer, and there router decides either this traffic is for the local delivery (same network) or it should be routed to outside the network. according to this page of book and what we were teaches in the class there is a confusion our teacher teach us that subnet mask decides that either this traffic will be routed to default gateway or not if after ip address and subnet mask calculation the result is this that traffic belongs to same network so it remains up to switch not passed over to the router.
Thanks
i have one question about osi layers, as in book icnd1 (cisco press)(page 27 after table 2-3) is written that first two layers application and transport just send the traffic to network layer, and there router decides either this traffic is for the local delivery (same network) or it should be routed to outside the network. according to this page of book and what we were teaches in the class there is a confusion our teacher teach us that subnet mask decides that either this traffic will be routed to default gateway or not if after ip address and subnet mask calculation the result is this that traffic belongs to same network so it remains up to switch not passed over to the router.
Thanks
Comments
From your question it doesn't seem like you have any grasp on the basics, i definitely advise you t spend alot more time trying to understand the fundamentals.