본문 바로가기

리눅스 커널/네트워크

DHCP

DHCP packet format

 

Message type(1) [1: request, 2: reply]

HW type(1) [1: Ethernet]

HW address length(1) [6: Ethernet]

Hops(1)

Transaction ID(4)

Seconds elapsed(2)

Bootp flags(2)

 

Client IP address(4)

Your(client) IP address(4)

Next server IP address(4)

Relay agnet IP address(4)

Client MAC address(6)

Client HW address padding(10)

 

empty(128)

 

Magic cookie(4)

 

option, opcode

53 : DHCP message type(3) -> opcode(1), length(1), type(1) 

54 : DHCP server identifier(6) -> opcode(1), length(1), dhcp server ip(4)

51 : IP address lease time(6) -> opcode(1), length(1), IP lease time(4)

1 : Subnet mask() -> opcode(1), length(1), subnet mask(4)

3 : Router(6) -> opcode(1), length(1), router ip(4)

6 : DNS(10) -> opcode(1), length(1), dns(4), dns(4)

 

50 : Requested IP address(6) -> opcode(1), length(1), requested ip address(4)

 

255 : END



'리눅스 커널 > 네트워크' 카테고리의 다른 글

netlink example  (0) 2021.10.24
promiscuous mode  (0) 2021.10.24
Kernel handler packet capture  (0) 2021.10.24
Kernel hooking packet capture  (0) 2021.10.24
Raw socket outgoing packet capture  (0) 2021.10.24