Cisco Catalyst 伪接口?

网络工程 局域网 思科-ios 顺式催化剂 思科命令 界面
2022-02-07 02:26:39

我想我记得在某处读过,您可以通过伪接口将多个 VLAN 分配给单个接口。不过,使用该词汇进行谷歌搜索并不会返回正确的结果,所以我希望我只是使用了错误的词。我有一台运行 12.2(18)EW3 的 Cisco WS-C4507R(​​我知道它很旧)。

我认为语法如下所示,但“.1”并没有创建新界面。

MySwitch#sh run int g4/47
Current configuration : 149 bytes
!
interface GigabitEthernet4/47
 description "The Server's address on VLAN 7"
 switchport access vlan 7
 switchport mode access
 no cdp enable
end

MySwitch#sh run int g4/47.1
Current configuration : 151 bytes
!
interface GigabitEthernet4/47
 description "The Server's address on VLAN 12"
 switchport access vlan 12
 switchport mode access
 no cdp enable
end

我是不是记错了这个功能?这是一件事,但不是我的旧 AF IOS?看来我可以在客户端机器上的单个物理 NIC 上分配两个完全不同的 IP,但我还需要在两个适当的 VLAN 上设置其交换机上行链路。我是否愿意将接口设置为中继 int 并在客户端 NIC 上有两个不同的 IP?

编辑:在单个 NIC 上拥有具有两个 IP 的客户端计算机,除非 NIC 配置了桥接或路由,否则不会创建广播循环/风暴,对吗?

2个回答

您正在寻找“子接口”。Catalyst 4500 系列不支持该功能,但其他一些 Catalyst 支持(6K 和我相信一些较新的 9K)

您正在寻找的功能是子接口,但如前所述,大多数交换机不支持此功能。它们确实支持类似的 VLAN 接口。

子接口示例(棒上的路由器)

此路由器上的 Gi0/0 将连接到为具有 VLAN 10 和 20 的 VLAN 中继配置的下游交换机。

interface gi0/0
  description MAIN Physical
  no ip address
interface gi0/0.10
  description DATA VLAN Gateway
  ip address 10.16.10.1 255.255.255.0
  no ip proxy-arp
interface gi0/0.20
  description Voice VLAN Gateway
  ip address 10.16.20.1 255.255.255.0
  no ip proxy-arp

VLAN 接口示例

在此示例中,没有额外的物理路由器,第 3 层交换机将处理路由。

interface vlan 10
  description DATA VLAN Gateway
  ip address 10.16.10.1 255.255.255.0
  no ip proxy-arp
interface vlan 20 
  description Voice VLAN Gateway
  ip address 10.16.20.1 255.255.255.0
  no ip proxy-arp