Linux - Network configuration

Hi
on each VM that i want to create, i have IP static (create by network Admin).
Adresses are ready.
When i configure resolv.conf - is this is only for global configuration network or just for DNS ?

And more than this, where i can configure my network, to be connected with all others VM ?
Plus, i need to correct following errors, after pressing "Apt-get update" :
e: sub directory gpgv resend error code (1)
e:  method /usr.lib/apt/methods/gpgv doesn"t start
w: repository http://164.2.2.x.x does not hava a release file.
n: data from such a repository can't be authentificated and is therefore potentially dangerous to use.
n: see apt-secure(8) manpage for repository creation and user configuration details.
root@xxxx:#
Sofi HeroJOLINDIENAsked:
Who is Participating?
 
David FavorConnect With a Mentor Linux/LXD/WordPress/Hosting SavantCommented:
Each /etc/resolv.conf applies to scope of where it's running.

Host/Machine level /etc/resolv.conf relates to the machine DNS resolution.

Container/VM level /etc/resolv.conf relates to container/VM DNS resolution.

Container/VM level /etc/resolv.conf almost always overrules host/machine level /etc/resolv.conf unless you've setup some very tricker DNS plumbing.

If you have static IPs already assigned to each VM, then packets should route correctly VMs <-> VMs, also Machine <-> VMs.

All this said, you mention apt-get, so if your host machine is running Linux + all your VMs are running Linux, then consider switching to LXD, as your VMs will then run at bare metal (hardware) speed, rather than VM speed.

And LXD network setup is a well know sequence of commands, whereas each VM seems to have... it's own idiosyncrasies to work through.

You'll likely also have to arrange manual routes for all IP ranges on a per machine basis.

Say for example you have an IP range of 147.56.39.176/28 then at boot time, you'd arrange for this command to run...

route add -net 147.56.39.176/28 gw $gateway || /bin/true

Open in new window


Do this for all your IP ranges. This bit of glue allows communication by every IP on machine to occur on the machine, rather than escaping the machine + being rerouted back to the machine.

Also, correct rerouting depends on your hosting or provisioning company correctly setting up their networking, each time you purchase a new block of IPs.

The likelihood of these companies getting this right... in my experience running private hosting, since 1994...

Is exactly 0. I've never had a single company correctly setup routing for IP blocks assigned to machines.
0
 
Seth SimmonsConnect With a Mentor Sr. Systems AdministratorCommented:
When i configure resolv.conf - is this is only for global configuration network or just for DNS ?

used for dns; though you shouldn't edit it manually

And more than this, where i can configure my network, to be connected with all others VM ?

appears you are using ubuntu?  edit /etc/network/interfaces
dns entries should be placed there also

repository http://164.2.2.x.x does not hava a release file.

obviously a configuration issue with the repository but haven't worked with custom repositories in debian though from what i've seen it could be an issue with the repository itself and might not be able to do anything about it
it's possible the repo doesn't support the version you are using?  what distro (debian, ubuntu, mint?) and version are you running?
1
 
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Marking both Seth + my updates as answers, as poster never responded + it was unclear what real problem + fix might have been.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.