Birmingham mumbai



Download 15,21 Mb.
Pdf ko'rish
bet370/482
Sana13.01.2022
Hajmi15,21 Mb.
#355107
1   ...   366   367   368   369   370   371   372   373   ...   482
Bog'liq
Mastering Ubuntu Server Gain expertise in the art of deploying, configuring, managing, and troubleshooting Ubuntu Server by Jay LaCroix (z-lib.org)

[
 282 
]
Now, we get to the most important part of our configuration file for DHCP. The 
following block details the specific information that will be provided to clients:
subnet 192.168.1.0 netmask 255.255.255.0 { 
    range 192.168.1.100 192.168.1.240; 
    option routers 192.168.1.1; 
    option domain-name-servers 192.168.1.1; 

This block is probably self-explanatory, but we're basically declaring our pool 
of addresses for the 
192.168.1.0
 network. We're declaring a range of IPs from 
192.168.1.100
 through 
192.168.1.240
 to be available from clients. Now when our 
DHCP server provides an address to clients, it will choose one from this pool. For 
the address pool (
range
), feel free to expand it or shrink it accordingly. For example, 
you might need more addresses than the 140 that are allowed in my sample range, 
so you may change it to something like 
192.168.1.50
 through 
192.168.1.250
. Feel 
free to experiment.
We're also providing a default gateway (
option routers
) and DNS server (
option 
domain-name-servers
) of 
192.168.1.1
. This is assuming that your router and 
local DNS server are both listed at that address, so make sure that you change it 
accordingly. Otherwise, anyone who receives a DHCP lease from your server will 
not be able to connect to anything.
Now we have our configuration file in place, but the DHCP server will likely still not 
start until we declare an interface for it to listen for requests on. You can do that by 
editing the 
/etc/default/isc-dhcp-server
 file, where you'll see a line toward the 
bottom similar to the following:
INTERFACESv4="" 
Simply type the name of the interface within the quotes:
INTERFACESv4="enp0s3" 
In case you forgot, the command to list the details of the interfaces on your server is 
ip addr show
, or the shortened version, 
ip a
.
Now that we have our DHCP server configured, we should be able to start it:
sudo systemctl start isc-dhcp-server 


Chapter 11

Download 15,21 Mb.

Do'stlaringiz bilan baham:
1   ...   366   367   368   369   370   371   372   373   ...   482




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish