Cisco三层交换配置不同VLAN、不同网段之间通信
ping结果图
switch 0上配置:
vlan 10
exit
interface range f0/1-2
switchport access vlan 10
exit
interface gigabitEthernet 1/1
switchport trunk allowed vlan all允许所有VLAN通过
exit
interface gigabitEthernet 1/1
switchport mode trunk 配置该接口为trunk模式
exit
switch 1上配置:
vlan 20
exit
interface range f0/1-2
switchport access vlan 20
exit
interface gigabitEthernet 1/1
switchport trunk allowed vlan all 允许所有VLAN通过
exit
interface gigabitEthernet 1/1
switchport mode trunk
exit
核心交换配置:
vlan 10
exit
vlan 20
exit
interface fastEthernet f0/1
switchport trunk allowed vlan all允许所有VLAN通过
switchport mode trunk
exit
interface fastEthernet f0/2
switchport trunk allowed vlan all允许所有VLAN通过
switchport mode trunk
exit
ip routing 开启路由功能
interface vlan 10
ip address 192.168.1.1 255.255.255.0配置模式虚拟端口
exit
interface vlan 20
ip address 192.168.2.1 255.255.255.0配置模式虚拟端口
exit
页:
[1]