
Wenn ich mein Netzwerk so konfiguriere, dass es eine IP-Adresse verwendet, 192.168.1.1
wird anderen als den angeschlossenen Geräten eine falsche IP-Adresse wie zugewiesen 169.254.5.54
. Fehlt mir irgendwo eine Konfigurationseinstellung, mit der ich meine LAN-Schnittstelle auf einstellen 192.168.10.1
und DHCP-Adressen von erhalten könnte 192.168.10.*
? Es wird Chaos Calmer 15.05 verwendet.
Hier sind meine Einstellungen:
/etc/config/network
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fd70:bf5f:ddc6::/48'
config interface 'lan'
option ifname 'eth1'
option force_link '1'
option type 'bridge'
option proto 'static'
option netmask '255.255.255.0'
option ip6assign '60'
option gateway '109.193.64.50'
option dns '127.0.0.1 8.8.8.8'
option ipaddr '192.168.1.1'
config interface 'wan'
option ifname 'eth0'
option proto 'dhcp'
config interface 'wan6'
option ifname '@wan'
option proto 'dhcpv6'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0 2 3 4 5'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '1 6'
/etc/config/dhcp
config dnsmasq
option domainneeded '1'
option boguspriv '1'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.auto'
option strictorder '1'
list server '8.8.8.8'
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv6 'server'
option ra 'server'
option ra_management '1'
config dhcp 'wan'
option interface 'wan'
option ignore '1'
config odhcpd 'odhcpd'
option maindhcp '0'
option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'
config domain
Antwort1
@DavidPostill hat mich in die richtige Richtung gelenkt. Ich habe Folgendes geändert, damit DHCP mit einer eth0-LAN-Schnittstellen-IP-Adresse von funktioniert 192.168.10.1
. Sie können nicht alle diese Änderungen in der LuCI-Website-Konfiguration vornehmen, Sie müssen sich also per SSH mit dem Router verbinden und die Änderungen vornehmen.
/etc/config/network
:
config interface 'lan'
option ipaddr '192.168.10.1'
/etc/dnsmasq.conf
:
listen-address=127.0.0.1,192.168.10.1
Kommentieren Sie /etc/init.d/dnsmasq
Zeile 409 aus:
# append_bool "$cfg" ignore "--no-dhcp-interface=$ifname" && return 0
Entfernen Sie gespeicherte DHCP-Adressen in /tmp/dhcp.leases
. Führen Sie einen Neustart durch.
Wenn dies nicht funktioniert, weisen Sie Ihrem Computer einfach manuell eine statische IP-Adresse zu, melden Sie sich erneut beim Router an und sehen Sie sich die generierte DHCP-Konfiguration unter an /var/etc/dnsmasq.conf
. Nehmen Sie Änderungen vor und starten Sie dnsmasq mit neu /etc/init.d/dnsmasq restart
.