# Nature of tension in a massless rope [duplicate]

I'm faced with a conceptual problem, where I am supposed to describe the motions of the following system (two masses on each end of a totally inelastic rope hanged on a pulley):

I understand that there is the gravitational force acting, and also a second, opposing force in the rope. My problem is that I don't understand the nature of this second force. Where does it come from? How do I summarize it for each of the masses? From my solutions manual I know that it must be equal $$|T_1|=|T_2|$$ for each masses, but that sounds plain counterintuitive for me. Can you please shed some light on this?

UPDATE: the problem is formulated so that the pulley and the rope are both massless, and the bearing has no friction.

The nature of the rope force is such that the accelerations of the two masses are connected. If the two heights are $y_1$ and $y_2$, then the their sum is constant, and their derivatives are equal to zero
$$y_1 + y_2 = \ell \\ \dot{y}_1 + \dot{y}_2 = 0 \\ \ddot{y}_1 + \ddot{y}_2 = 0$$
So the nature of the force is such to enforce $\ddot{y}_1 = - \ddot{y}_2$ such that when you do a free body diagram you will get
$$m_1 \ddot{y}_1 = T - m_1 g = - m_1 \ddot{y}_2 \\ m_2 \ddot{y}_2 = T - m_2 g$$ which is 2 linear equations solved for 2 variables $T$ and $\ddot{y}_2$