Results 1 to 1 of 1

Thread: delay starting dhcp server

  1. #1
    Join Date
    Jun 2009
    Location
    0:0:0:0:0:0:0:1
    Beans
    4,595
    Distro
    Xubuntu 13.04 Raring Ringtail

    delay starting dhcp server

    Sorry if the belong in the networking & wireless sub-forum.
    i found this, it seems close to what i want to do
    http://askubuntu.com/questions/3651/...interface-to-i
    this is currently in my /etc/network/interfaces file
    Code:
    # interfaces(5) file used by ifup(8) and ifdown(8)
    auto lo
    iface lo inet loopback
    during the boot process isc-dhcp-server tries to startup several times and fails
    this is in my /etc/rc.local script cause i don't know the proper way to do this
    Code:
    echo 1 > /proc/sys/net/ipv4/ip_forward
    while [ 0`pidof NetworkManager` -eq 0 ]; do # wait for net manager to start so ifconfig will work right
        sleep 1
    done
    while [ "`ifconfig eth0 | grep 'inet addr:'`" = "" ]; do # wait for external IP address
        sleep 2
    done
    while [ "`ifconfig eth0:1 | grep 'inet addr:'`" = "" ]; do # create new net interface
        sleep 2
        ifconfig eth0:1 10.0.0.1 netmask 255.255.0.0
    done
    # make new interface do what is needs to do
    #iptables -t nat -A PREROUTING -o eth0 -p tcp -m tcp --dport 80 -j DNAT --to-destination 10.0.0.75:80
    iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
    iptables -P FORWARD ACCEPT
    service isc-dhcp-server start
    how should i do this, should i just add this to my /etc/network/interfaces file
    Code:
    iface eth0:0 inet static
        bridge_ports eth0 eth0:1
        address 10.0.0.1
        broadcast 10.0.0.255
        netmask 255.255.0.0
        post-up /etc/init.d/isc-dhcp-server start
        pre-down /etc/init.d/isc-dhcp-server stop
    if that will work what do i do to my /etc/rc.local script
    Last edited by pqwoerituytrueiwoq; May 18th, 2013 at 03:25 PM.
    Laptop: ASUS A54C-NB91 (Storage: WD3200BEKT + MKNSSDCR60GB-DX); Desktop: Custom Build - Images included; rPi Server
    Putting your Networked Printer's scanner software to shame PHP Scanner Server
    I frequently edit my post when I have the last post

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •