A path in an edge-coloring graph , where adjacent edges may be colored the same, is called a if no two edges of are colored the same. A nontrivial connected graph is if for any two vertices of there is a rainbow path connecting them. The of , denoted , is defined as the minimum number of colors by using which there is coloring such that is rainbow connected. In this paper, we study the rainbow connection numbers of line graphs of triangle-free graphs, and particularly, of -connected triangle-free graphs according to their ear decompositions.