LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Naming My Computer and stuff (https://www.linuxquestions.org/questions/linux-newbie-8/naming-my-computer-and-stuff-205022/)

mst700 07-18-2004 04:37 AM

Here are my three files hosts resolv and dhcpd
 
The follwing are my files:

/etc/hosts:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
192.168.0.1 PenguinGateway.geek.net PenguinGateway

/etc/dhcpd.conf:
ddns-update-style interim;
ignore client-updates;

subnet 192.168.0.0 netmask 255.255.255.0 {

# --- default gateway
option routers 192.168.0.1;
option subnet-mask 255.255.255.0;

option nis-domain "geek.net";
option domain-name "geek.net";
option domain-name-servers 192.168.0.1;

option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.0.1;
# option netbios-name-servers 192.168.0.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;

range dynamic-bootp 192.168.0.10 192.168.0.199;
default-lease-time 86400;
max-lease-time 86400;

# we want the nameserver to appear at a fixed address
host ns {
next-server marvin.redhat.com;
hardware ethernet 12:34:56:78:AB:CD;
fixed-address 207.175.42.254;
}
}


and /etc/resolv.conf:

search localdomain
nameserver 205.152.144.23
nameserver 205.152.37.23


I have had to disable all my network systems (dns and router/dhcp) to get my link box up on the internet. So I can make this post.

frob23 07-18-2004 05:58 AM

Uhm, why do I see 4 different addresses for your nameserver?

option domain-name-servers 192.168.0.1;
# we want the nameserver to appear at a fixed address
host ns {
next-server marvin.redhat.com;
hardware ethernet 12:34:56:78:AB:CD;
fixed-address 207.175.42.254;
}
nameserver 205.152.144.23
nameserver 205.152.37.23

This might be just me... but if this computer is serving addresses all the computers that get one will only use 192.68.0.1 as their nameserver.

The computer you say is the nameserver will be running at the 207.x.x.x address which none of the others know about (how can they since they can't do a name lookup without a working nameserver)

Do you have a functional nameserver at 192.68.0.1?

Uhm, I can't think of other things but there have to be some. It seems like it works when you kill dhcp because it can then use the addresses in resolv.conf which are probably valid.

mst700 07-19-2004 11:41 AM

That is the question.
 
Quote:

Uhm, why do I see 4 different addresses for your nameserver?

option domain-name-servers 192.168.0.1;
# we want the nameserver to appear at a fixed address
host ns {
next-server marvin.redhat.com;
hardware ethernet 12:34:56:78:AB:CD;
fixed-address 207.175.42.254;
}
nameserver 205.152.144.23
nameserver 205.152.37.23

This might be just me... but if this computer is serving addresses all the computers that get one will only use 192.68.0.1 as their nameserver.

The computer you say is the nameserver will be running at the 207.x.x.x address which none of the others know about (how can they since they can't do a name lookup without a working nameserver)

Do you have a functional nameserver at 192.68.0.1?

Uhm, I can't think of other things but there have to be some. It seems like it works when you kill dhcp because it can then use the addresses in resolv.conf which are probably valid.
OK, you got me. I haven't figured that part out yet. Can you advise me on what I should set up first and how (if not how, explain what I should be doing. I doesn't look like I have a clue what I am doing. I thought I did and that is could be the problem.) If you could explain what I need to do it would help. (i.e. set up nameserver) If I am to use my IP address as the ns IP I can do that, I just haven't ever set it up using linux before. I have setup NT servers but not this.

frob23 07-19-2004 12:02 PM

Okay, from the looks of it I would change
"option domain-name-servers 192.168.0.1;" to
"option domain-name-servers 205.152.144.23, 205.152.37.23;"

I am pretty sure that these nameservers are working for you. These are probably the ones provided by your isp. That should make everything work until you setup your local nameserver -- if you really want to.

If you are going to setup a local nameserver at 192.168.0.1 which will be called ns you should change:
host ns {
next-server marvin.redhat.com;
hardware ethernet 12:34:56:78:AB:CD;
fixed-address 207.175.42.254;
}

to

host ns {
next-server marvin.redhat.com;
hardware ethernet 12:34:56:78:AB:CD;
fixed-address 192.168.0.1;
}

You would not need to do this if your DHCP server ran on 192.168.0.1 since it would already know its own ip address from your setup when it boots.

Note: You do not need your own nameserver unless you are really having problems with getting hosts to figure out each other's names -- it is more work to setup than it would be to find an error on the host.

All you need to do is make sure /etc/hosts on each machine contains the names and ip addresses for every computer on the network... an example from mine (change numbers and everything as fits your network). There are really very few applications where you will want to setup your own nameserver and it is a lot harder than copying one file onto each machine ... as long as you only have a few machines.

::1 localhost
127.0.0.1 localhost
#
# RFC 1918 specifies that these networks are "internal".
# 10.0.0.0 10.255.255.255
# 172.16.0.0 172.31.255.255
# 192.168.0.0 192.168.255.255

172.23.23.1 route.foo.org route ybrickrd
172.23.23.2 host02.foo.org host02
172.23.23.3 host03.foo.org host03

mst700 07-19-2004 12:15 PM

DHCP is the life for me
 
Thanks for the assistance frob23, this is what I was missing in my understanding department. I was missing the critical data (I had no clue). I will set this up tonight when I get off of work. I plan on just running the dhcp and let my ISP provide the rest.

skibum58 07-19-2004 04:54 PM

mst700 shows location as Ascension Island SAO. Many areas outside the US enjoyed large ISDN market penetration before onset of xDSL / Cable. I saw it happen in Germany.

You still see lots of areas with high concentration of ISDN and no other services to speak of. Maybe internet by satellite ?

Übernoob

mst700 07-19-2004 05:08 PM

On Ascension Island, I use ISDN via satellite. We don't have any hard lines to this island, It is to remote.

mst700 07-21-2004 12:30 AM

I finally connect
 
[I]I now connect to the internet when dhcpd is on./I]


The truth is my linux box (router/DHCPD) can connect to the internet and it also gives out dhcp's to all the systems, but the systems otheran than the linux box can't connect to the internet:

/etc/hosts

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
192.168.1.1 penguingateway.geek.org penguingateway


/etc/dhcpd.conf

ddns-update-style interim;
#ignore client-updates;

subnet 192.168.1.0 netmask 255.255.255.0 {

# --- default gateway
option routers 192.168.1.1; (ip addr of the local linux box)
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.1;

# option nis-domain "geek.org";
# option domain-name "geek.org";
# option domain-name-servers 205.152.144.23, 205.152.37.23;
# option ip-forwarding off;
# option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.1.1;
# option netbios-name-servers 192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;

range dynamic-bootp 192.168.1.5 192.168.1.254;
default-lease-time 86400;
max-lease-time 86400;
# host penguingateway.geek.org {
# hardware ethernet 00:50:70:2A:2A:95;
# fixed-address 192.168.1.1;
# we want the nameserver to appear at a fixed address
host ns {
next-server penguingateway.geek.org; (my local linux box)
hardware ethernet 00:50:70:2A:2A:95;
fixed-address 192.168.1.1;
}
}

/etc/sysconfig/network

NETWORKING=yes
HOSTNAME=penguingateway.geek.org


/etc/resolv.conf

search geek.org
nameserver 205.152.144.23 (bellsouth DNS)
nameserver 205.152.37.23 (bellsouth DNS)

I am making very slow progress, I would like to make the linux box a ROUTER/DHCP server and Bellsouth (ISP) provide DNS information. I think I have all the information required? Please tell me were I went wrong and how to fix it?

route display:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
penguingateway. localhost.local 255.255.255.255 UGH 0 0 0 lo
d205-152-239-13 * 255.255.255.255 UH 0 0 0 ppp0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
default d205-152-239-13 0.0.0.0 UG 0 0 0 ppp0



Should I go and set up IP_Masquerade? I down loaded a Howto.pdf on it, it looks like what I think I should be doing? Anyadvise?



mst700 07-22-2004 09:02 PM

WOOT
 
All my troubles where solved by a simple script file called Firestarter Firewall. It fixed my bridging problem I didn't know I had. My problem was my ppp0(ISDN) connection and my eth0 (gateway/DHCP) connection weren't talking. Thanks for the script Firestart.


All times are GMT -5. The time now is 04:12 AM.