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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-04-2003, 02:49 PM
|
#1
|
LQ Newbie
Registered: Aug 2003
Location: Ohio, USA
Distribution: Slackware 9
Posts: 26
Rep:
|
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?
|
|
|
08-04-2003, 03:04 PM
|
#2
|
Member
Registered: Jul 2003
Distribution: Fedora 3
Posts: 133
Rep:
|
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.
|
|
|
08-04-2003, 04:47 PM
|
#3
|
Member
Registered: Jul 2003
Location: Scotland
Distribution: Debian
Posts: 74
Rep:
|
bootproto determines whether or not it is DHCP (or bootpc if you really want  )
MN
|
|
|
08-04-2003, 10:15 PM
|
#4
|
LQ Newbie
Registered: Aug 2003
Location: Ohio, USA
Distribution: Slackware 9
Posts: 26
Original Poster
Rep:
|
network
Slackware does not have a /etc/sysconfig folder. Either that or I didnt install it(a major possibility).
|
|
|
08-05-2003, 01:04 AM
|
#5
|
LQ Newbie
Registered: May 2003
Distribution: Slackware 9.1
Posts: 26
Rep:
|
In Slackware the file is /etc/rc.d/rc.inet1.
|
|
|
08-05-2003, 05:15 PM
|
#6
|
LQ Newbie
Registered: Aug 2003
Location: Ohio, USA
Distribution: Slackware 9
Posts: 26
Original Poster
Rep:
|
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.
|
|
|
08-05-2003, 05:30 PM
|
#7
|
LQ Newbie
Registered: Aug 2003
Location: Ohio, USA
Distribution: Slackware 9
Posts: 26
Original Poster
Rep:
|
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
|
|
|
08-06-2003, 04:48 AM
|
#8
|
Member
Registered: Jul 2003
Location: Scotland
Distribution: Debian
Posts: 74
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 07:07 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|