The result showed that the preventive treatment of IL-17A can effectively reduce the bacterial load after S. agalactiae infection, and the treatment at 6 h after infection can also play an effective role. Here, IL17A is linked to infection.