2017年9月2日土曜日

Ubuntu 17.10のネットワーク設定がifupdownからnetplanに変更になったでござる

Ryzen 7を入手したので、Ubuntu Server 17.10のdaily buildでいろいろ試していたところ、
/etc/network/interfacesで固定IPが設定できなくなっていたので、
netplanの設定方法を確認した。

参考

https://insights.ubuntu.com/2017/07/10/netplan-by-default-in-17-10/
https://git.launchpad.net/netplan/tree/doc/netplan.md

インストール直後の設定

cat /etc/netplan/01-netcfg.yaml

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    enp38s0:
      dhcp4: yes
      dhcp6: yes
マニュアルを参考にして、定義ファイルを書き換え
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    enp38s0:
      dhcp4: no
      addresses: [192.168.100.10/24]
      gateway4: 192.168.100.1
      nameservers:
        addresses: [8.8.8.8]
      dhcp6: no
上記の設定のみでは反映されなかったので、以下のファイルを作成した。
sudo mkdir /etc/network/interfaces.d
sudo touch /etc/network/interfaces.d/enp38s0
再起動したところ固定IPアドレスが反映されました。
このあたりは、Ubuntu 18.04 LTSがリリースされてから再度調べてみる。

しかし、Ryzen 7いいですね。

2017年8月28日月曜日

Bitbucketはipv6対応していない???

ある日突然??
Bitbucketにgit cloneやらアクセスできなくなるわけですね。
環境は、macOS Sierraで、ssh接続で発生しました。
Warning: Permanently added the RSA host key for IP address '2401:1d80:1010::150' to the list of known hosts.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
公開鍵を追加、削除してみたり、ssh -vvvで動作確認してみたりするのですが、 ユーザーIDは認識できているようなので、鍵は問題なさそう。 上記のように、ipv6のアドレスでアクセスしていたので、念のため [ネットワーク] => [TCP/IP] => [IPv6の設定]を「リンクローカルのみ」に変更したところ接続できました。
Warning: Permanently added the RSA host key for IP address '104.192.143.2' to the list of known hosts.
Counting objects: 50, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (36/36), done.
Writing objects: 100% (50/50), 38.81 KiB | 0 bytes/s, done.
Total 50 (delta 3), reused 0 (delta 0)
以下省略
ipv6対応してるはずなんですけどね。
https://blog.bitbucket.org/2016/07/21/bitbucket-cloud-now-available-ipv6/

時間がないので、ここまで。