LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-04-2003, 02:49 PM   #1
Trumptight
LQ Newbie
 
Registered: Aug 2003
Location: Ohio, USA
Distribution: Slackware 9
Posts: 26

Rep: Reputation: 15
network card


I am using 2 network cards for doing proxy server. eth0 is dhcp, but eth1 is static. I use the ifconfig eth1 10.0.0.1 netmask 255.255.255.0 command and it apply's the settings. But after I reboot it loses its settings. any ideas?
 
Old 08-04-2003, 03:04 PM   #2
jqcaducifer
Member
 
Registered: Jul 2003
Distribution: Fedora 3
Posts: 133

Rep: Reputation: 15
Go to the folder /etc/sysconfig/network-scripts (that's on my Redhat 9), and you'll see stuff called ifcfg-*. Create a file called ifcfg-eth1, and examine the file ifcfg-eth0 to figure what should go in. Something for you would be like

DEVICE=eth1
BOOTPROTO=none #i don't know what this is but its in mine
BROADCAST= #not sure for you, probably 10.0.0.255
IPADDR=10.0.0.1
NETMASK=255.255.255.0
NETWORK=10.0.0.0
ONBOOT=yes
USERCTL=no #not sure what this is
PEERDNS=no #not sure about this either
TYPE=Ethernet

save the file, and bootup will load it

Last edited by jqcaducifer; 08-04-2003 at 03:05 PM.
 
Old 08-04-2003, 04:47 PM   #3
mindnumbed
Member
 
Registered: Jul 2003
Location: Scotland
Distribution: Debian
Posts: 74

Rep: Reputation: 15
bootproto determines whether or not it is DHCP (or bootpc if you really want)

MN
 
Old 08-04-2003, 10:15 PM   #4
Trumptight
LQ Newbie
 
Registered: Aug 2003
Location: Ohio, USA
Distribution: Slackware 9
Posts: 26

Original Poster
Rep: Reputation: 15
network

Slackware does not have a /etc/sysconfig folder. Either that or I didnt install it(a major possibility).
 
Old 08-05-2003, 01:04 AM   #5
max2003
LQ Newbie
 
Registered: May 2003
Distribution: Slackware 9.1
Posts: 26

Rep: Reputation: 15
In Slackware the file is /etc/rc.d/rc.inet1.
 
Old 08-05-2003, 05:15 PM   #6
Trumptight
LQ Newbie
 
Registered: Aug 2003
Location: Ohio, USA
Distribution: Slackware 9
Posts: 26

Original Poster
Rep: Reputation: 15
rawr

ok I edited the /etc/rc.d/rc.inet1, saved and rebooted:

#! /bin/sh
# /etc/rc.d/rc.inet1
# This script starts up the base networking system.
#
# Version:
# @(#)/etc/rc.d/rc.inet1 8.1 Tue May 28 15:27:39 PDT 2002 (pjv)

# Edit these values to set up your first Ethernet card (eth0):
IPADDR="127.0.0.1" # REPLACE with YOUR IP address!
NETMASK="255.255.255.0" # REPLACE with YOUR netmask!
# Or, uncomment the following lines to set up eth0 using DHCP:
USE_DHCP=yes
# If your provider requires a DHCP hostname, uncomment and edit below:
#DHCP_HOSTNAME="CCHOSTNUM-A"

# Edit these values to set up your second Ethernet card (eth1),
# if you have one. Otherwise leave it configured to 127.0.0.1,
# or comment it out, and it will be ignored at boot.
IPADDR2="10.0.0.1" # REPLACE with YOUR IP address!
NETMASK2="255.255.255.0" # REPLACE with YOUR netmask!
# Or, uncomment the following lines to set up eth1 using DHCP:
#USE_DHCP2=yes
# If your provider requires a DHCP hostname, uncomment and edit below:
#DHCP_HOSTNAME2="CCHOSTNUM-A"

# Edit the next line to point to your gateway:
GATEWAY="" # REPLACE with YOUR gateway!



But still when I type: ifconfig eth1 I get:

root@jamey:~# ifconfig eth1
eth1 Link encap:Ethernet HWaddr 00:C0:26:7D:5A:E4
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:10 Base address:0xd000

no 10.0.0.1 address assigned.
 
Old 08-05-2003, 05:30 PM   #7
Trumptight
LQ Newbie
 
Registered: Aug 2003
Location: Ohio, USA
Distribution: Slackware 9
Posts: 26

Original Poster
Rep: Reputation: 15
ok I came up with a temporary fix.

In the /etc/rc.d/rc.local file I just added the ifconfig eth1 10.0.0.1 netmask 255.255.255.0

it works. Yay
 
Old 08-06-2003, 04:48 AM   #8
mindnumbed
Member
 
Registered: Jul 2003
Location: Scotland
Distribution: Debian
Posts: 74

Rep: Reputation: 15
i think if you want it to do DHCP on boot, you should comment out the two previous lines, with the IP address and netmask. I think that should do it, as it looks as if it was still not touching the card, and my only guess is that it was ignoring it because "address" was set to 127.0.0.1.

MN

ps if that doesn't work, try changing the address to something else, like 10.0.0.2 so you get:

# Edit these values to set up your first Ethernet card (eth0):
IPADDR="10.0.0.1" # REPLACE with YOUR IP address!
NETMASK="255.255.255.0" # REPLACE with YOUR netmask!
# Or, uncomment the following lines to set up eth0 using DHCP:
USE_DHCP=yes
# If your provider requires a DHCP hostname, uncomment and edit below:
#DHCP_HOSTNAME="CCHOSTNUM-A"

in fact, if you commented out the DHCP line, i think that should do the trick statically.
 
  


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
Slackware 10 network configuration. Problem with 8139 network card drivers ! Padmakiran Linux - Networking 8 03-27-2007 06:48 AM
linux shuts down built in network card then windows tells me network card is unplugge lesmoxhaybaker SUSE / openSUSE 8 08-29-2006 05:10 PM
3c905C network card in docking station. Cannot activate network device eth0. pathelms Linux - Networking 4 04-12-2006 02:55 PM
how to set up SMC EZ Card 10/100 ethernet PCI network card mymojo Linux - Networking 2 12-16-2003 02:35 AM
network installation of RH7.3 on laptop with pcmcia network card. Smerk Linux - Distributions 1 10-31-2002 11:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:59 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