Saturday, October 22, 2005

Tell DHCP server to issue all but IP

ifconfig elxl0 dhcp inform

Start DHCP server in debug mode (2)

1) dhcpconfig -Sd
2) /usr/lib/inet/in.dhcpd -d -v

View dhcpagent debug info (2)

1) /sbin/dhcpagent -d1 -f &
2) ifconfig elxl0 dhcp start
* -d1 : debug-level 1, -f : foreground (stderr instead of syslog)

To assign a permanent IP address of 172.16.0.3 (2)

1) pntadm -M 172.16.0.3 -i 0100609762F09D 172.16.0.0
2) pntadm -M 172.16.0.3 -f 03 172.16.0.0
* identifier (-i) is MAC with preceeding 01
* flag (-f) 03 is Reserved which is Manual (02) + Permanent (01)

Client status of DHCP lease

ifconfig elxl0 dhcp status

Let DHCP client use its own name (2)

1) /etc/default/dhcpagent :
    Make sure that commented out : # REQUEST_HOSTNAME=no
2) /etc/hostname.eri0 : inet blade

Obtain DHCP IP on a client manually

ifconfig eri0 dhcp start

Release DHCP IP address on a client

ifconfig eri0 dhcp release

"ICMP ECHO reply to the OFFER candidate is n.n.n.n, disabling" means (2)

1) Another DHCP server already gave out this IP
2) Client has defined this IP manually

Friday, October 21, 2005

Configure dnet0 as DHCP client (2)

1) /etc/dhcp.dnet0
2) /etc/default/dhcpagent : RELEASE_ON_SIGTERM=yes
* leave /etc/hostname.dnet0 though, or iface won't plumb

Thursday, October 20, 2005

Rename 172.16.0.0 macro to blade172

dhtadm -M -m 172.16.0.0 -n blade172

Set subnet to 255.255.255.0 of macro 172.16.0.0

dhtadm -M -m 172.16.0.0 -e 'Subnet=255.255.255.0'
* note no colons around Subnet=

Delete macro "blade"

dhtadm -D -m blade

Add macro 172.16.0.0 supplying mask 255.255.0.0

dhtadm -A -m 172.16.0.0 -d ':Subnet=255.255.0.0:'
* note the colons around Subnet=

List all macros

dhtadm -P

Can macros contain other macros?

yes

Two config files for DHCP server

1) dhcp_"network" : client IDs and IPs
2) dhcptab : macross

Delete 172.16.0.3 from dhcp table

pntadm -D 172.16.0.3 172.16.0.0

Table flags (6)

00 : Dynamic
01 : Permanent
02 : Manual
03 : Manual + Permanent
04 : Unusable
06 : Manual + Unusable <- the only way to block a client from DHCP

Add 172.16.0.3 to dhcp the table

pntadm -A 172.16.0.3 172.16.0.0

Create a DHCP table for 172.16.0.0 network (2)

1) pntadm -C 172.16.0.0
2) dhcpconfig -N 172.16.0.0
* dhcpconfig adds a default macro in dhcptab

Remove DHCP table for 172.16.0.0 network

pntadm -R 172.16.0.0
* to remove macro from dhcptab: dhtadm -D -m 172.16.0.0

Disable and stop DHCP server

dhcpconfig -Sd

Restart DHCP server

dhcpconfig -Sr
* restart as a simple "Sire"

Status of DHCP server

dhcpconfig -qS
* "questsion"

Wednesday, October 19, 2005

List configured networks

pntadm -L

Display network table for 192.168.2.0

pntadm -P 192.168.2.0
* add -v for exact lease time

Command-line DHCP server initialization

dhcpconfig

Server for 192.168.2.0 with 192.168.2.1 gateway

/usr/sbin/dhcpconfig -N 192.168.2.0 -t 192.168.2.1

Faster resource ASCII or binary

SUNWbinfiles is much faster than SUNWfiles

Enable DHCP server with ASCII files in /var/dhcp

/usr/sbin/dhcpconfig -D -r SUNWfiles -p /var/dhcp
* -D : daemon, -r : resource, -p path

IP negotiation (4 steps)

1) client : DHCPDISCOVER
2) server : DHCPOFFER
3) client : DHCPREQUEST <- after evaluating all offers
4) server : DHCPACK

DHCP server config file

/etc/inet/dhcpsvc.conf