也许我只是累了,但我无法在我的网络中获得基本的连接。为了进行故障排除,我在 Packet Tracer 上构建了它,除了重要元素之外,我已经删除了所有内容。这是网络:
PC0:192.168.0.1/24 和 192.168.0.2 的 DG
切换配置:
vlan 4
name vlan4
int vlan 4
ip add 192.168.0.2 255.255.255.0
no shut
int range fa0/1-2
switchport mode access
switchport access vlan 4
no shut
exit
ip default-gateway 192.168.0.3
R0:
! Towards R1
int g0/0/0
ip add 10.10.10.1 255.255.255.0
no shut
! Towards VLAN 4
int g0/0/1
ip add 192.168.0.3 255.255.255.0
no shut
router rip
network 192.168.0.0
network 10.10.10.0
exit
R1:
int g0/0
ip add 10.10.10.2 255.255.255.0
no shut
int lo0
ip add 100.100.100.100 255.255.255.255
no shut
exit
ip route 0.0.0.0 0.0.0.0 lo0
router rip
network 10.10.10.0
network 100.100.100.100
default-information originate
正如预期的那样,交换机可以 ping 一切。问题是 PC 无法 ping 通其 VLAN 之外的任何内容。开关只是放下它。我以为交换机会简单地将其转发到其默认网关,在本例中为 R0。我肯定错过了一些非常基本的东西,但我只是不知道是什么。如何让 PC0 ping R1 的 Lo0?
