PC0和PC1分别处在不同VLAN,需通过3层交换机SVI接口实现VLAN间通信
2层交换机配置
vlan 11
exit
vlan 12
exit
interface Vlan11
ipaddress 11.1.1.1 255.255.255.0
!
interface Vlan12
ipaddress 12.1.1.1 255.255.255.0
!
interface FastEthernet0/1
switchport mode trunk
switchport trunk allowed vlan all
noshutdown
exit
3层交换机配置
vlan 11
exit
vlan 12
exit
!
interface Vlan11
ipaddress 11.1.1.1 255.255.255.0
!
interface Vlan12
ipaddress 12.1.1.1 255.255.255.0
interface FastEthernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
switchport trunk allowed vlan all
noshutdown
exit
ip routing
来源:CSDN
作者:mca_Zhenzhong
链接:https://blog.csdn.net/u011311614/article/details/14043809