树莓派添加网卡之后连接时自动设置其Ip
发布日期:2021-06-30 10:11:33
浏览次数:5
分类:技术文章
本文共 1383 字,大约阅读时间需要 4 分钟。
在/etc/dhcpcd.conf中配置:
interface eth1
static ip_address=192.168.4.123/24完整的一个文件示例:
# A sample configuration for dhcpcd.# See dhcpcd.conf(5) for details.# Allow users of this group to interact with dhcpcd via the control socket.#controlgroup wheel# Inform the DHCP server of our hostname for DDNS.hostname# Use the hardware address of the interface for the Client ID.clientid# or# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.# Some non-RFC compliant DHCP servers do not reply with this set.# In this case, comment out duid and enable clientid above.#duid# Persist interface configuration when dhcpcd exits.persistent# Rapid commit support.# Safe to enable by default because it requires the equivalent option set# on the server to actually work.option rapid_commit# A list of options to request from the DHCP server.option domain_name_servers, domain_name, domain_search, host_nameoption classless_static_routes# Respect the network MTU. This is applied to DHCP routes.option interface_mtu# Most distributions have NTP support.#option ntp_servers# A ServerID is required by RFC2131.require dhcp_server_identifier# Generate SLAAC address using the Hardware Address of the interface#slaac hwaddr# OR generate Stable Private IPv6 Addresses based from the DUIDslaac private# Example static IP configuration:interface eth1static ip_address=192.168.4.123/24
转载地址:https://islet.blog.csdn.net/article/details/114373497 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!
发表评论
最新留言
能坚持,总会有不一样的收获!
[***.219.124.196]2024年04月10日 02时50分17秒
关于作者
喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
基于JAVA_JSP电子书下载系统
2019-04-30
基于java出租车计价器设计与实现
2019-04-30
基于java的B2C的网上拍卖系统
2019-04-30
十二时辰篇:这该死的 996
2019-04-30
2021最新 上海互联网公司排名
2019-04-30
字节vs快手!取消大小周之战
2019-04-30
送一个闲置显示器!
2019-04-30
Oracle 行转列 pivot函数基本用法
2019-04-30
Oracle字符串分隔符替换(替换奇数个或偶数个)
2019-04-30
Oracle 利用 UTL_SMTP 包发送邮件
2019-04-30
Oracle 自定义函数实现split功能,支持超长字符串和clob类型的分隔
2019-04-30
Oracle 的循环中的异常捕捉和处理
2019-04-30
Oracle通过pivot和unpivot配合实现行列转换
2019-04-30
给Oracle数据库换一个1522端口的监听
2019-04-30
Excel表格数据生成ECharts图表
2019-04-30
阿里云短信服务python版,pyinstaller打包运行时缺少文件
2019-04-30
Oracle的pfile和spfile的一点理解和笔记
2019-04-30
WebService的简单案例记录(Java)
2019-04-30
Html利用PHP与MySQL交互
2019-04-30