LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Setting up linux networking on windows server (https://www.linuxquestions.org/questions/linux-networking-3/setting-up-linux-networking-on-windows-server-207828/)

david.cormie 07-21-2004 07:58 AM

Setting up linux networking on windows server
 
Hi guys.

This is probably a tiresome question from a Linux newbie, but I've searched the threads and not found anything to help. Please, somebody, help me if you can!

I am trying to set up networking on a new, single-boot, linux machine. We already have two dual-boot (linux/WinXP) machines that work fine.

The problem that I am having is in setting up the hostname and domain, and in getting the windows server to recognise the machine. I have set the hostname to linux01 on the linux machine, and in the Active Directory utility on the Windows 2000 server, I have added a new machine called linux01. I have also modified the first line of /etc/hosts to read:

127.0.0.1 linux01.nnaenguk.net linux01

IP addresses are assigned by DHCP by the server, and the machine has picked up an IP address. In the Active Directory, the only odd thing is that the hostname does not appear against the IP entry - seems to be perhaps a machineID?

All seems to be fine - I can log in properly, get internet access, ping the other machines etc. However, I tried to access the windows-side of the network by SMB (typing smb:/// into the address bar of an explorer window) and I get the message "Couldn't display "smb:///" because Nautilus cannot contact the SMB master brower. Check that an SMB server is running in the local network."

Also, when I try to mount a directory located on this machine onto one of the other linux boxes, I get an error "Mount: RPC: Remote system error - No route to host".

I don't understand what is causing this, other than presuming that I have not set up the networking properly. I can get SMB access from the other linux machines, and I have not had to do anything special. [In fact, one of those still has the hostname set as localhost.localdomain.]

I am presuming that the fact that Active Directory does not report the hostname of the machine against the IP address has something to do with the problem. [For the windows/linux dual-boots, the IP address has the hostname reported against it (winlinx01.nnaenguk.net).

Does anybody know what I need to do to resolve this?

Linux is RedHat 9.0.

Thanks,
David Cormie

pingu 07-21-2004 09:17 AM

I know next to nothing about AD, but 127.0.0.1 should point to localhost only.
The computername should be tied to the nic's IP.
I'm not sure if you need /etc/hosts, you use DHCP & DNS-servers, but maybe keep the localhost entry.

david.cormie 07-21-2004 09:34 AM

Quote:

Originally posted by pingu
I know next to nothing about AD, but 127.0.0.1 should point to localhost only.
The computername should be tied to the nic's IP.
I'm not sure if you need /etc/hosts, you use DHCP & DNS-servers, but maybe keep the localhost entry.

Pingu,
Thanks for your reply.

Do I understand from the your post that I should set /etc/hosts back to the following?
127.0.0.1 localhost.localdomain localhost

How do I set what the hostname of the machine should be, if it's not through /etc/hosts? You mention the network card IP address - do I have to do something on this to set the hostname?

pingu 07-21-2004 09:49 AM

I think there's a GUI-tool for this, not quite sure.
You can set it manually, in /etc/sysconfig/network add the line
HOSTNAME=linux01.nnaenguk.net

Hmmm... now I can't remember if you should specify the name only -
HOSTNAME=linux01 and also add
DOMAINNAME=nnaenguk.net?

david.cormie 07-21-2004 10:12 AM

Help! I seem to have made a step backwards!

I have edited the /etc/hosts file so that it reads:

127.0.0.1 localhost.localdomain localhost

and the /etc/sysconfig/network file so that it reads:

NETWORKING=YES
HOSTNAME=linux01
DOMAINNAME=nnaenguk.net

and now I get the message: "Could not look up internet address for linux01. This will prevent GNOME from operating correctly. It may be possible to correct the problem by adding linux01 to the file /etc/hosts." There are two options: "Log in anyway/try again".

pingu 07-22-2004 01:45 AM

Now I feel a bit lost... actually I thought I was pretty good at networking, not so sure now...
Anyway, you do have a DNS-server, right?
Post the output of
#ifconfig
#route

...or someone else have any ideas?

david.cormie 07-22-2004 04:03 AM

/sbin/ifconfig:

eth0 Link encap:Ethernet HWaddr 00:0F:1F:7A:1F:A5
inet addr:172.6.2.53 Bcast:172.6.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:45576 errors:0 dropped:0 overruns:0 frame:0
TX packets:730 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3627439 (3.4 Mb) TX bytes:87685 (85.6 Kb)
Interrupt:24 Base address:0xecc0 Memory:fe5e0000-fe600000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:330 errors:0 dropped:0 overruns:0 frame:0
TX packets:330 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:29519 (28.8 Kb) TX bytes:29519 (28.8 Kb)


/sbin/route:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.6.2.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 172.6.2.1 0.0.0.0 UG 0 0 0 eth0

pingu 07-22-2004 05:35 AM

<sigh> I thought that 'ifconfig' would show the DNS, apparently not... Just wanted to see if this is a DNS-problem. Maybe check /etc/resolv.conf. :scratch:
Maybe I shouldn't have answered in the first place, I'm out in deep water now... :o

But come to think of it: you have another computer in the same network running Linux, right?
On that computer, check
/etc/hosts
/etc/resolv.conf
/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/sysconfig/networking
(I'm taking this out of memory, file/dir-names are not necessarily 100% correct!) Compare with the 'trouble-computer'.

david.cormie 07-22-2004 08:20 AM

Checking these files on each machine seems to show the same stuff in each file. I think the problem arises on the Windows side: each of the working machines were set up in Windows first, and then made dual boot and set up with Linux. So all the DNS entries/DHCP settings were all sorted out first. However, on this machine there is no Windows side, so I'm having to try to get the Windows server to recognise it from scratch - which I know nothing about! Any ideas?


All times are GMT -5. The time now is 11:52 AM.