Openwrt не работает dhcp

Настройка получения DHCP на роутере с OpenWrt с с порта коммутатора Cisco

Помощь в написании контрольных, курсовых и дипломных работ здесь.

Конфигурация порта коммутатора cisco
Добрый деть! Проблема такая: Есть Комутатор Cisco на котором крутиться три Vlana, два влана.

Настройка dhcp на роутере в офисе
Есть сеть из 20 компьютеров .Провайдер предоставляет интернет через медиаконвектор.Также выдает.

Проброс порта на роутере Cisco 2800
ситуация следующая. есть cisco 2800 series. нужно пробросить порт 80, что бы из вне можно было.

Нужен образ cisco IOS для коммутатора Catalyst 2950 24 порта
Всем доброго времени суток! Нужен образ IOS для каталиста 2950 24 порта. Помогите у кого есть.

А как это сделать? У меня на циске поднят пул.Команда show ip dhcp binding выдает что устройству(маленькому роутеру) выдается ip 192.168.1.2 по DHCP.В роутере ifconfig пишет, что у меня статический ip 192.168.1.12(я его действаительно забивал вручную и при настройке DHCP пула на циске заносил в исключения чтобы циска мне его не выдавала(ip dhcp excluded addreses)).Если я вбивал в поле слово dhcp вместо static, то мне потом приходилось ресетить модем и возвращаться к заводским настройкам, т.к. зайти в админку мне не удавалось никак — ни по SSH ни телнетом.Даже пинговатся выданный циской DHCP не хотел.

Добавлено через 13 часов 9 минут
тема актуальна

Натравить не сложно, на выхлопе ifconfig смотришь имя интерфейса, далее выполняешь в той же консоли
dhclient имя_интерфейса
и этот порт принимает ip уже от cisco, отпиши если не вышло, будем думать дальше

Добавлено через 16 минут
А вот только смотрел на врт роутеры есть, прошивка версии 10 бэк фаер которая, там dhclient как таковой отсутствует, в общем так,

Люди..тема актуальна..на данном этапе попробовал получать DHCP через LUci на роутере. У меня на роутере интерфейс br-lan c ip адресом 192.168.1.20(его я назначил сам, было изначально 192.168.1.1).Затем на DHCP — сервере настроил раздачу из диапазона 192.168.1.1-192.168.1.10. Далее создал виртуальный bridged интерфейс dhcp(путем bridged соединения между eth0.1 и физическим br-lan).Затем сам создался vlan.Затем смотрю , в графе TX/RX какие то цифры бегут, МАС адресс такой же как у физической сетевой карты,т.е. пакеты идут, но DHCP адрес не присваивается.

Ps:стал присваиваться после того, как указал dns сервер (айпишник роутера), с которого его принимать.Ннадо чтобы роутер принимал DHCP как на винде ,сразу после втыкания кабеля.

Настройка DHCP на роутере D-LINK DIR-130
Всем здрям! У меня возникла следующая потребность — настроить на этом роутере DHCP сервер таким.

Cisco настройка портов коммутатора
настройки которые ввожу не работают всяко разно уже пробовала. 1.настройте ipv4-адрес для vlan1.

Cisco 881-k9 Проблемы с работой WAN порта, как клиент DHCP
Доброго времени суток! К сожалению, я новичок в работе с Cisco. Пришел на этот форум за помощью.

Настройка DHCP в Cisco, через маршрутизатор
Подскажите как настроить промежуточные маршрутизаторы и можно ли вообще? На главном все установил.

Источник

Openwrt dhcp local теперь не могу зайти на роутер .

Настраивая роутер включил получение ip для роутера по dhcp, так как айпи раздает хост а сам нерабочий роутер работает как повторитель,теперь не могу войти на роутер, но все индикаторы работают, wifi виден но теперь не раздает локальным компьютерам ip пробывал установить ip вручную и зайти на интерфейс 192.168.1.1 безрезультатно, роутер tp-link wr-2543nd .

ах да ,кнопка ресет не работает 🙁

Он наверняка получил адрес с хоста. Посмотри на лизы.

смотрел не получил 🙁

А как так вышло, что reset не работает?

сам в шоке зажимаю как раньше и безрезультатно , думаю дело в openwrt.

Есть универсальный способ сброса настроек:

  1. на включенном роутере нажимаешь reset и держишь 30 секунд;
  2. не отпуская кнопку reset, отключаешь блок питания от роутера и ждёшь 30 секунд;
  3. не отпуская кнопку reset, подключаешь блок питания к роутеру и ждёшь 30 секунд;
  4. отпускаешь кнопку reset.

На некоторых роутерах вместо кнопки reset надо использовать кнопку wps.

спасибо сейчас попробую все из того что ты перечислил.

все перепробовал безрезультатно 🙁

Как вариант, вдруг он из 169.254 себе назначил, попробуй.

Получилось

Получилось сделать так, всунул сетевой провод в Lan1 порт, установил на компьютере айпи 192.168.1.2 а шлюз 192.168.1.254 выключил роутер включил подождал 3 секунды когда роутер очердной раз моргнул зажал ресет на 3 секунды, отпустил индикатор замка на роутере начал бешенно мигать вошел в telnet 192.168.1.254 или 192.168.1.1 уже забыл, и там уже в терминале востановил настройки на заводские, ура , всем спасибо.

А потом я заново решился прошить его и испортил роутер который теперь кирпич, теперь придется заказывать шнур UART =(

У меня такая же история с 741nd + openwrt, не воспринимай близко к сердцу =)

Просто такие как мы не должны лезть туда, куда не надо =) Ну, или учиться на ошибках.

Отпишись о результатах прошивки через уарт, пжлста.

Читайте также:  Как настроить dns для поддомена

еще не пришел этот третий кирпич который я испортил =))))

Возможно и arp -a помогло бы его найти.

да спасибо, как то забыл про arp, пробывал tcpdump по какому-то howto:)

Источник

openwrt dhcp doesn’t work

Установил openwrt на mikrotik rb951g-2hnd. Зайти на него теперь могу только через uart — ни dhcpc, ни manual ip не работают. В какую сторону смотреть? dhcp — запущен. Единственная ошибка — «rocd: Not starting instance igmpproxy::instance1, an error was indicated» — врядли имеет к этому отношение. В какую сторону смотреть?

Не работает и по Wi-Fi и по проводу? Версию от своего роутера залил?

По логам вообще все идеально.

Локалка сама создается. Вон даже IP есть в ifconfig.

Возможно что-то не так с VLAN’ами.

В качестве DHCP-сервера обычно используется dnsmasq, я не вижу его в списке процессов. Возможно он просто выключен.

Кстати, прошивка самосборная вроде? На https://downloads.openwrt.org/ для твоего роутера есть что-нибудь или нет? У меня TP-LINK не загружается, если собрать сильно большой образ. Если выкинуть лишние пакеты, то сработает?

вафля и продвод работает — подключение обнаруживается, только сетевой адресс не принимается, если прописать его вручную — то пинг все-равно не идет, arp пакеты тоже.

только сетевой адресс не принимается

В качестве DHCP-сервера обычно используется dnsmasq, я не вижу его в списке процессов. Возможно он просто выключен.

При подключении провода в логах что-то пишется?

Ну хоть нашлось в чем дело

Самосборная, место хватает. На микротике 120 мб флеша. Попробую еще скачать с их репы. Ты не знаешь как можно обновить прошивку c tar.gz?

Ты не знаешь как можно обновить прошивку c tar.gz?

Тот tar.gz просто как промежуточный этап.

Микротик не поддерживает sysupgrade(

Что-то у меня «не пруха» с openwrt, на Tplink вафля падает раз в сутки. Mikrotik бутался раньше на 12.09, обновил прошивку, вышло то что в шапке описал. Вот только что опять прошился на образ с FTPшника 14.07 — выплыла новая бага. Сейчас запулился, попробую еще раз собрать образ, посмотрю вдруг что-то изменилось.

Запулился, скомпилил, прошил, в итоге в serial kernel log все гладко ни одной ошибки. В logread тоже все красиво. Процессы вроде все поднялись. Вафля работает — можно подключатся все ок. А вот ethernet порты — нет. В итоге — я подключаю провод к wan, который у меня dhcpclient. Айпишник получаю в течении минуты, или не получаю в зависимости от фазы луны.. Arp пакеты ходят по портам, ping на wan не работает, даже с полученным ip. DHCP сервер откзывается тоже отдавать айпишник через порты. Такое чувтво, что у меня порты сгорели, но с vmlinux-initramfs (когда я прошивку заливал на роутер) они же работали. Далее tcpdump буду пакеты смотреть. Возможно кто-то подкажет какую сторону еще глянуть можно.

Доброго! Имею такой же девайс (или он меня — хз) как и Вы, однако он в полуживом состоянии. прошу оказать помощь в копировании первого раздела mtd0. Я отписался что к чему в этом посте http://www.lan23.ru/forum/showthread.php?t=11871&p=122222&viewfull=1#. , однако без сторонней и вашей в том числе помощи мне не обойтись, т.к. не много любителей имеющих такую железку. команда dd if=/dev/mtd0 of=/some/folder/booter.hex

Должно получиться 256кб, ожидаю там увидеть параметры загрузки ядра, которые у меня возможно слетели при обновлении прошивки. Если интересно, можете прочитать топик по ссылке с самого начала, но там многа букаф.

Заранее благодарен. почта metsys@gmx.com

Обновился на chaos_calmer с ftp. Все тоже самое, только похоже wifi полностью рабочий, подключился в клиенте (`sta`) к другому роутеру — все работает, можно на luci зайти, ставить пакеты, передавать файлы — трафик весь доходит. А вот физический (проводной) ethernet не работает. 87% пакетов теряются.

В dhcpserver режиме подключаю патчкорд во 2ой порт роетура и в ноут (dhcp client) на 15 seconds ( после выдергиваю) и наблюдаю следующее :

  • Laptop send: 3 dhcp request and 9 icmpv6
  • Laptop receive: 0 packages
  • router sends: 0 packages ? ( ifconfig показывает, что отослано 4, но почему-то в tcpdump их нету)
  • router receives: 2 icmp packages ( те же 2 пакета, которые и в wireshark с ноута, пример снизу)

5c:f9:dd:48:9e:89 /fe80::b2e3:928a:66b2:ff43 — laptop, d4:ca:6d:92:a4:7e / fe80::d6ca:6dff:fe92:a47e: — router

Со статик айпи ситуация получше openwrt (static 192.168.2.1)

Источник

Конфигурация DNS и DHCP

Секции

Возможные для использования типы секций в конфигурационном файле dhcp определены далее. Не все типы могут быть использованы в файле и большинство из них требуются только для специальных случаев конфигурирования. Общие секции это Common Options, DHCP Pools и Static Leases.

Общие настройки

Тип конфигурационной секции dnsmasq определяет значения и опции относящиеся ко всем действиям dnsmasq, а также общие для всех обслуживаемых интерфейсов опции DHCP . В следующем списке перечислены все доступные опции, их значения по умолчанию, а также соответствующие опции командной строки dnsmasq. См. the dnsmasq man page для дополнительных подробностей.

Это настройки по умолчанию для общих опций:

All Options

Name Type Default Option Description
add_local_domain boolean 1 Add the local domain as search directive in resolv.conf.
add_local_hostname boolean 1 Add A and PTR records automatically for the local hostname.
addnhosts list of file paths (none) -H Additional host files to read for serving DNS responses
authoritative boolean 0 -K Force dnsmasq into authoritative mode. This speeds up DHCP leasing. Used if this is the only server on the network
bogusnxdomain list of IP addresses (none) -B IP addresses to convert into NXDOMAIN responses (to counteract “helpful” upstream DNS servers that never return NXDOMAIN).
boguspriv boolean 0 -b Reject reverse lookups to private IP ranges where no corresponding entry exists in /etc/hosts
cachelocal boolean 1 When set to 0 , use each network interface’s dns address in the local /etc/resolv.conf . Normally, only the loopback address is used, and all queries go through dnsmasq.
cachesize integer 150 -c Size of dnsmasq query cache.
dbus boolean 0 -1 Enable DBus messaging for dnsmasq.
Standard builds of dnsmasq on OpenWRT do not include DBus support.
dhcp_boot string (none) Specifies BOOTP options, in most cases just the file name
dhcphostsfile file path (none) Specify an external file with per host DHCP options
dhcpleasemax integer 150 -X Maximum number of DHCP leases
dnsforwardmax integer 150 -0 (zero) Maximum number of concurrent connections
domain domain name (none) -s DNS domain handed out to DHCP clients
domainneeded boolean 0 -D Tells dnsmasq never to forward queries for plain names, without dots or domain parts, to upstream nameservers. If the name is not known from /etc/hosts or DHCP then a “not found” answer is returned
ednspacket_max integer 1280 -P Specify the largest EDNS.0 UDP packet which is supported by the DNS forwarder
enable_tftp boolean 0 Enable the builtin TFTP server
expandhosts boolean 0 -E Add the local domain part to names found in /etc/hosts
filterwin2k boolean 0 -f Do not forward requests that cannot be answered by public name servers
fqdn boolean 0 Do not resolve unqualifed local hostnames. Needs domain to be set.
interface list of interface names (all interfaces) -i List of interfaces to listen on. If unspecified, dnsmasq will listen to all interfaces except those listed in notinterface .
leasefile file path (none) -l (ell) Store DHCP leases in this file
local string (none) -S Look up DNS entries for this domain from /etc/hosts . This follows the same syntax as server entries, see the man page.
localise_queries boolean 0 -y Choose IP address to match the incoming interface if multiple addresses are assigned to a host name in /etc/hosts . Note well the spelling of this option.
logqueries boolean 0 -q Log the results of DNS queries, dump cache on SIGUSR1
nodaemon boolean 0 -d Don’t daemonize the dnsmasq process
nohosts boolean 0 -h Don’t read DNS names from /etc/hosts
nonegcache boolean 0 -N Disable caching of negative “no such domain” responses
noresolv boolean 0 -R Don’t read upstream servers from /etc/resolv.conf
notinterface list of interface names (none) -I (eye) Interfaces dnsmasq should not listen on.
nonwildcard boolean 0 -z Bind only configured interface addresses, instead of the wildcard address.
port port number 53 -p Listening port for DNS queries, disables DNS server functionality if set to 0
queryport integer (none) -Q Use a fixed port for outbound DNS queries
readethers boolean 0 -Z Read static lease entries from /etc/ethers , re-read on SIGHUP
resolvfile file path /etc/resolv.conf -r Specifies an alternative resolv file
server list of strings (none) -S List of DNS servers to forward requests to. See the dnsmasq man page for syntax details.
strictorder boolean 0 -o Obey order of DNS servers in /etc/resolv.conf
tftp_root directory path (none) –tftp-root Specifies the TFTP root directory
rebind_protection boolean 1 –stop-dns-rebind Enables DNS rebind attack protection by discarding upstream RFC1918 responses
rebind_localhost boolean 0 –rebind-localhost-ok Allows upstream 127.0.0.0/8 responses, required for DNS based blacklist services, only takes effect if rebind protection is enabled
rebind_domain list of domain names (none) –rebind-domain-ok List of domains to allow RFC1918 responses for, only takes effect if rebind protection is enabled

DHCP Pools

You can disable a lease pool for a specific interface by specifying the ignore option in the corresponding section.

A minimal example of a dhcp section is listed below:

Below is a listing of legal options for dhcp sections.

Name Type Required Default Description
dhcp_option list of strings no (none) The ID dhcp_option here must be with written with an underscore. OpenWrt will translate this to –dhcp-option, with a hyphen, as ultimately used by dnsmasq. Multiple option values can be given for this network-id, with a a space between them and the total string between “”. E.g. ‘26,1470’ or ‘option:mtu, 1470’ that can assign an MTU per DHCP . Your client must accept MTU by DHCP for this to work. Or “3,192.168.1.1 6,192.168.1.1” to give out gateway and dns server addresses.
dynamicdhcp boolean no 1 Dynamically allocate client addresses, if set to 0 only clients present in the ethers files are served
force boolean no 0 Forces DHCP serving on the specified interface even if another DHCP server is detected on the same network segment
ignore boolean no 0 Specifies whether dnsmasq should ignore this pool if set to 1
interface logical interface name yes (none) Specifies the interface associated with this DHCP address pool; must be one of the interfaces defined in /etc/config/network .
leasetime string yes 12h Specifies the lease time of addresses handed out to clients, for example 12h or 30m
limit integer yes 150 Specifies the maximum allowable address that may be leased to clients, calculated as network address + “start” + “limit”. The maximum number of leased addresses is limit+1
networkid string no (value of interface ) The dhcp functionality defined in the dhcp section is limited to the interface indicated here through its network-id. In case omitted the system tries to know the network-id via the ‘interface’ setting in this dhcp section, through consultation of /etc/config/network. Some IDs get assigned dynamically, are not provided by network, but still can be set here.
start integer yes 100 Specifies the offset from the network address of the underlying interface to calculate the minimum address that may be leased to clients. It may be greater than 255 to span subnets.

This departs from ‘ifname’ and ‘network’ as used in /etc/config/network and in /etc/config/wireless, so double check!

Static Leases

The configuration options in this section are used to construct a -G option for dnsmasq.

Name Type Required Default Description
ip string yes (none) ‘ignore’ or the IP address to be used for this host.
mac string no (none) The hardware address of this host.
name string no (none) Optional hostname to assign.

As well as adding host sections, you can also enable the dnsmasq section option readethers , and add entries to the /etc/ethers file.

DHCP OPTION example to set an alternative default gateway

You can specify an alternative default Gateway

use the list ‘dhcp_option’ ‘3,192.168.1.2’ to set the default gateway. A list of options can be found here here

Booting Options

The configuration options in this section are used to construct a -M option for dnsmasq.

This tells the client to load pxelinux.0 from the server at 192.168.1.2, and mount root from /data/netboot/root on the same server.

Name Type Required Default Description
dhcp_option list of strings no (none) Additional options to be added for this network-id. If you specify this, you also need to specify the network-id.
filename string yes (none) The filename the host should request from the boot server.
networkid string no (none) The network-id these boot options should apply to. Applies to all clients if left unspecified.
serveraddress string yes (none) The IP address of the boot server.
servername string yes (none) The hostname of the boot server.

Classifying Clients And Assigning Individual Options

config classifier option classifier ‘value‘ option networkid ‘network-id‘ list dhcp_option ‘DHCP -option‘

The placeholder classifier can be one of these values:

Classifier Description
mac Hardware address of the client
vendorclass String sent by the client representing the vendor of the client. dnsmasq performs a substring match on the vendor class string using this value.
userclass String sent by the client representing the user of the client. dnsmasq performs a substring match on the user class string using this value.
circuitid Matches the circuit ID as sent by the relay agent, as defined in RFC3046.
remoteid Matches the remote ID as sent by the relay agent, as defined in RFC3046.
subscrid Matches the subscriber ID as sent by the relay agent, as defined in RFC3993.

Using plain dnsmasq.conf

It is possible to mix the traditional /etc/dnsmasq.conf configuration file with the options found in /etc/config/dhcp .

The dnsmasq.conf file does not exist by default but will be processed by dnsmasq on startup if it is present. Note that options in /etc/config/dhcp take precendence over dnsmasq.conf since they are translated to command line arguments.

You can have dnsmasq execute a script on every action:

DNS and DHCP Ports

Examples

Static Lease (MAC address hot swap)

Define a static lease for a host with MAC addresses 00:a0:24:5a:33:69 and 00:11:22:33:44:55 (handy when you use both wired and wireless connection on the same computer/laptop — of course, you can use just one MAC address) and assign the IP address 192.168.1.230 and the hostname example-host to it. We call this MAC address hot swap, since IP address stay same, but MAC address changes.

Troubleshooting

Windows 7 has introduced a new Microsoft-enhanced feature. It won’t assign IP address obtained from a DHCP server to an interface, if the IP was used before for another interface, even if that other interface is NOT active currently (i.e. cable disconnected). This behaviour is unique and was not reported for older Windows versions, Mac OS nor Linux.

If you try configure MAC address hot swap on your router, Windows 7 clients will end up in an infinite DORA loop.

Custom Domain

Note that this currently only works for IPv4 addresses and that this functionality is not present in release prior to 8.09.2 .

SRV RR for SIP

CNAME RR

To specify that the web server also doubles as the FTP server (at least in name), one might use:

MX RR

If you’re running the mail server for your domain behind a firewall (and therefore, with split-horizon for your own domain) then you might need to convince that mailer that it’s actually authoritative for your domain.

If sendmail tells you “Domain of sender address xxx@yyy.zzz does not exist” this is because it isn’t finding an MX record confirming that it’s an MX relay for that domain.

will mitigate the issues caused by split-horizon.

Источник

Оцените статью