Score:0

What's the proper command that generates a specific route that I should add to ubuntu?

in flag

I'm trying to understand why there aren't any linux vm that can connect to internet if emulated with bhyve (it's level 2 hypervisor which run on freebsd 13). Instead,if I use vm-bhyve (a wrapper for bhyve) they can.

I've compared the routes added by vm-bhyve and by bhyve,to try to understand why the first one allows any linux distro to connect to internet and the second one,doesn't,and I found that the route below is added by vm-bhyve but not by bhyve. I tried to add it manually inside ubuntu using this command :

route add default gw 192.168.1.1 enp0s5

but,instead of adding 192.168.1.1,it adds _gateway. I think that it is the reason why it does not work. Also the metric should be changed. The right one is 100,but the command that I have issued doesnt add 100,but its still 0.

Does vm-bhyve add that route at the host level ? Since I'm not a coder,I'm not able to understand how works the vm-bhyve source code,I would like to know if I can add that route within ubuntu 21.04 guest os.

So,below you can see the route that works :

Destination = default 
gateway = 192.168.1.1
genmask = 0.0.0.0
flags = UG
metric = 100
ref = 0
use = 0
iface = enps05

and below you can see the route that's added manually when I issue the command route add default gw 192.168.1.1 enp0s5 :

Destination = default 
gateway = _gateway
genmask = 0.0.0.0
flags = UG
metric = 0
ref = 0
use = 0
iface = enps05

maybe that command is wrong ? how it could be ?

muru avatar
us flag
What is that screenshot supposed to be? If that's your own text, please write it here as text.
Score:0
sl flag

That would usually be be added via sudo ip route add default via 192.168.1.1 it will determine the interface that it can reach the GW with or you can specify it yourself sudo ip route add default via 192.168.1.1 dev enp0s5. In general ip is preferred over the older route/ifconfig approach.

in flag
it isn't the solution for this problem. the solution is don't add the & character at the end of the bhyve pipeline command.
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.