Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-23-2003, 03:12 AM   #1
LQ Newbie
Registered: Nov 2003
Distribution: Red Hat 8.0, Mandrake 9.1 9.2
Posts: 23

Rep: Reputation: 16
Smile How to make network driver start at bootime

Running Red Hat 8.0 .

Have managed to build a new kernel for the on motherboard
gigbit Lan. 3c2000 . I can start the driver with insmod 3c2000.o
and I can see the eth0 device with ifconfig.

1/ How do I get the LAN driver to start at boot up ?

I also have managed get the USB adsl modem going as a tap() device.
I have a windows98SE machine on the LAN that I would like to share the ADSL modem . SE machine is Linux box .
I assume I need to put in a routing table for the eth0 to tap() . In gnome I can't see tap() as a device and the LAN driver doesn't look like the right one either. At command line all looks fine with ifconfig though.

2/ How to setup the router functions at command line?

3/ How do I make the devices appear correctly in the GUI?

I can ping from the each side so the hardware and drivers do work and the linux box can ping www's and back to the SE machine.

Thanks in advance .

Old 11-23-2003, 05:55 AM   #2
Registered: Jul 2003
Location: Brighton, Michigan, USA
Distribution: Lots of distros in the past, now Linux Mint
Posts: 748

Rep: Reputation: 31
Okay, I'm not using redhat, but here's a general guess...add grains of salt as needed. Insmod should have been permanent, but your can try the same thing using 'modprobe 3c2000' instead, and that should stay loaded.

Aside from the "easy" GUI approach, 'man route' should give you some hints, and it may be as easy as 'route -add <###.###.###.###>'

Once they're seen in the CLI, the GUI should pick them up automatically, as long as the GUI'd user has permission to access them.
Old 11-23-2003, 06:28 AM   #3
Registered: Apr 2003
Location: Vancouver, BC
Distribution: Slackware, Ubuntu
Posts: 558

Rep: Reputation: 31
From what I remember of Red Hat:

1/ You need to create this script and chmod 777 it: /etc/sysconfig/network-scripts/ifcfg-eth0
# start eth0 on boot
BOOTPROTO=dhcp  #get ip address from your isp dhcp server
I think you may also need to load your eth0 module by inserting the following line in /etc/modules.conf
alias eth0 3c2000
2/ With respect to sharing your ADSL connection, I understand your LAN as follows:

ADSL modem --> (eth0) Linux Box (eth1) --> Windows Box

You stated that your Linux box can ping to your Windows box, so obviously you have configured your eth1 properly.

To share your ADSL connection, your Linux box will act as a router. Use iptables to do NAT ip masquerading. Create (and chmod 777) /etc/init.d/iptables:

# load iptables modules
/sbin/modprobe iptable_nat
/sbin/modprobe ip_conntrack

# enable ip forwarding
/bin/echo 1 > /proc/sys/net/ipv4/ip_forward

# flush tables

# enable masquerading to allow LAN internet access

# forward LAN traffic from eth1 to eth0
$IPTABLES -A FORWARD -i eth1 -o eth0 -m state --state NEW,ESTABLISHED -j ACCEPT

# block out internet intrusion on eth0
$IPTABLES -A INPUT -i eth0 -m state --state NEW,INVALID -j DROP
$IPTABLES -A FORWARD -i eth0 -m state --state NEW,INVALID -j DROP
The above is a simple iptables script that will allow internet sharing on a home LAN. If you search this site for "iptables" and/or "firewall" you will find examples of more complex iptables scripts. Also search under user "mychl".

3/ I don't know what you mean by making the devices appear correctly in the GUI. Do you mean having your Linux box appear in Windows' Network Neighbourhood, or displaying your Windows shares on your Linux box? If so, then you need to search this site for "samba" and "linneighbourhood". I don't network with any Windows machines, so I can't help you here.
Old 11-23-2003, 06:54 AM   #4
LQ Newbie
Registered: Nov 2003
Distribution: Red Hat 8.0, Mandrake 9.1 9.2
Posts: 23

Original Poster
Rep: Reputation: 16
Thanks for the responses .

Just Clarifying .

There is ONE ethernet LAN connection between the two machines ,
eth0 . The ADSL modem is a D-Link200 a USB modem, in ifconfig it is identified as tap() not as eth1 or similar. The GUI doesn't seem to have a clue about tap() .

ADSL D-Link200 -----USB----->>Tap()--LinuxBox----eth0------>>Win98SEBox

ADSL is fixed IP address also so no DHCP.

I should be able to piece together the gaps from your posting I think.
I will do some reading on what chmod does.

Will have a play with it tomorrow night . Thanks .
Old 11-23-2003, 07:21 AM   #5
Registered: Apr 2003
Location: Vancouver, BC
Distribution: Slackware, Ubuntu
Posts: 558

Rep: Reputation: 31
If you have a fixed IP, then your ifcfg-eth0 script will be as follows:

IPADDR= # insert your IP address here
BROADCAST= # insert proper value here
NETWORK= # insert proper value here

You will also need to edit /etc/sysconfig/network:

GATEWAY= # insert IP address for your usb tap() nic.

Last edited by spurious; 11-23-2003 at 07:25 AM.


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Gentoo dhcpcd bootime lockup mconroy Linux - Newbie 1 07-10-2005 12:49 AM
Network Wont Start, VIA Rhine fast II ethernet driver Simon7891 Linux - Hardware 3 02-06-2005 05:45 AM
ndiswrapper at bootime donbellioni Linux - Software 1 08-20-2004 02:37 PM
Can I gett KPPP to start when I start a browser on a network machine? duffboygrim Linux - Networking 0 03-25-2004 05:49 PM
Filesystem check at bootime firestomper41 Mandriva 5 03-20-2004 12:07 PM > Forums > Linux Forums > Linux - Newbie

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

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