With the increasing number of Connected and Autonomous Vehicles (CAVs), the heterogeneous traffic flow on highways now consists of a mix of CAVs and Non-networked Autonomous Vehicles (NAVs). The current deployment of Roadside Units (RSUs) on highways is mostly based on uniform or hotspot locations. However, when the permeability of CAVs on the road varies, the communication network may face challenges such as excessive energy consumption due to closely spaced RSU deployments at high CAV permeability or communication interruptions due to widely spaced RSU deployments at low CAV permeability. To address this issue, this paper proposes an improved D-LEACH clustering algorithm based on vehicle clustering; analyzes the impact of RSU and vehicle communication radius, mixed traffic density, and different CAV permeabilities in the heterogeneous traffic flow on the RSU deployment interval; and calculates the rational and effective RSU deployment interval schemes under different CAV permeabilities on highways in the heterogeneous traffic flow. When the heterogeneous traffic flow density is stable and CAV continues to penetrate, the RSU communication radius and deployment interval can be adjusted to ensure that the network connectivity is maintained at a high level. When the RSU and vehicle communication radius are stable, the mixed traffic density is 0.05, and the CAV permeability is 0.2, the RSU deployment interval can be set to 1235 m; when the mixed traffic density is 0.08 and the CAV penetration rate is 0.7, the RSU deployment interval can be set to 1669 m to ensure that the network connectivity is maintained at a high level.