交换机和路由的基本配置
拓扑图
交换机基本配置
一、创建VL
en
conf t
ho SW1 //起名
in f0/1
end
sh vl br
sh ru
vl da
vl 2 na 17dz
vl 3 na 18dz
exit
sh vl br
sh ru //敲回车
二、把接口加入VLAN
conf t
in ra f0/1-2
sw mo ac
sw av vl 2
exit
in ra f0/3-4
sw mo ac
sw ac vl 3
end
sh vl br
三、把接口配置成中继模式
conf t
in f0/24
sw mo tr
四、三层交换机
exit
in f0/1
no sw
ip ad 192.168.1.254 255.255.255.0
no sh
end
sh ip ro
五、配置管理IP
conf t
in vl 1
ip ad 192.168.1.250 255.255.255.0
no sh
路由基本配置
一、给接口配IP
en
conf t
ho R1 //起名
in f0/0
IP ad192.168.1.254 255.255.255.0
no sh
exit
in f0/1
ip ad 192.168.2.254 255.255.255.0
no sh
end
sh ip ro
sh ru