单臂路由的配置

在路由器上配置

int fa0/0.1

en dot1q id

ip add 192.168.10.1 255.255.255.0

no shut

int fa0/0.2

en dot1q id

ip add 192.168.20.1 255.255.255.0

no shut

int fa0/0

no shut

show vlan-sw brief     //查看vlan信息//

--------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------

路由器上搭建dhcp

全局模式下

ip dhcp pool 名字      //定义地址池名字//

network 192.168.100.0 255.255.255.0      //动态分配ip地址段//

default-router 192.168.100.1   //配置网关//

dns-server 9.9.9.9   //为客户端配置dns地址//

lease 天数     //地址租约//

ip dhcp excluded-address 192.168.100.2 192.168.100.5

ip dhcp excluded-address 192.168.100.6     //预留静态分配ip地址//

----------------------------------------------------------------------------------------------

-----------------------------------------------------------------------------------------------