我正在尝试在 Cisco 3560 交换机上设置多个 VLAN。这些新网段应该能够与 VLAN 1 通信,甚至可以访问 Internet。
基本IP信息:
Gateway: 10.1.1.2
VLAN1: 10.1.1.1/24
VLAN2: 10.1.2.1/24
VLAN3: 10.1.3.1/24
我设法添加了 VLAN 并在 VLAN 内建立了网络连接,但无法使路由正常工作。
什么工作:
- VLAN 1内的主机可以ping通DG并访问internet
- VLAN 2 和 3 正在相互通信。VLAN2(例如10.1.2.2)内的主机可以ping通同一交换机上VLAN3(例如10.1.3.2)内的主机
- VLAN 2 & 3中的主机可以ping通VLAN1(10.1.1.1)的接口IP
什么不起作用:
- VLAN 2 和 3 中的主机无法在同一交换机上 ping VLAN 1 中的主机,反之亦然。
- VLAN 2 和 3 中的主机甚至无法 ping DG。
这是交换机上的配置:
#sh conf
version 12.2
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Layer3
!
enable secret 5 $1$3NYq$mDR12iJm5nEorw8oDLDgr1
enable password Cisco
!
no aaa new-model
vtp domain BETA
vtp mode transparent
ip subnet-zero
ip routing
!
!
!
!
no file verify auto
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
vlan 2
name VLAN002
!
vlan 3
name VLAN003
!
vlan 60
name Reserved-1
!
interface FastEthernet0/1
!
interface FastEthernet0/2
switchport access vlan 2
!
interface FastEthernet0/3
switchport access vlan 3
!
interface FastEthernet0/4
switchport access vlan 2
!
interface FastEthernet0/5
!
interface FastEthernet0/6
switchport access vlan 3
!
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
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/23
!
interface FastEthernet0/24
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
ip address 10.1.1.1 255.255.255.0
!
interface Vlan2
ip address 10.1.2.1 255.255.255.0
!
interface Vlan3
ip address 10.1.3.1 255.255.255.0
!
ip classless
ip route 0.0.0.0 0.0.0.0 10.1.1.2
ip http server
!
!
control-plane
!
#sh vlan br
VLAN Name Status Ports
---- -------------------------------- --------- ------------------------------
1 default active Fa0/1, Fa0/5, 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/23, Gi0/1, Gi0/2
2 VLAN002 active Fa0/2, Fa0/4
3 VLAN003 active Fa0/3, Fa0/6
60 Reserved-1 active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
#sh ip route
Gateway of last resort is 10.1.1.2 to network 0.0.0.0
10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
C 10.1.3.0/24 is directly connected, Vlan3
C 10.1.2.0/24 is directly connected, Vlan2
C 10.1.1.0/24 is directly connected, Vlan1
S* 0.0.0.0/0 [1/0] via 10.1.1.2
有人可以向我指出问题吗?