bootp引导程序协议

bootp引导程序协议IP 数据报我们前面有了解过 这里不赘述了 整个报文结构如下 前面还有个以太网首部 即是

大家好,欢迎来到IT知识分享网。

bootp又称为引导程序协议,我们来简单了解一下这个协议以及他的用法。

1,BOOTP 请求和应答均被封装在 U D P数据报中 ;

2,B O O T P使用 U D P,且通常需与 T F T P协同工作;

3,B O O T P有两个熟知端口: BOOTP 服务器为67(50067), BOOTP 客户为68(50068),这两个端口一般是固定不变的。

tftp协议后续再介绍,现在我们先来了解一下bootp.

3,bootp的报文了解.

bootp引导程序协议

我们看上面的报文,可以看到目的地址为0xffffffffff, 即是广播报文,我们可以看到request报文和reply报文都是广播报文的,那么为什么呢(这里的端口是固定的)

 IP数据报我们前面有了解过,这里不赘述了,整个报文结构如下 ,前面还有个以太网首部,即是

mac首部+ ip首部+udp首部 + udp报文。

bootp引导程序协议

 bootp的udp报文数据结构分析:

bootp引导程序协议

 报文分析

bootp引导程序协议

 请求报文:

bootp引导程序协议

op = 01;

Htype = 01;

HLen = 06;

XID = 0x7d;

chaddr = 0x001ab(00….)

sname = 0x(0000….)

 回应报文:

bootp引导程序协议

op = 02;

Htype = 01;

HLen = 06;

XID = 0x9d;

chaddr = 0x001ab(00….)

sname = 0x(0000….)

uint32 CIAddr; //  0x0000000

 uint32 YIAddr;//  0x7e000101(126.0.1.1)

 uint32 SIAddr;  //0x7e000107(126.0.1.7)

  uint32 GIAddr; // 0x00000

  uint8 CHAddr[16]; 0x001ab(000..)

  char SName[64]; //  0x(000..)

数据结构:

typedef struct { uint8 op; // The operation; 1 is a request, 2 is a reply. uint8 HType;// The hardware type; 1 is Ethernet. uint8 HLen;// The hardware address length; for Ethernet this will be 6, the length of the MAC address. uint8 Hops;// Hop count, used by gateways for cross-gateway booting. uint32 XID;// The transaction ID. uint16 Secs; // The number of seconds elapsed since the client started trying to boot. uint16 Flags;// The BOOTP flags. uint32 CIAddr; // The client's IP address, if it knows it. uint32 YIAddr;// The client's IP address, as assigned by the BOOTP server. uint32 SIAddr; // The TFTP server's IP address. uint32 GIAddr; // The gateway IP address, if booting cross-gateway. uint8 CHAddr[16];// The hardware address; for Ethernet this is the MAC address. char SName[64]; // The name, or nickname, of the server that should handle this BooTP // request. char File[128]; // The name of the boot file to be loaded via TFTP. uint8 Vend[64];// optional vendor-specific area; not used for BOOTP. }bootp_pkt_t;

 

免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://haidsoft.com/135150.html

(0)
上一篇 2025-07-06 19:20
下一篇 2025-07-06 19:26

相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注微信