LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-27-2008, 04:09 PM   #1
YAOMK
Member
 
Registered: Apr 2006
Location: Ft. Lauderdale
Distribution: FC7 and CentOS 5
Posts: 40

Rep: Reputation: 15
2 Nics problem: Eth1 disabled Eth0


I have very limited experience networking with multiple interfaces, so please bear with me. The issue is that Eth0 seems to have been disabled, I cannot connect/ssh to it directly, but I can connect to it's designated ip through eth1. This is what ifcfg-ethX looks like:

Eth0:

Code:
# ADMtek NC100 Network Everywhere Fast Ethernet 10/100
DEVICE=eth0
HWADDR=00:18:f8:0e:95:60
BOOTPROTO=static
IPADDR=192.168.7.6
NETMASK=255.255.255.0
GATEWAY=192.168.7.1
ONBOOT=yes
TYPE=Ethernet
Eth1:

Code:
# Broadcom Corporation BCM4401 100Base-T
odcom Corporation BCM4401 100Base-T
DEVICE=eth1
HWADDR=00:0b:db:c0:f6:c0
BOOTPROTO=static
IPADDR=192.168.7.5
NETMASK=255.255.255.0
GATEWAY=192.168.7.1
ONBOOT=yes
TYPE=Ethernet
#lspci -tv:

Code:
-[0000:00]-+-00.0  Intel Corporation 82845G/GL[Brookdale-G]/GE/PE DRAM Controller/Host-Hub Interface
           +-02.0  Intel Corporation 82845G/GL[Brookdale-G]/GE Chipset Integrated Graphics Device
           +-1d.0  Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1
           +-1d.1  Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2
           +-1d.2  Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3
           +-1d.7  Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller
           +-1e.0-[0000:01]--+-04.0  ADMtek NC100 Network Everywhere Fast Ethernet 10/100
           |                 +-05.0  Conexant Unknown device 2702
           |                 \-09.0  Broadcom Corporation BCM4401 100Base-T
           +-1f.0  Intel Corporation 82801DB/DBL (ICH4/ICH4-L) LPC Interface Bridge
           +-1f.1  Intel Corporation 82801DB (ICH4) IDE Controller
           +-1f.3  Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller
           \-1f.5  Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller
I'm trying to setup this machine as a transparent proxy. Thanks.
 
Old 04-27-2008, 04:39 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
During boot udev dynamically configures your hardware. You can permanently change what udev does in one of the files in the /etc/udev/rules.d directory. Which file contains the network configuration rules varies from distribution to distribution. Here is an explanation of how it is done in Slackware:

http://www.linuxquestions.org/questi...ight=eth0+eth1

I use Debian. My network configuration is set in /etc/udev/rules.d/z25_persistent-net.rules The contents of my file are:

Code:
# This file was automatically generated by the /lib/udev/write_net_rules
# program, probably run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.
# MAC addresses must be written in lowercase.

# PCI device 0x10ec:0x8139 (8139too)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:1b:2f:2f:13:aa", NAME="eth0"

# PCI device 0x1039:0x0900 (sis900)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:d0:09:d7:5a:d4", NAME="eth1"
I suggest that you look in your /etc/udev/rules.d/ directory for a file that describes your network configuration and change that file to suit your needs. If you can't find the file you might be able to create a file using mine as a pattern. If those ideas don't work then I suggest that you search LinuxQuestions for a thread that describes how your distribution sets up the file.

-------------------
Steve Stites
 
Old 04-27-2008, 05:06 PM   #3
YAOMK
Member
 
Registered: Apr 2006
Location: Ft. Lauderdale
Distribution: FC7 and CentOS 5
Posts: 40

Original Poster
Rep: Reputation: 15
Thanks for your prompt response Jailbait. I'm using Centos 5.0. I found 2 files of interest under the rules.d directory:

60-net.rules:
Code:
ACTION=="add", SUBSYSTEM=="net", IMPORT{program}="/lib/udev/rename_device"
SUBSYSTEM=="net", RUN+="/etc/sysconfig/network-scripts/net.hotplug"
60-pcmcia.rules:

Code:
# PCMCIA devices:
#
# modprobe $modalias loads all possibly appropriate modules
ACTION=="add", SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="?*", \
                RUN+="/sbin/modprobe $modalias"

# Very few CIS firmware entries (which we use for matching)
# are so broken that we need to read out random bytes of it
# instead of the manufactor, card or product ID. Then the
# matching is done in userspace.
ACTION=="add", SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="?*", \
                RUN+="/sbin/pcmcia-check-broken-cis"

# However, the "weak" matching by func_id is only allowed _after_ modprobe
# returns, so that "strong" matches have a higher priority.
ACTION=="add", SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="?*", \
                RUN+="/bin/sh -c 'echo 1 > /sys/$devpath/allow_func_id_match'"

# PCMCIA sockets:
#
# modprobe the pcmcia bus module so that 16-bit PCMCIA devices work
ACTION=="add", SUBSYSTEM=="pcmcia_socket", \
                RUN+="/sbin/modprobe pcmcia"

# if this is a PCMCIA socket which needs a resource database,
# pcmcia-socket-startup sets it up
ACTION=="add", SUBSYSTEM=="pcmcia_socket", \
                RUN+="/sbin/pcmcia-socket-startup"
I'm not sure in which of these files I should add the Eth0, Eth1 rules.
 
Old 04-27-2008, 05:11 PM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
Quote:
Originally Posted by YAOMK View Post

I'm not sure in which of these files I should add the Eth0, Eth1 rules.
I would try 60-net.rules.

--------------------
Steve Stites

P.S. I have CentOS 5.0 installed also and i have never had any network problems with it. My 60-net.rules file is the same as yours. My network configuration is different in that I only have eth0 installed. So maybe if you explicitly configure eth0 and eth1 in 60-net.rules maybe CentOS won't get them confused.

Last edited by jailbait; 04-27-2008 at 05:17 PM.
 
Old 04-27-2008, 05:58 PM   #5
YAOMK
Member
 
Registered: Apr 2006
Location: Ft. Lauderdale
Distribution: FC7 and CentOS 5
Posts: 40

Original Poster
Rep: Reputation: 15
When I tried to configure the transparent proxy, I did some redirection by appending rules to my iptables nat table. I tried to flush these rules by #iptables -F, and then followed your instructions but still Eth0 doesn't respond. I guess I'm going to do a clean install of CentOS and go from there. Thanks for all your help.

UPDATE: Alright, I got it working. The issue was that both interfaces were working under the same netmask. The following post explains it in detail. Now If I could figure out how to get eth0 to use DHCP to connect to the cable modem instead of using eth1 and acquiring an ip from my access point's dhcp!!!!! Any takers?

Last edited by YAOMK; 04-27-2008 at 10:20 PM.
 
Old 11-30-2008, 04:11 AM   #6
slackster
LQ Newbie
 
Registered: Jul 2004
Distribution: Slackware
Posts: 12

Rep: Reputation: 0
Quote:
Originally Posted by YAOMK View Post
When I tried to configure the transparent proxy, I did some redirection by appending rules to my iptables nat table. I tried to flush these rules by #iptables -F, and then followed your instructions but still Eth0 doesn't respond. I guess I'm going to do a clean install of CentOS and go from there. Thanks for all your help.

UPDATE: Alright, I got it working. The issue was that both interfaces were working under the same netmask. The following post explains it in detail. Now If I could figure out how to get eth0 to use DHCP to connect to the cable modem instead of using eth1 and acquiring an ip from my access point's dhcp!!!!! Any takers?
Sure, just use your dhcp-client command of choice (i.e. dhclient, dhcpcd, etc.) and add your interface name behind it:

# dhclient eth0
 
  


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
eth0 and eth1 problem BCarey Linux - Wireless Networking 8 05-26-2007 09:23 PM
howto acess intrnet thru eth1(wireless card)in winXP via briging in linux(eth0-eth1) labhesh_popli Linux - Wireless Networking 1 09-21-2006 01:11 AM
eth0 and eth1 posture problem Sushy Linux - Networking 1 10-27-2005 05:35 PM
eth1 added, mysql connections FROM this machine are from eth1. Need bound to eth0??? kreese Linux - Networking 9 03-31-2004 12:12 PM
Kernel 2.4.22 finds eth0 and eth1 but 2.6.0 does not find eth1 coollink Linux - Networking 3 01-13-2004 07:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

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