Linux配置手冊(二)配置DHCP服務器

1.檢查是否安裝DHCP服務器軟件

image

2.掛在RHEL5系統光盤

image

3.安裝DHCP服務軟件

image

4.將模板配置文件復制并覆蓋現在的配置文件

image

5.配置修改dhcpd.conf文件

image

配置信息

默認租約時間 default-lease-time

最大租約時間 max-lease-time

局域網內所有主機的域名 option domain-name

客戶機所使用的DNS option domain-name-servers

地址池范圍 range

掩碼 option subnet-mask

默認網關 option routers

特殊主機 host

Hardware Ethernet 11:22:33:44:55:66;

Fixed-address 192.168.1.1; (將目標IP地址與MAC地址綁定)

示例:

image

Ps: 寫入subnet以內的為只在192.168.1.0 網段的接口生效,而寫入subnet以外的為全局生效。

Linux客戶機:vim /etc/sysconfig/network-scripts/ifcfg-eth0 將BOOTPROTO項改為dhcp然后重新啟動網絡服務即可。

?

?

使用dhclient –d eth0為此網絡接口地址獲取新的IP地址

配置DHCP中繼

配置DHCP中繼,在中繼服務器開啟功能即可,無需配置文件

如下

安裝DHCP服務包

修改主DHCP服務器的網關指向中繼DHCP服務器1. Vi /etc/sysctl.conf 將 net.ipv4.ip_forward = (改為1)

imageimage

2. Sysctl –p 使其生效

image

3. 編輯中繼服務的配置文件,設置應用網卡和主DHCP來源

imageimage

4. 啟動中繼服務

?

?

?

?

?

?

?

?

?

?

?

image



本文轉自 鄭偉 ?51CTO博客,原文鏈接:http://blog.51cto.com/zhengweiit/371811

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/279611.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/279611.shtml
英文地址,請注明出處:http://en.pswp.cn/news/279611.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

什么是Google Play保護以及如何確保Android安全?

Android is open, flexible, and all about choice. Unfortunately, that flexibility comes more potential security issues. The good news is that Google has a system in place named Play Protect that helps keep Android secure. Android開放,靈活且具有多…

如何使計算機為您讀取文檔

Since the beginning of the computer age, people have always enjoyed making computers talk to them. These days, that functionality is built right into Windows and you can easily use it to have your PC read documents to you. 自計算機時代開始以來,人…

面試中常問的List去重問題,你都答對了嗎?

2019獨角獸企業重金招聘Python工程師標準>>> 面試中經常被問到的list如何去重,用來考察你對list數據結構,以及相關方法的掌握,體現你的java基礎學的是否牢固。 我們大家都知道,set集合的特點就是沒有重復的元素。如果集…

Coolite Toolkit學習筆記五:常用控件Menu和MenuPanel

Coolite Toolkit里的Menu控件和其他的.NET Web控件不一樣,如果只是設計好了Menu或是通過程序初始化菜單項,菜單是不會呈現在界面上的,因為Coolite Toolkit規定Menu控件需要一個容器來做依托,而這個讓Menu依托的控件就是MenuPanel&…

剛接觸git,提交文件時,遇到no changes added to commit

第一次用git 在提交(git commit -m add 文件名)的時候,遇到了一個no changes added to commit,大體意思是沒有將改變的東西提交成功,查了很多博客,才解決這個問題,然后自己也做一下筆記&#…

CSS中!important的使用

本篇文章使用最新的IE10以及firefox與chrome測試(截止2013年5月27日22:23:22)http://www.cnblogs.com/yudy/archive/2013/05/27/3102825.html CSS的原理: 我們知道,CSS寫在不同的地方有不同的優先級, .css文件中的定義…

windows命令提示符_如何個性化Windows命令提示符

windows命令提示符Command line interfaces can be downright boring and always seem to miss out on the fresh coats of paint liberally applied to the rest of Windows. Here’s how to add a splash of color to Command Prompt and make it unique. 命令行界面可能非常…

android-api28轉換到api19-不能編譯

安裝出現錯誤- rootponkan:/ # pm install /mnt/usb/sda1/app-debug.apkpkg: /mnt/usb/sda1/app-debug.apk Failure [INSTALL_FAILED_OLDER_SDK]查看系統和api版本 rootponkan:/ # getprop ro.build.version.release 5.1.1 rootponkan:/ # getprop ro.build.version.sdk 22將ap…

Java多線程編程 — 鎖優化

2019獨角獸企業重金招聘Python工程師標準>>> 閱讀目錄 一、盡量不要鎖住方法 二、縮小同步代碼塊,只鎖數據 三、鎖中盡量不要再包含鎖 四、將鎖私有化,在內部管理鎖 五、進行適當的鎖分解 正文 并發環境下進行編程時,需要使用鎖機…

Android Ap 開發 設計模式第六篇:原型模式

Prototype Pattern 名稱由來 不是利用類來產生實例對象,而是從一個對象實例產生出另一個新的對象實例 ,根據被視為原型的對象實例 ,建立起的另一個新的對象實例就稱為原型模式(Ptototype Pattern)。 需求場景 種類過多…

netty實現客戶端服務端心跳重連

前言: 公司的加密機調度系統一直使用的是http請求調度的方式去調度,但是會出現網絡故障導致某個客戶端或者服務端斷線的情況,導致很多請求信息以及回執信息丟失的情況,接著我們拋棄了http的方式,改為Tcp的方式去建立客…

為什么您仍然不應該購買《星球大戰:前線II》

If you’ve been following video game news at all for the last couple of weeks, you’ve probably heard that EA’s Star Wars: Battlefront II is having some teething troubles. EA has backpedaled to avoid more controversy, but we’re here to say: don’t fall f…

web 后臺返回json格式數據的方式(status 406)

1.在類上使用注解 RestController public class HttpComentInterface {} 2.在方法是使用注解 ResponseBody RequestMapping(path "/interface/queryRemote", method RequestMethod.POST) //可以指定請求方式ResponseBody public RemoteCommentResultData queryCo…

OpenStack Juno系列之計算節點搭建

OpenStack Juno系列之計算節點搭建 nova-compute安裝配置 -------------------- apt-get install nova-compute sysfsutils 編輯配置文件 vi /etc/nova/nova.conf [DEFAULT] verbose True rpc_backend rabbit rabbit_host controller rabbit_password RABBIT_PASS auth_str…

quantum_如何從Firefox Quantum刪除Pocket

quantumFirefox Quantum has deep integration with the Pocket read-it-later service, which is now owned by Mozilla. You’ll see a Pocket page action in the address bar, a “View Pocket List” feature in the Library, and recommended articles from Pocket on th…

vue-typescript

教你搭建typescript的vue項目 自尤大神去年9月推出vue對typescript的支持后,一直想開箱嘗試vuets,最近一個新項目準備入手typescript,也遇到了很多坑,下面就一步步來吧!!! 1. 項目創建和初始化 …

Couchbase概述

Couchbase概述 Couchbase概述 Couchbase概述Couchbase最早叫Membase,是由Memcached項目組的一些頭目另立的山頭。2011年與CouchDB合并,正式命名為Couchbase。2013年,作為NoSQL技術初創企業,拿到了2500萬美元的D輪投資。截稿時止&a…

Windows 2012 - Dynamic Access Control 淺析

Windows 2012相對于前幾個版本而已,做出了大量的改進,尤其體現在安全性和虛擬化方面。Dynamic Access Control ( 動態訪問控制)是微軟在文件服務器的訪問控制上的新功能,極大的提高了安全性和靈活性。經過一天的研究學習&#xff…

windows rt_如何在Windows RT上輕松將網站添加到Flash白名單

windows rtMicrosoft’s Surface RT and other Windows RT-based machines include the Flash browser plugin, but it only runs on websites Microsoft has whitelisted. We have covered how you can add any website to the Flash whitelist, but now there’s an easier w…

powershell實現設置程序相關性腳本

公司一直有臺服務器cpu占用很高,分析出是恒生監控程序java占用很高,且三個java程序,僅其中一個很高,要恒生解決,一直未解決,導致每周重啟,我司運維都要手動進行程序相關性設置,給運維…