二层交换+三层路由=三层交换机。
三层交换机的端口:
三层交换机的所有物理接口都是交换端口,不能给交换端口配置IP,三层交换的路由端口配置vlan虚接口为vlan的网关接口;
简易配置如下-vlan 设置,接口模式配置
[sw]vlan batch 1 2 3
Info: This operation may take a few seconds. Please wait for a moment...done.[sw]interface g0/0/1
[sw-GigabitEthernet0/0/1]port link-type access
[sw-GigabitEthernet0/0/1]port default vlan 1
[sw-GigabitEthernet0/0/1]q
[sw]interface g0/0/2
[sw-GigabitEthernet0/0/2]port link-type access
[sw-GigabitEthernet0/0/2]port default vlan 2
[sw-GigabitEthernet0/0/2]q
[sw]interface g0/0/3
[sw-GigabitEthernet0/0/3]port link-type access
[sw-GigabitEthernet0/0/3]port default vlan 3
[sw-GigabitEthernet0/0/3]q
给虚接口配置IP地址
[sw]interface Vlanif 1
[sw-Vlanif1]ip address 192.168.1.254 24
[sw-Vlanif1]q[sw]interface Vlanif 2
[sw-Vlanif2]ip address 192.168.2.254 24
[sw-Vlanif2]q[sw]interface Vlanif 3
[sw-Vlanif3]ip address 192.168.3.254 24
[sw-Vlanif3]q