其他分享
首页 > 其他分享> > 思科DHCP+VLAN实验(不同网段)

思科DHCP+VLAN实验(不同网段)

作者:互联网

思科DHCP+VLAN实验(不同网段)

点击链接实验拓扑下载
实验目的:让PC0获取到vlan10 网段的IP地址

image-20220101163705414

实验配置命令

交换机配置

多层交换机0
en

Switch#vlan database 
% Warning: It is recommended to configure VLAN from config mode,
  as VLAN database mode is being deprecated. Please consult user
  documentation for configuring VTP/VLAN in config mode.

Switch(vlan)#vlan 2
VLAN 2 modified:
Switch(vlan)#vlan 10
VLAN 10 modified:
Switch(vlan)#exit

conf t

Switch(config)#vtp mode server 
Device mode already VTP SERVER.

ip routing  //开启交换机路由功能


interface FastEthernet0/1
 switchport trunk encapsulation dot1q
 switchport mode trunk

interface FastEthernet0/3
 switchport access vlan 2
 switchport mode access
 
interface Vlan2
 ip address 192.168.2.254 255.255.255.0

interface Vlan10
 ip address 192.168.10.254 255.255.255.0
 ip helper-address 192.168.2.253

多层交换机2
en
conf t
ip routing
vtp mode client

interface FastEthernet0/1
 switchport trunk encapsulation dot1q
 switchport mode trunk
interface FastEthernet0/2
 switchport access vlan 10
 switchport mode access

交换机0
interface FastEthernet0/1
 switchport mode trunk
interface FastEthernet0/2
 switchport mode access
 

服务器配置

image-20220101164815145

image-20220101164823968

image-20220101164840015

PC机获取IP地址,ping测试

image-20220101164917111

image-20220101164958067

标签:vlan,网段,switchport,VLAN,FastEthernet0,mode,interface,DHCP
来源: https://blog.csdn.net/weixin_43663238/article/details/122268766