三层交换配置

作者: admin 分类: 网络 发布时间: 2019-04-29 00:12 浏览:628 次    

%title插图%num

1、SW1配置

en

vlan database

vlan 2

vlan 3

exit

config t

ip routing

int f1/0

swit mode trunk

int f1/1

no switch

ip add 10.1.1.1 255.255.255.252

no sh

int vlan 1

ip add 192.168.1.1 255.255.255.0

no sh

int vlan 2

ip add 192.168.2.1 255.255.255.0

no sh

int vlan 3

ip add 192.168.3.1 255.255.255.0

no sh

exit

ip route 0.0.0.0 0.0.0.0 10.1.1.2

2、SW2配置

en

vlan date

vlan 2

vlan 3

exit

config t

int f1/0

switch mode trunk

int f1/1

swit access vlan 1

int f1/2

swit access vlan 2

int f1/3

swit access vlan 3

 

3、R1配置

en

config t

int f0/0

ip add 10.1.1.2 255.255.255.0

no sh

int loop0

ip add 192.168.10.1 255.255.255.0

no sh

int loop1

ip add 192.168.20.1 255.255.255.0

no sh

exit

ip route 192.168.1.0 255.255.255.0 10.1.1.1

ip route 192.168.2.0 255.255.255.0 10.1.1.1

ip route 192.168.3.0 255.255.255.0 10.1.1.1

end

show ip route

4、pc配置

C1:192.168.2.2/24 C2:192.168.2.2/24 C3:192.168.3.1/24

5、测试

%title插图%num

 


温馨提示:如无特殊说明,本站文章均为作者原创,转载时请注明出处及相应链接!

发表评论