如何通过两个路由器把两个PC(PC0和PC1)ping通

最好把详细的步骤、过程也告诉我
2025-03-04 19:35:47
推荐回答(2个)
回答1:

假设 IP地址规划如下:
pc1 --- 192.168.1.0/24 ---- router1 ---192.168.2.0/24 --- router2 --- 192.168.3.0/24 --- pc2

PC1上设置网关为: 192.168.1.1

router1配置
interface f0/0
ip address 192.168.1.1 255.255.255.0
no shut
interface f0/1
ip address 192.168.2.1 255.255.255.0
no sht
ip route 192.168.3.0 255.255.255.0 192.168.2.2

router2配置
interface f0/0
ip address 192.168.2.2 255.255.255.0
no shut
interface f0/1
ip address 192.168.3.1 255.255.255.0
no sht
ip route 192.168.1.0 255.255.255.0 192.168.2.1

PC2 网关设置为192.168.3.1

回答2:

可以将其中一个路由做交换机用,进线及LAN口就行了