Wednesday, December 7, 2016

Linux – Setting up a DHCP Server (Video 1 of 4 for setting up Linux Router/Gateway)

April 19, 2012 by admin  
Filed under Videos

Read: In this video, I show you how to setup a DHCP server on a linux machine. This is the start of having a computer, running linux, to be your router and gateway to the internet. This is the first video, and we just touch on getting the DHCP rolling. Thank you, Shane. Notes: If you use debian or anything debian based, I cannot and will not help you. Do not ask for help on those distributions. Text version: www.bromosapien.net Prerequisits: -A PC -Two Network cards (One can be built in, and the other can be PCI or PCIe) -A linux operating system You can follow along completely if you use these distributions: –Fedora –CentOS 5/6 (6 with some file placement modification) NOTE: Edit the /etc/sysctl.conf file and find the line that says net.ipv4.ip_forward. Set it to 1. This will make it work! www.youtube.com Commands to note: vi — It’s an editor in linux. i for insert, o for a new line, shift+g to go to the end of the file, ESC for command mode. :wq saves your file (zz does too). nano — Another editor in linux, much easier to use. pico –Alternative to nano if not available. services name restart –name being the name of the service yum install name —name being the name of the package chkconfig — Changes runlevels of services (Example of chkconfig: chkconfig –list dhcpd) Files/Folders to note: /etc/dhcpd.conf :: The DHCP configuration file Example file: dpaste.org /etc/sysconfig/network-scripts/ifcfg-ethx :: x = number of interface. Network card options. Example

Video Rating: 5 / 5

Comments

21 Responses to “Linux – Setting up a DHCP Server (Video 1 of 4 for setting up Linux Router/Gateway)”
  1. jakke1975 says:

    IP Scheme format:
    10, 172, 192 are private IP’s. Use them. Trust me.
    ==> actually 10.x.y.z, 172.(16-31).x.y, 192.168.x.y
    There? are a lot of PUBLIC 172 address, as well as 192 addresses. BE CAREFUL!

  2. jakke1975 says:

    Your comment that the network address ALWAYS has to be zero is wrong. This is? only true with the netmask you are using, but if you have a /27 network for example, you can have a network identifier that doesn’t end in a zero.
    I understand where you’re coming from, you want to simplify things for the audience, which is OK, but you shouldn’t feed them incorrect information.

  3. atif7865 says:

    Hey,
    Just on a side note, when configuring the eth0 or eth1, you mentioned that the network id needs to be zero. that is true on some networks depending on the netmask. so your netmask dictates what is your network id.
    i am sure you didnt? include that in order not to confuse anyone.

    cheers.

  4. ITSystemsAdmin says:

    NICE VIDEO CHECK DHCP? 2008 R2!

  5. StarCraftSportsNet says:

    It is not a good idea to use wireless in this concept. And using? wireless for this concept in general would be near impossible unless you’re doing pure ad-hoc. Wired networks are more secure.

  6. Salamander014 says:

    can i? use a built in ethernet and a usb wireless adapter for this?

  7. StarCraftSportsNet says:

    Look up OpenVPN?

  8. thebigbigdaddy says:

    how do we setup VPN after doing all the? firewall?

  9. StarCraftSportsNet says:

    Of course, you’d be setting up a Samba server. ?

  10. lgreengo525 says:

    with a DHCP server running in my home, will I be able to configure it so that? windows, linux and mac OS machines can all store and access files on it?

  11. TheGoodChap says:

    The shell lets you use tab for auto completion, but you have to type the first letter or so and then it will try to guess what your typing based on what is in that folder. You’ll probably have to do ls /etc/ and then if there is? a foo.bar file you can type vi /etc/f “tab” and it will put in /etc/foo.bar for you. Hope this answers the question! Actually I believe that Bash may let you do what your wanting but you will have to edit the config file. You may want to look into that.

  12. brother776 says:

    hi there fantastic video , i’m pritty new to this linux stuff and its quite fun to learn i was wondering when you type? VI for the editing of the config files is it possible to tab the roots ? i.e vi /etc/ “tab” and then it gives the user whats within ? does that make sense? ahh like on a cisco switch ?

  13. pyblanding says:

    Could we have openvpn on? this same box? Maybe a noob question.

  14. jatsidan says:

    you’re the man!!!!
    ?

  15. StarCraftSportsNet says:

    The default location in CentOS 5 is /etc/dhcpd.conf. There is also a? dhcpd6.conf there assuming you’re setting up a IPv6 LAN.

  16. thecontrarian42 says:

    in the video info you have the dir to dhcpd.conf as /etc/dhcpd.conf, not /etc/dhcp/dhcpd.conf, which threw? me off

  17. benghaith says:

    Technologically; I’m a Richard Stallman fan, but I can’t let go of vi! He hates it and calls it: “… the editor of the? beast”!! Meaning UNIX!!! LOL
    Thank you

  18. StarCraftSportsNet says:

    if you Don’t have? another network card it won’t be there. Also if you do have a second card, make sure your path is typed correctly. /etc/sysconfig/network-scripts/ifcfg-eth1

  19. walkdru says:

    just troed this when i tried the setup? up etc/sysconfig/network-scri[ts/ifconfig-eth1 i tried that and got lunix saying new file what do i do (im on centos 55 ike u)

  20. gtmaia1 says:

    Great!! You help me!! Thanks a? lot.

  21. maes01 says:

    Nice video mate? .

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!

Get Adobe Flash playerPlugin by wpburn.com wordpress themes