This is a discussion on DHCP server and client on same mashine within the Linux General forums, part of the Linux Forums category; is it possible to run both clien and server on same mashine, so that linux would serve as kind of ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Carramba writes:
> is it possible to run both clien and server on same mashine, so that > linux would serve as kind of gateway ? Guessing at what problem you are trying to solve: Package: dhcp3-relay Priority: optional Section: net Installed-Size: 548 Maintainer: Eloy A. Paris <peloy@debian.org> Architecture: i386 Source: dhcp3 Version: 3.0.1-1 Depends: debconf, debianutils (>= 2.8.2), dhcp3-common (= 3.0.1-1), libc6 (>= 2.3.2.ds1-4) Conflicts: dhcp-relay Filename: pool/main/d/dhcp3/dhcp3-relay_3.0.1-1_i386.deb Size: 314468 MD5sum: 79d483e57cca4e94be998b3bd7cfe674 Description: DHCP Relay This is the DHCP relay from version 3 of the Internet Software Consortium DHCP package. For more information visit the ISC web site at http://www.isc.org. |
|
|||
|
On Sun, 27 Feb 2005 20:54:26 +0100, Carramba wrote:
> is it possible to run both clien and server on same mashine, so that > linux would serve as kind of gateway ? > > thanx in advance If your talking about a NAT firewall machine that has 2 NICs one for the internet (DHCP client) and one on your private LAN side that does DHCP (DHCPd server) then the answer is Yes. Which is exactly what I have done. |
|
|||
|
thanx for software tips, and yes answer...
but to by more specific how to I bind eth0 to DHCP client and eth1 to DHCPd server? On Sun, 27 Feb 2005 14:03:41 -0600, John Hasler <john@dhh.gt.org> wrote: > Carramba writes: >> is it possible to run both clien and server on same mashine, so that >> linux would serve as kind of gateway ? > > Guessing at what problem you are trying to solve: > > Package: dhcp3-relay > Priority: optional > Section: net > Installed-Size: 548 > Maintainer: Eloy A. Paris <peloy@debian.org> > Architecture: i386 > Source: dhcp3 > Version: 3.0.1-1 > Depends: debconf, debianutils (>= 2.8.2), dhcp3-common (= 3.0.1-1), > libc6 (>= 2.3.2.ds1-4) > Conflicts: dhcp-relay > Filename: pool/main/d/dhcp3/dhcp3-relay_3.0.1-1_i386.deb > Size: 314468 > MD5sum: 79d483e57cca4e94be998b3bd7cfe674 > Description: DHCP Relay > This is the DHCP relay from version 3 of the Internet Software > Consortium DHCP package. For more information visit the ISC web > site at http://www.isc.org. > . > Installing this package will make the machine it is installed on to > a dhcp relay. You need to have a DHCP or BOOTP server reachable in > order > to use the relay. > . > Documentation (apart from manpages) can be found in the dhcp package. > . > Note: This package _requires_ a 2.2.x or later Linux kernel. 2.0.x > kernels > are _not_ supported. > On Sun, 27 Feb 2005 23:20:51 GMT, Baho Utot <baho-utot+NOSPAM+@columbus.rr.com> wrote: > On Sun, 27 Feb 2005 20:54:26 +0100, Carramba wrote: > > >> is it possible to run both clien and server on same mashine, so that >> linux would serve as kind of gateway ? >> >> thanx in advance > > If your talking about a NAT firewall machine that has 2 NICs one for the > internet (DHCP client) and one on your private LAN side that does DHCP > (DHCPd server) then the answer is Yes. Which is exactly what I have > done. -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ |
|
|||
|
Carramba wrote: > thanx for software tips, and yes answer... > but to by more specific how to I bind eth0 to DHCP client and eth1 to > DHCPd server? > Is this a trick question? If not, I would have guessed "dhcpcd eth0" and "dhcpd eth1". One of them need "-i" and you need to read the manual. > > On Sun, 27 Feb 2005 14:03:41 -0600, John Hasler <john@dhh.gt.org> wrote: > > > Carramba writes: > >> is it possible to run both clien and server on same mashine, so that > >> linux would serve as kind of gateway ? > > > > Guessing at what problem you are trying to solve: > > > > Package: dhcp3-relay > > Priority: optional > > Section: net > > Installed-Size: 548 > > Maintainer: Eloy A. Paris <peloy@debian.org> > > Architecture: i386 > > Source: dhcp3 > > Version: 3.0.1-1 > > Depends: debconf, debianutils (>= 2.8.2), dhcp3-common (= 3.0.1-1), > > libc6 (>= 2.3.2.ds1-4) > > Conflicts: dhcp-relay > > Filename: pool/main/d/dhcp3/dhcp3-relay_3.0.1-1_i386.deb > > Size: 314468 > > MD5sum: 79d483e57cca4e94be998b3bd7cfe674 > > Description: DHCP Relay > > This is the DHCP relay from version 3 of the Internet Software > > Consortium DHCP package. For more information visit the ISC web > > site at http://www.isc.org. > > . > > Installing this package will make the machine it is installed on to > > a dhcp relay. You need to have a DHCP or BOOTP server reachable in > > order > > to use the relay. > > . > > Documentation (apart from manpages) can be found in the dhcp package. > > . > > Note: This package _requires_ a 2.2.x or later Linux kernel. 2.0.x > > kernels > > are _not_ supported. > > > > > > > On Sun, 27 Feb 2005 23:20:51 GMT, Baho Utot > <baho-utot+NOSPAM+@columbus.rr.com> wrote: > > > On Sun, 27 Feb 2005 20:54:26 +0100, Carramba wrote: > > > > > >> is it possible to run both clien and server on same mashine, so that > >> linux would serve as kind of gateway ? > >> > >> thanx in advance > > > > If your talking about a NAT firewall machine that has 2 NICs one for the > > internet (DHCP client) and one on your private LAN side that does DHCP > > (DHCPd server) then the answer is Yes. Which is exactly what I have > > done. > > > > -- > Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ |
|
|||
|
Carramba wrote:
> > is it possible to run both clien and server on same mashine, so that > linux would serve as kind of gateway ? > I have. There are two configurations hidden in your question: 1. The gateway forwards client requests to an upstream server and the answers back. Here, the sensible usage of the acquired address may create routing problems in the gateway, as the both interfaces may be assigned to the same subnet. The forwarding is handled by a DHCP realy daemon in the gateway. 2. The gateway gets its upstream settings from the ISP with DHCP, and distributes other (usually RFC 1918) subnet addresses to the internal network server. For outside connectivity of the internal network clients, the gateway acts as a NAT address-translating router. Usually, the gateway provides also firewalling services for the internal network. DHCP is here handled by two daemons: the DHCP daemon to serve the internal network, and the DHCP client daemon for obtaining the external interface settings. My set-up is of the type 2 above. The DHCP daemons are from the DHCP consortium package DHCP3. -- Tauno Voipio tauno voipio (at) iki fi |
|
|||
|
Carramba wrote:
> thanx for software tips, and yes answer... > but to by more specific how to I bind eth0 to DHCP client and eth1 to > DHCPd server? > This depends somewhat on your DHCP packace and Linux dsitribution start-up scripts. Most daemons take the interface as an argument on the command line. For details, see the manpage of the daemon. -- Tauno Voipio tauno voipio (at) iki fi |
|
|||
|
On Mon, 28 Feb 2005 19:34:14 +0100, Carramba wrote:
> thanx for software tips, and yes answer... > but to by more specific how to I bind eth0 to DHCP client and eth1 to > DHCPd server? > This is my script that starts DHCPD Have a look at www.linuxfromscratch.org use the BLFS (Beyond Linux From Scratch) the DHCPD entries #!/bin/sh # Begin $rc_base/init.d/dhcpd # Based on sysklogd script from LFS-3.1 and earlier. # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org .. /etc/sysconfig/rc .. $rc_functions case "$1" in start) echo "Starting DHCP Server..." loadproc dhcpd -q eth1 ;; stop) echo "Stopping DHCP Server..." killproc dhcpd ;; reload) echo "Reloading DHCP Server..." reloadproc dhcpd ;; restart) $0 stop sleep 1 $0 start ;; status) statusproc dhcpd ;; *) echo "Usage: $0 {start|stop|reload|restart|status}" exit 1 ;; esac # End $rc_base/init.d/dhcpd And for the dhcp client #/etc/sysconfig/network-devices/ifconfig.eth0 ONBOOT=yes DHCP_PROG=/sbin/dhclient DHCP_START= DHCP_STOP=-r |