差分

ナビゲーションに移動 検索に移動

ArchLinuxのインストール

1,690 バイト追加, 2019年8月23日 (金) 14:00
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s3enp0s20u4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether 0800:00e0:004c:0036:00be:00brd 7f brd ff:ff:ff:ff:ff:ff inet 10192.0168.256.1511/24 brd 10192.0168.211.255 scope global enp0s20u4 valid_lft forever preferred_lft forever inet6 xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx/64 scope global dynamic noprefixroute enp0s3mngtmpaddr valid_lft 82004sec 86391sec preferred_lft 82004sec14391sec inet6 fe80:0000:00002e0:00004cff:0000fe36:0000be7f/64 scope link noprefixroute valid_lft forever preferred_lft forever3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether 18:bb:26:a9:a1:0e brd ff:ff:ff:ff:ff:ff</syntaxhighlight>「lo」じゃないほうがデバイス名です(この場合「enp0s3」です)。「lo」じゃないほうがデバイス名です(この場合「enp0s20u4」です)。
NICのデバイス名を取得したら、以下のコマンドを実行します。netctlの設定ファイルをコピーします。<syntaxhighlight lang="bash">cp /etc/netctl/examples/ethernet-static /etc/netctl/enp0s20u4</syntaxhighlight>(私の場合、nic名をnetctlのプロファイル名にも使用しています)  コピーしたら以下のコマンドで、設定を編集していきます。<syntaxhighlight lang="bash">systemctl enable dhcpcd@[interface]netctl edit enp0s20u4</syntaxhighlight> 修正箇所は以下のとおりです。<br/>  【修正前】<syntaxhighlight lang="text" line="line" highlight="2,5,7-8,11">Description='A basic static ethernet connection'Interface=eth0Connection=ethernetIP=staticAddress=('192.168.1.23/24' '192.168.1.87/24')#Routes=('192.168.0.0/24 via 192.168.1.2')Gateway='192.168.1.1'DNS=('192.168.1.1') ## For IPv6 autoconfiguration#IP6=stateless ## For IPv6 static address configuration#IP6=static#Address6=('1234:5678:9abc:def::1/64' '1234:3456::123/96')#Routes6=('abcd::1234')#Gateway6='1234:0:123::abcd'</syntaxhighlight>  【修正後】<syntaxhighlight lang="text" line="line" highlight="2,5,7-8,11-12">Description='A basic static ethernet connection'Interface=enp0s20u4Connection=ethernetIP=staticAddress=('192.168.56.11/24')#Routes=('192.168.0.0/24 via 192.168.1.2')Gateway='192.168.56.1'DNS=('192.168.56.service1') ## For IPv6 autoconfigurationIP6=statelessTimeoutDAD=60 ## For IPv6 static address configuration#IP6=static#Address6=('1234:5678:9abc:def::1/64' '1234:3456::123/96')#Routes6=('abcd::1234')#Gateway6='1234:0:123::abcd'</syntaxhighlight>[interface]をNICのデバイス名に置き換えてください。以下のコマンドでnetctlを起動&有効化します。<syntaxhighlight lang="bash">netctl start enp0s20u4netctl enable enp0s20u4</syntaxhighlight>
= 参考サイト =

案内メニュー