18.3 配置DHCP

图片[1]-18.3 配置DHCP-大赛人网
图18-3 DHCP配置网络拓扑

1.R1配置OSPF

[R1]ospf 1 router-id 1.1.1.1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 12.1.1.0 0.255.255.255

2.R2配置OSPF

[R2]ospf 1 router-id 2.2.2.2
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 12.1.1.0 0.255.255.255

3.R2配置DHCP方法一:基于地址池方式

[R2]dhcp enable
[R2]ip pool dsrw
[R2-ip-pool-dsrw]network 192.168.1.0 mask 255.255.255.0
[R2-ip-pool-dsrw]gateway-list 192.168.1.254
[R2-ip-pool-dsrw]dns-list 114.114.114.114 8.8.8.8
[R2-ip-pool-dsrw]domain-name dsrw.com
[R2]interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]dhcp select global 

4.R2配置DHCP方法二:基于接口方式

[R2]dhcp enable
[R2]interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]dhcp select interface
[R2-GigabitEthernet0/0/1]dhcp server dns-list 114.114.114.114 8.8.8.8
[R2-GigabitEthernet0/0/1]dhcp server domain-name dsrw.com

5.PC1设置自动获取IP地址,查看获取IP地址。

PC>ipconfig 
Link local IPv6 address...........: fe80::5689:98ff:fed9:1a54
IPv6 address......................: :: / 128
IPv6 gateway......................: ::
IPv4 address......................: 192.168.1.253
Subnet mask.......................: 255.255.255.0
Gateway...........................: 192.168.1.254
Physical address..................: 54-89-98-D9-1A-54
DNS server........................: 114.114.114.114
                                    8.8.8.8
© 版权声明
THE END
喜欢就支持一下吧
点赞6 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称

    请登录后查看评论内容