0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

NetplanやNetworkManagerが導入されていない環境で一時的にネットワークを疎通させたいときのコマンド

Last updated at Posted at 2024-01-03

NetplanやNetworkManagerが導入されていない環境において、一時的にネットワークを疎通させたい時は、次のように設定します。(NetplanやNetworkManagerは後からdnfやaptでインストールすることを想定)

設定例

条件

  • NICは eth0
  • IPアドレスは 10.1.0.11 を割り当てる
  • サブネットは /24 (255.255.255.0)
  • デフォルトゲートウェイのIPアドレスは 10.1.0.1
  • DNSサーバは Google Public Dns (8.8.8.8) をとりあえず指定 ( /etc/resolve.conf は一切設定されていない=空の状態であることを想定)

コマンド

# ip addr add 10.1.0.11/24 dev eth0
# ip route add 10.1.0.1 dev eth0
# ip route add default via 10.1.0.1
# nameserver 8.8.8.8 > /etc/resolve.conf
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?