0

I'm new to *bsd systems. Usually in linux-based I add routes like that:

# eth0 ip address
ip a add 10.100.1.2 dev eth0

# gw is accessible via eth0 interface
ip route add 10.100.2.1 dev eth0

# default route via 10.100.2.1
ip route add default via 10.100.2.1 dev eth0

I don't understand what's wrong with my command for openbsd. It's freshly installed with no custom configs at all.

# that's one's ok
ifconfig enc0 10.100.1.2

# route: enc0: bad address
route add -host 10.100.2.1 -iface enc0

I'd appreciate any help. Thanks.

1 Answers1

0
ifconfig enc0 10.100.1.2
route add -inet 10.100.2.1 -llinfo -link -static -iface enc0
route add -inet default 10.100.2.1

not great, not terrible. works.

found it here: https://serverfault.com/a/769010/456638

P.S:

for FreeBSD it's slightly different:

ifconfig enc0 10.100.1.2/32
route add -inet 10.100.2.1 -link -static -iface enc0
route add -inet default 10.100.2.1