linux newbie needs some help setting up networking

Issues related to configuring your network
Post Reply
zzyzx37
Posts: 3
Joined: 2008/03/25 16:05:48

linux newbie needs some help setting up networking

Post by zzyzx37 » 2008/03/25 16:48:06

Hey all,

I am having a lot of trouble doing something that I think should be pretty simple. I hope someone can steer me in the right direction.

I am setting up a server to run apache/tomcat/mysql for development use. I want the server to get it's IP address from our network's existing DHCP server. Then, I want to access the server by name when using SSH or a brower. So we can type in

http://devserver/

instead of always needing to get the current IP address. The server only needs to be accessed within our LAN, not from the internet. For this discussion, let's assume the server is named 'devserver'. I am not a network admin, and I know just enough to get by. Because I am more familiar with windows servers, here is the output of ipconfig from a windows machine that is working the way I want:

Connection-specific DNS Suffix . : public.ourdomain.com
Link-local IPv6 Address . . . . . : fe80::853c:f928:ce8b:41e9%8
IPv4 Address. . . . . . . . . . . : 10.128.201.124
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.128.201.1


Here is what I have done so far:

1. used netconfig to setup the NIC and use DHCP

here is the output of resolv.conf

[code]
; generated by /sbin/dhclient-script
search public.ourdomain.com
nameserver 10.128.201.2
nameserver 10.128.206.3
nameserver 198.6.100.25
nameserver 198.6.1.146
nameserver 198.6.1.195
[/code]

2. #hostname devserver.public.ourdomain.com

3. edited /etc/sysconfig/network

[code]
NETWORKING=yes
HOSTNAME=devserver.public.ourdomain.com
[/code]


At this point, I can access the server by IP address, but not by name. Anyone know what I am missing?

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

linux newbie needs some help setting up networking

Post by gerald_clark » 2008/03/25 17:12:47

Anyone accessing your server must either:
1. Have your server in its hosts file.
or
2. Use a nameserver that knows your server.

Does your DHCP sever update your DNS?

michaelnel
Posts: 1478
Joined: 2006/05/29 16:50:11
Location: San Francisco, CA

Re: linux newbie needs some help setting up networking

Post by michaelnel » 2008/03/25 17:27:08

Ooops, never mind.

zzyzx37
Posts: 3
Joined: 2008/03/25 16:05:48

Re: linux newbie needs some help setting up networking

Post by zzyzx37 » 2008/03/25 19:13:56

I assume that our DHCP server does update the DNS, because it works with windows OS. All of our windows workstations and servers get their IP from dhcp, and we can use dns to access them by name. There must be some step I am missing on the centos network setup, but I can't figure out what it is.

zzyzx37
Posts: 3
Joined: 2008/03/25 16:05:48

Re: linux newbie needs some help setting up networking

Post by zzyzx37 » 2008/04/03 19:28:24

I have a new theory here: I think maybe the windows workstations and servers are using WINS on top of DHCP, and that is why they can communicate their hostnames. I may try installing samba just to test this out.

Anyone else with network configuration experience want to weigh in on this?

weslowsk
Posts: 51
Joined: 2008/04/09 04:45:34
Location: Canada

Re: linux newbie needs some help setting up networking

Post by weslowsk » 2008/04/10 03:55:30

I think configuring samba is necessary to do what you want to do...

Similar to you, I have a linux server, running samba, in a windows network, and I can access it using its hostname instead of its IP...but that only worked once I configured samba. I also use a static IP for the server and not a dynamic one from DHCP.

On a side note, I have yet to see a DHCP server issue a different IP for the same computer, even after the IP lease expires. Perhaps this is the way DHCP works, the way some some DHCP servers are configured, or maybe it's just coincidence...I don't know enough about DHCP to be sure.

Post Reply

Return to “CentOS 4 - Networking Support”