dnsmasq: failed to bind DHCP server socket: Address already in use
Hi everyone
i have problem with dnsmasq and dhcp. I cant get dhcp working. [root@test diplomska]# dnsmasq --log-dhcp dnsmasq: failed to bind DHCP server socket: Address already in use This is the setup [root@test diplomska]# ifconfig eth0 Link encap:Ethernet HWaddr 00:13:8F:BC:01:30 inet addr:192.168.1.3 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:15242 errors:0 dropped:0 overruns:0 frame:0 TX packets:15444 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:13826515 (13.1 MiB) TX bytes:2387616 (2.2 MiB) Interrupt:22 Base address:0xa800 eth1 Link encap:Ethernet HWaddr 00:C0:DF:EE:B5:79 inet addr:192.168.3.1 Bcast:192.168.3.255 Mask:255.255.255.0 UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1 RX packets:23 errors:0 dropped:0 overruns:0 frame:0 TX packets:37 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:7866 (7.6 KiB) TX bytes:7476 (7.3 KiB) Interrupt:22 Base address:0xbc00 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:12119 errors:0 dropped:0 overruns:0 frame:0 TX packets:12119 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:512240 (500.2 KiB) TX bytes:512240 (500.2 KiB) ############# # INTERFACES# ############# # Networking Interface DEVICE=eth0 BOOTPROTO=dhcp NAME="WAN" HWADDR=00:13:8F:BC:01:30 ONBOOT=yes TYPE=Ethernet PEERDNS=yes PEERROUTES=yes UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 # Networking Interface DEVICE=eth1 BOOTPROTO=none IPADDR=192.168.3.1 NETMASK=255.255.255.0 NETWORK=192.168.3.0 BROADCAST=192.168.3.255 NAME="LAN" HWADDR=00:C0:DF:EE:B5:79 ONBOOT=yes TYPE=Ethernet PREFIX=24 #PEERDNS=yes UUID=9c92fad9-6ecb-3e6c-eb4d-8a47c6f50c04 ############## # /etc/hosts # ############## 127.0.0.1 test.router localhost.localdomain localhost 192.168.3.1 router #################### # /etc/resolv.conf # #################### nameserver 127.0.0.1 ####################### # /etc/resolv.dnsmasq # ####################### nameserver 192.168.1.1 ##################### # /etc/dnsmasq.conf # ##################### domain-needed bogus-priv resolv-file=/etc/resolv.dnsmasq interface=eth1 listen-address=127.0.0.1 listen-address=192.168.3.1 bind-interfaces expand-hosts dhcp-range=192.168.3.100,192.168.3.150,12h log-queries log-dhcp ####### # NAT # ####### iptables -F iptables -t nat -F iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE iptables -A FORWARD -i eth1 -j ACCEPT echo 1 > /proc/sys/net/ipv4/ip_forward echo 1 > /proc/sys/net/ipv4/ip_dynaddr service iptables restart ############################# # output od tcpdump -i eth1 # ############################# 02:45:08.290027 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:1e:ec:9a:57:93 (oui Unknown), length 300 02:45:15.048943 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:1e:ec:9a:57:93 (oui Unknown), length 300 02:45:36.063862 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:1e:ec:9a:57:93 (oui Unknown), length 300 i can ping eth1 |
I think i've found the problem. Interface eth1 should not have an IP address. Don't know why i address that iface in a first place :scratch: .. i am so dumb .. hihihi
Cheers |
Actually the output from dnsmasq --log-dhcp is still same.. failed to bind DHCP bla bla bla.. but now is working :))
|
All times are GMT -5. The time now is 01:55 PM. |