PDA

setting up a router+dhcp+staticIP linux+DNS+?

reddwarf2956
2004-04-02, 07:17 AM PST
Ok I have bought a Linksys router which seems to be working. I can ping the computers in the network, I just can not call them by name.

The /etc/hosts file reads like this:
cat /etc/hosts
# Do not remove the line below the line with "",
# or various programs that require network functionality will fail.
# "127.0.0.1 localhost.localdomain localhost" (orginal line)
127.0.0.1 laptop.mylinuxbox.com localhost.localdomain localhost

Is this correct?

How should /etc/hosts read with a laptop which and be removed from the LAN network and linked thought the internet as a WAN, laptop is using DHCP?

How should the two desktop's, p3 and ppro, /etc/hosts read if they use static IP addresses? Do I need Bind?

I want one of the desktops, if space allows, to serve as a yum repos. for only the most current rpms, time server, if needed DNS, http server, mail server,.... currently it is a command line only, and has 1.6G space.

If that desktop machine does not do it the other one will, as needed.

How does this work out with the router on where I need to place things, DHCP and static ip, and DNS wise?

The biggest use of the network is as a link back to the network as a harddrive away from the laptop. One desktop machine will be the one use a lot too.

John

mars_hall
2004-04-02, 07:24 AM PST
Originally posted by reddwarf2956

127.0.0.1 laptop.mylinuxbox.com localhost.localdomain localhost
IJohn

I don't believe you want to be using the loopback address (127.0.0.1) for the IP address on the laptop, but I am not sure how you should set a DHCP address in the host file, maybe dynamic (0.0.0.0) I am just making a guess here :)

On the two desktops you would have something like:
192.168.x.x desktop1.mylinux.com

then on the other:
192.168.x.y desktop2.mylinux.com

where the IP address is the same as what is statically assigned

Jman
2004-04-02, 09:36 PM PST
If you only have a few machines and they don't change IPs, add them to /etc/hosts. The format is:
IP name alias
For example: 192.168.0.1 machine othername is valid. Each entry is on a new line.
Follow the example of the localhost entry.
Or you could use the graphical network configuration tool. Hosts tab, new button.

See man hosts for details.

This assumes the router is consistent in reassigning the addresses to the same machines.

reddwarf2956
2004-04-12, 12:22 AM PDT
mars_hall,

Yes, am confuse as to what to do.
That was how I lefted it as to be able to write, the post.


Jman,

The problem is the laptop is a dynamic DHCP machine (or at least I want it to be.) The reason is it can go to a university campus with the same setup as at home.

At the same time I realize the DNS machine needs to have a static Ip

So I am confused to what to do.

reddwarf2956
2004-04-16, 08:27 PM PDT
I know this can be done because my ISP has a fix DNS server and uses DHCP, but being SBC I will not ask them how the do there net work. Please help.

reddwarf2956
2004-04-24, 06:50 PM PDT
update:

# cat /etc/hosts
# Do not remove the line below the line with "",
# or various programs that require network functionality will fail.
# "127.0.0.1 localhost.localdomain localhost" (orginal line)
127.0.0.1 localhost.localdomain localhost
192.168.1.2 computer1.domainname.com computer1
192.168.1.1 router.domainname.com router

# cat /etc/resolv.conf
; generated by /sbin/dhclient-script
search domainname.com
nameserver 192.168.1.1
nameserver IP of ISP-DNS1
nameserver IP of ISP-DNS2

Now I can ping by name computer1 and the router, but not the laptop itself. With computer1 I can ping itself by name and the router, but not the laptop.

The laptop is using DHCP from the router, and computer1 is using static IP which was setup using the static IP howto.

How to setup the DNS for the laptop?

wshawn
2004-05-08, 07:36 PM PDT
Static IP HOW TO (http://www.fedoraforum.org/forum/showthread.php?s=&threadid=1144)

dragon
2004-05-31, 11:05 AM PDT
John, when you asked this, did you mean setting up your laptop so that it can browse the web, use FTP etc?

If so, there are two possibilities:
1) Use DHCP to get DNS servers
2) Manually set DNS servers (you will need to change settings each time you access the Internet from a different place). In Fedora Core 2, you can do this in Gnome by selecting "System Settings" => "Network" from the menu (not sure about the exact names of the menu items)

NOTE: You need your router to be set up properly first - Ensure that it has DHCP or the appropriate manual settings.

dragon
2004-05-31, 11:10 AM PDT
John, by this do you mean having a place where you can store files and access them over the internet?

If so, there are a couple of options for doing this. Post some details of what you want to do and if I have time I'll post some ideas.

wshawn
2004-05-31, 06:21 PM PDT
Follow my how to linked above to list the file machine as a static ip. Forward ftp and/or port 80 web browsing to that machine.

Brose the local machine via the ip address or ftp in with your machine user name and password.

Currently I am attempting to sort out which services are running in fedora core 2 which will allow this. Mandrake I turned on the service i wanted during install and they worked. Fedora seems to have a firewall on even though I disabled it or the services jsut aren't running. I will let you know.