Embodiments relate to a routing information processing method and apparatus. The method implemented by a first network device includes: obtaining a local route corresponding to a second network device, where the local route includes a first identifier; allocating a first segment identifier based on the fact that the first identifier exists only in the local route; obtaining a local route and a remote route that correspond to a third network device, where each of the local route and the remote route includes a second identifier; allocating a second segment identifier based on the fact that the second identifier exists at least in the local route and the remote route; and sending routing information including the first segment identifier and the second segment identifier. This avoids traffic interruption of a failure-free single-homed network device in a scenario in which single-homing and multi-homing coexist.