View Full Version : Trying to connect with client to DCHP server fails
wprauchholz
9th February 2006, 07:42 PM
On my FC4 server DHCP is up and running
Feb 9 20:17:47 srv01 dhcpd: dhcpd shutdown succeeded
Feb 9 20:17:47 srv01 dhcpd: Internet Systems Consortium DHCP Server V3.0.2-RedHat
Feb 9 20:17:47 srv01 dhcpd: Copyright 2004 Internet Systems Consortium.
Feb 9 20:17:47 srv01 dhcpd: All rights reserved.
Feb 9 20:17:47 srv01 dhcpd: For info, please visit http://www.isc.org/sw/dhcp/
Feb 9 20:17:47 srv01 dhcpd: Wrote 1 leases to leases file.
Feb 9 20:17:47 srv01 dhcpd: Listening on LPF/eth0/00:80:5a:20:2a:32/192.168.2/24
Feb 9 20:17:47 srv01 dhcpd: Sending on LPF/eth0/00:80:5a:20:2a:32/192.168.2/24
Feb 9 20:17:47 srv01 dhcpd: Sending on Socket/fallback/fallback-net
Feb 9 20:17:47 srv01 dhcpd: dhcpd startup succeeded
Nevertheless I cannot conect from the client to the server. The error messages is
....
The file messagages gives me:
Feb 9 20:35:21 localhost dhclient: Copyright 2004 Internet Systems Consortium.
Feb 9 20:35:21 localhost dhclient: All rights reserved.
Feb 9 20:35:21 localhost dhclient: For info, please visit http://www.isc.org/products/DHCP
Feb 9 20:35:21 localhost dhclient:
Feb 9 20:35:21 localhost dhclient: Listening on LPF/eth0/00:0f:b0:9e:54:d0
Feb 9 20:35:21 localhost dhclient: Sending on LPF/eth0/00:0f:b0:9e:54:d0
Feb 9 20:35:21 localhost dhclient: Sending on Socket/fallback
Feb 9 20:35:21 localhost dhclient: DHCPRELEASE on eth0 to 192.168.2.1 port 67
Feb 9 20:35:21 localhost dhclient: send_packet: Network is unreachable
Feb 9 20:35:21 localhost dhclient: send_packet: please consult README file regarding broadcast address.
/sbin/dhclient eth0 gives me
Internet Systems Consortium DHCP Client V3.0.2-RedHat
Copyright 2004 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/products/DHCP
Listening on LPF/eth0/00:0f:b0:9e:54:d0
Sending on LPF/eth0/00:0f:b0:9e:54:d0
Sending on Socket/fallback
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 192.168.2.1
bound to 192.168.2.115 -- renewal in 40999 seconds
tp ping the server from the workstation tells me: connect: Network is reachable
The firewalls on both ends are switched off. What am I missing?
BTW, should somebody of you experts who are helping here happen to come to Barcelona, call me and I surely buy you a couple of beers!
giulix
9th February 2006, 09:20 PM
Based on this
Listening on LPF/eth0/00:0f:b0:9e:54:d0
Sending on LPF/eth0/00:0f:b0:9e:54:d0
Sending on Socket/fallback
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 192.168.2.1
bound to 192.168.2.115 -- renewal in 40999 seconds
server would appear to be working fine... can you post your /etc/dhcpd.conf file, please ?
wprauchholz
10th February 2006, 06:12 AM
The setup is as follows:
2 NICs (eth1 external and eth0 internal)
eth0: IP: 192.168.2.1, Netmaks: 255.255.255.0, Gateway: 192.168.1.2 (IP of NIC1)
/etc/dhcp.conf looks like this
ddns-update-style interim;
ignore client-updates;
lease-file-name "/var/lib/dhcp/dhcpd.leases";
authoritative;
option domain-name "ipnspain.biz";
# SRV01 Office Server
subnet 192.168.2.0 netmask 255.255.255.0 {
authoritative;
range 192.168.2.201 192.168.2.210;
default-lease-time 86400;
max-lease-time 172800;
option routers 192.168.2.1;
option broadcast-address 192.168.2.255;
option subnet-mask 255.255.255.0;
}
When starting up dhcp it writes these messages to /var/log/messages
Feb 10 06:50:04 srv01 dhcpd: Internet Systems Consortium DHCP Server V3.0.2-RedHat
Feb 10 06:50:04 srv01 dhcpd: Copyright 2004 Internet Systems Consortium.
Feb 10 06:50:04 srv01 dhcpd: All rights reserved.
Feb 10 06:50:04 srv01 dhcpd: For info, please visit http://www.isc.org/sw/dhcp/
Feb 10 06:50:04 srv01 dhcpd: lease 192.168.2.110: no subnet.
Feb 10 06:50:04 srv01 last message repeated 138 times
Feb 10 06:50:04 srv01 dhcpd: Wrote 0 leases to leases file.
Feb 10 06:50:05 srv01 dhcpd: Listening on LPF/eth0/00:80:5a:20:2a:32/192.168.2/24
Feb 10 06:50:05 srv01 dhcpd: Sending on LPF/eth0/00:80:5a:20:2a:32/192.168.2/24
Feb 10 06:50:05 srv01 dhcpd: Sending on Socket/fallback/fallback-net
Feb 10 06:50:05 srv01 dhcpd: dhcpd startup succeeded
Feb 10 06:50:28 srv01 kernel: r8169: eth0: link down
Feb 10 06:50:30 srv01 kernel: r8169: eth0: link up
Among other things it is saying
Feb 10 06:50:04 srv01 dhcpd: lease 192.168.2.110: no subnet.
Feb 10 06:50:04 srv01 last message repeated 138 times
Is this correct?
When accessing from the workstation with "dhclient eth0" it writes again into /var/log/messages
Feb 10 06:51:07 srv01 dhcpd: DHCPDISCOVER from 00:0f:b0:9e:54:d0 via eth0
Feb 10 06:51:08 srv01 dhcpd: DHCPOFFER on 192.168.2.210 to 00:0f:b0:9e:54:d0 via eth0
Feb 10 06:51:08 srv01 dhcpd: DHCPREQUEST for 192.168.2.210 (192.168.2.1) from 00:0f:b0:9e:54:d0 via eth0
Feb 10 06:51:08 srv01 dhcpd: DHCPACK on 192.168.2.210 to 00:0f:b0:9e:54:d0 via eth0
On the client side, the dhclient eth0 command generates the following message;
dhclient eth0
Internet Systems Consortium DHCP Client V3.0.2-RedHat
Copyright 2004 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/products/DHCP
Listening on LPF/eth0/00:0f:b0:9e:54:d0
Sending on LPF/eth0/00:0f:b0:9e:54:d0
Sending on Socket/fallback
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
DHCPOFFER from 192.168.2.1
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 192.168.2.1
bound to 192.168.2.210 -- renewal in 33175 seconds.
But ifconfig reveals:
[root@localhost ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0F:B0:9E:54:D0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:127 errors:0 dropped:0 overruns:0 frame:0
TX packets:136 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:42308 (41.3 KiB) TX bytes:43568 (42.5 KiB)
Interrupt:11 Base address:0x5000
As you see, the workstations eth0 MAC is the same as the one showing up on the server side in /var/log/messages:
workstation: eth0 Link encap:Ethernet HWaddr 00:0F:B0:9E:54:D0
server: Feb 10 06:51:07 srv01 dhcpd: DHCPDISCOVER from 00:0f:b0:9e:54:d0 via eth0
Could it be an issue that it shows on one side lower case and on the other side upper case?
Thanks for the help.
giulix
10th February 2006, 09:07 AM
Try with this /etc/dhcpd.conf to see if the situation improves:
ddns-update-style interim;
#ignore client-updates;
#lease-file-name "/var/lib/dhcp/dhcpd.leases";
authoritative;
#option domain-name "ipnspain.biz";
# SRV01 Office Server
subnet 192.168.2.0 netmask 255.255.255.0 {
#authoritative;
range dynamic-bootp 192.168.2.201 192.168.2.210;
default-lease-time 86400;
max-lease-time 172800;
option routers 192.168.2.1;
#option broadcast-address 192.168.2.255;
option subnet-mask 255.255.255.0;
}
wprauchholz
10th February 2006, 10:43 AM
Hi giulix. Thanks for trying tp help me.
I made the canges you said and re-started the server. In a nutshell, I still cannot connect, not even ping the server's NIC from the the workstation.
The file /var/log/messages reads now:
Feb 10 11:20:17 srv01 kernel: lp0: using parport0 (interrupt-driven).
Feb 10 11:20:17 srv01 dhcpd: Copyright 2004 Internet Systems Consortium.
Feb 10 11:20:17 srv01 kernel: lp0: console ready
Feb 10 11:20:17 srv01 dhcpd: All rights reserved.
Feb 10 11:20:17 srv01 dhcpd: For info, please visit http://www.isc.org/sw/dhcp/
Feb 10 11:20:17 srv01 dhcpd: Wrote 1 leases to leases file.
Feb 10 11:20:17 srv01 dhcpd: Listening on LPF/eth0/00:80:5a:20:2a:32/192.168.2/24
Feb 10 11:20:17 srv01 dhcpd: Sending on LPF/eth0/00:80:5a:20:2a:32/192.168.2/24
Feb 10 11:20:17 srv01 dhcpd: Sending on Socket/fallback/fallback-net
Feb 10 11:20:17 srv01 dhcpd: dhcpd startup succeeded
Then there are 2 messages of which I do not know whether they are important:
Feb 10 11:24:55 srv01 kernel: r8169: eth0: link down
Feb 10 11:24:57 srv01 kernel: r8169: eth0: link up
When trying to connect form the workstation to the server the following messages is written 1 time to the file "messages"
Feb 10 11:25:38 srv01 dhcpd: DHCPDISCOVER from 00:0f:b0:9e:54:d0 via eth0
Feb 10 11:25:39 srv01 dhcpd: DHCPOFFER on 192.168.2.210 to 00:0f:b0:9e:54:d0 via eth0
Feb 10 11:25:39 srv01 dhcpd: DHCPREQUEST for 192.168.2.210 (192.168.2.1) from 00:0f:b0:9e:54:d0 via eth0
Feb 10 11:25:39 srv01 dhcpd: DHCPACK on 192.168.2.210 to 00:0f:b0:9e:54:d0 via eth0
Feb 10 11:26:07 srv01 dhcpd: DHCPREQUEST for 192.168.2.210 from 00:0f:b0:9e:54:d0 via eth0
Feb 10 11:26:07 srv01 dhcpd: DHCPACK on 192.168.2.210 to 00:0f:b0:9e:54:d0 via eth0
and 59 times the following to the file "messages"
Feb 10 11:26:09 srv01 dhcpd: DHCPDISCOVER from 00:0f:b0:9e:54:d0 via eth0
Feb 10 11:26:09 srv01 dhcpd: DHCPOFFER on 192.168.2.210 to 00:0f:b0:9e:54:d0 via eth0
Feb 10 11:26:09 srv01 dhcpd: DHCPREQUEST for 192.168.2.210 (192.168.2.1) from 00:0f:b0:9e:54:d0 via eth0
Feb 10 11:26:09 srv01 dhcpd: DHCPACK on 192.168.2.210 to 00:0f:b0:9e:54:d0 via eth0
Feb 10 11:28:56 srv01 dhcpd: DHCPREQUEST for 192.168.2.210 (192.168.2.1) from 00:0f:b0:9e:54:d0 via eth0
Feb 10 11:28:56 srv01 dhcpd: DHCPACK on 192.168.2.210 to 00:0f:b0:9e:54:d0 via eth0
Feb 10 11:28:58 srv01 dhcpd: DHCPDISCOVER from 00:0f:b0:9e:54:d0 via eth0
Feb 10 11:28:58 srv01 dhcpd: DHCPOFFER on 192.168.2.210 to 00:0f:b0:9e:54:d0 via eth0
and at the end 1 time
Feb 10 11:28:58 srv01 dhcpd: DHCPREQUEST for 192.168.2.210 (192.168.2.1) from 00:0f:b0:9e:54:d0 via eth0
Feb 10 11:28:58 srv01 dhcpd: DHCPACK on 192.168.2.210 to 00:0f:b0:9e:54:d0 via eth0
I am not an expert, but this means, that there is some kind of connection??
On the workstation side it looks like this:
[root@localhost ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0F:B0:9E:54:D0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:29 errors:0 dropped:0 overruns:0 frame:0
TX packets:33 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8792 (8.5 KiB) TX bytes:9110 (8.8 KiB)
Interrupt:11 Base address:0x5000
eth1 Link encap:Ethernet HWaddr 00:00:00:00:00:00
UP BROADCAST RUNNING 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:1
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:10 Base address:0x6000 Memory:bc007000-bc007fff
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1301 errors:0 dropped:0 overruns:0 frame:0
TX packets:1301 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1867850 (1.7 MiB) TX bytes:1867850 (1.7 MiB)
[root@localhost ~]# ping 192.168.2.1
connect: Network is unreachable
[root@localhost ~]# dhclient eth0
Internet Systems Consortium DHCP Client V3.0.2-RedHat
Copyright 2004 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/products/DHCP
Listening on LPF/eth0/00:0f:b0:9e:54:d0
Sending on LPF/eth0/00:0f:b0:9e:54:d0
Sending on Socket/fallback
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 192.168.2.1
bound to 192.168.2.210 -- renewal in 38870 seconds.
giulix
10th February 2006, 11:28 AM
Have you setup the workstation NIC so that it is configured to obtain its IP address from a DHCP server ? Everything else seems correct: the DHCP server (dhcpd) message DHCPDISCOVER means it is listening to the broadcast address; DHCPOFFER that it is picking up a request by the workstation (shouldn't happen 59 times, though); DHCPREQUEST that is handing out a lease to it and DHCPACK that the process was successful. It looks to me as if there's some problem on the workstation, even though it looks ok on that side, too (bound to 192.168.2.210 -- renewal in 38870 seconds). Try to run dhclient on the workstation till you get the "bound" message and then post here the results of a ifconfig -a, please.
wprauchholz
10th February 2006, 12:43 PM
That is what I did; I deleted with system-config-network eth0 + eth1 on the workstation and added eth1 only. This NIX works fine with linux, I had it running smoothly being connected directly to my ADSL modem.
This is the setup
# Please read /usr/share/doc/initscripts-*/sysconfig.txt
# for the documentation of these parameters.
IPV6INIT=no
ONBOOT=yes
USERCTL=no
PEERDNS=yes
TYPE=Ethernet
DEVICE=eth0
HWADDR=00:0f:b0:9e:54:d0
BOOTPROTO=dhcp
dhclient eth0 gives the following:
[root@localhost ~]# dhclient eth0
Internet Systems Consortium DHCP Client V3.0.2-RedHat
Copyright 2004 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/products/DHCP
Listening on LPF/eth0/00:0f:b0:9e:54:d0
Sending on LPF/eth0/00:0f:b0:9e:54:d0
Sending on Socket/fallback
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 192.168.2.1
bound to 192.168.2.210 -- renewal in 34704 seconds.
ifconfig -a gives the following:
[root@localhost ~]# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:0F:B0:9E:54:D0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:163 errors:0 dropped:0 overruns:0 frame:0
TX packets:168 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:54338 (53.0 KiB) TX bytes:54998 (53.7 KiB)
Interrupt:11 Base address:0x5000
eth1 Link encap:Ethernet HWaddr 00:00:00:00:00:00
UP BROADCAST RUNNING 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:1
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:10 Base address:0x6000 Memory:bc007000-bc007fff
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1276 errors:0 dropped:0 overruns:0 frame:0
TX packets:1276 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1821786 (1.7 MiB) TX bytes:1821786 (1.7 MiB)
sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 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:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
I start to believe that the problems has to do with the the fact that it is asking so many times to hand-out a new IP address. The following is a inquiry coming from "webmin". it shows the currently used leases. It has given the same IP address to the sam MAC simultaneously 44 times:
IP Address Ethernet Hostname Start Date End Date
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:31:19 2006/02/11 12:31:19
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:31:22 2006/02/11 12:31:22
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:31:24 2006/02/11 12:31:24
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:31:26 2006/02/11 12:31:26
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:31:53 2006/02/11 12:31:53
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:31:55 2006/02/11 12:31:55
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:31:57 2006/02/11 12:31:57
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:31:59 2006/02/11 12:31:59
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:32:02 2006/02/11 12:32:02
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:32:04 2006/02/11 12:32:04
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:32:06 2006/02/11 12:32:06
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:32:08 2006/02/11 12:32:08
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:32:10 2006/02/11 12:32:10
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:32:13 2006/02/11 12:32:13
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:32:15 2006/02/11 12:32:15
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:32:17 2006/02/11 12:32:17
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:32:19 2006/02/11 12:32:19
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:32:21 2006/02/11 12:32:21
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:32:49 2006/02/11 12:32:49
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:32:51 2006/02/11 12:32:51
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:32:53 2006/02/11 12:32:53
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:32:55 2006/02/11 12:32:55
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:32:57 2006/02/11 12:32:57
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:32:59 2006/02/11 12:32:59
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:33:02 2006/02/11 12:33:02
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:33:04 2006/02/11 12:33:04
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:33:06 2006/02/11 12:33:06
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:33:08 2006/02/11 12:33:08
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:33:10 2006/02/11 12:33:10
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:33:12 2006/02/11 12:33:12
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:33:14 2006/02/11 12:33:14
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:33:17 2006/02/11 12:33:17
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:33:19 2006/02/11 12:33:19
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:33:21 2006/02/11 12:33:21
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:33:23 2006/02/11 12:33:23
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:33:26 2006/02/11 12:33:26
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:33:28 2006/02/11 12:33:28
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:33:30 2006/02/11 12:33:30
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:33:32 2006/02/11 12:33:32
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:33:34 2006/02/11 12:33:34
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:33:36 2006/02/11 12:33:36
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:33:39 2006/02/11 12:33:39
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:33:41 2006/02/11 12:33:41
192.168.2.210 00:0f:b0:9e:54:d0 2006/02/10 12:33:47 2006/02/11 12:33:47
giulix
10th February 2006, 01:02 PM
Not simultaneously, but in a very short lapse of time, yes. There is something wrong on the client, as the server seems to be handing out IP leases fine. Have you got another box, no matter which OS, to give it a try ? So, at least we can rule out the server...
wprauchholz
10th February 2006, 01:07 PM
The problem is the NIC. I made the same test with another workstation (both are laptops, different brands but the NICs are exactly the same in both laptops!!!: Realtek Semiconductor Co. Ltd RTL-8139/8139C/8139C+) and voila I get a an IP and only 1 IP
How can this be???
Another question, I cannot access to the internet from the laptop. Can you tell me whether this is the correct IP routing?
[root@srv01 ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth1
Thanks for your help so far!
giulix
10th February 2006, 01:50 PM
If 192.168.1.1 is your default router, yes. It doesn't appear to be the case based on your /etc/dhcpd.conf file, though (option routers 192.168.2.1)... As to why the NIC is not working, I really have no idea... is the kernel module loaded ? You can check with 'lsmod |grep mii' or maybe it's fried...
wprauchholz
10th February 2006, 02:16 PM
192.168.1.1 is the gateway for the externl NIC eth1.
I thought that he parameter "option routers 192.168.2.1" was the gateway for the workstations, which point to the internal NIC eth0 which in turn is then routed by the kernel to eth1.
Or did I misunderstand the concept?
giulix
10th February 2006, 03:59 PM
Probably I don't have a clear picture about how your network is configured...
wprauchholz
10th February 2006, 05:29 PM
eth1 the external network is set as:
IP: 192.168.1.2
netmask: 255.255.255
gateway: 192.168.1.1
eth0 (internal network) is set as:
IP: 192.168.2.1
Netmask: 255.255.255.0
gateway: 192.168.2.1
/etc/sysconfig/network; added GATEWAYDEN=eth1
IP route:
route add default gw 192.168.1.1 dev eth1
and last but not least in /etc/sysctl.con
net.ipv4.ip_forward = 1
What do you think?
giulix
10th February 2006, 05:48 PM
Ok, and how do you connect to the Internet ? You must have a "normal" IP address somewhere (not a 192.168.... which is not addressable by the Internet). I assume it is on the routing table of your gateway machine. Or you have a hardware router somewhere (in a word, what is doing NAT)? And how many gateways and subnets are there in your network ?
P.S.
For instance, this is the routing table of my default gateway. eth0 is connected to my ISP router and eth1 is my internal NIC.
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth1
1.61.203.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth1
default 1.61.203.1 0.0.0.0 UG 0 0 0 eth0
wprauchholz
12th February 2006, 07:18 AM
I want to setup a server with 2 NICs by which eth0 is connected to a ADSL router which in turn provides access to the internet.
I setup eth0 (externel NIC) as
IP: 192.168.1.2
Netmask: 255.255.255.0
Gateway: 192.168.1.1
I setup eth1 (internal network) as:
IP 192.168.10.101
Netmask 255.255.255.0
Gateway: 192.168.1.2
But when I try to add the route, I get the following error message:
[root@srv01 ~]# route add -net 192.168.10.0 netmask 255.255.255.0 gw 192.168.1.1 dev eth1
SIOCADDRT: Network is unreachable
giulix
12th February 2006, 12:52 PM
The two addresses 192.168.1.x and 192.168.10.101 with a netmask of 255.255.255.0 are not on the same subnet. You need to add another router between the two subnets or to define a different netmask (255.255.0.0).
wprauchholz
12th February 2006, 03:21 PM
Would the following then be correct?
IP: 192.168.1.2
Netmask: 255.255.255.0
Gateway: 192.168.1.1
I setup eth1 (internal network) as:
IP 192.168.10.101
Netmask 255.255.0.0
Gateway: 192.168.1.2
But when I try to add the route, I get the following error message:
route add -net 192.168.10.0 netmask 255.255.0.0 gw 192.168.1.1 dev eth1
Again thanks on deed for your help
giulix
12th February 2006, 06:36 PM
No, they're still on different subnets. Best thing you can do, is change 192.168.10.101 to something in the 192.168.1.x range.
route add -net 192.168.10.0 netmask 255.255.0.0 gw 192.168.1.1 dev eth1
is a command, not an error message.
P.S. If in doubt, use this (http://www.techtutorials.net/reference/subnet_calculator.shtml) to determine whether two IP addresses are on the same subnet.
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.