LinuxForum.Fans
Тема

Проблемы с DHCP при смене прова

Автор: XliN 7 сообщений 2856 просмотров
#190776

У меня на сервере (CentOS) постоянно лезет в логи

Sep 8 10:37:56 ldap dhclient: DHCPREQUEST on eth1 to 46.72.0.1 port 67
Sep 8 10:37:56 ldap dhclient: send_packet: Operation not permitted
Sep 8 10:38:17 ldap dhclient: DHCPREQUEST on eth1 to 46.72.0.1 port 67
Sep 8 10:38:17 ldap dhclient: send_packet: Operation not permitted

В чем проблема? Почитал на одном форуме, говорят такое может быть из-за того что шлюз прова в другой сети. Как от этого избавиться? Инет есть, скорость заявленная, но логи очень засоряются!!!

Показать
eth0 Link encap:Ethernet HWaddr 70:71:BC:42:EE:CA
inet6 addr: fe80::7271:bcff:fe42:eeca/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:88171272 errors:0 dropped:0 overruns:0 frame:0
TX packets:93634121 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3065816550 (2.8 GiB) TX bytes:2643821088 (2.4 GiB)
Interrupt:66 Base address:0x2000

eth1 Link encap:Ethernet HWaddr 00:07:E9:0E:A4:54
inet addr:46.72.ххх.ххх Bcast:46.72.63.255 Mask:255.255.192.0
inet6 addr: fe80::207:e9ff:fe0e:a454/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3740945 errors:0 dropped:0 overruns:0 frame:0
TX packets:3045759 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:3619980980 (3.3 GiB) TX bytes:1073702026 (1023.9 MiB)

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:2596868 errors:0 dropped:0 overruns:0 frame:0
TX packets:2596868 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:341928388 (326.0 MiB) TX bytes:341928388 (326.0 MiB)

vlan1 Link encap:Ethernet HWaddr 70:71:BC:42:EE:CA
inet addr:192.168.131.100 Bcast:192.168.131.255 Mask:255.255.255.0
inet6 addr: fe80::7271:bcff:fe42:eeca/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:34 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:4560 (4.4 KiB)

vlan3 Link encap:Ethernet HWaddr 70:71:BC:42:EE:CA
inet addr:192.168.3.77 Bcast:192.168.3.255 Mask:255.255.255.0
inet6 addr: fe80::7271:bcff:fe42:eeca/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:18196006 errors:0 dropped:0 overruns:0 frame:0
TX packets:20127740 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:445728655 (425.0 MiB) TX bytes:3416520357 (3.1 GiB)

vlan4 Link encap:Ethernet HWaddr 70:71:BC:42:EE:CA
inet addr:192.168.1.77 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::7271:bcff:fe42:eeca/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:49461275 errors:0 dropped:0 overruns:0 frame:0
TX packets:58027752 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1466345086 (1.3 GiB) TX bytes:3602075026 (3.3 GiB)

vlan5 Link encap:Ethernet HWaddr 70:71:BC:42:EE:CA
inet addr:192.168.0.77 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::7271:bcff:fe42:eeca/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:20513944 errors:0 dropped:0 overruns:0 frame:0
TX packets:15478574 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4214308775 (3.9 GiB) TX bytes:4215152231 (3.9 GiB)

[console][root@ldap ~]# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.131.0 0.0.0.0 255.255.255.0 U 0 0 0 vlan1
192.168.3.0 0.0.0.0 255.255.255.0 U 0 0 0 vlan3
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 vlan4
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 vlan5
46.72.0.0 0.0.0.0 255.255.192.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
0.0.0.0 46.72.0.1 0.0.0.0 UG 0 0 0 eth1[/console]

[console][root@ldap ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=dhcp
HWADDR=00:07:E9:0E:A4:54
GATEWAY=46.72.0.1
TYPE=Ethernet
ONBOOT=yes[/console]

На всякий случай открыл 67 порт для DHCP из вне (Хотя мой локальный DHCPD его не требовал)

[console][root@ldap ~]# iptables -L -v -n | grep 67
0 0 ACCEPT udp -- eth1 * 0.0.0.0/0 0.0.0.0/0 udp dpt:67
1 343 ACCEPT udp -- eth1 * 0.0.0.0/0 0.0.0.0/0 udp spt:67
0 0 ACCEPT udp -- * eth1 0.0.0.0/0 0.0.0.0/0 udp spt:67
0 0 ACCEPT udp -- * eth1 0.0.0.0/0 0.0.0.0/0 udp dpt:67[/console]

#190802

Слушайте... Это ошибка наверное исправится если я на eth1 пропишу статику, но у меня не статика. За нее 500р. в месяц надо платить. По какой причине eth1 не может получить новый IP от провайдера?

#190804

Мужики. Я достал наверное уже вас. Но думаю проблема в локальном DHCPD демоне. Как его жестко привязать работать только с eth0
А именно с vlan4. Чтобы он не стучался на eth1 и не портил мне логи.
Вот смотрите логи

Показать
Sep 8 13:04:12 ldap dhcpd: Internet Systems Consortium DHCP Server V3.0.5-RedHat
Sep 8 13:04:12 ldap dhcpd: Copyright 2004-2006 Internet Systems Consortium.
Sep 8 13:04:12 ldap dhcpd: All rights reserved.
Sep 8 13:04:12 ldap dhcpd: For info, please visit http://www.isc.org/sw/dhcp/
Sep 8 13:04:12 ldap dhcpd: Wrote 0 deleted host decls to leases file.
Sep 8 13:04:12 ldap dhcpd: Wrote 0 new dynamic host decls to leases file.
Sep 8 13:04:12 ldap dhcpd: Wrote 20 leases to leases file.
Sep 8 13:04:12 ldap dhcpd:
Sep 8 13:04:12 ldap dhcpd: No subnet declaration for eth1 (46.72.XXX.XXX).
Sep 8 13:04:12 ldap dhcpd: ** Ignoring requests on eth1. If this is not what
Sep 8 13:04:12 ldap dhcpd: you want, please write a subnet declaration
Sep 8 13:04:12 ldap dhcpd: in your dhcpd.conf file for the network segment
Sep 8 13:04:12 ldap dhcpd: to which interface eth1 is attached. **
Sep 8 13:04:12 ldap dhcpd:
Sep 8 13:04:12 ldap dhcpd:
Sep 8 13:04:12 ldap dhcpd: No subnet declaration for vlan5 (192.168.0.77).
Sep 8 13:04:12 ldap dhcpd: ** Ignoring requests on vlan5. If this is not what
Sep 8 13:04:12 ldap dhcpd: you want, please write a subnet declaration
Sep 8 13:04:12 ldap dhcpd: in your dhcpd.conf file for the network segment
Sep 8 13:04:12 ldap dhcpd: to which interface vlan5 is attached. **
Sep 8 13:04:12 ldap dhcpd:
Sep 8 13:04:12 ldap dhcpd: Listening on LPF/vlan4/70:71:bc:42:ee:ca/192.168.1/24
Sep 8 13:04:12 ldap dhcpd: Sending on LPF/vlan4/70:71:bc:42:ee:ca/192.168.1/24

Sep 8 13:04:12 ldap dhcpd:
Sep 8 13:04:12 ldap dhcpd: No subnet declaration for vlan3 (192.168.3.77).
Sep 8 13:04:12 ldap dhcpd: ** Ignoring requests on vlan3. If this is not what
Sep 8 13:04:12 ldap dhcpd: you want, please write a subnet declaration
Sep 8 13:04:12 ldap dhcpd: in your dhcpd.conf file for the network segment
Sep 8 13:04:12 ldap dhcpd: to which interface vlan3 is attached. **
Sep 8 13:04:12 ldap dhcpd:
Sep 8 13:04:12 ldap dhcpd:
Sep 8 13:04:12 ldap dhcpd: No subnet declaration for vlan1 (192.168.131.100).
Sep 8 13:04:12 ldap dhcpd: ** Ignoring requests on vlan1. If this is not what
Sep 8 13:04:12 ldap dhcpd: you want, please write a subnet declaration
Sep 8 13:04:12 ldap dhcpd: in your dhcpd.conf file for the network segment
Sep 8 13:04:12 ldap dhcpd: to which interface vlan1 is attached. **
Sep 8 13:04:12 ldap dhcpd:
Sep 8 13:04:12 ldap dhcpd: Sending on Socket/fallback/fallback-net

Секция subnet прописана только для vlan4.

#190805

Подправил
[console][root@ldap xlin]# cat /etc/sysconfig/dhcpd
# Command line options here
DHCPDARGS="vlan4"[/console]
Теперь он привязан только к vlan4

Теперь подожду что в логах появится. По идее все ок должно быть.

#191013

Не помогло ((

Sep 9 12:14:09 ldap dhclient: DHCPREQUEST on eth1 to 46.72.0.1 port 67
Sep 9 12:14:09 ldap dhclient: send_packet: Operation not permitted
Sep 9 12:14:26 ldap dhclient: DHCPREQUEST on eth1 to 46.72.0.1 port 67
Sep 9 12:14:26 ldap dhclient: send_packet: Operation not permitted
Sep 9 12:14:33 ldap dhclient: DHCPREQUEST on eth1 to 46.72.0.1 port 67
Sep 9 12:14:33 ldap dhclient: send_packet: Operation not permitted
Sep 9 12:14:46 ldap dhclient: DHCPREQUEST on eth1 to 46.72.0.1 port 67
Sep 9 12:14:46 ldap dhclient: send_packet: Operation not permitted
Sep 9 12:15:00 ldap dhclient: DHCPREQUEST on eth1 to 46.72.0.1 port 67
Sep 9 12:15:00 ldap dhclient: send_packet: Operation not permitted
Sep 9 12:15:10 ldap dhclient: DHCPREQUEST on eth1 to 255.255.255.255 port 67
Sep 9 12:15:10 ldap dhclient: DHCPACK from 46.72.0.1
Sep 9 12:15:10 ldap dhclient: bound to 46.72.4.246 -- renewal in 4482 seconds.
#191015

Вот что пишет тех. поддержка.

Скорее всего ваш сервер отвечает в сети как dhcp, соответственно на него приходят запросы для получения ip. Более предположений не могу высказать. Если в логах отражается DHCPREQUEST, это означает что DHCPDISCOVER уже прошел и ваш сервер подтвердил, что он является DHCP, а вот потом уже не дает ip.
#191039

Sep 9 13:29:52 ldap dhclient: DHCPREQUEST on eth1 to 46.72.0.1 port 67
Sep 9 13:29:52 ldap dhclient: DHCPACK from 46.72.0.1
Sep 9 13:29:52 ldap dhclient: bound to 46.72.4.246 -- renewal in 4869 seconds.

Вроде запрос прошел. :D

Войдите или зарегистрируйтесь, чтобы ответить.