关于DHCP Option60的认识-点评

本文探讨了在网络建设中如何利用DHCP Option60解决CATV与宽带业务共用一根线路的问题。介绍了Option60的工作原理及在机顶盒中的具体应用,提出了一种通过三层交换机配置不同地址池来区分业务的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

关于DHCP Option60的认识


最近在网络建设过程中,必须面对一个实际存在的问题:当只有一根线入户时,该如何解决CATV和宽带业务的共存呢?这时就要考虑用到DHCPOption60了,那么DHCPOption60到底是如何来实现业务区分的呢?

首先先来看下DHCP协议,在DHCP协议中,定义了一个option字段,该字段主要是用来扩展DHCP协议的,Option 60 (Vendor classidentifier)DHCP报文中的一个选项字段,code60,可以标识终端类型,根据不同的终端类型来选择接口下的网关。这样,各个厂家就可以在该字段中添加自身的标识,用于区别不同的终端。 

 

针对与机顶盒来说具体的实现应该是这样的:

  1. 用户终端(机顶盒)填好的一个域(classidentifier),主要用于机顶盒标识自身的设备类型或配置,以便在DHCPserver之间传递特殊的配置信息。

   2. DHCPrelay设备根据DHCP报文内的option 60域的内容判断其属于哪个DHCP域,并将相关网关地址填入GIADDR,然后进行3层转发。

  3. 不具备option 60DHCPserver将忽略该选项;否则,server在返回相应信息时应采用option 60选项。

 

 目前在实际的建网过程中,大多数都采用三层交换机来充当DHCPServer,这中间会涉及到DHCP Relay功能(暂时不解释),在三层交换机上配置vlan接口,创建两个地址池,一个给宽带用户,一个给CATV,但是这两个业务是在同一个vlan中(开头提到的只有一根线入户),如何来区分呢?需要给该vlan接口配置两个ip地址(网关),然后给这个接口指定两个Server(不同的DNS),一个给宽带用户分配上网地址,一个给机顶盒分配点播互动地址,并且开启DHCPRelay(不开启不能获取地址),当用户用PC上网时,获取的将是宽带业务的地址,当进行CATV互动点播时,获取到的是CATV的地址,这样就解决了一根线入户,区别业务的目的。

   PS:当用三层交换机做Server时,一般配置接口地址为Server的地址。

 

下图为机顶盒发起的DHCPDiscover报文


 

  空白部分就是机顶盒的classidentifier(不好公布,谅解),由机顶盒发起,其他的DHCP过程就不上图了,跟一般的过程一样,只是整个交互过程注意这个填充字段就可以了。

=========================================================================

点评:我认为option60实际应用价值不大。为了解决“一根线”的问题而使用Option60,用户家里必然要配备一个“猫”,eoc方式是终端,lan方式是交换机,不管哪种都需要供电,实际情况是,大部分用户家里的多媒体集线箱没有通电。

vlan1,机顶盒通过dhcp获取地址,

vlan2,电脑通过pppoe拨号接入,

      (  之所以不用dhcp,是因为在网内主机不多的时候,使用dhcp很方便,但随着宽带用户大量增加,网内各种私接、误接dhcp server的情况不断出现,虽然可通过dhcp snooping 来禁止非法dhcp server,但上网高峰时期的dhcp请求包仍然会占用相当的网络带宽,而且)

在只有“一根线”入户的情况下:

1.EOC接入

        onu默认透传模式,不用配置,eoc终端可以自动接受局端的预配置,以太口可自动区分宽带与互动电视业务,只要把机顶盒与电脑接在指定的端口就可以了。需要做的只是预先配置好局端上的eoc终端默认配置。

2.LAN接入

a.平房区,室外拉网线入户,一般不超过80米,一根网线可分分作两根用,即使ONU采用用户端供电,也就是多放一根网线而已

b.光纤到楼(FTTB),可分为明装和暗线,与平房区一样,特殊的情况是使用反向供电,同时第二根线无法到达用户室内,这时,用户想要同时开通互动与宽带,家里必须有个能划分vlan的交换机,,但这种情况是在少见的。

c.光纤到户(FTTH),看起来很不错,但也不是哪里都适用。把光纤通过管道穿到用户指定的房间里可不是件容易的事。


### DHCP Server Option 43 Sub-Option Meaning and Usage In the context of DHCP (Dynamic Host Configuration Protocol), option 43 is used to convey vendor-specific information between a client and server. This option allows vendors to define their own set of parameters that are not covered by standard options defined in RFCs. For sub-options within option 43, these represent specific pieces of configuration data or instructions intended for devices from particular manufacturers. The interpretation of each sub-option depends on what has been specified by the device manufacturer[^1]. The structure typically includes an enterprise number identifying the vendor followed by one or more length-value pairs where: - **Length**: Specifies how many bytes follow. - **Value**: Contains actual data relevant to this sub-option as determined by the vendor. To configure such settings manually might involve specifying both the main option code (`0x2B` for decimal 43) along with any required sub-codes depending upon your network's requirements and supported hardware/software. When configuring certain types of equipment like IP phones or printers via DHCP, administrators often need to use option 43 alongside appropriate sub-options to provide necessary bootstrapping details or other operational configurations directly through the DHCP process without requiring manual setup at every endpoint. ```bash # Example command line tool invocation setting up option 43 with some hypothetical values using dhcpd.conf syntax: option space myVendor; option myVendor.config code 1 = string; subnet 192.168.1.0 netmask 255.255.255.0 { ... option vendor-class-identifier "myVendor"; option myVendor.config "\001\006example"; # Here \001 represents sub-option ID and \006 its length } ``` This example demonstrates adding custom vendor class identifier and associated config into a subnet block inside `dhcpd.conf`. Note that exact encoding will vary based on target system expectations; refer to documentation provided by respective vendors when implementing similar setups. --related questions-- 1. How does one determine which enterprise numbers correspond to different vendors? 2. Can you explain the significance of including vendor-specific information over standard DHCP options? 3. What tools can assist in decoding captured packets containing complex DHCP options structures? 4. Are there common pitfalls encountered while troubleshooting issues related to improperly configured option 43 entries?
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值