Locally repairable codes (LRCs) have attracted a lot of interests recently due to their important applications in distributed storage systems. An (n, k, r, δ)-LRC (δ ≥ 2) is an [n, k, d] linear code such that each of the n code symbols satisfies (r, δ)-locality and is said to be optimal if it has minimumThe generalized Hamming weights (GHWs) are fundamental parameters of linear codes. Prakash et al. firstly applied GHWs to study linear codes with locality properties. In this paper, we study the GHWs of (n, k, r, δ)-LRCs (δ ≥ 2). Firstly, for a general (n, k, r, δ)-LRC, an upper bound on the i-th (1 ≤ i ≤ k) GHW is presented. Then, for an optimal (n, k, r, δ)-LRC and its dual code, a lower bound on the [i(δ − 1)]-th GHW, for 1 ≤ i ≤ k/r − 1, of the dual code is given. Specially, when r | k, we determine the [i(δ − 1)]-th GHW, for 1 ≤ i ≤ k/r − 1, of the dual code of an optimal (n, k, r, δ)-LRC. For the case of δ = 2, we obtain a lower bound on the i-th GHW for all 1 ≤ i ≤ k of an optimal (n, k, r, 2)-LRC. Moreover, it is shown that the weight hierarchy of an optimal (n, k, r, 2)-LRC with r | k can be completely determined.