Author Topic: Zentyal 2.2 C2 Static & DHCP Same Network Card  (Read 3392 times)

rich@adcock.net

  • Zen Apprentice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Zentyal 2.2 C2 Static & DHCP Same Network Card
« on: September 05, 2011, 06:41:58 pm »
Hi All -

I'm new to Zentyal, have previously used Ubuntu 10.04 LTS.

I'm trying to configure a machine with 1 Network card to have both a DHCP and Static Address.

eth0 DHCP
eth0:1 Static

I know how to do this in Ubuntu via /etc/network/interfaces and I've done this for Zentyal, but then I loose the functionality of the Web Configuration tool, which is the attraction of Zentyal (Ubuntu with a Potentially Nice Web Admin tool). 

Is this possible?


Sam Graf

  • Guest
Re: Zentyal 2.2 C2 Static & DHCP Same Network Card
« Reply #1 on: September 05, 2011, 08:28:53 pm »
Hi, and welcome. :)

To my knowledge, the Zentyal 2.2 administration interface supports only an either/or setting in this case: the interface is either static or dynamic.

Just for information's sake, if you decide to continue to use Zentyal but want to manually configure the interfaces, please give this document a look:

http://trac.zentyal.org/wiki/Documentation/Community/HowTo/CustomizeConfigFiles

christian

  • Guest
Re: Zentyal 2.2 C2 Static & DHCP Same Network Card
« Reply #2 on: September 05, 2011, 08:40:26 pm »
In addition to what Sam explained, you should be able to access one or the other but some basic information is required to understand better what happens:
- are these 2 IPs in same subnet (I hope not otherwise I don't understand the purpose  :) )
- how did you define the interface (the one you can see) in Zentyal: internal or external?

rich@adcock.net

  • Zen Apprentice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Zentyal 2.2 C2 Static & DHCP Same Network Card
« Reply #3 on: September 06, 2011, 01:03:25 am »
Maybe I should step back.  Perhaps there is another pathway.

I'm trying to setup a new Machine.  If I use DHCP the machine works fine, when I try to setup Static IP I'm not able to access the Internet.

Here are the static settings I use.

Click on Network->Interfaces->Name: Eth0  Method:Static  External:Checked  IP:24.111.96.234  NetMask:255.255.255.252 -> Save

Click on Gateways -> Add new -> Enabled:Checked  Name:Open-4Biz  IP:24.111.96.233  Interface:Eth0  Weight:1  Default:Checked -> Add

Click on DNS -> 24.220.0.10 & 24.220.0.11

In Ubuntu 10.04 this worked for me.  I'm guessing I'm just doing something wrong in the GUI.   I can live without the DHCP and Static Address if I can get the Static Address installed.  For other IP needs, I think I will try using a VM.  Probably a better use anyway now that I think about it.

I hope this helps and I appreciate your input.  Irony is using sudo nano I was able to get it going, now with a nice webmin, I'm stumped. :)

Thanks!  I'm guessing/hoping it's an obvious oversight.

exekias

  • Zentyal Staff
  • Zen Warrior
  • *****
  • Posts: 196
  • Karma: +21/-0
    • View Profile
    • The Big Bug Theory
Re: Zentyal 2.2 C2 Static & DHCP Same Network Card
« Reply #4 on: September 06, 2011, 12:51:03 pm »
Hi rich,

Please post the output of the following commands, and we will try to see what is happening:

Code: [Select]
# ip addr show dev eth0
# ip rule ls
# ip route ls table main
# ip route ls table default
# cat /etc/resolv.conf

Best regards

rich@adcock.net

  • Zen Apprentice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Zentyal 2.2 C2 Static & DHCP Same Network Card
« Reply #5 on: September 07, 2011, 03:38:53 am »
Thank you for your assistance.  The following are the results you asked about.  I look forward to any insight you can share.

# ip addr show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
    link/ether 2c:27:d7:3e:6f:ee brd ff:ff:ff:ff:ff:ff
    inet 96.2.38.211/23 brd 96.2.39.255 scope global eth0
    inet6 fe80::2e27:d7ff:fe3e:6fee/64 scope link
       valid_lft forever preferred_lft forever

# ip rule ls
0:   from all lookup local
32763:   from all lookup main
32764:   from 96.2.38.1 lookup 101
32765:   from all fwmark 0x1/0xff lookup 101
32766:   from all lookup main
32767:   from all lookup default

# ip route ls table main
192.168.122.0/24 dev virbr0  proto kernel  scope link  src 192.168.122.1
96.2.38.0/23 dev eth0  proto kernel  scope link  src 96.2.38.211
10.201.16.0/20 dev tap0  proto kernel  scope link  src 10.201.25.84
10.200.0.0/16 via 10.201.16.1 dev tap0

# ip route ls table default
default via 96.2.38.1 dev eth0

# cat /etc/resolv.conf
nameserver 24.220.0.10
nameserver 24.220.0.11
domain midco.net
search midco.net

rich@adcock.net

  • Zen Apprentice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Zentyal 2.2 C2 Static & DHCP Same Network Card
« Reply #6 on: September 07, 2011, 03:53:49 am »
Here is the Info requested, when I change from DHCP to Static

# ip addr show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
    link/ether 2c:27:d7:3e:6f:ee brd ff:ff:ff:ff:ff:ff
    inet 24.111.96.234/30 brd 24.111.96.235 scope global eth0
    inet6 fe80::2e27:d7ff:fe3e:6fee/64 scope link
       valid_lft forever preferred_lft forever

#  ip rule ls
0:   from all lookup local
32763:   from all lookup main
32764:   from 24.111.96.233 lookup 101
32765:   from all fwmark 0x1/0xff lookup 101
32766:   from all lookup main
32767:   from all lookup default

# ip route ls table main
24.111.96.232/30 dev eth0  proto kernel  scope link  src 24.111.96.234
192.168.122.0/24 dev virbr0  proto kernel  scope link  src 192.168.122.1

# ip route ls table default
default via 24.111.96.233 dev eth0

# cat /etc/resolv.conf
search midco.net
nameserver 24.220.0.10
nameserver 24.220.0.11

exekias

  • Zentyal Staff
  • Zen Warrior
  • *****
  • Posts: 196
  • Karma: +21/-0
    • View Profile
    • The Big Bug Theory
Re: Zentyal 2.2 C2 Static & DHCP Same Network Card
« Reply #7 on: September 07, 2011, 07:00:56 pm »
Why are you trying to use static IP on that interface? It seems that you get this IP when configured as DHCP:

96.2.38.211/23

So I think the problem is that you are setting the wrong static IP. Does it make sense?

Best regards

rich@adcock.net

  • Zen Apprentice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Zentyal 2.2 C2 Static & DHCP Same Network Card
« Reply #8 on: September 09, 2011, 01:46:02 pm »
This is an internet server with a domain name. thats why I have a  static IP.

If I manually configure the /etc/interfaces/network files with my static IP info, it works.  So I know I have the right IP address, subnet, etc...

Other thoughts on how I setup Zentyal with a static IP using the command tools?

rich@adcock.net

  • Zen Apprentice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Zentyal 2.2 C2 Static & DHCP Same Network Card
« Reply #9 on: September 09, 2011, 01:46:29 pm »
In my last post, I meant Web tools ....

Thanks again for assistance

christian

  • Guest
Re: Zentyal 2.2 C2 Static & DHCP Same Network Card
« Reply #10 on: September 09, 2011, 02:05:59 pm »
Other thoughts on how I setup Zentyal with a static IP using the command tools?

Is the issue to use Zentyal to configure static IP or is it to configure, still using GUI, multiple IP on same network card?

Still my question could be somewhat stupid as I never tried Zentyal on VM but I wonder whenever you are not mixing IP for host and VM?

rich@adcock.net

  • Zen Apprentice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Zentyal 2.2 C2 Static & DHCP Same Network Card
« Reply #11 on: September 11, 2011, 11:02:21 pm »
I figured out the issue was Network Cache at my upstream provider.

Thanks for input all.