s***g 发帖数: 6 | 1 cable modem + D-Link router.
一台PC和一台Solaris接在router上. 用DHCP. PC work正常.
Solaris 可以得到IP address, 从PC可以telnet到Solaris上.
但是Solaris不能resolve domain name. 比如ping bbs.mit.edu 不行, 但是
直接ping ip 可以. solaris自己的hostname是unknown.
怎么办? 我试着在/etc/resolv.conf 里嫁了两个DNS server的IP, 然后reboot
但是没有用. 试着在/etc/hosts里嫁了一个hostname, 但是机器reboot后又被
改回unknown.
是solaris8
多谢多谢!! | c***z 发帖数: 152 | 2 1: Check /etc/nsswitch.conf, make sure there is one line looks like
hosts: files dns
2: Make sure you can successfully PING the DNS server address from your
system.
Good luck.
【在 s***g 的大作中提到】 : cable modem + D-Link router. : 一台PC和一台Solaris接在router上. 用DHCP. PC work正常. : Solaris 可以得到IP address, 从PC可以telnet到Solaris上. : 但是Solaris不能resolve domain name. 比如ping bbs.mit.edu 不行, 但是 : 直接ping ip 可以. solaris自己的hostname是unknown. : 怎么办? 我试着在/etc/resolv.conf 里嫁了两个DNS server的IP, 然后reboot : 但是没有用. 试着在/etc/hosts里嫁了一个hostname, 但是机器reboot后又被 : 改回unknown. : 是solaris8 : 多谢多谢!!
| c******n 发帖数: 4965 | 3 I guess you have to set up you own dns server
in your home network---- the PC+Solaris,
for a router, it just do "IP masquerading" or NAT,
I doubt it has ability to do DHCP,
so you can set up DHCP on solaris, then each machine gets a
local IP automatically,
well, I suggest that you check the IP on PC, it must be a real
internet IP now, not a local IP, because you connect it directly
to modem, time-warner only allows one ip for each modem unless you pay
more.
the other way would be to directly set
【在 s***g 的大作中提到】 : cable modem + D-Link router. : 一台PC和一台Solaris接在router上. 用DHCP. PC work正常. : Solaris 可以得到IP address, 从PC可以telnet到Solaris上. : 但是Solaris不能resolve domain name. 比如ping bbs.mit.edu 不行, 但是 : 直接ping ip 可以. solaris自己的hostname是unknown. : 怎么办? 我试着在/etc/resolv.conf 里嫁了两个DNS server的IP, 然后reboot : 但是没有用. 试着在/etc/hosts里嫁了一个hostname, 但是机器reboot后又被 : 改回unknown. : 是solaris8 : 多谢多谢!!
| s***g 发帖数: 6 | 4 果然是大侠!! 当时就work!
还有一个小问题: solaris还说自己的host name是unknown. 如果从PC ping
的话, 只能用IP ping通. 用unknown不行.
我试了在/etc/hosts 里把 unknown改成一个名字, 没用. 如果reboot的话,
它又自己改回unknown了. weird.
救人救到底.
【在 c***z 的大作中提到】 : 1: Check /etc/nsswitch.conf, make sure there is one line looks like : hosts: files dns : 2: Make sure you can successfully PING the DNS server address from your : system. : Good luck.
| m****m 发帖数: 165 | 5 Say if you are using Solaris 2.6:
1.Put your machine's hostname in the /etc/nodename file.
2.Edit the /etc/rcS.d/S30rootuser.sh script. Around line 150 there's an
if/then statement that sets the hostname to "unknown". Comment out the whole
if/then statement (3 lines).
【在 s***g 的大作中提到】 : 果然是大侠!! 当时就work! : 还有一个小问题: solaris还说自己的host name是unknown. 如果从PC ping : 的话, 只能用IP ping通. 用unknown不行. : 我试了在/etc/hosts 里把 unknown改成一个名字, 没用. 如果reboot的话, : 它又自己改回unknown了. weird. : 救人救到底.
|
|