Score:0

How to add a static route to a host via interface using 'route' tool?

cn flag

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.

Score:0
cn flag
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
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.