我们正在使用思科催化剂1000交换机(准确地说是C100-16P-2G-L),并且在将标记的多播从一个端口传递到另一个端口时遇到了麻烦。我们想传递它是(标记),我认为它应该是可能的,但如何配置(我们需要传递多播流量与id=257)?默认配置肯定不起作用。
一些与默认配置相关的其他细节:
这种类型的交换机默认使用vlan=1,所以如果我发送带有vlan id=1标记的多播通信量,它就会被取消标记--这不是我所需要的。
我还发现:
Switch#show topology
Topology Address Family Associated VRF State
base ipv4 default UP
base ipv6 default DOWN
base ipv4 multicast default DOWN
base ipv6 multicast default DOWN它可能是相关的,以及如何改变拓扑?
这些数据包是从主机发送的:
$ sudo mz v_eno1 -v -c 0 -d 1s -B 239.0.0.5 -t udp "dp=32000" -P "AAAA"
IP: ver=4, len=32, tos=0, id=0, frag=0, ttl=255, proto=17, sum=0, SA=198.19.4.250, DA=239.0.0.5,
payload=[see next layer]
UDP: sp=0, dp=32000, len=12, sum=0,
payload=41:41:41:41
....在主机上捕获:
$ tcpdump -nn "udp port 32000 or (vlan and udp port 32000)" -e -i eno1 -Xvvv
16:20:02.364860 f6:e0:32:f0:7b:74 > 01:00:5e:00:00:05, ethertype 802.1Q (0x8100), length 50: vlan 257, p 0, ethertype IPv4, (tos 0x0, ttl 255, id 26302, offset 0, flags [none], proto UDP (17), length 32)
198.19.4.250.0 > 239.0.0.5.32000: [udp sum ok] UDP, length 4
0x0000: 4500 0020 66be 0000 ff11 9afb c613 04fa E...f...........
0x0010: ef00 0005 0000 7d00 000c 4640 4141 4141 ......}...F@AAAAUPDATE 1
试图在传入/输出端口上设置主干,但是:
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface GigabitEthernet1/0/2
Switch(config-if)#switchport mode trunk
Switch(config-if)#vlan dot1q tag native
^
% Invalid input detected at '^' marker.
Switch(config-if)#switchport trunk ?
allowed Set allowed VLAN characteristics when interface is in trunking mode
native Set trunking native characteristics when interface is in trunking
mode
pruning Set pruning VLAN characteristics when interface is in trunking mode 我应该选择主干模式吗?
UPDATE 2
其中一个端口的当前设置:
Switch#show interfaces GigabitEthernet1/0/4 switchport
Name: Gi1/0/4
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: disabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none UPDATE 3
尝试在两个端口上安装主干之后:
interface GigabitEthernet1/0/2
switchport trunk allowed vlan 257
switchport trunk native vlan 257
switchport mode trunk
interface GigabitEthernet1/0/4
switchport trunk allowed vlan 257
switchport trunk native vlan 257
switchport mode trunk 还是没有经过..。
发布于 2022-04-04 21:18:12
根据思科文档,特定的开关模型不允许对本机VLAN进行标记:
一般限制
如果希望在主干接口上标记VLAN 1(默认的本机VLAN),则需要将本机VLAN更改为不同的VLAN编号,如下所示:
switchport trunk native vlan 12了解大多数终端设备(个人电脑、打印机、服务器等)通常不要理解标记的帧,并将其删除为损坏的帧,因此您必须确保连接到主干接口的设备支持并配置为理解标记帧(主干)。
另外,第二层安全最佳实践是永远不要使用VLAN 1或中继本地VLAN。将访问接口分配给不同的VLAN编号,并使用switchport trunk allowed命令将本机VLAN限制在主干接口上。
默认VLAN和本机VLAN是两个不同的概念,尽管它们在默认情况下都是VLAN 1。
https://serverfault.com/questions/1097768
复制相似问题