
A 回答 (4件)
- 最新から表示
- 回答順に表示
No.4
- 回答日時:
> ホスト名 ipアドレス の記述だと、認識しないのでしょうか?
逆になぜこうしてみたくなったのかそれを聞いてみたいところではあるが、
では、/etc/hostsの役割から検討してみよう。
/etc/hostsの役割は「IPアドレスに対してわかりやすい別名をつける」事だ。/etc/hostsの正確な書き方は以下のようになる。
xxx.xxx.xxx.xxx hostname1 hostname2 hostname3 hostname4 ....
分かるだろうか。1つのIPアドレスに対して複数の別名をつける事ができる。これは、書き方が(IPアドレスとホスト名で)逆だと実現できない機能だ。いや、hostname1 xxx.xxx.xxx.xxx、hostname2 xxx.xxx.xxx.xxxという2行で表現できるかもしれないけど。
なので、上記の正確な書き方をしてあげてほしい。そうしないとSolarisは分かってくれない。
そして、このhostsファイルの役割と書き方はSolarisでもLinuxでもWindowsでも同じだ。LinuxとWindowsでも同じようにしてあげてほしい。
No.3
- 回答日時:
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
#127.0.0.1 localhost
#::1 localhost
No.2
- 回答日時:
この質問の解決がとても必要なのにも拘わらず、
http://oshiete.goo.ne.jp/qa/6884878.html (すぐに回答ほしいです)
自分では確認できない、不思議な状況にとても興味あり。
もし気が向いたら、補足にその状況の説明を書いてね!
ちなみに、Windows XP ではダメだったよ?
| C:\WINDOWS\system32\drivers\etc>echo somepc 192.168.1.10>>hosts
|
| C:\WINDOWS\system32\drivers\etc>more +17 hosts
|
| 127.0.0.1 localhost
| somepc 192.168.1.10
|
| C:\WINDOWS\system32\drivers\etc>ping -a somepc
| Ping request could not find host somepc. Please check the name and try again.
|
| C:\WINDOWS\system32\drivers\etc>
お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!
関連するカテゴリからQ&Aを探す
おすすめ情報
デイリーランキングこのカテゴリの人気デイリーQ&Aランキング
-
BIND エラー not found: 3(NXD...
-
Apacheをサービスに組み込めません
-
【DNS】ゾーン情報が上手く設定...
-
リモートデスクトップ接続でパ...
-
Mailの送信済みメールボックス...
-
エラーメールで"too many hops"...
-
パスワード設定していないユー...
-
同一のホスト名で何か問題があ...
-
TortoiseSVNでアクセスエラー
-
ワークグループ設定のPCの名前解決
-
サーバーというのとメインフレ...
-
エクセルで#N/Aを含めた平均値...
-
root権限によるFFFTPでの接続
-
同じ独自ドメインを2つのサーバ...
-
sendmailでのctladdrの変更
-
1つのサーバにFTPサイトを2つ以...
-
Linuxでパスワード変更時に「it...
-
【組み込み】HEWのビルドエラー
-
OS X10.5とOS9.2でファイル共有
-
MACアドレス 00:E0:C3 SAKAI って
マンスリーランキングこのカテゴリの人気マンスリーQ&Aランキング
-
【DNS】ゾーン情報が上手く設定...
-
VNCへのアクセス制限
-
Linuxのtarコマンドで同一ディ...
-
BIND エラー not found: 3(NXD...
-
CentOSの解像度・変更方法。
-
ネットワークの再起動方法
-
Apacheをサービスに組み込めません
-
awsで wordpressのhttpd.conf ...
-
CentOSでのbad owner name
-
NFSサーバー起動時のエラー対処...
-
シャットダウンが途中で止まっ...
-
logrotate.confでmonthlyとした...
-
echo $LANGで何も表示されません。
-
named.confの設定
-
Red Hat Linux7.3でNICが認識さ...
-
sentOS 6.3でsquid.confを開くと
-
crontabでtarを実行した際、エ...
-
BIND9によるDNS構築
-
コアダンプについて
-
Tomcat で ポート8080 が使えない
おすすめ情報