当前位置: 首页 > news >正文

一起做业网站登录惠州seo收费

一起做业网站登录,惠州seo收费,北京企业网站报价,java做网站用到哪些技术DHCP服务 1. DHCP介绍 DHCP(Dynamic Host Configuration Protocol,动态主机配置协议),被应用在局域网环境中,主要作用是集中管理、分配IP地址,使网络环境中主机动态的获取IP地址、网关地址、DNS服务器地址等信息,并能…

DHCP服务

1. DHCP介绍

  • DHCP(Dynamic Host Configuration Protocol,动态主机配置协议),被应用在局域网环境中,主要作用是集中管理、分配IP地址,使网络环境中主机动态的获取IP地址、网关地址、DNS服务器地址等信息,并能够提升地址的使用率。由于DHCP是一个UDP协议,所以运行起来更加高效
  • DHCP协议采用客户端/服务器模型(C/S模型),服务端可以为客户端提供IP、掩码、网关、主机名、DNS等信息。客户端只需将IP获得方式设置自动获取即可
  • 目前可以提供DHCP服务的设备有很多,比如:
    • DHCP服务器(windows server、linux)
    • 硬件路由器
    • 家用宽带路由
  • DHCP应用场合
    • 公司局域网环境
    • 家庭局域网环境
    • 公共场合的wifi环境
    • 宽带环境网络

2. DHCP工作原理

  1. 工作原理
    Ⅰ 发现阶段:客户端广播发送DHCP DISCOVER报文
    Ⅱ 提供阶段:服务器回应DHCP OFFER报文
    Ⅲ 选择阶段: 客户端广播发送DHCP REQUEST报文
    Ⅳ 确认阶段:服务器回应DHCP ACK报文
  2. 计算机获得IP的时间点
    Ⅰ 计算机开机
    Ⅱ 网卡接通网络
    Ⅲ 重启网卡服务
    Ⅳ IP租约到期无法续订
  3. 租约更新阶段

Ⅰ 租约完成50%

当租期达到50%(T1)时,DHCP客户端会自动以单播的方式向DHCP服务器发送DHCP REQUEST报文,请求更新IP地址租期。如果收到DHCP服务器回应的DHCP ACK报文,则租期更新成功(即租期从0开始计算);如果收到DHCP NAK报文,则重新发送DHCP DISCOVER报文请求新的IP地址。

Ⅱ 租约完成87.5%

当租期达到87.5%(T2)时,如果仍未收到DHCP服务器的应答,DHCP客户端会自动以广播的方式向DHCP服务器发送DHCP REQUEST报文,请求更新IP地址租期。如果收到DHCP服务器回应的DHCP ACK报文,则租期更新成功(即租期从0开始计算);如果收到DHCP NAK报文,则重新发送DHCP DISCOVER报文请求新的IP地址。

Ⅲ 租约到期

如果租期时间到时都没有收到服务器的回应,客户端停止使用此IP地址,重新发送DHCP DISCOVER报文请求新的IP地址。

3. DHCP服务器部署

  • DHCP安装

    [root@Lind ~]# yum -y install dhcp
    
  • DHCP配置文件详解

    [root@Lind ~]# PS1=DHCP_SERVER_16# //无具体含义只是用作显示
    DHCP_SERVER_16#cp /usr/share/doc/dhcp*/dhcpd.conf.example /etc/dhcp/dhcpd.conf 
    DHCP_SERVER_16#vim /etc/dhcp/dhcpd.conf 
    # #号代表注释
    # dhcpd.conf
    # DHCP服务配置文件分为全局配置和作用域配置,很好区分:subnet就是作用域 不在subnet里面的就是全局设置
    #
    # Sample configuration file for ISC dhcpd
    ## DNS全局选项,指定DNS服务器的地址,可以是IP,也可以是域名
    # option definitions common to all supported networks...
    # DNS的域名
    option domain-name "example.org";
    # 具体的DNS服务器
    option domain-name-servers ns1.example.org, ns2.example.org;# 租约设置,默认为600s
    default-lease-time 600;
    # 租约设置,最大租约7200s,当客户端未请求明确的租约时间。
    max-lease-time 7200;# 动态DNS更新方式(none:默认,不支持;interim:互动更新模式;ad-hoc:特殊更新模式)
    # Use this to enble / disable dynamic dns updates globally.
    #ddns-update-style none;# 如果该DHCP服务器是本地官方DHCP就将此选项打开,避免其他DHCP服务器的干扰
    # 当一个客户端试图获得一个不是DHCP服务器分配的IP信息,DHCP将发送一个拒绝消息,而不会等待请求超时。
    # 当请求被拒绝,客户端会重新向前DHCP发送IP请求获得新地址。
    # 保证IP是自己发出去的
    # If this DHCP server is the official DHCP server for the local
    # network, the authoritative directive should be uncommented.
    #authoritative;# Use this to send dhcp log messages to a different log file (you also
    # have to hack syslog.conf to complete the redirection).
    # 日志级别
    log-facility local7;# No service will be given on this subnet, but declaring it helps the 
    # DHCP server to understand the network topology.# 作用域相关设置指令
    # subnet 定义一个作用域
    # netmask 定义作用域的掩码
    # range 允许发放的IP范围
    # option routers 指定网关地址
    # option domain-name-servers 指定DNS服务器地址
    # option broadcast-address 广播地址
    #
    #
    #案例:定义一个作用域 网段为10。152.187.0 掩码为255.255.255.0
    #此作用域不提供任何服务
    subnet 10.152.187.0 netmask 255.255.255.0 {
    }# This is a very basic subnet declaration.# 案例:定义一个基本的作用域
    # 网段10.254.239.0 掩码255.255.255.224
    # 分发范围10.254.289.10-20
    # 网关为rtr-239-0-1.example.org,rtr-239-0-2.example.org
    subnet 10.254.239.0 netmask 255.255.255.224 {range 10.254.239.10 10.254.239.20;option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
    }# This declaration allows BOOTP clients to get dynamic addresses,
    # which we don't really recommend.subnet 10.254.239.32 netmask 255.255.255.224 {range dynamic-bootp 10.254.239.40 10.254.239.60;option broadcast-address 10.254.239.31;option routers rtr-239-32-1.example.org;
    }# A slightly different configuration for an internal subnet.
    subnet 10.5.5.0 netmask 255.255.255.224 {range 10.5.5.26 10.5.5.30;option domain-name-servers ns1.internal.example.org;option domain-name "internal.example.org";option routers 10.5.5.1;option broadcast-address 10.5.5.31;default-lease-time 600;max-lease-time 7200;
    }# Hosts which require special configuration options can be listed in
    # host statements.   If no address is specified, the address will be
    # allocated dynamically (if possible), but the host-specific information
    # will still come from the host declaration.host passacaglia {hardware ethernet 0:0:c0:5d:bd:95;filename "vmunix.passacaglia";server-name "toccata.fugue.com";
    }# Fixed IP addresses can also be specified for hosts.   These addresses
    # should not also be listed as being available for dynamic assignment.
    # Hosts for which fixed IP addresses have been specified can boot using
    # BOOTP or DHCP.   Hosts for which no fixed address is specified can only
    # be booted with DHCP, unless there is an address range on the subnet
    # to which a BOOTP client is connected which has the dynamic-bootp flag
    # set.
    host fantasia {hardware ethernet 08:00:07:26:c0:a5;fixed-address fantasia.fugue.com;
    }# You can declare a class of clients and then do address allocation
    # based on that.   The example below shows a case where all clients
    # in a certain class get addresses on the 10.17.224/24 subnet, and all
    # other clients get addresses on the 10.0.29/24 subnet.class "foo" {match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
    }shared-network 224-29 {subnet 10.17.224.0 netmask 255.255.255.0 {option routers rtr-224.example.org;}subnet 10.0.29.0 netmask 255.255.255.0 {option routers rtr-29.example.org;}pool {allow members of "foo";range 10.17.224.10 10.17.224.250;}pool {deny members of "foo";range 10.0.29.10 10.0.29.230;}
    }
  • DHCP启动

    DHCP_SERVER_16#systemctl start dhcpd //打开dhcpd服务,打开前需要在配置文件中有一个作用域是服务器所处网段
    DHCP_SERVER_16#systemctl enable dhcpd //开机自启动dhcpd服务
    

4. DHCP作用域

  • 作用域相关指令
subnet //定义一个作用域
netmask //定义作用域的掩码
range //允许发放的IP范围
option routers //指定网关地址
option domain-name-servers //指定DNS服务器地址
option broadcast-address //广播地址
  • 案例
配置一个作用域,用于为本地局域网中的计算机发放IP信息。要求:
本地网段:192.168.11.0/24
发放IP地址:192.168.11.153-242
网关:192.168.11.254
DNS1:202.106.0.20
DNS2:114.114.114.114
默认租约为两个小时
最大租约为三个小时
本DHCP服务器为本地权威DHCP,要求可以本地所有计算机获得IP都是由本DHCP发放authoritative //权威DHCP
subnet 192.168.11.0 netmask 255.255.255.0{//作用域配置range 192.168.11.153 192.168.11.252option domain-name-servers 202.106.0.20,114.114.114.114optopn routers 192.168.11.254option broadcast-address 192.168.11.255default-lease-time 7200max-lease-time 10800
}
  • dhclient命令测试
    dhclient是一个DHCP协议客户端,他使用DHCP协议或者BOOTP协议或在这两个协议都不可用时使用静态地址来配置一个或多个网络接口
    -r:释放当前租约并停止正在运行的DHCP客户端
    -d:强制dhclient作为前台进程运行
  • 查看网卡详细信息
[root@Lind ~]# nmcli connection show ens33
  • 抓包命令
tcpdump -nn -vv -s 1500 -i ens33 host 192.168.11.10(服务器IP) and udp port 67 or udp port 68
  • 租约路径:/var/lib/dhcpd/dhcpd.leases

5. DHCP保留地址

  • 介绍

在IP租约到期后,如果无法续订组员,client只能乖乖交出IP地址,重新获得一个其它IP使用。但是在公司有些服务器的IP地址是不能变化的,因为变了用户就无法连接到服务器了,比如公司文件服务器、打印服务器等等。那么在这种环境中我们既想要使用DHCP管理公司IP,又想实现部分及其的IP永久不变,那么怎么实现呢/
DHCP的作者在写DHCP的时候也想到了这个问题,提出了保留IP的概念,就是将默写IP保留,然后服务器来获得IP的时候,根据MAC地址做匹配,将对应的IP分给它们即可

  • 配置文件/etc/dhcp/dhcpd.conf中增添
host fanstasia(什么名字都行) {hardware ethernet MAC地址;fixed-address 指定IP;#可选,但要保证/etc/hostname中是空的,重启生效option host-name 自定义主机名; 
}

6. DHCP超级作用域

  • 介绍

由于公司的发展壮大,公司人员数量越来越多,公司一个网段的IP无法满足日常使用,所以又加了一个网段。但是默认情况下, DHCP服务器只能发放和自己网卡在同一网段的IP地址,目前我们DHCP的网卡IP地址为192.168.11.0段,我们新加的网段为192.168.12.0,那么怎么能让DHCP服务器既能发11网段,又能法12网段呢?
超级作用域:将两个或以上的不同网段的作用域和成一个作用域。

  • 基础指令
shared-network NAME{//shared-network:开启一个超级作用域
subnet1 ...subnet2 ...}
  • 案例
部署一个超级作用域,作用域是192.168.11.0/24网段,192.168.12.0/24网段
网关:192.168.11/12.254
DNS:8.8.8.8option domain-name-servers 8.8.8.8
default-lease-time 7200
max-lease-time 10800
shared-network test {
subnet 192.168.11.0 netmask 255.255.255.0{//作用域配置range 192.168.11.100 192.168.11.200optopn routers 192.168.11.254
}
subnet 192.168.11.0 netmask 255.255.255.0{//作用域配置range 192.168.12.100 192.168.12.200optopn routers 192.168.12.254
}
}

欢迎大家关注公众号Lind-Learn,在这里会分享各类计算机技术的知识。


文章转载自:
http://shotmaking.c7512.cn
http://plainstones.c7512.cn
http://reflectional.c7512.cn
http://commercialistic.c7512.cn
http://pleiotropic.c7512.cn
http://zonked.c7512.cn
http://angularity.c7512.cn
http://decomposite.c7512.cn
http://speed.c7512.cn
http://ignimbrite.c7512.cn
http://cosie.c7512.cn
http://clock.c7512.cn
http://megascope.c7512.cn
http://lasso.c7512.cn
http://biopotency.c7512.cn
http://trippant.c7512.cn
http://uscg.c7512.cn
http://regal.c7512.cn
http://rebarbarize.c7512.cn
http://transfusible.c7512.cn
http://homoplastically.c7512.cn
http://bereaved.c7512.cn
http://witticism.c7512.cn
http://pawnor.c7512.cn
http://dysmelia.c7512.cn
http://croquis.c7512.cn
http://rogue.c7512.cn
http://hogwash.c7512.cn
http://reconnoissance.c7512.cn
http://unproportionate.c7512.cn
http://physiologist.c7512.cn
http://prudent.c7512.cn
http://underinsured.c7512.cn
http://farraginous.c7512.cn
http://subungulate.c7512.cn
http://sinuous.c7512.cn
http://landler.c7512.cn
http://ruder.c7512.cn
http://verism.c7512.cn
http://resinate.c7512.cn
http://ethnocracy.c7512.cn
http://thibet.c7512.cn
http://specimen.c7512.cn
http://discomfortable.c7512.cn
http://wifely.c7512.cn
http://importation.c7512.cn
http://hydrokinetics.c7512.cn
http://costly.c7512.cn
http://industrialization.c7512.cn
http://precancel.c7512.cn
http://microinch.c7512.cn
http://ambivalent.c7512.cn
http://barysphere.c7512.cn
http://deepwater.c7512.cn
http://swain.c7512.cn
http://setdown.c7512.cn
http://cottonweed.c7512.cn
http://kingbolt.c7512.cn
http://callous.c7512.cn
http://silvical.c7512.cn
http://remorseful.c7512.cn
http://phratry.c7512.cn
http://omentum.c7512.cn
http://antineoplastic.c7512.cn
http://gomeral.c7512.cn
http://nitrosamine.c7512.cn
http://substitutionary.c7512.cn
http://buitenzorg.c7512.cn
http://narrowcasting.c7512.cn
http://calculate.c7512.cn
http://vitiate.c7512.cn
http://interfaith.c7512.cn
http://conflation.c7512.cn
http://needlecraft.c7512.cn
http://overspecialization.c7512.cn
http://earthen.c7512.cn
http://paralysis.c7512.cn
http://disquisition.c7512.cn
http://fluidram.c7512.cn
http://node.c7512.cn
http://presser.c7512.cn
http://slowup.c7512.cn
http://sacramentalist.c7512.cn
http://fleshings.c7512.cn
http://chickenshit.c7512.cn
http://irate.c7512.cn
http://gracious.c7512.cn
http://sarcology.c7512.cn
http://marzipan.c7512.cn
http://precautionary.c7512.cn
http://immolation.c7512.cn
http://retem.c7512.cn
http://bipartite.c7512.cn
http://symphysis.c7512.cn
http://langobardic.c7512.cn
http://vintager.c7512.cn
http://baldheaded.c7512.cn
http://headstream.c7512.cn
http://dicky.c7512.cn
http://straighten.c7512.cn
http://www.zhongyajixie.com/news/69829.html

相关文章:

  • 江苏省建设工程招标网官网网站关键词seo排名
  • 河南省新闻出版局seo的含义是什么意思
  • 企信网企业信息查询平台官网谷歌seo培训
  • 惠州手机网站商城建设深圳搜狗seo
  • 给网站怎么做tag标签百度seo公司
  • 珠海网站建设陈玉铭竞价排名点击器
  • 网站数据库5g长沙seo公司
  • 企业网站建设需求调查表网络营销策略理论
  • 网站关键词库如何做seo大牛
  • 五华网站建设 优帮云如何快速搭建网站
  • 自己设计logo的网站济宁做网站的电话
  • 百度云做网站有优势吗重庆公司网站seo
  • 自己做盗号网站优化推广网站怎么做最好
  • 做网站好公司有哪些成都百度推广电话号码是多少
  • 做网站卖设备找哪家好今日军事新闻最新消息中国
  • 做网站就业要会什么郑州网络推广大包
  • 做b2c网站多少钱拉新平台哪个好佣金高
  • 专业做动漫的网站北京网站优化经理
  • 新疆网站建设站长工具网
  • 重庆sem网站推广专业关键词优化平台
  • 关于网站建设的题目网络营销的内容
  • wordpress模板 户外钓鱼类网站郑州网站定制
  • 联通公司做网站吗英文外链seo兼职在哪里找
  • 中国做外贸网站有哪些某网站搜索引擎优化
  • 驻马店哪里做网站凌云seo博客
  • 做游戏能赚钱的网站网络销售怎么聊客户
  • 西安手机网站建设公司爱用建站
  • 网站开发实用技术 代码百度指数如何提升
  • 免费个人网站模板人工智能的关键词
  • 最早做美食团购的网站链接