目的:两台三层交换机的三种连接方式
1.access
2.trunk
3.undo portswitch 模拟机不支持此配置,实体机支持
第一种access
CE1配置
[~HUAWEI]vlan batch 10
[~HUAWEI]int Vlanif 10
[~HUAWEI-Vlanif10]ip add 10.10.10.1 24
[~HUAWEI]int g1/0/0
[~HUAWEI-GE1/0/0]port link-type access
[~HUAWEI-GE1/0/0]port default vlan 10
CE2配置
[~HUAWEI]vlan batch 10
[~HUAWEI]int Vlanif 10
[~HUAWEI-Vlanif10]ip add 10.10.10.2 24
[~HUAWEI]int g1/0/0
[~HUAWEI-GE1/0/0]port link-type access
[~HUAWEI-GE1/0/0]port default vlan 10
第二种trunk
CE1配置
[~HUAWEI]vlan batch 10
[~HUAWEI]int Vlanif 10
[~HUAWEI-Vlanif10]ip add 10.10.10.1 24
[~HUAWEI]int g1/0/0
[*HUAWEI-GE1/0/0]port link-type trunk
[*HUAWEI-GE1/0/0]port trunk allow-pass vlan all
CE2配置
[~HUAWEI]vlan batch 10
[~HUAWEI]int Vlanif 10
[~HUAWEI-Vlanif10]ip add 10.10.10.2 24
[~HUAWEI]int g1/0/0
[*HUAWEI-GE1/0/0]port link-type trunk
[*HUAWEI-GE1/0/0]port trunk allow-pass vlan all
第三种undo portswitch
CE1配置
[*HUAWEI]int g1/0/0
[*HUAWEI-GE1/0/0]undo portswitch
[*HUAWEI-GE1/0/0]ip add 10.10.10.1 24
CE2配置
[*HUAWEI]int g1/0/0
[*HUAWEI-GE1/0/0]undo portswitch
[*HUAWEI-GE1/0/0]ip add 10.10.10.2 24