路由器DHCP服务器及PPP封装验证
拓撲圖如下:
?
先進行各路由器的IP設置和路由設置,將各主機的IP地址均改為DHCP自動獲取以便于驗證DHCP服務器
R1配置
en
conf t
no ip domain-lookup
hostname R1
int s0/0/0
ip addr 192.168.12.1 255.255.255.0
clock rate 64000
no shut
int f0/0
ip addr 192.168.1.1 255.255.255.0
no shut
end
conf t
router rip
version 2
no auto-summary
network 192.168.1.0
network 192.168.12.0
?
R2配置
en
conf t
no ip domain-lookup
hostname R2
int s0/0/0
ip addr 192.168.12.2 255.255.255.0
no shut
int s0/0/1
ip addr 192.168.23.1 255.255.255.0
clock rate 64000
no shut
int f0/0
ip addr 192.168.2.1 255.255.255.0
no shut
end
conf t
router rip
version 2
no auto-summary
network 192.168.2.0
network 192.168.12.0
network 192.168.23.0
?
R3配置
en
conf t
no ip domain-lookup
hostname R3
int s0/0/1
ip addr 192.168.23.2 255.255.255.0
no shut
int f0/0
ip addr 192.168.3.1 255.255.255.0
no shut
end
conf t
router rip
version 2
no auto-summary
network 192.168.3.0
network 192.168.23.0
?
在路由配置結束之后接下來我們要進行封裝驗證配置,封裝是配置在接口上的,我們應進入對應接口進行配置
在R1和R2之間?我們配置PAP驗證 ,在R2和R3之間我們配置CHAP驗證
PAP驗證如下:
PAP驗證是單向的,故我們需要在R1和R2上互相為對方配置驗證
R1配置
en
conf?t
int s0/0/0
encapsulation?ppp
ppp authentication pap
ppp pap sent-username?R1 password 123
ppp pap sent-username?R2 password 321
end
conf?t
username R2?password 321
?
R2配置
?
en
conf?t
int s0/0/0
encapsulation?ppp
ppp authentication pap
ppp pap sent-username?R1 password 123
ppp pap sent-username?R2 password 321
end
conf?t
username R1 password 123
?
PAP的驗證完成了,接下來我們要配置R2與R3的CHAP驗證
CHAP驗證本身即是雙向的
CHAP驗證配置密碼時,兩端密碼必須相同
?
R2配置
en
conf?t
int?s0/0/1
encapsulation?ppp
ppp authentication?chap
end
conf?t
username R3 password 123
?
R3配置
en
conf?t
int?s0/0/1
encapsulation?ppp
ppp authentication?chap
end
conf?t
username R2 password 123
?
這樣PPP驗證就配置結束了,接下來要配置的是DHCP服務器
我們要將R3配置為DHCP服務器,同時還要為R2和R1的F0/0端口配置DHCP-helper端口
?
R3配置
en
conf?t
ip dhcp pool 1
network 192.168.3.0 255.255.255.0
network 192.168.2.0 255.255.255.0
network 192.168.1.0 255.255.255.0
ip dhcp excluded-address 192.168.1.1
ip dhcp excluded-address 192.168.2.1
ip dhcp excluded-address 192.168.3.1
?
R2配置
en
conf?t
int?f0/0?
ip helper-address 192.168.23.2
R1配置
en
conf t
int f0/0
ip helper-address 192.168.23.2
這樣就配置結束啦,可以打開主機獲取IP地址了噢
轉載于:https://www.cnblogs.com/LilacStrawberry/p/9264056.html
總結
以上是生活随笔為你收集整理的路由器DHCP服务器及PPP封装验证的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 使用plsql developer 创建
- 下一篇: 去重算法