by Devin Yang

建立于: 6年前 ( 更新: 6年前 )

ubuntu网卡固定及浮动IP笔记,这是我在Nvidia TX2上的设置。
其他版本的ubuntu Linux应该也可以用
修改
/etc/network/interfaces

浮动IP设置方式

iface eth0 inet dhcp

固定IP设置方式

# The primary network interface
auto eth0
iface eth0 inet static
    address 192.168.0.108
    netmask 255.255.255.0
    network 192.168.0.0
    broadcast 192.168.0.255
    gateway 192.168.0.1
    dns-nameservers 168.95.1.1 8.8.8.8
    dns-domain ccc.tc
    dns-search ccc.tc

重启网络

 /etc/init.d/networking restart

 

Tags:

Devin Yang

文章内容无法一一说明,如果您有什么不了解处,欢印提问哦:)

No Comment

Post your comment

需要登入才可留言!

类似文章


cwebp,bash

我如何用bash优化网站图档,透过cwebp转图

我的网站中有大量背景图在同一个页面中,下载下来太大罗,需要瘦身,这cwebp工具不错。在ubunut的环境apt install webp就可以安装罗。

docker,phpenv

用光了Docker IPv4 address pool问题解法

可能在旧版的docker环境,使用Docker compose启动容器时,会碰过下方的错误: Error response from daemon: could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network这其实这是default-address-pools用光的症状,有些环境,docker-compose默认会使用Class B的私有网络。172段的私有IP是有范围的,从172.16.0.0到172.31.255.255。也就是说,当我们起动一个docker-compose的Project,就会吃掉一个Class B的私有段,非常豪迈,

d-laravel, docker, docker-compose, laravel

D-Laravel释出v0.9.1版了

为了让D-Laravel保持在一个可运作的版本及稳定的本。 开始使用Tag标注该版本通过测试那些测试.. 这个版本已通过ubuntu实及macos实机测试,可顺利创建Container及运行哦..