computers:dhcp_server_configuration
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
computers:dhcp_server_configuration [2011/08/29 14:17] – chkuo | computers:dhcp_server_configuration [2020/08/16 00:52] (current) – chkuo | ||
---|---|---|---|
Line 2: | Line 2: | ||
===== Installation ===== | ===== Installation ===== | ||
- | Download and install the dhcp3-server | + | Download and install the package |
<code bash> | <code bash> | ||
- | sudo apt-get install | + | sudo apt-get install |
</ | </ | ||
===== Configuration ===== | ===== Configuration ===== | ||
- | Specify the interfaces dhcpd should listen to in ''/ | + | Specify the interfaces dhcpd should listen to in ''/ |
<code bash> | <code bash> | ||
- | INTERFACES="eth3" | + | INTERFACESv4="eno1np0" |
</ | </ | ||
- | Configure the interface used in ''/ | + | Edit ''/ |
<code bash> | <code bash> | ||
- | auto eth3 | + | # /etc/dhcp/dhcpd.conf |
- | iface eth1 inet static | + | |
- | address 192.168.0.1 | + | |
- | netmask 255.255.255.0 | + | |
- | gateway 192.168.0.254 | + | |
- | </ | + | |
- | + | ||
- | Edit '' | + | |
- | <code bash> | + | |
- | # /etc/dhcpd.conf | + | |
ddns-update-style none; | ddns-update-style none; | ||
log-facility local7; | log-facility local7; | ||
- | option domain-name-servers | + | option domain-name-servers |
default-lease-time 86400; | default-lease-time 86400; | ||
max-lease-time 86400; | max-lease-time 86400; | ||
- | subnet 192.168.0.0 netmask 255.255.255.0 { | + | subnet 192.168.1.0 netmask 255.255.255.0 { |
- | option routers | + | option routers |
option subnet-mask | option subnet-mask | ||
- | option broadcast-address | + | option broadcast-address |
- | range 192.168.0.200 192.168.0.250; | + | range 192.168.1.200 192.168.1.250; |
} | } | ||
# printer | # printer | ||
host poplar { | host poplar { | ||
- | hardware ethernet | + | hardware ethernet |
- | fixed-address 192.168.0.11; | + | fixed-address 192.168.1.11; |
- | } | + | |
- | host aspen { | + | |
- | hardware ethernet 00: | + | |
- | fixed-address 192.168.0.12; | + | |
} | } | ||
# server | # server | ||
host oak { | host oak { | ||
- | hardware ethernet | + | hardware ethernet |
- | fixed-address 192.168.0.21; | + | fixed-address 192.168.1.21; |
- | } | + | |
- | + | ||
- | host maple { | + | |
- | hardware ethernet bc: | + | |
- | fixed-address 192.168.0.22; | + | |
} | } | ||
# workstation | # workstation | ||
host sage { | host sage { | ||
- | hardware ethernet | + | hardware ethernet |
- | fixed-address 192.168.0.101; | + | fixed-address 192.168.1.101; |
} | } | ||
- | host aloe { | ||
- | hardware ethernet 34: | ||
- | fixed-address 192.168.0.102; | ||
- | } | ||
- | host azalea { | ||
- | hardware ethernet c4: | ||
- | fixed-address 192.168.0.103; | ||
- | } | ||
- | host camellia { | ||
- | hardware ethernet c4: | ||
- | fixed-address 192.168.0.104; | ||
- | } | ||
- | host fuchsia { | ||
- | hardware ethernet c4: | ||
- | fixed-address 192.168.0.105; | ||
- | } | ||
- | host basil { | ||
- | hardware ethernet c8: | ||
- | fixed-address 192.168.0.106; | ||
- | } | ||
- | |||
</ | </ | ||
Line 91: | Line 52: | ||
To start/ | To start/ | ||
<code bash> | <code bash> | ||
- | sudo / | + | sudo service isc-dhcp-server start |
- | sudo / | + | sudo service isc-dhcp-server stop |
- | sudo / | + | sudo service isc-dhcp-server restart |
</ | </ | ||
Line 99: | Line 60: | ||
To check dhcpd status: | To check dhcpd status: | ||
<code bash> | <code bash> | ||
- | sudo / | + | sudo service isc-dhcp-server status |
</ | </ | ||
To see the leases: | To see the leases: | ||
<code bash> | <code bash> | ||
- | more /var/lib/dhcp3/ | + | more /var/lib/dhcp/ |
</ | </ | ||
computers/dhcp_server_configuration.1314598627.txt.gz · Last modified: 2011/08/29 14:17 by chkuo