概要
CLI でネットワークの設定を行うには特権モードに入る必要があります。
設定手順
ホスト名の変更 (configure network hostname)
# configure network hostname iwsva.example.com
hostname: iwsva.example.com
IP アドレスの変更 (configure network interface)
# configure network interface ipv4 static eth0 192.168.0.1 255.255.255.0
Interface: eth0
IP Address: 192.168.0.1
Netmask: 255.255.255.0
Type: static
管理インタフェースの設定 (configure network mgmt interface)
# configure network mgmt interface eth1
現在の管理インタフェースの状態を確認するにはshow network mgmt interface を実行します。
Management interface: enable
Interface: eth1
IP address: 172.16.0.1
Network mask: 255.255.255.192
Type: static
管理インタフェースの無効化 (configure network mgmt disable)
# configure network mgmt disable
デフォルトゲートウェイの変更 (configure network route default)
# configure network route ipv4 default 192.168.0.254
静的ルートの追加 (configure network route add)
# configure network route ipv4 add 192.168.2.0/24 192.168.0.253 eth0
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.2.0 192.168.0.253 255.255.255.0 UG 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
0.0.0.0 192.168.0.254 0.0.0.0 UG 0 0 0 eth0
静的ルートの削除 (configure network route del)
# configure network route ipv4 del 192.168.2.0/24 192.168.0.253 eth0
DNS の変更 (configure network dns)
# configure network dns ipv4 192.168.0.53 172.16.0.53
DNS1: 192.168.0.53
DNS2: 172.16.0.53
