How to configure DHCP Server in Ubuntu Linux 18.04 ( Complete Server & client )

Поделиться
HTML-код
  • Опубликовано: 11 сен 2024
  • How to configure DHCP Server in Centos 7 , Redhat 7 , Fedora ( Complete Server & client )
    • How to configure DHCP ...
    ###############################################
    What is DHCP Server ?
    Dynamic Host Configuration Protocol (DHCP) is a network protocol that is used to enable host computers to be automatically assigned IP addresses and related network configurations from a server.
    The IP address assigned by a DHCP server to DHCP client is on a “lease”, the lease time normally varies depending on how long a client computer is likely to require the connection or DHCP configuration.
    How Does DHCP Work?
    The following is a quick description of how DHCP actually works:
    Once a client (that is configured to use DHCP) and connected to a network boots up, it sends a DHCPDISCOVER packet to the DHCP server.
    When the DHCP server receives the DHCPDISCOVER request packet, it replies with a DHCPOFFER packet.
    Then the client gets the DHCPOFFER packet, and it sends a DHCPREQUEST packet to the server showing it is ready to receive the network configuration information provided in the DHCPOFFER packet.
    Finally, after the DHCP server receives the DHCPREQUEST packet from the client, it sends the DHCPACK packet showing that the client is now permitted to use the IP address assigned to it.
    In this article, we will show you how to setup a DHCP server in Ubuntu/Debian Linux, and we will run all the commands with the sudo command to gain root user privileges.
    Testing Environment Setup
    We are going to use following testing environment for this setup.
    DHCP Server - Ubuntu 18.04
    DHCP Clients - Ubuntu 18.04 and Windows 10
    source - www.techmint,com
    #############################
    follow us on facebook :-
    / androidandtechsolutions
    Website Link :-
    www.letslearnte...

Комментарии • 149

  • @lilia_spn
    @lilia_spn 5 лет назад +10

    Hey dude you are awesome! Simple explanation and great video, you made the configuration very understandable 👌🏻👌🏻✌ thanks :D

    • @saron1822
      @saron1822 3 года назад +1

      Modul 123 carry

  • @yeraa3
    @yeraa3 5 лет назад +4

    Gracias buen señor. Me has salvado la vida. Te debo una. Me congratula que haya tan buen trabajadores como usted. Con amor desde ASIR (Antártida). Adiós... :)

  • @flamyoad
    @flamyoad 5 лет назад +4

    This video definitely deserves more views. Keep up the good work !!

    • @AndroidandTechSolutions
      @AndroidandTechSolutions  5 лет назад

      Thanks :)

    • @flamyoad
      @flamyoad 5 лет назад

      I have a question. Can the DHCP server in my Ubuntu VM assign IP to my windows10 host? (I'm using Host-only-Adapter). I followed the steps in your video but the adapter keeps getting 169.254.xx.xx as its IP address.

    • @AndroidandTechSolutions
      @AndroidandTechSolutions  5 лет назад +1

      Yes but for that you need to configure it to a network interface connected to you host machine..
      In the video I have used bridge network to connect my vm to base machine...
      I hope this helps you :)

  • @wyst8
    @wyst8 10 месяцев назад

    Thank you for your excellent step-by-step instruction! I was able to follow along and found the part I had missed while setting up my client. It works!

  • @Kuki1537
    @Kuki1537 4 года назад +5

    exam tomorrow, thank you

  • @MrNiyoku
    @MrNiyoku 4 года назад +2

    Thanks dude, you helped me for my homework ! :D

  • @arbinkhadka4857
    @arbinkhadka4857 5 лет назад +1

    Nice one again brother. You are doing great work man.

  • @minecraftowiec878
    @minecraftowiec878 3 года назад +2

    That is insanely useful tutorial.

  • @zeuscanoe
    @zeuscanoe 5 лет назад +3

    Your head was in front of the last server command you spoke about
    :0)

  • @smurad404
    @smurad404 3 года назад +1

    love the way you describe.
    thanks a lot

  • @k1ng0fr4ng3
    @k1ng0fr4ng3 3 года назад +3

    respects broski

  • @morfigasoulslayer
    @morfigasoulslayer 3 года назад

    I love you my indian man, you are better than teacher

  • @dangerouzdan8471
    @dangerouzdan8471 4 года назад

    Dude you are an actual life saver! Thanks👍

  • @vediyappanvillali2763
    @vediyappanvillali2763 3 года назад +1

    Well explained. Appreciate your efforts and knowledge sharing mind :-)

  • @GerardGriffin
    @GerardGriffin 5 лет назад +1

    Would you ever consider doing a tutorial of setting up an Ubuntu PXE server to do an unattended installation?

  • @ON3STG
    @ON3STG 5 лет назад +1

    Hi very nice video about the setup. Great help :-)

  • @alanmiguelmartinezleon1986
    @alanmiguelmartinezleon1986 5 лет назад +2

    Hi :D !!!! Very Good!! thank you so much man!!!

  • @fakename8670
    @fakename8670 11 месяцев назад

    Hi I followed video right to end all was working except for end assigning fixed address to windows client
    Windows client was just windows 11
    Also it's lease only lasts for short time before having to forget and reconnect to wifi on windows client

  • @taharasheed2343
    @taharasheed2343 2 года назад

    u are life saver brother ❤️

  • @willlehrfeld457
    @willlehrfeld457 2 года назад

    Nice work, thanks for the video.

  • @kvpandurangarao9665
    @kvpandurangarao9665 5 лет назад +1

    very nice explanation Thank you

  • @h.w7141
    @h.w7141 3 года назад

    thanks man much appreciate it you are awesome

  • @braju568
    @braju568 2 года назад

    Very nice video indeed but would have been more comprehensive if dhcp option tag configuration covered as well.

  • @juansebastianmunozmartinez7414
    @juansebastianmunozmartinez7414 4 года назад

    Jaja second 0:08 the automated captions saying "Hello friends you're watching erotic solutions" jajaja, die laughin'.

  • @alzahalemn7322
    @alzahalemn7322 3 года назад

    Excellent video, I was able to set this up ez

  • @girumdemisse4313
    @girumdemisse4313 3 года назад

    thank you bro! that helped a looooot.

  • @skyltdockan
    @skyltdockan 5 лет назад +2

    Nice guide, I will try this. But is it not a bit odd to set the GW to .255? Is that not reserved for broadcasts?

    • @thesingleindian7368
      @thesingleindian7368 2 года назад

      One more strange thing is that both the broadcast and gateway addresses are same. Time - 6:47 . But, it wouldn't matter much as the whole setup is being routed through a virtual switch and is being emulated in a virtual machine/environment. In real world, where you'd use the connected machines for real-life tasks, it'd be a problem. But, again... When you are the DHCP, you become the gateway. Hence, going with localhost address should be fine, unless you have a separate gateway server configured on your network.

  • @karankajrolkar2707
    @karankajrolkar2707 5 лет назад +2

    How you are add another window for Ubuntu and windows on same user

  • @betraid
    @betraid 6 лет назад +2

    1 thing, in your video you use /etc/network/interfaces, but in 18.04 this file is replaced by /etc/netplan/50-cloud-init.yaml right?

    • @AndroidandTechSolutions
      @AndroidandTechSolutions  6 лет назад

      No

    • @jaxonryan1313
      @jaxonryan1313 5 лет назад +1

      @@AndroidandTechSolutions I read something about that making a new method to set a static ip for instance

    • @josht2454
      @josht2454 4 года назад +1

      That is server-side to configure static ip or dhcp on the interfaces

  • @lakshmistudies1043
    @lakshmistudies1043 3 года назад +1

    What keys we have to use for write and quit

  • @dorothyjolly7299
    @dorothyjolly7299 6 лет назад +1

    Thank you, one of the best video on DHCP installation and configuration. By the way when i run dhcp-lease-list command it is not showing the lease list. Instead it is saying cannot open /car/db/dhcpd.lease. Any helpful tips to get this sorted out?

    • @thesingleindian7368
      @thesingleindian7368 2 года назад +1

      You'd have found the answer long back. But, I am still answering because it may help others. This is because the DHCPd service is trying to read the lease list from "/car/db/dhcpd.lease"(in your case). But, the actual lease list resides in "/var/lib/dhcp/dhcpd.leases". 15:33 - Check your /etc/dhcp/dhcpd.conf file and change the location pointer/directory where it is reading the lease list from... A good start is to look the error message and replace that directory path with the above one.

  • @kubakonieczny655
    @kubakonieczny655 3 года назад

    super filmik pozdrawiam z polski :DD

  • @omershalev1855
    @omershalev1855 6 лет назад +1

    If I use a client on another computer, Is there something that I have to pay attention on?
    Or everything is the same?
    By the way, Great video!!! And thanks for the quick answers

  • @worldonlinux1139
    @worldonlinux1139 2 года назад

    Should the DHCP server must have a static ip address? before setting the configuration? If no, why?

  • @bablushaw6856
    @bablushaw6856 4 года назад

    correct me if i am wrong.. i was thinking gateway address should be placed in option router, instead you provided broadcast addr. what if you provide inet addr found from ifconfig?

  • @sarmadghafoor8215
    @sarmadghafoor8215 6 лет назад +1

    Hello , Can we configure any Wifi Router (Link Sys) to get IPs for users from Linux machine dhcp server instead of using pool inside Router. ??

  • @victoralvarado7370
    @victoralvarado7370 5 лет назад +1

    Amazing!

  • @Geo-sc3mg
    @Geo-sc3mg 3 года назад

    Just wondering about the last part of enabling the dhcp, I dont know if this is right "sudo ufw allow in on enp0s3 from any port 68 to any port 67 UDP" can you write down here what's exactly you did cause your camera blocked it so I wasn't sure about that part. ty

  • @annloraineluyao6004
    @annloraineluyao6004 3 года назад

    when I entered the restart command in client-side -- the output was failed to restart networking.service: unit networking.service not found and my and enp0s3 output is mtu 1500 qdisc noop state down group default ubuntu. how can I resolve it?

  • @odewumibamise8155
    @odewumibamise8155 2 года назад

    This /etc/netwok/interfaces file does not exist on ubuntu 20.04. Please how do i go about it?

  • @yarek_staryi_idy_na_nowyj
    @yarek_staryi_idy_na_nowyj 4 года назад

    SUPER OCHOOOO POMOGŁO W RZYCIU, ZNALAZŁEM 1000000000000 DOLARÓŒ PO TYM WIDEO , PIĘKNĘ WIDEO !!!!!!!!!!!!!!

  • @mehvishnoor9013
    @mehvishnoor9013 4 года назад

    When you write the conmond
    Sudo nano /etc/default/isc-dhcp-servrr
    Then ens3 k bad apny kia type kia ya kia press kia jis k bad next page aya...mera next page empty ata hy ....kindly guide m kal mera exam hy

  • @gerryvalenzuela9158
    @gerryvalenzuela9158 3 года назад

    I want to get DHCP server for my cisco gear lab but do I really need DHCP client windows on any of my network topologies ?

  • @I.N.E.A
    @I.N.E.A 5 лет назад

    good job man, can you upload how to install and configure snort on ybuntu server please?

  • @tvtenhagen
    @tvtenhagen 3 года назад +5

    Drinking game:
    take a shot every time he says "okey"

  • @rakshithaambarish1689
    @rakshithaambarish1689 2 года назад +1

    Sir, how are you writing and Quitting ? Ctrl+O to write and ?

    • @gamerboy-su1uq
      @gamerboy-su1uq 2 года назад

      For write-Press F3
      For close the window-press F2

  • @matthieumbayo7452
    @matthieumbayo7452 4 года назад

    Hi there, I have a question,
    Let's assume we have 10 scopes for our IT infrastructure, in the infra we have 2 buildings and each building hase its own scopes.
    say we have 1st scope is IT in building A, and 5th Scope is IT in building B. now I want to make a reservation for one IT user in both fisrt scope and fifth scope.
    Can Ubuntu DHCP Server be able to do that ? Or, do you know some solutions to this ?
    thank you in advance.

  • @joseoplmx
    @joseoplmx 3 года назад

    Hello, i have a ubuntu 14, it was configured by someone else a few years i know that it works because it assigns ip's from network 10.X.X.X to the devices but if i check with command dhcp-lease-list it doesnt show any ip assigned, neither if i look in the dhcpd.conf the pool 10.x.x.x doesnt exist, where should i look?, regards

  • @venkateshd7248
    @venkateshd7248 2 года назад

    Hi bro, i have done the same as you do but in dhcp-lease-list i cannot see my client ip address. can you help me with that?

  • @lucathekid7
    @lucathekid7 3 года назад +2

    what a video

  • @AhmadRajab
    @AhmadRajab 3 года назад

    whats the client side and how did you configure it?

  • @harshitsharma5597
    @harshitsharma5597 4 года назад

    i had configured the dhcp server at the host side completley and its working but but at the client side my clients are not getting connected withe the host am not getting the dhcp servers ip at client side it is still displaying the its old ip address.

  • @hamza3524
    @hamza3524 2 года назад

    the first adaptator is connected on NAT or inner network?

  • @zuzelmonster9450
    @zuzelmonster9450 2 года назад

    why is your subnet ending on .0 if your inet is ending on .10?

  • @TabishPatvi
    @TabishPatvi 2 года назад

    Can you show it with ubuntu, instead of windows

  • @camille8712
    @camille8712 5 лет назад +1

    How did you get the different clients

  • @smurad404
    @smurad404 3 года назад

    what is the setting of VM Network Adaptor?
    can I connect to this server to GNS3..?

  • @pramodchavan5807
    @pramodchavan5807 4 года назад

    Sir I've trying to manage client machine frm server and install softwares and drivers from server..
    How I do plz help..🙏

  • @omershalev1855
    @omershalev1855 6 лет назад +1

    Does the client have to be a virtual machine? Will it work also with my phone or another laptop?

    • @AndroidandTechSolutions
      @AndroidandTechSolutions  6 лет назад

      It is not necessary that client must be another virtual machine it can be other computer also.. :)

  • @shc1990
    @shc1990 5 лет назад

    hi, i am working on aproject were i need to use ubuntu 16.04.5 GUI as ltsp server to use with thin client pc. but till now i am not successful. need a few suggestion

  • @hassinayaz7310
    @hassinayaz7310 6 лет назад +1

    thanks a lot for the video .. but client cannot access internet . is there something else to be done ?

  • @livingphate
    @livingphate 5 лет назад +1

    Hi there Thanks for this, however how can i add a failover router so that if the first router inter fails it will change the dhcp to allow all users to connect to the second router?

    • @AndroidandTechSolutions
      @AndroidandTechSolutions  5 лет назад

      I am not sure but yes..
      I will research on this and will let you know

    • @thesingleindian7368
      @thesingleindian7368 2 года назад

      This isn't a router configuration. This is a DHCP server. You can add failover DHCP servers to the router config. But, not the other way around. If you are asking - what if the switch fails, and you need redundancy... Add one more NIC to your machine and add another switch and configure it to be the failover interface in the dhcpd configuration file. But, this is unnecessary redundancy. I feel that I answered your question in the first part... You can add additional/optional DHCP servers to the routers, because they route traffic, you cannot add additional routers to the DHCP server... DHCP server's job is to hand out DHCP IP addresses...

  • @jaxonryan1313
    @jaxonryan1313 5 лет назад +1

    My brother at 2:43 may I ask what was it you input to exit I tried typing "^X" as reads but didnt work could you please give us a hint on the matter (Sorry am a bit of a newbie to linux terminal

  • @subhamucet
    @subhamucet 4 года назад

    How to configure dhcp server for multiple vlan subnet or multiscope ???

  • @Martin-gg1vo
    @Martin-gg1vo 5 лет назад

    bro can u help if i type commad ifconfig ensp7s0 doesnt show his inet and subnetmask,should i setting with myself with command(sudo ifconfig ensp7s0 192.168......)

  • @Th3M4nuc9
    @Th3M4nuc9 5 лет назад +3

    oke? big man

  • @benjaminwe4
    @benjaminwe4 3 года назад

    Do you know how can i set the dhcp authentication?

  • @anandusurendran8742
    @anandusurendran8742 4 года назад

    I did all the things as shown in video. Client is not getting ip. May i know the network configuration like which network card is being used n all.

    • @anandusurendran8742
      @anandusurendran8742 4 года назад

      When we go to ifconfig we can see 1 port n 1 loopback. Is that NAT or Bridge???

  • @yurrymatufira3701
    @yurrymatufira3701 6 лет назад

    i have question in minutes 2:41, after typing "ens" what can i do?
    thanks.. i'm newbie, want to learn server.. (ctrl+s and ctrl+z) or any?
    thanks master..

    • @jaxonryan1313
      @jaxonryan1313 5 лет назад

      Uh i had trouble myself in case you hadnt figured it out yet its ctrl+x
      as in hold control x
      your welcome

  • @dorothyjolly7299
    @dorothyjolly7299 6 лет назад +1

    Sorry typing error it should be /var/db/dhcpd.leases

  • @sakshamkataria3093
    @sakshamkataria3093 5 лет назад

    What's that part after giving the interface name "write and quit"...I didn't get it

  • @sakshamkataria3093
    @sakshamkataria3093 5 лет назад

    It's not getting configured.....after checking the status it's showing
    Active : failed
    I checked but configurations are correct

  • @somnathroy8803
    @somnathroy8803 4 года назад

    Sir I sees that some time after my public ip is changed ?? so how can connect with domain

  • @MosiaTV
    @MosiaTV 3 года назад

    Make a notepad with commands to be easier for viewers follow your video

  • @adityawibowo2447
    @adityawibowo2447 5 лет назад

    what network adapter you use in both of your client?

  • @enzoscandelt3350
    @enzoscandelt3350 2 года назад

    ddin't work

  • @somnathroy8803
    @somnathroy8803 4 года назад

    Sir I want to host jsp website from my computer ubuntu Os and install tomcat so I want to know Static Ip must be buy or normal Internate connection by router is enough for it?? Domain name need to buy must or just any name we can do just like royinfotech.com?? can you help me??

    • @AndroidandTechSolutions
      @AndroidandTechSolutions  4 года назад

      Hi,
      Yes you need to buy domain and you need to point that domain to your public ip which is trough your router..
      In your router you need do port forwarding to make your server live on the internet.
      Hope this helps..
      Thanks!!

    • @somnathroy8803
      @somnathroy8803 4 года назад

      Sir I want to buy domain after I can connect my PC as linux tomcat webserver so how can do it?? again I need to buy static Ip ??

  • @yeohfuseong
    @yeohfuseong 5 лет назад

    DHCP server running but the ip address on windows not within range
    Lease list is empty

    • @AndroidandTechSolutions
      @AndroidandTechSolutions  5 лет назад

      Stop dhcp then start

    • @yeohfuseong
      @yeohfuseong 5 лет назад

      is it fine if both client & server has the same ip address?
      Ubuntu server inet : 10.0.2.15
      Windows ip address: 10.0.2.15
      Since both are attached to NAT on virtualBox

    • @AndroidandTechSolutions
      @AndroidandTechSolutions  5 лет назад

      No like that your dhcp will not work

    • @yeohfuseong
      @yeohfuseong 5 лет назад

      What should i do to resolve then? Im using virtualBox

    • @BichaelStevens
      @BichaelStevens 5 лет назад

      @@yeohfuseong Bridget net instead of NAT

  • @Inkrementalgeber
    @Inkrementalgeber 5 лет назад

    Instead of installing the net-tools package just for "ifconfig" simply do "ip addr" ... welcome to GNU/Linux

  • @krisrock2185
    @krisrock2185 3 года назад

    command 8:49 please

  • @BichaelStevens
    @BichaelStevens 5 лет назад

    Only windows gets listen in lease list, not the ubuntu client

    • @AndroidandTechSolutions
      @AndroidandTechSolutions  5 лет назад

      Bro watch again

    • @BichaelStevens
      @BichaelStevens 5 лет назад

      Ok I shut down my windows machine and now the Ubuntu client is showing
      why does only 1 client work at a time?

    • @BichaelStevens
      @BichaelStevens 5 лет назад

      @@AndroidandTechSolutions I did and I followed your instructions religiously.
      Only 1 of 2 clients shows up at any time. If windows client is shut down, then ubuntu shows up. If not, only windows shows up

  • @purufrozen1508
    @purufrozen1508 4 года назад

    on 7:39 sec how you have started writing again

  • @airxayasith1738
    @airxayasith1738 6 лет назад +1

    can client access internet ??

    • @AndroidandTechSolutions
      @AndroidandTechSolutions  6 лет назад

      Yes

    • @airxayasith1738
      @airxayasith1738 6 лет назад

      client can get ip address from dhcp but it can't access internet. can you please help ?

    • @AndroidandTechSolutions
      @AndroidandTechSolutions  6 лет назад

      Look for that you have to set gate way from which the Internet is coming

    • @airxayasith1738
      @airxayasith1738 6 лет назад +1

      can you config proxy server for client can't access some website such as: facebook or google

    • @AndroidandTechSolutions
      @AndroidandTechSolutions  6 лет назад

      Yes wil upload a video regarding it in a few days it is done through squid server

  • @ChillerDragon
    @ChillerDragon 5 лет назад +2

    1:42 first i installed netdudes xd
    but he probably means
    apt install net-tools

  • @mehvishnoor9013
    @mehvishnoor9013 4 года назад

    Plzzz repaly m as soon as possibke

  • @ApoRekt
    @ApoRekt 2 года назад

    okay

  • @creestl8638
    @creestl8638 2 года назад

    ok

  • @kevincorreia9680
    @kevincorreia9680 2 года назад

    666

  • @camille8712
    @camille8712 5 лет назад +1

    How did you get the different clients

  • @Dreffyt
    @Dreffyt 4 года назад

    ok