サーバ管理
# ifconfig -a
# ifconfig hme0 up # ifconfig hme0 down
# ifconfig hme0 plumb # ifconfig hme0 unplumb
# ifconfig hme0 down # ifconfig hme0 192.168.1.10 netmask 255.255.255.0 broadcast 192.168.1.255 # ifconfig hme0 up
とか
# ifconfig hme0 192.168.1.10 netmask 255.255.255.0 broadcast 192.168.1.255
設定ファイルで変更する場合、/etc/hostsを編集しIPアドレスを変更します。実際は、/etc/hostname.hme0が直接関係しますが、/etc/hostsとホスト名で対応付けされているため、/etc/hostsの方を変更すればいいです。 設定ファイル変更後は、システムの再起動を忘れずに。
# cat /etc/hostname.hme0 --- host # vi /etc/hosts --- 192.168.1.10 host loghost # /etc/telinit 6
# ifconfig hme0:1 plumb # ifconfig hme0:2 plumb # ifconfig hme0:1 192.168.1.11 netmask 255.255.255.0 broadcast 192.168.1.255 up # ifconfig hme0:2 192.168.1.12 netmask 255.255.255.0 broadcast 192.168.1.255 up
# ifconfig hme0 mtu 1454