Help us understand the problem. What is going on with this article?

CentOS でデフォルトゲートウェイの設定を確認・変更する

More than 1 year has passed since last update.



$ route

出力された結果の default の項目がデフォルトゲートウェイの設定になります。

route del default gw ****
route add default gw ****

起動する度に同じ設定にしておきたい場合は ifcfg-eth0 の GATEWAY 項目を編集する必要があります。

$ vi /etc/sysconfig/network-scripts/ifcfg-eth0
$ service network restart
I'm a software engineer. Python3/Embulk/Digdag/Presto/Hive/Elasticsearch
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away