Archive

Posts Tagged ‘dhcp’

Ubuntu DHCP Server

May 21st, 2010 Arthur Gressick No comments

To install DHCP server from scratch

apt-get install dhcp3-server

When it installs you will see that it had a problem. Don’t worry about this failure, we will fix it. I recommend before we make any changes that we do a backup of the config file.

cd /etc/dhcp3
mv dhcpd.conf dhcpd.conf.bak
nano dhcpd.conf

Here is some sample code for the DHCP configuration

# Sample /etc/dhcpd.conf
# (add your comments here) 
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.1;
option domain-name-servers 192.168.1.1;
option domain-name "gressick.local";
 
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.100;
range 192.168.1.150 192.168.1.200;
}

For more information on this read from Ubuntu link Ubuntu DHCP3

if you want to install and LDAP version

apt-get install dhcp3-server-ldap

If you want to install the VERY light version of DHCP

apt-get install udhcpd

Categories: Ubuntu 9.x Server Tags: ,

Ubuntu Network Adaptor

February 11th, 2009 Arthur Gressick No comments

If you have an additional network adaptor or need to change the ip address of an adaptor follow these command to change the information.

Modify: /etc/network/interfaces

auto eth0
iface eth0 inet static
        address 10.10.1.101
        netmask 255.255.255.0
        network 10.10.1.0
        broadcast 10.10.1.255
        gateway 10.10.1.1
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 10.10.1.250
        dns-search domainname.com

Setting up the DNS service, modify: /etc/resolv.conf

search domainname.com
nameserver 10.10.1.250
nameserver 66.35.209.135

Modify the hosts file in /etc/hosts

127.0.0.1          localhost
10.10.1.101     subdomain.domainname.com subdomain
# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

After this has been changed then restart the network adapter.

sudo /etc/init.d/networking restart