zoukankan      html  css  js  c++  java
  • 路由器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地址了噢

  • 相关阅读:
    Spring总结(三)
    lucene全文检索
    知识点
    postman本地测试post接口
    第一份任务,写接口验证接口写文档
    spring Date JPA的主要编程接口
    springmvc之格式化要显示的小数或者日期。
    限制action所接受的请求方式或请求参数
    正则表达式映射
    Url通配符映射
  • 原文地址:https://www.cnblogs.com/LilacStrawberry/p/9264056.html
Copyright © 2011-2022 走看看