Hello everyone.
I have recently started my adventure with OpenWRT, so my questions may seem trivial, but I want to understand them in order to proceed. I wanted to start a network consisting of several servers (DNS, WWW, MAIL). I have configured the eth0 (WAN), eth1 (NAT), eth2 (Host-Only) interfaces. I have also configured a DHCP server for class C IP addresses for the eth1 interface. When restarting dnsmaq, such messages appear.
Network configuration:
root@OpenWrt:~# cat /etc/config/network
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config interface 'wan'
option proto 'dhcp'
option ifname 'eth0'
config interface 'nat'
option ifname 'eth1'
option proto 'static'
option ipaddr '192.168.20.1'
option netmask '255.255.255.0'
option gateway '192.168.20.1'
option dns '192.168.0.1'
config interface 'hostonly'
option ifname 'eth2'
option proto 'static'
option ipaddr '192.168.10.2'
option netmask '255.255.255.0'
# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP qlen 1000
link/ether 08:00:27:72:dc:31 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.104/24 brd 192.168.0.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:fe72:dc31/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP qlen 1000
link/ether 08:00:27:0a:d5:e7 brd ff:ff:ff:ff:ff:ff
inet 192.168.20.1/24 brd 192.168.20.255 scope global eth1
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:fe0a:d5e7/64 scope link
valid_lft forever preferred_lft forever
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP qlen 1000
link/ether 08:00:27:20:a3:86 brd ff:ff:ff:ff:ff:ff
inet 192.168.10.2/24 brd 192.168.10.255 scope global eth2
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:fe20:a386/64 scope link
valid_lft forever preferred_lft forever
DHCP configuration
# cat /etc/config/dhcp
config dnsmasq
option domainneeded '1'
option boguspriv '1'
option filterwin2k '0'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option nonegcache '0'
option cachesize '1000'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
option nonwildcard '1'
option localservice '1'
option ednspacket_max '1232'
option filter_aaaa '0'
option filter_a '0'
config dhcp 'lan'
option interface 'nat'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv4 'server'
option dhcpv6 'server'
option ra 'server'
option ra_slaac '1'
list ra_flags 'managed-config'
list ra_flags 'other-config'
option dns '192.168.0.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'
#option loglevel '4'
I have been looking for the cause for another day, but I cannot deduce anything from where the references to class A addresses come from.
# service dnsmasq restart
udhcpc: started, v1.36.1
udhcpc: broadcasting discover
udhcpc: broadcasting select for 10.0.3.15, server 10.0.3.2
udhcpc: lease of 10.0.3.15 obtained from 10.0.3.2, lease time 86400
Can you tell me where he gets it from?
In VirtualBOX, I don't have a DHCP server that would work in this address class.
C:\Program Files\Oracle\VirtualBox> .\VBoxManage list dhcpservers
NetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter
Dhcpd IP: 192.168.56.100
LowerIPAddress: 192.168.56.101
UpperIPAddress: 192.168.56.254
NetworkMask: 255.255.255.0
Enabled: No
Global Configuration:
minLeaseTime: default
defaultLeaseTime: default
maxLeaseTime: default
Forced options: None
Suppressed opts.: None
1/legacy: 255.255.255.0
Groups: None
Individual Configs: None
And the router from which it takes the WAN interface address also has a DHCP server from class C. Could the reason be that the WAN interface is set as dhcp-client and the DHCP server is running on eth1?
Regards
MA