CentOS7

仮想インタフェースを作成する

[root@localhost ~]# cd /etc/sysconfig/network-scripts/
[root@localhost network-scripts]# cp ifcfg-eth0 ifcfg-eth0:1 ←設定ファイルをコピー
[root@localhost network-scripts]# vi ifcfg-eth0:1
DEVICE=eth0:1
ONBOOT=yes
IPADDR=xxx.xxx.xxx.xxx
NETMASK=255.255.255.0
NETWORK=xxx.xxx.xxx.0
GATEWAY=xxx.xxx.xxx.xxx
BOOTPROTO=none
USERCTL=no
[root@localhost network-scripts]# cd
[root@localhost ~]# ifup eth0:1 ←仮想インタフェースをUP
[root@localhost ~]# ifconfig ←仮想インターフェースの状態を確認

トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2018-08-21 (火) 16:34:56