dhcp基本配置
dhcp配置步骤?
dhcp配置步骤?
1.首先,我们需要打开我们的电脑中的浏览器,然后在地址栏里面输入登录的地址,通常情况下的路由器的登陆地址都是192.168.0.1,我们可以通过查看路由器底部的铭牌上面的标注来进行获取登陆地址。
2.进入到路由器管理界面之后,会弹出一个路由器的登陆界面,我们需要在里面分别输入我们的用户名和密码进行登录,大部分用户的用户名和密码都是默认的admin哦,如果有修改过的,就要填写我们修改的用户名和密码了。
3.登录之后就正式进入到管理界面中了,找到dhcp服务器选项并单击选择,然后在右边将dhcp服务器勾选为启用状态,然后紧接着在下面的地址池开始地址和地址池结束地址分别填上地址。这里需要注意,我们填写的这两部分的设置要确保与路由器处于同一网段才可以。
4.设置完成后,点击保存按钮进行保存,然后重启一下路由器就可以了。
5.接下来,我们需要对电脑端进行设置了。打开我们电脑的控制面板,然后找到网络共享中心并选择里面的适配器设置的按钮。
6.然后,我们需要找到里面的本地连接,右键单击在下拉菜单栏中选择属性选项。
7.在弹出的窗口中,找到并双击ipv4协议。同时,我们需要把下面的自动获取ip地址和自动获取dns服务器这两个选项给勾选上。点击确认进行保存设置就可以了。
配置dhcp的命令和步骤?
DHCP
的配置命令
第一步:配置各个
vlan
所用的地址池和相应参数
(
1
)配置
VLAN2
所用的地址池和相应参数
Switch(config)#ipdhcppooltest2
Switch(dhcp-config)#network192.168.3.0255.255.255.0
Switch(dhcp-config)#dns-server192.168.2.30
Switch(dhcp-config)#default-router192.168.3.1
(
2
)配置
VLAN3
所用的地址池和相应参数
Switch(config)#ipdhcppooltest3
Switch(dhcp-config)#network192.168.4.0255.255.255.0
Switch(dhcp-config)#dns-server192.168.2.30
Switch(dhcp-config)#default-router192.168.4.1
(
3
)配置
VLAN4
所用的地址池和相应参数
Switch(config)#ipdhcppooltest4
Switch(dhcp-config)#network192.168.5.0255.255.255.0
Switch(dhcp-config)#dns-server192.168.2.30
Switch(dhcp-config)#default-router192.168.5.1
(
4
)配置
VLAN5
所用的地址池和相应参数
Switch(config)#ipdhcppooltest5
Switch(dhcp-config)#network192.168.6.0255.255.255.0
Switch(dhcp-config)#dns-server192.168.2.30
Switch(dhcp-config)#default-router192.168.6.1
(
5
)配置
VLAN6
所用的地址池和相应参数
Switch(config)#ipdhcppooltest6
Switch(dhcp-config)#network192.168.7.0255.255.255.0
Switch(dhcp-config)#dns-server192.168.2.30
Switch(dhcp-config)#default-router192.168.7.1
(
6
)配置
VLAN7
所用的地址池和相应参数
Switch(config)#ipdhcppooltest7
Switch(dhcp-config)#network192.168.8.0255.255.255.0
Switch(dhcp-config)#dns-server192.168.2.30
Switch(dhcp-config)#default-router192.168.8.1
(
7
)配置
VLAN8
所用的地址池和相应参数
Switch(config)#ipdhcppooltest8
Switch(dhcp-config)#network192.168.9.0255.255.255.0
Switch(dhcp-config)#dns-server192.168.2.30
Switch(dhcp-config)#default-router192.168.9.1
第二步:设置
DHCP
保留不分配的地址
Switch(config)#ipdhcpexcluded-address192.168.3.2192.168.3.10
Switch(config)#ipdhcpexcluded-address192.168.4.2192.168.4.10
Switch(config)#ipdhcpexcluded-address192.168.5.2192.168.5.10
Switch(config)#ipdhcpexcluded-address192.168.6.2192.168.6.10
Switch(config)#ipdhcpexcluded-address192.168.7.2192.168.7.10
Switch(config)#ipdhcpexcluded-address192.168.8.2192.168.8.10
Switch(config)#ipdhcpexcluded-address192.168.9.2192.168.9.10
第三步:启动路由:
(路由启动后,各
VLAN
间主机可互相访问)
Switch(config)#iprouting
第四步:配置访问控制列表
Switch(config)#access-list1permit192.168.3.00.0.0.255
Switch(config)#access-list2permit192.168.4.00.0.0.255
Switch(config)#access-list3permit192.168.5.00.0.0.255
Switch(config)#access-list4permit192.168.6.00.0.0.255
Switch(config)#access-list5permit192.168.7.00.0.0.255
Switch(config)#access-list6permit192.168.8.00.0.0.255
Switch(config)#access-list7permit192.168.9.00.0.0.255
第五步:应用访问控制列表:
(
将访问控制列表应用到各个
VLAN
中
)
Switch(config)#intvlan2
Switch(config-vlan)#ipaccess-group1out
Switch(config)#intvlan3
Switch(config-vlan)#ipaccess-group2out
Switch(config)#intvlan4
Switch(config-vlan)#ipaccess-group3out
Switch(config)#intvlan5
Switch(config-vlan)#ipaccess-group4out
Switch(config)#intvlan6
Switch(config-vlan)#ipaccess-group5out
Switch(config)#intvlan7
Switch(config-vlan)#ipaccess-group6out
Switch(config)#intvlan8
Switch(config-vlan)#ipaccess-group7out
第六步:结束并保存配置
Switch(config-vlan)#end
Switch#copyrunstart