cisco packet tracer pc0可以ping通pc1,但是pc1只能ping通主机0的ip地址 ,ping不通pc0的网关

主机0可以ping通主机1的ip地址和网关地址,主机1只能ping通主机0的ip地址 ping不通网关,怎么能把网关也ping通呢。最上面两个路由器通的命令是什么二层交换机0Switch>enableSwitch#conf tEnter configuration commands, one perline. End with CNTL/Z.Switch(config)#vlan 10Switch(config-vlan)#exitSwitch(config)#interface f 0/1Switch(config-if)#switchport access vlan 10Switch(config-if)#exitSwitch(config)#interface f 0/2Switch(config-if)#switchport mode trunk %LINEPROTO-5-UPDOWN: Line protocol onInterface FastEthernet0/2, changed state to down%LINEPROTO-5-UPDOWN: Line protocol onInterface FastEthernet0/2, changed state to upSwitch(config-if)#exit三层交换机0 Switch>enableSwitch#conf tEnter configuration commands, one perline. End with CNTL/Z.Switch(config)#vlan 10Switch(config-vlan)#exitSwitch(config)#vlan 20Switch(config-vlan)#exitSwitch(config)#interface f 0/1Switch(config-if)#switchport mode trunkSwitch(config-if)#endSwitch#%SYS-5-CONFIG_I: Configured from console byconsoleSwitch#conf tEnter configuration commands, one perline. End with CNTL/Z.Switch(config)#int vlan 10 %LINK-5-CHANGED: Interface Vlan10, changedstate to up%LINEPROTO-5-UPDOWN: Line protocol onInterface Vlan10, changed state to upSwitch(config-if)#ip address 192.168.10.1255.255.255.0Switch(config-if)#exitSwitch(config)#int vlan 20 %LINK-5-CHANGED: Interface Vlan20, changedstate to up%LINEPROTO-5-UPDOWN: Line protocol onInterface Vlan20, changed state to upSwitch(config-if)#ip address 192.168.20.1255.255.255.0Switch(config-if)#exit
2026年09月24日 18:52
有1个网友回答
网友(1):

把拓扑文件传上来我看看