Is there a de-facto 'standard' for the gateway address on class C subnets?
Asking because I've been fighting a docker-compose issue with macvlans where it assumes the gateway is always at 192.x.x.1, while the actual gateway is 192.x.x.251
Is there a de-facto 'standard' for the gateway address on class C subnets?
Asking because I've been fighting a docker-compose issue with macvlans where it assumes the gateway is always at 192.x.x.1, while the actual gateway is 192.x.x.251
Technically it can be whatever you want and no standards impact it bar any in an organisation.
In practice its almost always .1, sometimes .254 or one of the others above 250, but its noticeably rare for it to be not be .1.
I'd guess 90%+ are .1
For your docker-compose issue I believe the below will work, taken from: https://forums.docker.com/t/how-do-i-attach-a-macvlan-network-and-assign-a-static-ip-address-in-compose-file/107419 and not tested by me.
networks:
vlan:
driver: macvlan
driver_opts:
parent: eth0
ipam:
config:
- subnet: "192.168.0.0/24"
ip_range: "192.168.0.64/26"
gateway: "192.168.0.1"