One DHCP server - two interfaces - two subnets

linux

    Next

  • 1. why bash -c and su -c works different with signals?
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ NS->cat a.c int main() { sleep(10); exit(35); } NS->gcc a.c NS->bash -c ./a.out ; echo $? (^C) 130 NS->bash -c ./a.out ; echo $? (^\) Quit 131 NS->su -c ./a.out ; echo $? (^C) 0 NS->su -c ./a.out ; echo $? (^\) 0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ NS->cat b1.sh #!/bin/bash echo start a.out #su -c ./a.out bash -c ./a.out echo end a.out = $? NS->./b1.sh (^C) start a.out NS->./b1.sh (^\) start a.out ./b1.sh: line 4: 2519 Quit bash -c ./a.out end a.out = 131 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ NS->cat b2.sh #!/bin/bash echo start a.out su -c ./a.out #bash -c ./a.out echo end a.out = $? NS->./b2.sh (^C) start a.out end a.out = 0 NS->./b2.sh (^\) start a.out end a.out = 0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ why `su -c' always return 0 when it receive signals? it may confuse the caller if the normal exit code is zero.
  • 2. Ext version
    How is ext2/3 filesystems versioned? I can find different versions of e2fsprog, or the utilties to manipulate the filesystem, but not for the filesystem itself. Are they the same? Thanks, Cary
  • 3. Where to put an .rpm file on a Debian system
    I have an IBM ServeRAID controller in my Debian fileserver. IBM's support CD has an .rpm for (I assume) a RAID array manager. Where should I put the .rpm file? 'Man rpm' tells me how to install it, so that's what I'm going to try. Hope it isn't a nifty GUI app 'cause I don't want to fool with X at this point. -- -- Marten Kemp (Fix name and ISP to reply)
  • 4. A question..
    I want an ultra-quiet Linux box without resorting to liquid cooling. I've read somewhere about a guy who used a PII cpu, without a fan and ran Linux on it. Is this possible? Would it heat up too much? Thanks.
  • 5. GTwireless Suse 9.3
    Hey guys, Sorry if this is the wrong group for this question, but. . . I've got Suse 9.3 installed on a Dell D600 Latitude Laptop and have working wireless internet with most available networks, save for GTwireless. I'd like any help anyone could offer.. I generally use KWiFiManager, but am also fine with command line - so either way, I'd appreciate it. Thanks! tom

One DHCP server - two interfaces - two subnets

Postby Madhusudan Singh » Sun, 10 Aug 2003 05:46:54 GMT

Hi
        I run a DHCP server which supports wired internet in the internal LAN range
192.168.0.1/24. Now I wish to add a wireless internet LAN in the internal
LAN range 10.0.0.1/24. How do I accomplish this ?

/etc/dhcpd.conf :


option www-server       207.75.181.2,141.213.6.5,141.213.6.1;
ddns-update-style ad-hoc;

subnet 192.168.0.0 netmask 255.255.255.0
{
        range 192.168.0.3       192.168.0.10;
}

subnet 10.0.0.0 netmask 255.255.255.0
{
        range 10.0.0.3  10.0.0.10;
}

host clientwired
{
        hardware ethernet       wr:wr:wr:wr:wr:wr;
        fixed-address           192.168.0.2;
}


host clientwireless
{
        hardware ethernet       wl:wl:wl:wl:wl:wl;
        fixed-address           10.0.0.2;
}


where wr:wr:wr:wr:wr:wr and wl:wl:wl:wl:wl:wl are the obfuscated hardware
addresses for two clients - one wired and one wireless. How do I make sure
that the server listens on eth0 for the wired connections (192.168.0.1/24 -
as it already does) and wlan0 for wireless connections (10.0.0.1/24) ?

Thanks,

MS

Re: One DHCP server - two interfaces - two subnets

Postby Paul Black » Sun, 10 Aug 2003 14:51:44 GMT



Doesn't the DHCP daemon deduce this automatically by looking at the IP
addresses already associated with an interface?

Have a look at the startup messages to see what it says.

Pual


Similar Threads:

1.ISC DHCP - Two subnets on one physical interface.

I'm having some trouble trying to get dhcp to serve two subnets on one
interface.
The first is 10.0.0.0/24 which is for office workstations and
equipment.  Everyone in here is assigned a static ip via mac address.
The second is a 'guest' network which is 10.0.10.0/24.

I was able to get dhcp to assign the ip address for both subnets by
making the subnet declaration 10.0.0.0/16.  The problem is that there
are other settings that need to be set like the default route, dns,
netmask, etc.

In my first attempt, I made a pool and set all the settings to be that
of the guest network.  I would then override those settings in the
host declarations for the office equipment.  The problem is that it
didn't like having options such as routers,domain-name-servers, etc in
the host declarations.

Does anyone know how I can do this without a second NIC?

Below is my current config.
################ Current Config #################
max-lease-time 86400;
default-lease-time 14400;
ddns-update-style interim;

log-facility local4;

subnet 10.0.0.0 netmask 255.255.0.0 {
        authoratative;
        range 10.0.10.10 10.0.10.250; ## Guest Network

        # don't let clients update A records for ddns
        ignore client-updates;

        # options
        option subnet-mask 255.255.255.0;
        option broadcast-address 10.0.0.255;

        option domain-name "domain.tld";
        #option domain-name-servers 65.106.1.196,65.106.7.196;
        #option routers 10.0.10.1;
        option domain-name-servers 10.0.0.225;
        option routers 10.0.0.1;

        option ntp-servers 10.0.0.250;

        option netbios-scope "";
        option netbios-node-type 8;

host ws1 {hardware ethernet 00:13:21:d0:3f:0b;fixed-address 10.0.0.3;}
host ws2 {hardware ethernet 00:0d:9d:4c:94:4d;fixed-address 10.0.0.5;}
host ws3 {hardware ethernet 00:0d:9d:4b:35:bd;fixed-address 10.0.0.6;}
host ws4 {hardware ethernet 00:0b:cd:c3:ee:03;fixed-address 10.0.0.7;}
}
########################################

The following is what I would have liked to set up.  Understandably
the following won't work because the two networks are not physically
separated, and there is only one NIC available for dhcp.


max-lease-time 86400;
default-lease-time 14400;
ddns-update-style interim;

log-facility local4;

subnet 10.0.10.0 netmask 255.255.255.0 {
        authoratative;
        range 10.0.10.10 10.0.10.250; ## Guest Network

        # don't let clients update A records for ddns
        ignore client-updates;

        # options
        option subnet-mask 255.255.255.0;
        option broadcast-address 10.0.10.255;

        option domain-name "guest.domain.tld";
        option domain-name-servers 65.106.1.196,65.106.7.196;
        option routers 10.0.10.1;
}


subnet 10.0.0.0 netmask 255.255.255.0 {
        authoratative;

        # don't let clients update A records for ddns
        ignore client-updates;

        # options
        option subnet-mask 255.255.255.0;
        option broadcast-address 10.0.0.255;

        option domain-name "domain.tld";
        option domain-name-servers 10.0.0.225;
        option routers 10.0.0.1;

        option ntp-servers 10.0.0.250;

        option netbios-scope "";
        option netbios-node-type 8;

host ws1 {hardware ethernet 00:13:21:d0:3f:0b;fixed-address 10.0.0.3;}
host ws2 {hardware ethernet 00:0d:9d:4c:94:4d;fixed-address 10.0.0.5;}
host ws3 {hardware ethernet 00:0d:9d:4b:35:bd;fixed-address 10.0.0.6;}
host ws4 {hardware ethernet 00:0b:cd:c3:ee:03;fixed-address 10.0.0.7;}
}

2.Two subnets on one interface with no VLANs

Hi,

I'm looking for input from anyone that has experience of running two
subnets on one inteface.

Eg:

172.16.1.1/24 and 10.10.10.1/24 both bound to one NIC via a layer 2
switch without using VLANs.

Will it cause problems ? I can't find much online that's concrete.

I'd appreciate any help,

JR

3.One graphic card, two monitors, two X servers?

Hi,

We have a system with a Matrox Millenium G550 graphics card which has
two monitor adapters. I can set them up using xinerama or two displayx
:0.0 and :0.1. This is not exactly what I want.

Is it possible to run two instances of the X server on the same card,
each one serves one monitor?

- Monitor A should become display :0.0 and show xdm and normal window
manager for a user
- Monitor B should become display :1.0 and only show a full screen X
application and not be affected what happens on monitor A.

One idea was to run a X server on both monitors and then use Xnest for
the window manager session on monitor A, but I cannot get xdm running
in Xnest.

Thanks for any hints.

Regards,
Bernd

4.Solved: One graphic card, two monitors, two X servers

Hi Jon,

> That implies the X server inherits is keyboard from the tty device its
> started from. See "vtXX" in "X --help"
> You can tie it down with the Keyboard section of the X config file.
>
> If thats not it then its getting a little two involved for me to follow
> second hand !
>
> Which linux distro is it ?

Thanks for that hint. It's SUSE LINUX Enterprise Server 9 SP3. The
solution was to give X the same arguments as shown in
/etc/X11/xdm/Xservers. Now the X server also has keyboard input when
started at system boot.  I'll recall the whole solution for future
googlers with the same problem.


(1) Use GDM and start it in the background without occupying the
screen. Example of /etc/init.d/gdm:

/opt/gnome/bin/gdm --no-console &

(2) Enable remote access with GDM in /etc/opt/gnome/gdm/gdm.conf:

[xdmcp]
Enable=True
HonorIndirect=true

(3) Start up X server in /etc/inittab so it will be restarted when
terminating it with Ctrl+Alt+Backspace:

x:5:respawn:/usr/X11R6/bin/xinit /etc/X11/xinit/xinitrc.my --
/usr/X11R6/bin/X -nolisten tcp -br vt7

(4) The /etc/X11/xinit/xinitrc.my starts the two Xnest on each screen,
one with the application and the second with the GDM login screen.

==CUT==
PATH="/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/opt/gnome/bin:/usr/local/bin"

# Touchscreen
Xnest -display :0.1 -ac -geometry 1280x1024+0+0 -xkbmap
'xfree86(de_CH)' :2 &
export DISPLAY=:2.0
su nobody -c "/usr/X11R6/bin/xclock -geometry 1280x1024+0+0" &

# Console Screen
while true; do
  export DISPLAY=:1.0
  Xnest -display :0.0 -ac -geometry 1280x1024+0+0 -xkbmap
'xfree86(de_CH)' -query localhost :1
done
==CUT==

Hope next one will find the solution faster than me. ;-)

Bye
Bernd

5.Forwarding of multicast packets between two subnets with two NICS - Does not work

WHY DO I NOT GET ANY REPLY FROM A DIFFERENT SUBNET? WHY ARENT
IGMP/MULTICAST PACKETS BEING FORWARDED THROUGH THE LINUX BOX?

Here is my setup:

                               Linux Box with two NICS
PC1         router          NIC(eth0)---NIC(eth1)          router
 PC2
192.168.1.100 192.168.1.1 192.168.1.111 192.168.4.114 192.168.4.1
192.168.4.100


Linux Box:
---------
/proc/sys/net/ipv4/ip_forward


PC1
----
ping 192.168.4.1 - works
ping 224.0.0.1 - only get reply from 192.168.1.1 and 192.168.1.111


PC2
----
ping 192.168.4.1 - works
ping 224.0.0.1 - only get reply from 192.168.4.1 and 192.168.1.114

WHY DO I NOT GET ANY REPLY FROM A DIFFERENT SUBNET? WHY ARENT
IGMP/MULTICAST PACKETS BEING FORWARDED THROUGH THE LINUX BOX?

6. How to handle two networks - one DHCP, one fixed IP

7. routing to two subnets over the same interface

8. OpenVpn Server and two subnets



Return to linux

 

Who is online

Users browsing this forum: No registered users and 88 guest