我猜这很简单,因为我最近才开始联网,今天是我摆弄这个交换机和虚拟机的第二天。我会包括我认为可能相关的所有信息 - 如果您需要更多信息,请提及。
虚拟机上未启用防火墙。
PC 和交换机的子网掩码为 255.255.255.0
我使用的电缆是 cat5e 直通电缆。
设置:
虚拟 PC 1. 192.168.2.10 --电缆-- cisco 3550 交换机(192.168.2.1)--电缆-- 虚拟 PC 2. 192.168.2.11
问题:我无法在 PC 之间 ping 通。
我可以做什么:
- 从 PC1 ping 交换机
- 从 PC2 ping 交换机
- 从交换机 ping PC1
- 从交换机 ping PC2
虚拟 PC 使用虚拟盒托管,并使用我已添加到桌面 PCIe 插槽的 NIC。我使用 Tera Term 通过控制台电缆与交换机进行通信。
显示运行配置
hostname Switch
!
!
ip subnet-zero
ip routing
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
!
!
!
interface FastEthernet0/1
switchport mode dynamic desirable
!
interface FastEthernet0/2
switchport mode dynamic desirable
!
interface FastEthernet0/3
switchport mode dynamic desirable
!
interface FastEthernet0/4
switchport mode dynamic desirable
!
interface FastEthernet0/5
switchport mode dynamic desirable
!
interface FastEthernet0/6
switchport mode dynamic desirable
!
interface FastEthernet0/7
switchport mode access
!
interface FastEthernet0/8
switchport mode access
!
interface FastEthernet0/9
switchport mode dynamic desirable
!
interface FastEthernet0/10
switchport mode dynamic desirable
!
interface FastEthernet0/11
switchport mode dynamic desirable
!
interface FastEthernet0/12
switchport mode dynamic desirable
!
interface FastEthernet0/13
switchport mode dynamic desirable
!
interface FastEthernet0/14
switchport mode dynamic desirable
!
interface FastEthernet0/15
switchport mode dynamic desirable
!
interface FastEthernet0/16
switchport mode dynamic desirable
!
interface FastEthernet0/17
switchport mode dynamic desirable
!
interface FastEthernet0/18
switchport mode dynamic desirable
!
interface FastEthernet0/19
switchport mode dynamic desirable
!
interface FastEthernet0/20
switchport mode dynamic desirable
!
interface FastEthernet0/21
switchport mode dynamic desirable
!
interface FastEthernet0/22
switchport mode dynamic desirable
!
interface FastEthernet0/23
switchport mode dynamic desirable
!
interface FastEthernet0/24
switchport mode dynamic desirable
!
interface GigabitEthernet0/1
switchport mode dynamic desirable
!
interface GigabitEthernet0/2
switchport mode dynamic desirable
!
interface Vlan1
ip address 192.168.2.1 255.255.255.0
!
ip classless
ip http server
!
!
line con 0
line vty 5 15
!
!
end
显示 VLAN 概要
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
Gi0/1, Gi0/2
编辑:我忘了提及我从 ping 中得到的错误是‘目标主机不可达’。
此后将发布其他所需信息
显示 ip 接口简介 从这一点来看很明显(我忘了提到)PC1 和 PC2 的活动端口分别是 fa0/7 和 fa0/8。
Interface IP-Address OK? Method Status Protocol
Vlan1 192.168.2.1 YES manual up up
FastEthernet0/1 unassigned YES unset down down
FastEthernet0/2 unassigned YES unset down down
FastEthernet0/3 unassigned YES unset down down
FastEthernet0/4 unassigned YES unset down down
FastEthernet0/5 unassigned YES unset down down
FastEthernet0/6 unassigned YES unset down down
FastEthernet0/7 unassigned YES unset up up
FastEthernet0/8 unassigned YES unset up up
FastEthernet0/9 unassigned YES unset down down
FastEthernet0/10 unassigned YES unset down down
FastEthernet0/11 unassigned YES unset down down
FastEthernet0/12 unassigned YES unset down down
FastEthernet0/13 unassigned YES unset down down
FastEthernet0/14 unassigned YES unset down down
FastEthernet0/15 unassigned YES unset down down
FastEthernet0/16 unassigned YES unset down down
FastEthernet0/17 unassigned YES unset down down
FastEthernet0/18 unassigned YES unset down down
FastEthernet0/19 unassigned YES unset down down
FastEthernet0/20 unassigned YES unset down down
FastEthernet0/21 unassigned YES unset down down
FastEthernet0/22 unassigned YES unset down down
FastEthernet0/23 unassigned YES unset down down
FastEthernet0/24 unassigned YES unset down down
GigabitEthernet0/1 unassigned YES unset down down
GigabitEthernet0/2 unassigned YES unset down down
答案1
后来发现问题出在 virtualbox 上。
我创建了一个虚拟机的克隆,结果 MAC 地址不唯一。只需更改 MAC 地址即可解决问题。