cisco交换用于二层时的基本配置

switch#conf t
switch#vlan vlan-id
switch#interface fe 27/gi 27
switch#switchport mode access/trunk

switchswitchport access vlan vlan-id

switch#switchport trunk allowed vlan add vlan-id

switch#exit
switch#exit

查询所配置端口信息
switch#show interfaces switchport fe 27/gi 27




cisco交换用于二层时的基本配置_第1张图片

配置dhcp snooping

switch#interface gi 28
switch#switchport access vlan vlan-id
switch#exit

在全局下开启dhcp snooping

switch#ip dhcp snooping
switch#

在vlan下应用dhcp snooping

switch#ip dhcp snooping vlan vlan-id
switch#ip dhcp snooping verify mac-address

配置信任端口,以便接收三层设备的dhcp server

switch#interface gi 27
switch#ip dhcp snooping trust
switch#exit

查询dhcp snooping

switch#exit
switch#exit
switch#show ip dhcp snooping


 

cisco交换用于二层时的基本配置_第2张图片

cisco交换用于二层时的基本配置_第3张图片

多配了个trust端口,删除掉

cisco交换用于二层时的基本配置_第4张图片

保存配置

保存配置
write

 

你可能感兴趣的:(网络)