vlan+vtp+dhcp+三层交换+中继 综合实验
(附视频地址:http://down.51cto.com/data/792029)
网络拓扑:
一、Trunk
为2层交换f0/1配置trunk
sw mo trunk
为3层交换f0/1配置trunk
switchport trunk encapsulation dot1q
(encapsulation trunk dot1q)
sw mo trunk
二、VTP
vlan data
vtp domain benet
vlan 2
vlan 3
vlan 4
exit
三、三层交换
在3层交换上配置vlan 的网关
int vlan 2
ip add 192.168.2.254 255.255.255.0
no shut
exit
int vlan 3
ip add 192.168.3.254 255.255.255.0
no shu
exit
int vlan 4
ip add 192.168.4.254 255.255.255.0
no shu
exit
配置默认路由:
en
conf t
ip route 172.16.0.0 255.255.0.0 10.0.0.2
end
四、端口划入 VLAN
在2层交换上,把端口分到VLAN 中
int f0/2
sw ac vlan 2
int f0/3
sw acc vlan 3
int f0/4
sw acc vlan 4
五、DHCP服务器 和中继
在3层交换上上。
en
conf t
ip dhcp pool benet
network 172.16.0.0
default 172.16.0.1
exit
六、在路由器上配置中继
int f0/1
ip helper-address 10.0.0.1
七、在3层交换上 F0/2开启三层接口配置IP地址
no sw
ip add 10.0.0.1 255.0.0.0
no shu
exit
八、在R1配置接口IP 和默认路由(汇总的即可)
int f0/0
ip add 10.0.0.2 255.0.0.0
no shut
int f0/1
ip add 172.16.0.1 255.255.0.0
no shu
ip route 192.168.0.0 255.255.0.0 10.0.0.1
转载于:https://blog.51cto.com/710512442/1200397