LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Libranet
User Name
Password
Libranet This forum is for the discussion of Libranet Linux.

Notices


Reply
  Search this Thread
Old 10-20-2003, 06:36 PM   #1
GreenerLinux
Member
 
Registered: Aug 2003
Location: Olympia, WA
Distribution: Xandros, Libranet, Mandrake
Posts: 86

Rep: Reputation: 15
Question DHCP/Samba networking with two ethernet cards


I'm trying to setup this Linux box so that it will run as both a DHCP and Samba server for two Windows machines. Right now, I'm trying to get DHCP running correctly so that I can at least provide internet connection to the Windows computers. Currently, DHCP3 is installed and my dhcp.conf looks like:

default-lease-time 720;
max-lease-time 86400;
option subnet-mask 255.0.0.0;
option routers 10.0.0.254;
option domain-name-servers 204.127.198.4, 63.240.76.4;
range 10.0.0.10 10.0.0.100;


When I restart networking all hell breaks loose and I get an error message:

Reconfiguring network interfaces: failed to connect to localhost:bootpc: Operation now in progress
Reconfiguring network interfaces: Operation failed.

My current setup uses two Realtek 8139 ethernet cards with eth0 plugged into a 4-Port hub with the Windows machines and eth1 plugged into a cable modem. I think I may need to change the settings for eth0 and provide it with a static IP instead of using DHCP. Honestly, I really have no idea how to set these devices manually so I've been using the Libranet admin. tools for everything.

Last edited by GreenerLinux; 10-20-2003 at 06:44 PM.
 
Old 10-20-2003, 07:12 PM   #2
Kopfschmertzen
LQ Newbie
 
Registered: Jul 2003
Location: Columbus, Ohio
Posts: 17

Rep: Reputation: 0
Does your DHCP server that you are setting up have a static IP address?
 
Old 10-20-2003, 07:24 PM   #3
GreenerLinux
Member
 
Registered: Aug 2003
Location: Olympia, WA
Distribution: Xandros, Libranet, Mandrake
Posts: 86

Original Poster
Rep: Reputation: 15
do I need to set up Libranet as a router first?

First to answer your question, I'm using dynamic naming for both eth devices. Not sure how to set the static IP for eth0.

Do I need to set up my Linux box as a router before I try configuring DHCP? Maybe this would be a good idea altogether since I also plan on running a Samba server.

Last edited by GreenerLinux; 10-20-2003 at 07:49 PM.
 
Old 10-20-2003, 07:53 PM   #4
Kopfschmertzen
LQ Newbie
 
Registered: Jul 2003
Location: Columbus, Ohio
Posts: 17

Rep: Reputation: 0
You will want your DHCP server have a static IP address. If you are using Libranet, you can change the IP address of eth0 by using xadminmenu or you can edit it by hand in the /etc/networking/interfaces


Here is an example I pulled form the Libranet forums slightly modified to meet your criteria.

auto eth0
iface eth0 inet static
address 10.0.0.5
netmask 255.0.0.0
broadcast 10.255.255.255
gateway 10.0.0.254

As far as routing goes, are you planning on using it as a router? What is your network scheme and what do you want to accomplish?

Let me know if this helps but your dhcp server should always have a static IP address. Have Fun.

Last edited by Kopfschmertzen; 10-20-2003 at 07:55 PM.
 
Old 10-20-2003, 08:09 PM   #5
GreenerLinux
Member
 
Registered: Aug 2003
Location: Olympia, WA
Distribution: Xandros, Libranet, Mandrake
Posts: 86

Original Poster
Rep: Reputation: 15
Libranet as a router...

That was very helpful!

Here is what my current /etc/network/interfaces looks like:

# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet dhcp

My current LAN has three computers in it. It has this one, a LInux box, and two Windows machines. I'm trying to set up the LAN so that my two Windows machines are hidden to the outside world. I thought that this could be done by making the Linux machine a DHCP server. I'd also like to share my printers, files, and other devices on each computer within my LAN. I thought the easiest way to do this would be to use Samba and configure the Linux box as the server for this as well.

Thanks for helping.

Last edited by GreenerLinux; 10-20-2003 at 08:12 PM.
 
Old 10-20-2003, 08:26 PM   #6
Kopfschmertzen
LQ Newbie
 
Registered: Jul 2003
Location: Columbus, Ohio
Posts: 17

Rep: Reputation: 0
Are you connected with broadband? If so do you already use a firewall/router like a d-link or linksys? If not and you are trying to do this with your linux box it will be more involved than just setting up a dhcp server.

A DHCP server is just used to automatically assign IP address, subnetmask, default gateways, and DNS address to client machines (your other 2 windows boxes).

Either way one of your interfaces needs to have a static IP address, here is what you should have in /etc/networking/interfaces if you want to use your current scheme:

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 10.0.0.5
netmask 255.0.0.0
broadcast 10.255.255.255
gateway 10.0.0.254
auto eth1
iface eth1 inet dhcp

After this restart networking and assuming your eth0 and other Windows boxes are plugged into the same hub/switch and the Windows machines are configured to receive IP address and dns address automatically you should be able to ping your linux box.

In a windows command prompt type:

ping 10.0.0.5

and you should get a reply from 10.0.0.5

Keep me posted on your progress.
 
Old 10-20-2003, 11:13 PM   #7
GreenerLinux
Member
 
Registered: Aug 2003
Location: Olympia, WA
Distribution: Xandros, Libranet, Mandrake
Posts: 86

Original Poster
Rep: Reputation: 15
localhost:bootpc connection error

I've reconfigured my interfaces so that eth0 has a static IP. I wasn't able to assign a static IP that began with 10 so I used 192.168.1.2 instead. This is what my /etc/network/interfaces now looks like:

auto lo
iface lo inet loopback
auto eth1
iface eth1 inet dhcp
auto eth0
iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.255

When I restart networking I get this error message:

Reconfiguring network interfaces... failed to connect to localhost:bootpc: Operation now in progress
done.

or this error message after trying it a second time:

Reconfiguring network interfaces... SIOCDELRT: No such process
SIOCADDRT: Network is unreachable
done.

Last edited by GreenerLinux; 10-20-2003 at 11:16 PM.
 
Old 10-20-2003, 11:30 PM   #8
GreenerLinux
Member
 
Registered: Aug 2003
Location: Olympia, WA
Distribution: Xandros, Libranet, Mandrake
Posts: 86

Original Poster
Rep: Reputation: 15
same IP as Windows...

I'm not sure how much this matters but at the moment one of the Windows machines has the same IP address as the static IP that I just made. So I made these changes to the interface:

root@HellFire:/home/penz66# cat /etc/network/interfaces
# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.

auto lo
iface lo inet loopback
auto eth1
iface eth1 inet dhcp
auto eth0
iface eth0 inet static
address 192.168.254.1
netmask 255.255.255.0
broadcast 192.168.254.255
gateway 192.168.254.255

This is the error message I receive after these changes are made.

root@HellFire:/home/penz66# /etc/init.d/networking restart
Reconfiguring network interfaces... SIOCDELRT: No such process
SIOCADDRT: Network is unreachable
done.
 
Old 10-21-2003, 08:19 AM   #9
Kopfschmertzen
LQ Newbie
 
Registered: Jul 2003
Location: Columbus, Ohio
Posts: 17

Rep: Reputation: 0
The Woes of TCP?IP

Okay, first off the best thing for you to do is get a better understanding of TCP/IP. You were correct in thinking that no two machines can have the same IP address. You are now using the 192.168.1.x scheme but when you switched it to 192.168.254.x that will cause problems. With and IP address of 192.168.1.x or 192.168.254.x you are using what's called a class C IP address. With a class C IP address for all of your computers to talk to each other they must have the same network portion in the IP address. In your case the network portion is 192.168.1 so all of your machines should have that.

Next, we choose the host portion of the address, which is the last set of numbers. You have 256 possibilites but you can only use 254. YOU CANNOT ASSIGN .0 or .255 to a computer. .0 is not allowed and .255 is reserved for the broadcast. So you want to assign any IP except .0 and .255 to your computers. For example, assign you Linux machine to 192.168.1.5 and your other machines to 192.168.1.10 and 192.168.1.11. The broadcast should be 192.168.1.255. The default gateway should be set to the ip address of your router if you have one, ususally this is 192.168.1.1 or 192.168.1.254 for example.

I highly recommend you do a google search for TCP/IP to get a little better understadning, TCP/IP is very complex and can be very frustrating but it is essential to learn for networking. Here is a link found that should help you get a bit better understanding. As you search keep in mind you don't need to know everything about TCP/IP just the basics. Stay away from and topics about the OSI model or subnetting unless you want to delve deeper.

As far as your error, it look like your other NIC card eth1 is trying to get a DHCP assigned address, since this NIC is either A) not hooked up to a hub or switch. or B) You don't have a DHCP server setup properly yet it will fail because it cannot get an IP address.

I know this is probably frustrating but stick with it and you will learn all kinds of cool stuff.
 
Old 10-21-2003, 11:22 AM   #10
uteck
Senior Member
 
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: Ubuntu based stuff for the most part
Posts: 1,173

Rep: Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501
Using adminmenu you can configure your firewall to do internet sharing, which will set up dchp for the rest of your network. Then you just have to configure samba, I would recomend using webmin-samba.
 
Old 10-24-2003, 09:55 PM   #11
GreenerLinux
Member
 
Registered: Aug 2003
Location: Olympia, WA
Distribution: Xandros, Libranet, Mandrake
Posts: 86

Original Poster
Rep: Reputation: 15
Lightbulb Libranet video drivers for Radeon 7000

I installed a Radeon 7000 pci graphics card in a Linux box because the motherboard had onboard AGP that was on the fritz. I was going to play around with a different distribution but the only distro that seemed to correctly configure this video card was Libranet. With all of the other distros... Mandrake, Redhat, SuSE, and Ark... the video cut out shortly after the boot screen initialized. Each distro was using the same driver.

Just wondering if anyone had any ideas on this?

I'm not sure how this posted here. Thought I started a new thread.

Last edited by GreenerLinux; 11-14-2003 at 06:41 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Qestion about Networking with a Firewall that has 2 ethernet cards Nauntilus Linux - Networking 12 11-22-2005 11:47 PM
Two ethernet cards Scorper Linux - Hardware 1 06-05-2005 07:38 AM
Two Ethernet Cards webwolf70 Linux - Networking 9 04-15-2005 12:20 PM
dhcp configuration with 2 ethernet cards ygfperson Linux - Networking 4 10-05-2004 07:50 AM
Ethernet Cards and Sound Cards SchizoIV Linux - Newbie 2 07-05-2002 09:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Libranet

All times are GMT -5. The time now is 04:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration