LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 09-20-2004, 04:57 AM   #16
stormblast
LQ Newbie
 
Registered: Apr 2004
Location: Germany
Distribution: Debian 3.1
Posts: 24

Original Poster
Rep: Reputation: 15

Allright, I managed to compile a new kernel.
I got 2.4.27 installed now with all the options described in the Tutorial.

But.. how could it be different my interfaces are gone now.

I tried an ifup eth0 and I`m getting:
Quote:
eth0: ERROR while getting interface flags: No such device
My interfaces file:

Quote:
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
#address 192.168.1.1
#netmask 255.255.255.0
#broadcast 192.168.1.255
#network 192.168.1.0

auto eth1
iface eth1 inet dhcp
eth0 is set on dhcp at the moment because I'm using a win32 router atm. till the linux one is running, so I'm using it's internet connection.

How can I reimplent my network card?

lspci:
Quote:
01#.0b.0 Ethernet controller: Realtek Semiconductor Co. RTL 8029(AS)
thats eth0 or is supposed to be eth0
 
Old 09-20-2004, 06:40 AM   #17
reetep
Member
 
Registered: Oct 2003
Location: UK
Distribution: Debian
Posts: 122

Rep: Reputation: 15
This is probably because you don't have the kernel driver for your card loaded. Did you include the appropriate network driver in your kernel recompile? If you copied the old config as I suggested you should be fine (ie it should still be included).

Type lsmod to see which modules are loaded. Look for one that relates to your network card. If it is not there type modconf. Navigate through the menu to find the network driver for your card and select it. It will be loaded on selection and then automatically loaded each time on boot.

reetep.
 
Old 09-20-2004, 07:51 AM   #18
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
Quote:
Originally posted by reetep

Type lsmod to see which modules are loaded. Look for one that relates to your network card. If it is not there type modconf. Navigate through the menu to find the network driver for your card and select it. It will be loaded on selection and then automatically loaded each time on boot.

reetep.
Only if you compiled it as a a module (m option) when you compiled the kernel.
 
Old 09-20-2004, 04:46 PM   #19
esaias
LQ Newbie
 
Registered: Sep 2004
Distribution: Debian, Fedora C2, Slackware
Posts: 3

Rep: Reputation: 0
I see one glaring error in the firewall. This line:

Code:
INTLAN="192.168.1.0/150"
When specifying an TCP/IP network in Linux (and on many other systems) when you tell the script the IP network you are running on, you also tell it what your subnet mask is (what this script refers to as your "netmask"). This is done by specifying in this format on Linux:

Quote:
"first octet" . "second octet" . "third octet" . "fourth octet" (in most cases zero) / "netmask bit value"
IP addresses are 32 bits long, or four bytes. Your netmask refers to how many of these bits are "borrowed" in the creation of subnets. Thus, a /24 details a regular class C address of mask 255.255.255.0 with no bits borrowed, and no subnets created. If I were to change this to /27 (subnet mask of 255.255.255.224), this would mean that I am borrowing 27 bits from the available address space, making eight subnets (numSubnets = 2 ^ bitsBorrowed) [I will admit, it has been awhile since I had opportunity to play with this stuff, so this may be a bit off...].

Now, your script is saying that you are borrowing 150 bits, which is 118 bits larger than an IP address. This will cause problems. Unless you have reason to split up the computers onto different subnets, changing this to 192.168.1.0/24 should not cause any problems whatsoever. If you do need to create subnets, remember these formulas for determining how many, and what interval:

numSubnets = 2 ^ bitsBorrowed

subnetInterval = 2 ^ bitsRemaining

Note 1: with your situation, using class C addressing space, this process is fairly straight forward. Your first subnet will start on .0 and end on .31. It is less intuitively obvious with larger classes (C only allows for 256 available addresses).

Note 2: When creating subnets, you will have two unusable subnets. These are the first one, which starts at .0 and ends on .(2^bitsRemaining - 1) and the last, which ends on .255, which is reserved as a broadcast address.

Most of this is probably superfluous to your situation, but hey, theres a free lesson in network theory

Last edited by esaias; 09-20-2004 at 09:37 PM.
 
Old 09-22-2004, 03:49 AM   #20
stormblast
LQ Newbie
 
Registered: Apr 2004
Location: Germany
Distribution: Debian 3.1
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by reetep
This is probably because you don't have the kernel driver for your card loaded. Did you include the appropriate network driver in your kernel recompile? If you copied the old config as I suggested you should be fine (ie it should still be included).

Type lsmod to see which modules are loaded. Look for one that relates to your network card. If it is not there type modconf. Navigate through the menu to find the network driver for your card and select it. It will be loaded on selection and then automatically loaded each time on boot.

reetep.
It's not loaded in lsmod. However, if I start up modconf I'm getting the following menu:

Quote:
Exit

kernel/drivers/net - Drivers for network interface cards.
kernel/net/ipv4
kernel/net/ipv4/netfilter
I choose kernel/drivers/net and only get:

Quote:
Exit

dummy - Dummy net driver support
Apparently it doesnt work with "dummy". Do I have to recompile the Kernel now or am I able to fix it with the current one?

I wish I could spare you a beer or something reteep, you really helped me a lot already Slowly I get a clue of what's happening. Most books I read about Debian are outdated or too unspecific..

Thanks esaias pretty interesting. Also thanks to TigerOC!
 
Old 09-22-2004, 05:11 AM   #21
reetep
Member
 
Registered: Oct 2003
Location: UK
Distribution: Debian
Posts: 122

Rep: Reputation: 15
As TigerOC said, it will only appear under lsmod and in modconf if the driver is compiled as a module - ie it may actually be present because it's compiled directly into the kernel. You can check this by reading the config you used to compile:

Either:
Code:
less /boot/config-your-new-kernel
Or:
Code:
cp /boot/config-your-new-kernel /usr/src/linux
make menuconfig
and take a look around in the menu.

Unfortunately, if the correct module is not present, you will have to recompile . I suppose the only bright way of looking at that is as an opportunity to unload some of the crap that's in there that you don't need - eg there may be 25 network drivers in there.



Thanks for the feedback:
Quote:
you really helped me a lot already
it's nice to hear that. Just one thing relating to that -please don't think that my new signature has appeared for your benefit - I've been using it for a few days now!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
local web server behind dhcp router j4b Linux - Networking 10 08-09-2004 10:21 PM
simple ftp server for embedded router amitchandel Linux - Software 2 06-09-2004 10:20 PM
Replace a string including simple quotes. philipina Programming 4 03-18-2004 08:01 AM
Debian Router/DHCP retiqlum Linux - Networking 0 01-30-2004 01:42 PM
dhcp server in linksys router maxvenum Linux - Networking 3 09-02-2003 07:56 AM


All times are GMT -5. The time now is 08:31 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration