将 IP 分配给 dd-wrt ​​中的 certian mac 地址

Unf*_*nut 5 dd-wrt ip-address mac-address

我有一个WRT54G/GL/GS正在运行的 Linksys ,在我DD-WRT v24-sp2 (10/10/09) vpn - build 13064的一生中,我找不到一种基于 Mac 地址分配 IP 的方法。基本上我有几台笔记本电脑,而 Windows 确实没有像样的方法来为每个网络设置单独的配置文件。

qua*_*ote 5

基于MAC地址分配IP地址一般由DHCP服务器完成;这通常被称为“静态租约”。

这是关于启用静态 DHCPDD-WRT 教程。在 Web 管理 GUI 中,您将在服务选项卡上的 DHCP 服务器选项中找到此选项。

如果您使用 ssh 命令行界面,请使用以下命令:

  • 构建早于 13832:

    # X is the total number of static leases
    nvram set static_leasenum=X
    
    # note the space between the two example addresses
    nvram set static_leases="00:11:22:33:44:55=name1=IP-Address1 00:11:22:33:44:56=name2=IP-Address2"
    
    Run Code Online (Sandbox Code Playgroud)
  • 构建 13832 及更高版本:

    # X is the total number of static leases
    nvram set static_leasenum=X
    
    # note the space between the two example addresses
    # the last field is new; lease time; leave empty for "indefinite"
    nvram set static_leases="00:11:22:33:44:55=name1=IP-Address1= 00:11:22:33:44:56=name2=IP-Address2=1440"
    
    Run Code Online (Sandbox Code Playgroud)

替代文字

  • @Piotr Dobrogost:包括我在内的很多人都无法使用基于网络的方式。我在 DD-WRT v24-sp2 (06/14/11) 上,用于添加静态租约的 Web 界面无法正常工作。它没有错误。它什么都不做。搜索发现很多人都有这个问题。 (2认同)