iT邦幫忙

0

思科交换机默认 VLAN 怎么使用?

在思科交换机上面给默认 VLAN 1 配置了 IP 地址,但当我在 vSphere 上面新建分布式交换机端口,并指定 VLAN ID 为 1 时,VLAN 1 分布式交换机端口组中的交换机不能ping 通 VLAN 1 的 IP。
其他 VLAN 上面的虚拟机可以正常ping 通,所对应的 VLAN IP,除 VLAN 1 以外的所有 VLAN可以互相通信,但 与 VLAN 1 不行。

这是我的 VLAN 配置
https://ithelp.ithome.com.tw/upload/images/20180207/20099494F4AfIt0hSO.png

看更多先前的討論...收起先前的討論...
丹尼 iT邦研究生 4 級 ‧ 2018-02-07 10:33:49 檢舉
你有圖嗎
丹尼 iT邦研究生 4 級 ‧ 2018-02-07 10:33:50 檢舉
你有圖嗎
as900 iT邦新手 2 級 ‧ 2018-02-07 12:15:45 檢舉
什么图?
as900 iT邦新手 2 級 ‧ 2018-02-07 12:16:11 檢舉
这是我交换机的配置:
Building configuration...

Current configuration : 2498 bytes
!
version 12.1
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Switch
!
!
ip subnet-zero
!
!
spanning-tree mode pvst
no spanning-tree optimize bpdu transmission
spanning-tree extend system-id
!
!
!
interface GigabitEthernet1/0/1
switchport trunk encapsulation dot1q
switchport mode trunk
no ip address
no mdix auto
!
interface GigabitEthernet1/0/2
switchport trunk encapsulation dot1q
switchport mode trunk
no ip address
no mdix auto
!
interface GigabitEthernet1/0/3
no ip address
no mdix auto
!
interface GigabitEthernet1/0/4
no ip address
no mdix auto
!
interface GigabitEthernet1/0/5
no ip address
no mdix auto
!
interface GigabitEthernet1/0/6
no ip address
no mdix auto
!
interface GigabitEthernet1/0/7
no ip address
no mdix auto
!
interface GigabitEthernet1/0/8
no ip address
no mdix auto
!
interface GigabitEthernet1/0/9
no ip address
no mdix auto
!
interface GigabitEthernet1/0/10
no ip address
no mdix auto
!
interface GigabitEthernet1/0/11
no ip address
no mdix auto
!
interface GigabitEthernet1/0/12
no ip address
no mdix auto
!
interface GigabitEthernet1/0/13
no ip address
no mdix auto
!
interface GigabitEthernet1/0/14
no ip address
no mdix auto
!
interface GigabitEthernet1/0/15
no ip address
no mdix auto
!
interface GigabitEthernet1/0/16
no ip address
no mdix auto
!
interface GigabitEthernet1/0/17
no ip address
no mdix auto
!
interface GigabitEthernet1/0/18
no ip address
no mdix auto
!
interface GigabitEthernet1/0/19
no ip address
no mdix auto
!
interface GigabitEthernet1/0/20
no ip address
no mdix auto
!
interface GigabitEthernet1/0/21
no ip address
no mdix auto
!
interface GigabitEthernet1/0/22
no ip address
no mdix auto
!
interface GigabitEthernet1/0/23
switchport trunk encapsulation dot1q
switchport mode trunk
no ip address
no mdix auto
!
interface GigabitEthernet1/0/24
switchport trunk encapsulation dot1q
switchport mode trunk
no ip address
no mdix auto
!
interface Vlan1
ip address 192.168.1.1 255.255.255.0
shutdown
!
interface Vlan2
ip address 192.168.2.1 255.255.255.0
ip helper-address 192.168.1.10
!
interface Vlan3
ip address 192.168.3.1 255.255.255.0
ip helper-address 192.168.1.10
!
interface Vlan4
ip address 192.168.4.1 255.255.255.0
ip helper-address 192.168.1.10
!
interface Vlan5
ip address 192.168.5.1 255.255.255.0
ip helper-address 192.168.1.10
!
ip classless
ip http server
!
!
line con 0
line vty 5 15
!
end
runan5678 iT邦新手 3 級 ‧ 2018-02-07 14:14:28 檢舉
需要調整的是VM分布式交换机上的設定,請不要指定VLAN ID,直接用預設值。
as900 iT邦新手 2 級 ‧ 2018-02-07 14:45:30 檢舉
是分布式交换机上面的 Port group 吗?试了不行。我 Uplink 接 Physical switch 使用的是 trunk 模式。
runan5678 iT邦新手 3 級 ‧ 2018-02-07 16:11:05 檢舉
看來我誤會您原先的意思,應該是要確認Physical switch 和分布式交换机兩端連線的端口是否都為802.1q(trunk),並已經把規劃的Vlan(Vlan1、Vlan2、Vlan3、Vlan4、Vlan5)都設定上去。Cisco的vlan1 預設是untagged的vlan 詳細可參考bluegrass的答案
hon2006 iT邦大師 1 級 ‧ 2018-02-09 08:54:55 檢舉
一般都會新增一個vlan來用,而不是用default的
http://blog.xuite.net/general.lu/blog/324762963-Cisco+Native+Vlan
hon2006 iT邦大師 1 級 ‧ 2018-02-09 09:05:51 檢舉
其他port 要設定
interface GigabitEthernet1/0/40
switchport access vlan ?
switchport mode access
!
你的VM 網路線接在那一個Port Number?
不需要設trunk

1 個回答

0
bluegrass
iT邦新手 4 級 ‧ 2018-02-07 10:48:07

你vSphere上面指定 VLAN ID 1, 但你的 VLAN ID 1 是untagged的嗎?

CISCO 的 VLAN ID 1 是 NATIVE VLAN 要 untagged

看更多先前的回應...收起先前的回應...
bluegrass iT邦新手 4 級 ‧ 2018-02-07 10:49:52 檢舉

你可以試試這句:

vlan dot1q tag native

把 CISCO 的 VLAN ID 1 tagged, 看能不能PING

as900 iT邦新手 2 級 ‧ 2018-02-07 13:06:37 檢舉

怎么看 VLAN 1 是否 untagged?
这是我交换机的配置:
Building configuration...

Current configuration : 2498 bytes
!
version 12.1
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Switch
!
!
ip subnet-zero
!
!
spanning-tree mode pvst
no spanning-tree optimize bpdu transmission
spanning-tree extend system-id
!
!
!
interface GigabitEthernet1/0/1
switchport trunk encapsulation dot1q
switchport mode trunk
no ip address
no mdix auto
!
interface GigabitEthernet1/0/2
switchport trunk encapsulation dot1q
switchport mode trunk
no ip address
no mdix auto
!
interface GigabitEthernet1/0/3
no ip address
no mdix auto
!
interface GigabitEthernet1/0/4
no ip address
no mdix auto
!
interface GigabitEthernet1/0/5
no ip address
no mdix auto
!
interface GigabitEthernet1/0/6
no ip address
no mdix auto
!
interface GigabitEthernet1/0/7
no ip address
no mdix auto
!
interface GigabitEthernet1/0/8
no ip address
no mdix auto
!
interface GigabitEthernet1/0/9
no ip address
no mdix auto
!
interface GigabitEthernet1/0/10
no ip address
no mdix auto
!
interface GigabitEthernet1/0/11
no ip address
no mdix auto
!
interface GigabitEthernet1/0/12
no ip address
no mdix auto
!
interface GigabitEthernet1/0/13
no ip address
no mdix auto
!
interface GigabitEthernet1/0/14
no ip address
no mdix auto
!
interface GigabitEthernet1/0/15
no ip address
no mdix auto
!
interface GigabitEthernet1/0/16
no ip address
no mdix auto
!
interface GigabitEthernet1/0/17
no ip address
no mdix auto
!
interface GigabitEthernet1/0/18
no ip address
no mdix auto
!
interface GigabitEthernet1/0/19
no ip address
no mdix auto
!
interface GigabitEthernet1/0/20
no ip address
no mdix auto
!
interface GigabitEthernet1/0/21
no ip address
no mdix auto
!
interface GigabitEthernet1/0/22
no ip address
no mdix auto
!
interface GigabitEthernet1/0/23
switchport trunk encapsulation dot1q
switchport mode trunk
no ip address
no mdix auto
!
interface GigabitEthernet1/0/24
switchport trunk encapsulation dot1q
switchport mode trunk
no ip address
no mdix auto
!
interface Vlan1
ip address 192.168.1.1 255.255.255.0
shutdown
!
interface Vlan2
ip address 192.168.2.1 255.255.255.0
ip helper-address 192.168.1.10
!
interface Vlan3
ip address 192.168.3.1 255.255.255.0
ip helper-address 192.168.1.10
!
interface Vlan4
ip address 192.168.4.1 255.255.255.0
ip helper-address 192.168.1.10
!
interface Vlan5
ip address 192.168.5.1 255.255.255.0
ip helper-address 192.168.1.10
!
ip classless
ip http server
!
!
line con 0
line vty 5 15
!
end

interface Vlan1
ip address 192.168.1.1 255.255.255.0
shutdown

shutdown ??

as900 iT邦新手 2 級 ‧ 2018-02-07 16:28:13 檢舉

那应该是 no shutdown??
其它 VLAN 也没有配 no shutdown

as900 iT邦新手 2 級 ‧ 2018-02-07 16:29:23 檢舉

VLAN 1 没法运行 no shutdown,报错:
Command is only allowed on VLAN 2..1001.

bluegrass iT邦新手 4 級 ‧ 2018-02-07 16:49:53 檢舉

看 VLAN 1 是否 untagged

show vlan dot1q tag native

我要發表回答

立即登入回答