在交换机SA与SB上建立VLAN并把端口加入相应的VLAN,配置相关端口为Trunk模式。

2025-04-04 05:25:06
推荐回答(2个)
回答1:

楼主,你好

在帮你写配置之前,

有两点希望你能记下来哈。

  1. VLAN间的通讯有两种方式

    (1).单臂路由

    (2). 三层SVI

2.Trunk模式到底是干嘛用的?

简单来说,Trunk链路就是允许多个VLAN数据通过。

路由器2811配置:

ip dhcp excluded-address 192.168.10.1

ip dhcp excluded-address 192.168.20.1

!

ip dhcp pool 10

network 192.168.10.0 255.255.255.0

default-router 192.168.10.1

dns-server 202.103.24.68

ip dhcp pool 20

network 192.168.20.0 255.255.255.0

default-router 192.168.20.1

dns-server 202.103.24.68

!

interface GigabitEthernet0/1

no ip address

duplex auto

speed auto

!

interface GigabitEthernet0/1.10

encapsulation dot1Q 10

ip address 192.168.10.1 255.255.255.0

!

interface GigabitEthernet0/1.20

encapsulation dot1Q 20

ip address 192.168.20.1 255.255.255.0

SA交换机:

interface FastEthernet0/1

switchport mode trunk

!

interface FastEthernet0/2

switchport access vlan 10

switchport mode access

!

interface FastEthernet0/3

switchport access vlan 20

switchport mode access

interface GigabitEthernet0/1

switchport mode trunk

SB交换机:

interface FastEthernet0/1

switchport mode trunk

!

interface FastEthernet0/2

switchport access vlan 10

switchport mode access

!

interface FastEthernet0/3

switchport access vlan 20

switchport mode access

回答2:

可以