Packet Tracer 中 VTP 服务器和客户端的 VLAN 间路由

网络工程 转变 第3层 数据包追踪器 虚拟机
2021-07-30 02:07:20

我是网络世界的新手,正在尝试在 Packet Tracer 中进行我的前几个项目。前几个很容易,但我已经遇到了障碍。

我的目标是拥有三个独立的 VLAN,每个 VLAN 上至少有一个客户端。我的目标是使用第 3 层交换机进行 VLAN 间路由,以便我能够将 L3 交换机设置为 VTP 服务器,将另外两个交换机设置为 VTP 客户端,并使每个客户端交换机连接到不同的 VLAN。

问题是:我不知道如何让 ping 在来自不同交换机的 VLAN 之间工作。我已经附上了我的网络拓扑和每个交换机的配置。请帮忙!!

任何帮助将不胜感激。

交换机 1(VTP 客户端 1) 

Current configuration : 1566 bytes

!

version 12.2

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption

!

hostname anton

!

!

!

!

!

spanning-tree mode pvst

!

interface FastEthernet0/1

switchport trunk native vlan 99

switchport mode trunk

!

interface FastEthernet0/2

switchport access vlan 10

!

interface FastEthernet0/3

switchport access vlan 10

!

interface FastEthernet0/4

switchport access vlan 10

!

interface FastEthernet0/5

!

interface FastEthernet0/6

!

interface FastEthernet0/7

!

interface FastEthernet0/8

!

interface FastEthernet0/9

!

interface FastEthernet0/10

!

interface FastEthernet0/11

!

interface FastEthernet0/12

!

interface FastEthernet0/13

!

interface FastEthernet0/14

!

interface FastEthernet0/15

!

interface FastEthernet0/16

!

interface FastEthernet0/17

!

interface FastEthernet0/18

!

interface FastEthernet0/19

!

interface FastEthernet0/20

!

interface FastEthernet0/21

!

interface FastEthernet0/22

!

interface FastEthernet0/23

!

interface FastEthernet0/24

!

interface GigabitEthernet0/1

!

interface GigabitEthernet0/2

!

interface Vlan1

no ip address

shutdown

!

interface Vlan10

mac-address 00e0.8f04.7201

ip address 192.168.10.254 255.255.255.0

!

interface Vlan20

mac-address 00e0.8f04.7202

ip address 192.168.20.254 255.255.255.0

!

interface Vlan30

mac-address 00e0.8f04.7203

ip address 192.168.30.254 255.255.255.0

!

interface Vlan99

mac-address 00e0.8f04.7204

ip address 192.168.99.10 255.255.255.0

!

ip default-gateway 192.168.10.0

!

!

!

!

line con 0

!

line vty 0 4

login

line vty 5 15

login

!

!

!

end

交换机 2(VTP 客户端 2)

Current configuration : 1582 bytes

!

version 12.2

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption

!

hostname anton

!

!

!

!

!

spanning-tree mode pvst

!

interface FastEthernet0/1

switchport trunk native vlan 99

switchport mode trunk

!

interface FastEthernet0/2

switchport access vlan 20

!

interface FastEthernet0/3

switchport access vlan 30

!

interface FastEthernet0/4

switchport access vlan 30

!

interface FastEthernet0/5

!

interface FastEthernet0/6

!

interface FastEthernet0/7

!

interface FastEthernet0/8

!

interface FastEthernet0/9

!

interface FastEthernet0/10

!

interface FastEthernet0/11

!

interface FastEthernet0/12

!

interface FastEthernet0/13

!

interface FastEthernet0/14

!

interface FastEthernet0/15

!

interface FastEthernet0/16

!

interface FastEthernet0/17

!

interface FastEthernet0/18

!

interface FastEthernet0/19

!

interface FastEthernet0/20

!

interface FastEthernet0/21

!

interface FastEthernet0/22

!

interface FastEthernet0/23

!

interface FastEthernet0/24

!

interface GigabitEthernet0/1

!

interface GigabitEthernet0/2

!

interface Vlan1

no ip address

shutdown

!

interface Vlan10

mac-address 00e0.a334.8b03

ip address 192.168.10.254 255.255.255.0

!

interface Vlan20

mac-address 00e0.a334.8b01

ip address 192.168.20.254 255.255.255.0

!

interface Vlan30

mac-address 00e0.a334.8b02

ip address 192.168.30.254 255.255.255.0

!

interface Vlan99

mac-address 00e0.a334.8b04

ip address 192.168.99.10 255.255.255.0

!

ip default-gateway 192.168.10.0

!

!

!

!

line con 0

!

line vty 0 4

password cisco

login

line vty 5 15

login

!

!

!

end

第 3 层交换机(VTP 服务器)

Current configuration : 1708 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname anton
!
!
!
!
!
!
!
ip routing
!
!
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface FastEthernet0/1
switchport trunk native vlan 99
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/2
switchport trunk native vlan 99
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address
shutdown
!
interface Vlan10
mac-address 00d0.5894.8e01
ip address 192.168.10.254 255.255.255.0
!
interface Vlan20
mac-address 00d0.5894.8e02
ip address 192.168.20.254 255.255.255.0
!
interface Vlan30
mac-address 00d0.5894.8e03
ip address 192.168.30.254 255.255.255.0
!
interface Vlan99
mac-address 00d0.5894.8e04
ip address 192.168.99.10 255.255.255.0
!
ip default-gateway 192.168.10.0
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end

网络拓扑

1个回答

您似乎在所有三台交换机上都配置了 VLAN 10、20 和 30 的 SVI。这将导致IP冲突。

真正需要 SVI 的唯一交换机是将进行路由的任何交换机。所有其他的只需要简单地在 L2 转发数据。据我所知,那将是您的 Switch 3。

我建议通读本文以帮助理解 VLAN 之间路由的不同选项,特别是有关使用第 3 层交换机的这一部分