用VLANIF配置三层交换

用VLANIF配置三层交换

1.在S1上创建vlan10和vlan20,并将接口划入对应vlan
S1]vlan batch 10 20

[S1]interface Ethernet 0/0/2
[S1-Ethernet0/0/2]port link-type access
[S1-Ethernet0/0/2]port default vlan 10
[S1-Ethernet0/0/2]quit

[S1]interface Ethernet 0/0/3
[S1-Ethernet0/0/3]port link-type access
[S1-Ethernet0/0/3]port default vlan 20
[S1-Ethernet0/0/3]quit

2.在S1上配置三层交换
SW1]interface Vlanif 10
[SW1-Vlanif10]ip address 10.1.1.100 24
[SW1-Vlanif10]quit

[SW1]interface Vlanif 20
[SW1-Vlanif20]ip address 10.1.2.100 24
[SW1-Vlanif20]quit

猜你喜欢

转载自blog.51cto.com/13212728/2516078
今日推荐