How to setup one ethernet interface as dhcp server and another interface as static ip?

6,146

I think it should work this way: setup the two interfaces in /etc/network/interfaces. Install dhcp3-server package. After that, in the /etc/defaults/dhcp3-server configuration file, you can tell the DHCP server, on what interface(s) it should listen: INTERFACES="eth0". That's all!

Share:
6,146

Related videos on Youtube

Jorge Castro
Author by

Jorge Castro

Updated on September 18, 2022

Comments

  • Jorge Castro
    Jorge Castro almost 2 years

    I am getting a static ip from provider. But in my Ubuntu 11.04 pc i have two reserved ethernet interface mostly both are like getting automatic dhcp IP as of now.

    But i want my Ethernet interface 0 as static ip WAN. And Ethernet interface 1 as dhcp server.

    How can i do this setup?

    • shay.porteous
      shay.porteous over 12 years
      Please clarify: Do you want to do 'internet connection sharing' with this setup?
  • jrg
    jrg over 12 years
    Don't you need sudo privileges to do 90% of that?
  • maniat1k13
    maniat1k13 over 12 years
    I assume you're going to do sudo -i
  • jrg
    jrg over 12 years
    Never assume anything - always specify something that you need done.
  • shay.porteous
    shay.porteous over 12 years
    The OP wants a DHCP-Server, not a client!