View previous topic :: View next topic |
Author |
Message |
javeree Guru
Joined: 29 Jan 2006 Posts: 455
|
Posted: Wed Mar 29, 2006 5:32 pm Post subject: Cannot connect to eth1, is it detected correctly [SOLVED] |
|
|
I had a PC with access to internet via ppp and being a router (iptables + dnsmasq) for another PC through eth0. I wanted to add a NIC and connect that to a third PC so that it too could be served by his PC. eth0 is a DLink card
I added a 3c905B card, and compiled in the module 3c59x.
I executed
ln -s /etc/init.d/net.eth1 net.lo
rc-update add net.eth1 default
and changed some configuration files
cat /etc/conf.d/net gives
Quote: | config_eth0=( "192.168.0.1 broadcast 192.168.0.255 netmask 255.255.255.0" )
config_eth1=( "192.168.1.1 broadcast 192.168.1.255 netmask 255.255.255.0" )
|
cat /etc/conf.d/dnsmasq gives
Quote: | DNSMASQ_OPTS="-i eth0 -i eth1" |
After all this, I rebooted and saw both eth0 and eth1 being initialized on theit static address. When I connected a cross connect cable betzeen eth1 and the other PC, I saw the 100Mb LED up, the other PC detected the cable, but could not get an address through dhcp.
ifconfig gives
Quote: | eth0 Link encap:Ethernet HWaddr 00:50:BA:24:49:B2
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:787714 errors:0 dropped:0 overruns:0 frame:0
TX packets:558240 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1029938803 (982.2 Mb) TX bytes:58871784 (56.1 Mb)
Interrupt:11 Base address:0x8000
eth1 Link encap:Ethernet HWaddr 00:50:DA:38:B2:58
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:2916 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:279497 (272.9 Kb) TX bytes:0 (0.0 b)
Interrupt:10 Base address:0x2000
|
The funny thing is, although everything seems to work on a high level, there may be something going on on low level.
if I do
ifconfig eth0 down
ifconfig eth0 up
tail -n 1 dmesg says:
Quote: | eth0: link up, 100Mbps, full-duplex, lpa 0x41E1 |
If I do
ifconfig eth1 down
ifconfig eth1 up
tail -n 1 dmesg says
Quote: | ACPI: PCI Interrupt 0000:00:0c.0[A] -> Link [LNKD] -> GSI 10 (level, low) -> IRQ 10 |
dmesg | grep eth1 gives me no result at all.
I am wondering: is eth1 detected correctly or not ? if yes, then why can't another PC get a dhcp address over eth1 ? if no, why can I configure eth1 without it complaining ?
Last edited by javeree on Wed Mar 29, 2006 8:22 pm; edited 1 time in total |
|
Back to top |
|
|
magic919 Advocate
Joined: 17 Jun 2005 Posts: 2182 Location: Berkshire, UK
|
Posted: Wed Mar 29, 2006 7:34 pm Post subject: |
|
|
Why don't you go back to having the PC on the crossover and try giving it an address manually. You can then ping and prove it's just DHCP not working. |
|
Back to top |
|
|
javeree Guru
Joined: 29 Jan 2006 Posts: 455
|
Posted: Wed Mar 29, 2006 8:21 pm Post subject: |
|
|
Thanks for this suggestion to narrow it down.
I could indeed ping after setting my IP manually to 192.168.1.5.
I could even do DNS translation.
After a good hard read of man dnsmasq, I finally saw that I needed to expand the IP addresses that the dhcp server allocated. So I changed /etc/conf.d/dnsmasq to
Quote: | DNSMASQ_OPTS="-i eth0 -i eth1 -F 192.168.0.50,192.168.0.100 -F 192.168.1.50,192.168.1.100" |
And lo and behold: I got an address.
I am still a bit curious why dmesg doesn't say anything about eth1, but as long as my system works, I OK with it |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|