[Solved/acceptable] Prevent router hostname resolution on guest network?

Hi everyone,

Thanks as ever for the great support I've received on here getting my box working as I want! It's really coming together now!

Smaller issue: I have a LAN with the subnet 192.168.1.x and a guest network with the subnet 192.168.9.x. I have a hostname set up for the router, but the problem I have now is that the IP address of the router will be reported at both 192.168.1.1 and 192.168.9.1. This cause problems with other local addressing I'd like to do.

Ideally, I'd just set the desired hostname in the LAN interface in config/network. However, this appears to do nothing; in fact, I have to set the hostname in config/system for it to work at all. Then the problem is that it's reported with both IP addresses.

So the question is, how to do this properly?

Hope someone can help!

config system
	option timezone 'GMT0BST,M3.5.0/1,M10.5.0'
	option ttylogin '0'
	option log_size '64'
	option urandom_seed '0'
	option compat_version '1.1'
	option description 'Fritz!BOX 7530'
	option zonename 'Europe/London'
	option log_proto 'udp'
	option conloglevel '8'
	option cronloglevel '5'
	option hostname 'fritzbox.lan'

config timeserver 'ntp'
	list server 'time.euro.apple.com'
	list server 'time.apple.com'

config led 'led_dsl'
	option name 'DSL'
	option sysfs 'green:info'
	option trigger 'netdev'
	option mode 'link tx rx'
	option dev 'dsl0'

config led 'led_wlan'
	option name 'WLAN'
	option sysfs 'green:wlan'
	option trigger 'phy0tpt'

config led
	option name 'WAN'
	option sysfs 'green:fon'
	option trigger 'netdev'
	option dev 'lan1'
	list mode 'link'
	list mode 'tx'
	list mode 'rx'

config led
	option name 'LAN'
	option sysfs 'green:wps'
	option trigger 'netdev'
	option dev 'br-lan'
	list mode 'link'
	list mode 'tx'
	list mode 'rx'

config led
	option name 'Beat'
	option sysfs 'red:info'
	option trigger 'heartbeat'
	option inverted '1'
config interface 'loopback'
	option device 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fd85:2a51:d5c3::/48'

config atm-bridge 'atm'
	option vpi '1'
	option vci '32'
	option encaps 'llc'
	option payload 'bridged'
	option nameprefix 'dsl'

config dsl 'dsl'
	option annex 'j'
	option tone 'b'
	option ds_snr_offset '0'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'lan2'
	list ports 'lan3'
	list ports 'lan4'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option hostname 'fritzbox.lan'

config interface 'wan'
	option device 'lan1'
	option proto 'dhcp'

config interface 'wan6'
	option device 'lan1'
	option proto 'dhcpv6'
	option reqaddress 'try'
	option reqprefix 'auto'

config device
	option type 'bridge'
	option name 'br-guest'

config interface 'guest'
	option proto 'static'
	option device 'br-guest'
	option ipaddr '192.168.9.1'
	option netmask '255.255.255.0'
	option hostname 'guests.lan'

tried setting whatever names you wanted for the IPs in /etc/hosts ?

Thanks! I've been playing and discovered one solution:

  • I noted that my current hosts were being delivered from the tmp file /tmp/hosts/dhcp.cfg01411c
  • There I noticed a typo: I had my hostname listed in config/dhcp:config domain, with the desired static IP address. Not sure how this was there, don't remember adding it myself... well it was misspelled
  • So I corrected that, and then I had three entries, two with the "right" IP address, and one with the wrong
  • Then I removed the option hostname from config/system and the tmp file was updated to have just the single entry (from config domain) with the correct IP address
  • After this host <the hostname> returns just the single desired IP address
  • I get two randomly generated router-xxx hostnames for the removed system hostname

I suppose this seems kind of logical? Setting option hostname in config/network doesn't appear to have any effect. Setting a hostname for the system itself reports that hostname on all interfaces (which makes sense). The config domain approach allows me to specify just the single IP I want for the domain...

Seems an ok solution. Any thoughts?

If you mean under the wan interface, it is the identifier for the client_id.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.