Cisco 891:子接口 VS SVI 方法

网络工程 VLAN 点1q
2021-08-03 20:23:30

我有一个 SOHO 环境,我使用 Cisco 891-K9 作为 ISP GW。但是 Cisco 891 的本质是它既是路由器又是具有 10 个端口的交换机。

交换机端口(接入端口和中继端口)是否会正确转发 VLAN 或 VLAN 的广播数据包/DHCP 请求,还是只会传播中继端口?891 的情况是否如此,广播数据包不会在一台设备内泛滥?

我的第一个选择是棒上的路由器:

!
interface FastEthernet8
 no ip address
 duplex auto
 speed auto
!
interface FastEthernet8.2
 encapsulation dot1Q 10
 ip address 10.2.10.1 255.255.255.0
 ip nat inside
 ip virtual-reassembly in
 no cdp enable
!
interface FastEthernet8.70
 encapsulation dot1Q 70
 ip address 10.70.0.1 255.255.252.0
 ip nat inside
 ip virtual-reassembly in
 no cdp enable
!
!
ip dhcp pool VLAN70
 network 10.70.0.0 255.255.252.0
 dns-server 8.8.8.8 8.8.4.4 
 default-router 10.70.0.1 
!
ip dhcp pool VLAN2
 network 10.2.10.0 255.255.255.0
 dns-server 8.8.8.8 8.8.4.4 
 default-router 10.2.10.1
!

通过 SVI 的第二个选项:

!
interface FastEthernet0
 switchport mode trunk
 no ip address
!
interface Vlan2
 ip address 10.2.10.1 255.255.255.0
 ip nat inside
 ip virtual-reassembly in
!
interface Vlan70
 ip address 10.70.0.1 255.255.252.0
 ip nat inside
 ip virtual-reassembly in
!

!
ip dhcp pool VLAN70
 network 10.70.0.0 255.255.252.0
 dns-server 8.8.8.8 8.8.4.4 
 default-router 10.70.0.1 
!
ip dhcp pool VLAN2
 network 10.2.10.0 255.255.255.0
 dns-server 8.8.8.8 8.8.4.4 
 default-router 10.2.10.1
!

就我遇到的大多数路由器而言,只能做子接口,但似乎891是一个独特的案例。

1个回答

您有一个传统的 2 端口路由器中继到 8 端口交换机。891 有两个路由器端口,可以像传统的路由器端口一样使用。这两个端口通常用于广域网连接,但其中一个或两个可以设置子接口等作为传统的路由器端口。

其余8个端口为交换机端口,相当于交换机,不能作为路由器端口使用。许多 ISR 路由器可以使用交换模块;该路由器只是内置了它。要使用交换机端口,您可以使用 SVI 并将 VLAN 分配给交换机端口。您甚至可以将它们设置为中继端口,但不能将它们用作路由器端口。