The primary function of lymph nodes is the filtering of lymph to identify and fight infection. In order to do this, lymph nodes contain lymphocytes, a type of white blood cell, which includes B cells and T cells. These circulate through the bloodstream and enter and reside in lymph nodes. B cells produce antibodies.