LoginSignup
2
2

More than 5 years have passed since last update.

ubuntuのIP追加方法

Last updated at Posted at 2018-05-25

起動中のOSに固定IPをセットする

$ ip addr add 192.168.1.222/24 broadcast 192.168.1.255 dev eno1
$ ip a | grep 192.168.1

ちなみにnicのリストを出す

ip link show
ip a

再起動後も有効な固定IPにする

$ vi /etc/network/interfaces
auto eno1:8
iface eno1:8 inet static
        address 192.168.1.222
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.1
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 8.8.8.8 4.4.4.4

再起動して設定変わらなければok

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2