Routing list not updated with WAN static IP/32

Hello, I'm performing some tests on the WAN interface. Usually, when I create a WAN with a static IP, the routing list is updated accordingly e.g.,

config interface 'wan'
	option device 'eth1'
	option proto 'static'
	option ipaddr '192.168.2.2'
	option netmask '255.255.255.0'
	option gateway '192.168.2.1'

# ip r
default via 192.168.2.1 dev eth1
192.168.1.0/24 dev br-lan scope link  src 192.168.1.1
192.168.2.0/24 dev eth1 scope link  src 192.168.2.2

If I use any static/32 IP on the WAN, the route table is not updated accordingly

config interface 'wan'
	option device 'eth1'
	option proto 'static'
	option ipaddr '192.168.2.2'
	option netmask '255.255.255.255'
	option gateway '192.168.2.1'

# ip r
192.168.1.0/24 dev br-lan scope link  src 192.168.1.1

I'm definitely wrong with something, but what? How can I route default traffic properly through the gateway?

With calculating addresses from netmask. A /32 is a single host network. For your configuration to work, you need at least a /30.

3 Likes

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