Literature suggests that attention is a critical cognitive process for pain perception and modulation and may play an important role in placebo and nocebo effects. Here, we investigated how repeated transcranial direct current stimulation (tDCS) applied at the dorsolateral prefrontal cortex (DLPFC) for three consecutive days can modulate the brain functional connectivity (FC) of two networks involved in cognitive control: the frontoparietal network (FPN) and dorsal attention network (DAN), and its association with placebo and nocebo effects.81 healthy subjects were randomized to three groups: anodal, cathodal, and sham tDCS. Resting state fMRI scans were acquired pre- and post- tDCS on the first and third day of tDCS. An Independent Component Analysis (ICA) was performed to identify the FPN and DAN. ANCOVA was applied for group analysis.Compared to sham tDCS, 1) both cathodal and anodal tDCS increased the FC between the DAN and right parietal operculum; cathodal tDCS also increased the FC between the DAN and right postcentral gyrus; 2) anodal tDCS led to an increased FC between the FPN and right parietal operculum, while cathodal tDCS was associated with increased FC between the FPN and left superior parietal lobule/precuneus; 3) the FC increase between the DAN and right parietal operculum was significantly correlated to the placebo analgesia effect in the cathodal group.Our findings suggest that both repeated cathodal and anodal tDCS could modulate the FC of two important cognitive brain networks (DAN and FPN), which may modulate placebo / nocebo effects.