turboLinux_White Box Enterprise Linux_Fedora Core_Red Hat Memo/Network
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
RIGHT:更新日&lastmod();
*Ubuntu 22.04 LTS IPv6無効化 [#j87f16fe]
***IPv6の確認 [#ye584515]
# ip -6 address
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 state UNKNOWN ql...
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens160: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 st...
inet6 2001:a251:d281:a200:20c:29ff:fea4:23a7/64 scop...
valid_lft 2591831sec preferred_lft 604631sec
inet6 fe80::20c:29ff:fea4:23a7/64 scope link
valid_lft forever preferred_lft forever
***/etc/default/grub [#xfa04f29]
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX=""
↓
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"
GRUB_CMDLINE_LINUX="ipv6.disable=1"
***grub再起動 [#i2ae9191]
# update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.0-78-generic
Found initrd image: /boot/initrd.img-5.15.0-78-generic
Warning: os-prober will not be executed to detect other ...
Systems on them will not be added to the GRUB boot confi...
Check GRUB_DISABLE_OS_PROBER documentation entry.
done
***OS再起動後のIPv6の確認 [#be387425]
$ ip -6 address
何もエコーバックしない
*Ubuntu18.04LTSでネットワークの確認 [#u9c2f369]
RIGHT:更新日 &lastmod();
''IP確認''
# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue st...
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens160: <BROADCAST,MULTICAST> mtu 1500 qdisc noop sta...
link/ether 00:0c:29:43:31:48 brd ff:ff:ff:ff:ff:ff
3: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdi...
link/ether 00:0c:29:43:31:3e brd ff:ff:ff:ff:ff:ff
inet 192.168.0.177/24 brd 192.168.0.255 scope global...
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe43:313e/64 scope link
valid_lft forever preferred_lft foreve r
''ネットワーク(NIC)の確認''
# lshw -short -class network
H/W path Device Class Description
======================================================
/0/100/11/1 ens33 network 82545EM Gigab...
/0/100/15/0 ens160 network VMXNET3 Ether...
***追加NICにIP設定 [#ld222f4c]
''変更前''
元のNIC
NIC ens33:
IP 192.168.0.177/24
G/W xxx.160.237.178/29
''変更後''
元のNIC
NIC ens33:
IP 192.168.0.177/24
経路 10.0.0.0/8
経路G/W 192.168.0.197
追加のNIC
NIC ens160
IP xxx.160.237.178/29
default GW xxx.160.237.182
''設定ファイル''
-routeの追加を以下ように行う
10.0.0.0/8のGWを192.168.0.197に設定
&color(red){UbuntuではDNSの設定も/etc/resolv.confではなく...
-/etc/netplan/50-cloud-init.yaml
network:
ethernets:
ens33:
addresses:
- 192.168.0.177/24
routes: ←追加
- to: 10.0.0.0/8 ←追加
via: 192.168.0.197 ←追加
nameservers:
addresses:
- 192.168.0.243
search:
- ootsuji-c.com
ens160: ←追加
addresses: ←追加
- xxx.160.237.178/29 ←追加
gateway4: xxx.160.237.182 ←変更
version: 2
&color(red){以下注意};
インデントを間違うとSyntaxエラーになる
インデントはスペースがよさそう
''設定の有効化''
# netplan apply
''確認''
$ ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue st...
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens160: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qd...
link/ether 00:0c:29:43:31:48 brd ff:ff:ff:ff:ff:ff
inet 210.160.237.178/29 brd 210.160.237.183 scope gl...
^^^^^^^^^^^^^^^^^^^^^^^^
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe43:3148/64 scope link
valid_lft forever preferred_lft forever
3: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdi...
link/ether 00:0c:29:43:31:3e brd ff:ff:ff:ff:ff:ff
inet 192.168.0.177/24 brd 192.168.0.255 scope global...
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe43:313e/64 scope link
valid_lft forever preferred_lft forever
***DNSサーバの指定について [#z9430420]
先のファイル「/etc/netplan/50-cloud-init.yaml」で行う
''/etc/resolv.conf''には以下の指定入っているがこれは編集...
nameserver 127.0.0.53
options edns0
search ootsuji-c.com
ポート53がどのプロセスが使用しているか調べてみる
***ポート開放プロセスの表示 [#k73ca196]
# ss -nltup
Netid State Recv-Q Send-Q Local Address:Port Peer A...
udp UNCONN 0 0 127.0.0.53%lo:53 0.0.0....
^^^^^^^^^^^^^^^
# systemd-resolve --status
Global
DNSSEC NTA: 10.in-addr.arpa
16.172.in-addr.arpa
168.192.in-addr.arpa
(略)
Link 2 (enp5s0)
Current Scopes: DNS
LLMNR setting: yes
MulticastDNS setting: no
DNSSEC setting: no
DNSSEC supported: no
DNS Servers: 210.160.237.177 ←DNSの指定はここ...
DNS Domain: ootsuji-c.com
*BIOSの時間をローカル時間(JST)として取り扱う [#j1eba085]
Ubuntuインストール後、BIOSの時間がUTCとして扱われるので、...
''状態確認''
# timedatectl
Local time: Fri 2020-05-01 18:37:3...
Universal time: Fri 2020-05-01 09:37:3...
RTC time: Fri 2020-05-01 09:37:31
Time zone: Asia/Tokyo (JST, +0900)
System clock synchronized: no
systemd-timesyncd.service active: yes
RTC in local TZ: no ←RTCはTimeZoneで...
''RTCをTimeZone(JST)に変更''
# timedatectl set-local-rtc 1
# timedatectl
Local time: Fri 2020-05-01 18:37:4...
Universal time: Fri 2020-05-01 09:37:4...
RTC time: Fri 2020-05-01 18:37:42
Time zone: Asia/Tokyo (JST, +0900)
System clock synchronized: no
systemd-timesyncd.service active: yes
RTC in local TZ: yes ←RTCはがTimeZone...
Warning: The system is configured to read the RTC time i...
This mode can not be fully supported. It will c...
with time zone changes and daylight saving time...
time is never updated, it relies on external fa...
If at all possible, use RTC in UTC by calling
'timedatectl set-local-rtc 0'.
''時間を設定''
「systemd-timesyncd.service active: yes」なのでntp同期を...
# dpkg -l | grep ntp
# timedatectl set-ntp no
# timedatectl set-time "2020-05-01 09:58:00"
# timedatectl
Local time: Fri 2020-05-01 09:58:4...
Universal time: Fri 2020-05-01 00:58:4...
RTC time: Fri 2020-05-01 09:58:41
Time zone: Asia/Tokyo (JST, +0900)
System clock synchronized: no
systemd-timesyncd.service active: no ← NTP同期 noは同...
RTC in local TZ: yes
※System clock synchronized:yes `は時刻が正常に同期された...
''再起動''
終了行:
RIGHT:更新日&lastmod();
*Ubuntu 22.04 LTS IPv6無効化 [#j87f16fe]
***IPv6の確認 [#ye584515]
# ip -6 address
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 state UNKNOWN ql...
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens160: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 st...
inet6 2001:a251:d281:a200:20c:29ff:fea4:23a7/64 scop...
valid_lft 2591831sec preferred_lft 604631sec
inet6 fe80::20c:29ff:fea4:23a7/64 scope link
valid_lft forever preferred_lft forever
***/etc/default/grub [#xfa04f29]
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX=""
↓
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"
GRUB_CMDLINE_LINUX="ipv6.disable=1"
***grub再起動 [#i2ae9191]
# update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.0-78-generic
Found initrd image: /boot/initrd.img-5.15.0-78-generic
Warning: os-prober will not be executed to detect other ...
Systems on them will not be added to the GRUB boot confi...
Check GRUB_DISABLE_OS_PROBER documentation entry.
done
***OS再起動後のIPv6の確認 [#be387425]
$ ip -6 address
何もエコーバックしない
*Ubuntu18.04LTSでネットワークの確認 [#u9c2f369]
RIGHT:更新日 &lastmod();
''IP確認''
# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue st...
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens160: <BROADCAST,MULTICAST> mtu 1500 qdisc noop sta...
link/ether 00:0c:29:43:31:48 brd ff:ff:ff:ff:ff:ff
3: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdi...
link/ether 00:0c:29:43:31:3e brd ff:ff:ff:ff:ff:ff
inet 192.168.0.177/24 brd 192.168.0.255 scope global...
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe43:313e/64 scope link
valid_lft forever preferred_lft foreve r
''ネットワーク(NIC)の確認''
# lshw -short -class network
H/W path Device Class Description
======================================================
/0/100/11/1 ens33 network 82545EM Gigab...
/0/100/15/0 ens160 network VMXNET3 Ether...
***追加NICにIP設定 [#ld222f4c]
''変更前''
元のNIC
NIC ens33:
IP 192.168.0.177/24
G/W xxx.160.237.178/29
''変更後''
元のNIC
NIC ens33:
IP 192.168.0.177/24
経路 10.0.0.0/8
経路G/W 192.168.0.197
追加のNIC
NIC ens160
IP xxx.160.237.178/29
default GW xxx.160.237.182
''設定ファイル''
-routeの追加を以下ように行う
10.0.0.0/8のGWを192.168.0.197に設定
&color(red){UbuntuではDNSの設定も/etc/resolv.confではなく...
-/etc/netplan/50-cloud-init.yaml
network:
ethernets:
ens33:
addresses:
- 192.168.0.177/24
routes: ←追加
- to: 10.0.0.0/8 ←追加
via: 192.168.0.197 ←追加
nameservers:
addresses:
- 192.168.0.243
search:
- ootsuji-c.com
ens160: ←追加
addresses: ←追加
- xxx.160.237.178/29 ←追加
gateway4: xxx.160.237.182 ←変更
version: 2
&color(red){以下注意};
インデントを間違うとSyntaxエラーになる
インデントはスペースがよさそう
''設定の有効化''
# netplan apply
''確認''
$ ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue st...
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens160: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qd...
link/ether 00:0c:29:43:31:48 brd ff:ff:ff:ff:ff:ff
inet 210.160.237.178/29 brd 210.160.237.183 scope gl...
^^^^^^^^^^^^^^^^^^^^^^^^
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe43:3148/64 scope link
valid_lft forever preferred_lft forever
3: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdi...
link/ether 00:0c:29:43:31:3e brd ff:ff:ff:ff:ff:ff
inet 192.168.0.177/24 brd 192.168.0.255 scope global...
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe43:313e/64 scope link
valid_lft forever preferred_lft forever
***DNSサーバの指定について [#z9430420]
先のファイル「/etc/netplan/50-cloud-init.yaml」で行う
''/etc/resolv.conf''には以下の指定入っているがこれは編集...
nameserver 127.0.0.53
options edns0
search ootsuji-c.com
ポート53がどのプロセスが使用しているか調べてみる
***ポート開放プロセスの表示 [#k73ca196]
# ss -nltup
Netid State Recv-Q Send-Q Local Address:Port Peer A...
udp UNCONN 0 0 127.0.0.53%lo:53 0.0.0....
^^^^^^^^^^^^^^^
# systemd-resolve --status
Global
DNSSEC NTA: 10.in-addr.arpa
16.172.in-addr.arpa
168.192.in-addr.arpa
(略)
Link 2 (enp5s0)
Current Scopes: DNS
LLMNR setting: yes
MulticastDNS setting: no
DNSSEC setting: no
DNSSEC supported: no
DNS Servers: 210.160.237.177 ←DNSの指定はここ...
DNS Domain: ootsuji-c.com
*BIOSの時間をローカル時間(JST)として取り扱う [#j1eba085]
Ubuntuインストール後、BIOSの時間がUTCとして扱われるので、...
''状態確認''
# timedatectl
Local time: Fri 2020-05-01 18:37:3...
Universal time: Fri 2020-05-01 09:37:3...
RTC time: Fri 2020-05-01 09:37:31
Time zone: Asia/Tokyo (JST, +0900)
System clock synchronized: no
systemd-timesyncd.service active: yes
RTC in local TZ: no ←RTCはTimeZoneで...
''RTCをTimeZone(JST)に変更''
# timedatectl set-local-rtc 1
# timedatectl
Local time: Fri 2020-05-01 18:37:4...
Universal time: Fri 2020-05-01 09:37:4...
RTC time: Fri 2020-05-01 18:37:42
Time zone: Asia/Tokyo (JST, +0900)
System clock synchronized: no
systemd-timesyncd.service active: yes
RTC in local TZ: yes ←RTCはがTimeZone...
Warning: The system is configured to read the RTC time i...
This mode can not be fully supported. It will c...
with time zone changes and daylight saving time...
time is never updated, it relies on external fa...
If at all possible, use RTC in UTC by calling
'timedatectl set-local-rtc 0'.
''時間を設定''
「systemd-timesyncd.service active: yes」なのでntp同期を...
# dpkg -l | grep ntp
# timedatectl set-ntp no
# timedatectl set-time "2020-05-01 09:58:00"
# timedatectl
Local time: Fri 2020-05-01 09:58:4...
Universal time: Fri 2020-05-01 00:58:4...
RTC time: Fri 2020-05-01 09:58:41
Time zone: Asia/Tokyo (JST, +0900)
System clock synchronized: no
systemd-timesyncd.service active: no ← NTP同期 noは同...
RTC in local TZ: yes
※System clock synchronized:yes `は時刻が正常に同期された...
''再起動''
ページ名: