Help in DHCP Server [message #39851] |
Thu, 10 June 2010 15:14  |
f.sivas
Messages: 4 Registered: April 2010
|
Junior Member |
|
|
I have a Debian 5.0 machine with linux-image-2.6.26-2-openvz-686.
With 2 network cards. One is eth0 conected to the modem, the other is eth1 with a static ip (192.168.1.9) conected to an wireless acess point.
At the moment i'v got in the node the DHCP Server runing because i can´t configure it in a virtual machine. What i did was:
First off all stop the dhcp server in the hardware node and unconfigure eth1.
[host-node]:~# ifconfig -a
eth0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:xxx.xxx.xxx.xxx Bcast:xxx.xxx.xxx.xxx Mask:255.255.240.0
inet6 addr: fe80::221:85ff:fe15:bedf/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5320 errors:0 dropped:0 overruns:0 frame:0
TX packets:3222 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6549594 (6.2 MiB) TX bytes:326786 (319.1 KiB)
Interrupt:221
eth1 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:16 Base address:0xe800
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:2459 errors:0 dropped:0 overruns:0 frame:0
TX packets:4428 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:143700 (140.3 KiB) TX bytes:6383660 (6.0 MiB)
Then add veth device to CT
[host-node]:~# vzctl set 107 --netif_add eth1 --save
[host-node]:~# ifconfig -a
eth0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:xxx.xxx.xxx.xxx Bcast:xxx.xxx.xxx.xxx Mask:255.255.240.0
inet6 addr: fe80::221:85ff:fe15:bedf/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5414 errors:0 dropped:0 overruns:0 frame:0
TX packets:3254 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6575652 (6.2 MiB) TX bytes:333920 (326.0 KiB)
Interrupt:221
eth1 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:16 Base address:0xe800
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:2503 errors:0 dropped:0 overruns:0 frame:0
TX packets:4472 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:147327 (143.8 KiB) TX bytes:6387674 (6.0 MiB)
veth107.1 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet6 addr: fe80::218:51ff:fea1:8375/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Then configure device in CT
[host-node]# ifconfig veth107.1 0
[host-node]# echo 1 > /proc/sys/net/ipv4/conf/veth107.1/forwarding
[host-node]# echo 1 > /proc/sys/net/ipv4/conf/veth107.1/proxy_arp
[host-node]# echo 1 > /proc/sys/net/ipv4/conf/eth1/forwarding
[host-node]# echo 1 > /proc/sys/net/ipv4/conf/eth1/proxy_arp
# Configure device in CT107
[ve-101]# ifconfig eth1 0
[ve-101]# ip addr add 192.168.1.9 dev eth1
[ve-101]# ip route add default dev eth1
# RTNETLINK answers: File exists
dhcp:/# ip route
192.0.2.1 dev venet0 scope link
default via 192.0.2.1 dev venet0
[ve-101]# ip route del default via 192.0.2.1 dev venet0
[ve-101]# ip route add default dev eth1
Add route in CT0
[host-node]# ip route add 192.168.1.9 dev veth107.1
After this
[ve-101]# apt-get install dhcp3-server
The strange is that i can ping 192.168.1.9 but the clients can´t get any leases.
Can someone help me in the configuration?
Thanks.
|
|
|
Re: Help in DHCP Server [message #39858 is a reply to message #39851] |
Fri, 11 June 2010 01:28   |
f.sivas
Messages: 4 Registered: April 2010
|
Junior Member |
|
|
Now i´m geting this:
Hardware node:
localhost:~# tcpdump -n -i eth1
tcpdump: WARNING: eth1: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 96 bytes
02:19:07.111641 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:33:43:6f:ab:47, length 300
02:19:07.113661 arp who-has 192.168.1.156 tell 192.168.1.9
02:19:08.001764 IP 192.168.1.9.67 > 192.168.1.156.68: BOOTP/DHCP, Reply, length 300
02:19:08.009702 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:33:43:6f:ab:47, length 321
02:19:08.013228 IP 192.168.1.9.67 > 192.168.1.156.68: BOOTP/DHCP, Reply, length 300
02:19:08.034223 arp who-has 192.168.1.156 tell 192.168.1.156
02:19:08.243316 arp who-has 192.168.1.156 tell 192.168.1.156
02:19:08.269618 arp reply 192.168.1.156 is-at 00:21:6b:95:e1:f0
02:19:08.272280 arp who-has 192.168.1.156 tell 192.168.1.156
02:19:08.314028 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:33:43:6f:ab:47, length 300
02:19:08.581624 arp reply 192.168.1.156 is-at 00:21:6b:95:e1:f0
02:19:08.917636 arp reply 192.168.1.156 is-at 00:21:6b:95:e1:f0
CT107
Jun 11 02:13:46 dhcp dhcpd: DHCPOFFER on 192.168.1.154 to 00:33:43:6f:ab:47 (gjkjgkjgkj) via eth1
Jun 11 02:13:46 dhcp dhcpd: DHCPREQUEST for 192.168.1.154 (192.168.1.9) from 00:33:43:6f:ab:47 (gjkjgkjgkj) via eth1
Jun 11 02:13:46 dhcp dhcpd: DHCPACK on 192.168.1.154 to 00:33:43:6f:ab:47 (gjkjgkjgkj) via eth1
Jun 11 02:13:46 dhcp dhcpd: Abandoning IP address 192.168.1.154: declined.
Jun 11 02:13:46 dhcp dhcpd: DHCPDECLINE of 192.168.1.154 from 00:33:43:6f:ab:47 (gjkjgkjgkj) via eth1: not found
Jun 11 02:13:55 dhcp dhcpd: DHCPDISCOVER from 00:33:43:6f:ab:47 via eth1
Jun 11 02:13:56 dhcp dhcpd: DHCPOFFER on 192.168.1.155 to 00:33:43:6f:ab:47 (gjkjgkjgkj) via eth1
Jun 11 02:13:56 dhcp dhcpd: DHCPREQUEST for 192.168.1.155 (192.168.1.9) from 00:33:43:6f:ab:47 (gjkjgkjgkj) via eth1
Jun 11 02:13:56 dhcp dhcpd: DHCPACK on 192.168.1.155 to 00:33:43:6f:ab:47 (gjkjgkjgkj) via eth1
Jun 11 02:13:56 dhcp dhcpd: Abandoning IP address 192.168.1.155: declined.
Jun 11 02:13:56 dhcp dhcpd: DHCPDECLINE of 192.168.1.155 from 00:33:43:6f:ab:47 (gjkjgkjgkj) via eth1: not found
Jun 11 02:19:07 dhcp dhcpd: DHCPDISCOVER from 00:33:43:6f:ab:47 via eth1
Jun 11 02:19:08 dhcp dhcpd: DHCPOFFER on 192.168.1.156 to 00:33:43:6f:ab:47 (gjkjgkjgkj) via eth1
Jun 11 02:19:08 dhcp dhcpd: DHCPREQUEST for 192.168.1.156 (192.168.1.9) from 00:33:43:6f:ab:47 (gjkjgkjgkj) via eth1
Jun 11 02:19:08 dhcp dhcpd: DHCPACK on 192.168.1.156 to 00:33:43:6f:ab:47 (gjkjgkjgkj) via eth1
Jun 11 02:19:08 dhcp dhcpd: Abandoning IP address 192.168.1.156: declined.
|
|
|
Re: Help in DHCP Server [message #39863 is a reply to message #39858] |
Fri, 11 June 2010 11:32  |
maratrus
Messages: 1495 Registered: August 2007 Location: Moscow
|
Senior Member |
|
|
Dear f.sivas,
don't you think that something is not clear with 192.168.1.156?
Doesn't the following message mean that somebody has already had that ip address?
02:19:08.269618 arp reply 192.168.1.156 is-at 00:21:6b:95:e1:f0
|
|
|