networkctl: add dhcp-lease verb to dump DHCP lease
This shows the DHCP message of an acquired DHCP lease.
Example:
```
$ networkctl dhcp-lease eth0
Header:
KEY VALUE
Hardware Type: ETHER
Hardware Address: 41:42:43:31:32:33
Client Address: 192.0.2.123
Server Address: 192.0.2.1
Options:
CODE NAME DATA
1 subnet mask 255.255.255.0
3 router 192.0.2.1
6 domain name server 192.0.2.1
12 hostname test-node
15 domain name lan
28 broadcast address 192.0.2.255
42 NTP server 192.0.2.11
192.0.2.12
51 lease time 1d
53 message type 5
54 server identifier 192.0.2.1
58 renewal time 11h 5min 38s
59 rebinding time 20h 5min 38s
119 domain search hoge.example.com
foo.example.com
```
This commit is contained in:
@@ -51,7 +51,7 @@ _networkctl() {
|
||||
|
||||
local -A VERBS=(
|
||||
[STANDALONE]='label reload'
|
||||
[LINKS]='status list lldp delete renew up down forcerenew reconfigure'
|
||||
[LINKS]='status dhcp-lease list lldp delete renew up down forcerenew reconfigure'
|
||||
[FILES_OR_LINKS]='edit cat'
|
||||
[FILES]='mask unmask'
|
||||
[BOOL]='persistent-storage'
|
||||
|
||||
Reference in New Issue
Block a user