HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   No DHCP on second LAN interface (http://www.howtoforge.com/forums/showthread.php?t=17047)

DrJohn 7th November 2007 06:37

No DHCP on second LAN interface
 
This system has two internal (and one external) interfaces. The internals map to eth0 and eth2 on startup, with the external (static IP) on eth1. DHCP3 works flawlessly on eth0 and shows up in the log, but I get no DHCP allocations for the eth2 interface and see no logged DHCP traffic there.

The second LAN interface goes to a wireless AP, but this isn't the source of the problem -- it works fine if I connect it to the first LAN interface or if I use a fixed IP address on either interface.

I'm running Gutsy Gibbon with Shorewall and dhcp3.

Here's some configuration info (the real server name and external IP have been changed):


$ifconfig

eth0 Link encap:Ethernet HWaddr 00:14:6C:74:C9:37
inet addr:192.168.2.254 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::214:6cff:fe74:c937/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:742891 errors:0 dropped:0 overruns:0 frame:0
TX packets:770574 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:148315574 (141.4 MB) TX bytes:289954504 (276.5 MB)
Interrupt:20 Base address:0x6000

eth1 Link encap:Ethernet HWaddr 00:0C:41:1D:6C:D9
inet addr: 207.46.197.32 Bcast: 207.46.197.0 Mask:255.255.255.0
inet6 addr: fe80::20c:41ff:fe1d:6cd9/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:814007 errors:0 dropped:0 overruns:0 frame:0
TX packets:332819 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:333381278 (317.9 MB) TX bytes:155803258 (148.5 MB)
Interrupt:19 Base address:0xa800

eth2 Link encap:Ethernet HWaddr 00:10:5A:2A:21:44
inet addr:192.168.3.1 Bcast:192.168.3.255 Mask:255.255.255.0
inet6 addr: fe80::210:5aff:fe2a:2144/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:11565 errors:0 dropped:0 overruns:0 frame:0
TX packets:10667 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1844033 (1.7 MB) TX bytes:10371214 (9.8 MB)
Interrupt:22 Base address:0x6000

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:703 errors:0 dropped:0 overruns:0 frame:0
TX packets:703 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:64201 (62.6 KB) TX bytes:64201 (62.6 KB)


$ cat /etc/network/interfaces

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth1
iface eth1 inet static
address 207.46.197.32
netmask 255.255.255.0
network 207.46.197.0
broadcast 207.46.197.255
gateway 207.46.197.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 68.238.128.12 68.238.64.12
dns-search ptldor.fios.verizon.net

#The LAN interface
auto eth0
iface eth0 inet static
address 192.168.2.254
netmask 255.255.255.0
network 192.168.2.0
broadcast 192.168.2.255

#The wireless interface
auto eth2
iface eth2 inet static
address 192.168.3.1
netmask 255.255.255.0
network 192.168.3.0
broadcast 192.168.3.255



$cat /etc/dhcp3/dhcpd.conf


ddns-update-style none;
option domain-name "mydomain.net";
option domain-name-servers mysys.mydomain.net;

default-lease-time 600;
max-lease-time 7200;
authoritative;
log-facility local7;

# A slightly different configuration for an internal subnet.
subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.200 192.168.2.250;
option domain-name-servers mysys.mydomain.net;
option domain-name "mydomain.net";
option routers 192.168.2.254;
option broadcast-address 192.168.2.255;
default-lease-time 600;
max-lease-time 7200;
}
subnet 192.168.3.0 netmask 255.255.255.0 {
range 192.168.3.2 192.168.3.63;
option domain-name-servers mysys.mydomain.net;
option domain-name "mydomain.net";
option routers 192.168.3.1;
option broadcast-address 192.168.3.255;
default-lease-time 600;
max-lease-time 7200;
}

#Print server @ fixed IP addr
host NPI4255B7 {
hardware ethernet 00:0E:7F:42:55:B7;
fixed-address 192.168.2.253;
}

$cat /etc/shorewall/zones


#ZONE TYPE OPTIONS IN OUT
# OPTIONS OPTIONS
fw firewall
net ipv4
loc ipv4

$ cat /etc/shorewall/interfaces

#ZONE INTERFACE BROADCAST OPTIONS
net eth1 detect tcpflags,routefilter,nosmurfs,logmartians
loc eth0 detect dhcp,tcpflags,detectnets,nosmurfs
loc eth2 detect dhcp,tcpflags,detectnets,nosmurfs

$cat /etc/shorewall/masq

#INTERFACE SUBNET ADDRESS PROTO PORT(S) IPSEC
eth1 eth0 detect
eth1 eth2 detect


I'm at a loss on this one.

Thanks,

DrJohn

ManWithNoName 8th November 2007 03:28

In Debian there is /etc/default/dhcp3-server where you can configure interfaces.

DrJohn 8th November 2007 03:58

Thanks, that did it!

<rant> I'm new to Linux, but have been in the computer field since over 30 years. I stared on Unix long long ago, went to DOS and then Windows with the first PCS, some adventures in embedded real-time OS systems, and now am coming back around (and generally glad to do so).

BUT, the multiple flavors and non-standard details of each distro are driving me CrAzY. By choosing one (Debian / Ubuntu) at least there's the consistency of the user community; but it's often nearly impossible to unearth the simplest but completely necessary little pieces of information like the above just to do something as simple as this!

I suppose this is the side effect of going open-source, but compared to some other standardized systems it's no wonder that only the brave tread here. I'll get better at it as time and experience mount, but just now I had to sound off!</rant>


All times are GMT +2. The time now is 23:10.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.