Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've an Ubuntu computer running Ubuntu 8.04 with vmware installed. I have two interfaces:
eth0 which connects to my router on the 10.39.10.0 net with netmask 255.255.255.0
vmnet1 which is the virtual network where my Windows 2003 Server and RHEL virtual boxes are located, which is on the 10.39.17.0 net with netmask 255.255.255.0.
Now, I want the boxes on the 10.39.17.0 net on the interface vmnet1 to be able to ping boxes on the 10.39.10.0 net on interface vmnet1.
Simple: route two networks together, no NAT or other stuff like that. Everyone will be able to ping everyone.
Problem is everywhere Google takes me people mess around with NAT and stuff.
well that's really not a great architecture, and it is generally going to be much more preferable to do nat or better still, bridging, but to do what you want to do, you just need to route the vm destined traffic to the host box and enable ip forwarding on the box. there's nothing acutally vmware specific to it in any way- and hence probaly why you're having trouble tracking it down... Just run "echo 1 > /proc/sys/net/ipv4/ip_forward" and it should work. obviously that also necessitates the internal machines using the host as the default gateway too.
Well I do not see the point of using NAT since that would "hide" one network from the other, which I do not want.
Bridging is exactly what I want to do here. Just like a normal Cisco Router (read: real router, not one of those home-user ones). Put to networks together. There must be some way to do that in Linux.
Anyway, ip forwarding seems to have done it. My two networks are now working in perfect order. And my DHCP server on my Windows 2003 is up and running. Everything's perfect! Thanks! :D
well NAT is just one approach and not one that really suits all, but suits more than routing i think. why should the machine upon which a virtual machine reside define it's network layout? It's an arbitrary restriction that isn't really that nice. move a vm from one host to another and you have to change the ip? yuck. obviously if you only have one vm host then that doesn't exist, but the logic still applies, say in physical to vm conversions.
Well one of the virtual machines is a dhcp server and dns server. It's a total of five machines in there, two of them with dual boot. And since there are a lot of services in there (like web, ftp, etc) on different machines I really want to be able to reach it from my 'real' network.
oh totally, but the most conventional method would be bridging. machines should be seperated by function, security level etc... not architecture like we have here.
Oh.. I am very new to this, just starting to play around. Perhaps you have some links where I can learn more?
What I'm trying to do is getting a Microsoft Windows domain to play nice along with Linux servers and clients. But I can always through in some network lessons, too.
Well if you've not explored bridged interfaces then you really must. I assumed you had a logical reason for not already doing so. When you brigde and interface, the host machine essentially acts like a switch as far as networking is concerned. so traffic just passes straight through the host hardware just like a network switch or hub, all on the same network. If you did then have seperate networks for different functions you'd use something like 802.1q tagging to pass multiple networks through the host, again just like a normal (but more complex) switch.
Hm.. I tried to set up bridging using the brctl utility but I never managed to get the two networks to access each other. The furthes I got was to the virtual machines to be able to ping the eth0 interface on the host machine.
I do not really understand the difference between forwarding and bridging. Do they operate on different levels?
Btw, I want routing, not switching. Since there is two separate networks. I also need to make sure that my ubuntu host machine, while acting like a router between the two networks, will be able to talk to my Linksys router, to make sure that they both know about each other's networks.
To explain my situation a little bit further:
The lab is inside a linksys router which connects the 10.39.100.0 and 10.39.10.0 networks. The physical lab machines are located on the 10.39.10.0 net, the other network is just for network devices outside the lab. Now one of those machines runs a number of virtual machines. I want all these machines to be on their own network: 10.39.17.0.
So of course devices on all networks should be able to talk to each other. The internet is reached via the 10.39.100.0 network, and I will just set up firewall rules in the linksys router to block internet traffic to specific virtual machines.
Well vmware handles all the bridging config, no need to do brctl stuff. if you really want two seperate networks then what you're doing is the only option (save for NAT), but my point was that it's just really not a good architecture, and you *should* only want a single network in the first place.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.