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 am trying to increase my understanding of ip networking.
I have my main network with internet and DHCP which is on 192.168.x.x with a router.
Now I have set up an Ubuntu file server and i want it on a separate home network with static ip addresses range of 10.x.x.x. and it is also connected to a router.
So i will have two networks, one private static with no direct internet access, and the other with internet and DHCP. I want to know how I would "bridge" these two networks so that I could access my file server from the DHCP network. How is this typically done?
you would not bridge them, that's very much the wrong word. bridging is for layer 2 connections, e.g. using a switch (which is a multi port bridge). You'd route them, possibly with some natting at the L3 boundary. Where is the router that holds these two networks in conjunction with the internet connection? If it's the same device then there should be no need to do anything at all - a device on all machines default gateway is directly connected to each interesting network, so everything relevant is all known about.
if these are different routers connecting to the same subnet, then all devices on the DHCP network would need to know that the other network lives off in a special direction. This could probably actually just be done on the internet router by adding a static route on that device to point all traffic trying to head towards the internet for the other network to be redirected to the other router, but in general this culd get a little messy and you could instead put a route directly on to each of the potential clients to tell it that 10.1.2.0/24 is via 192.168.1.254 or whatever the ip address is of the joining router on the 192.168 network. Given that the static network is only having one way out there should be no need to do anything interesting on those machines, just let them stick to their default gateway.
Actually bridge is the correct term and it is not a switch. It is a computer with at least two network cards on different subnets which allows the two separate networks to communicate with one another. I've run a bridge using Windows 2000 Server before. You're right about it being on Layer 2 of the OSI model though.
As for how to implement that on Linux. Look up "iptables bridge" in google. There's tons of examples.
For what the OP wants done, connecting two networks and access a file share across them, a bridge is necessary. A router would not be adequate. You don't if that's what you think needs to be done. I don't care for this to turn into a heated discussion.
he has two seperate ip subnets 192.168.x.x and 10.x.x.x, these are in different layer 3 space, therefore needs a layer 3 device to connect them, not a bridge, at layer 2.
Can you recommend any introductory links for the 7 layer model, Chris? I really ought to be able to understand it having knowledge of electronics, communications systems theory, practical network administration and networked applications but every time I try to understand the 7 layer model I get lost in a welter of edge case detail and specialist jargon. This is a pity because a clear understanding of the 7 layer model would be very helpful when thinking about networking as this thread has already demonstrated.
Can you recommend any introductory links for the 7 layer model, Chris? I really ought to be able to understand it having knowledge of electronics, communications systems theory, practical network administration and networked applications but every time I try to understand the 7 layer model I get lost in a welter of edge case detail and specialist jargon. This is a pity because a clear understanding of the 7 layer model would be very helpful when thinking about networking as this thread has already demonstrated.
Not in my mind, TBH. I'd just look over Wikipedia most likely. It certainly is useful to be able to see these discrete levels within the technologies and appreciate what things are relative to what. Mostly it's down in the networking levels, but when you're doing things like application load balancing it also comes in very handy, knowing what do do and don't have the right to mess with etc.
I have two Linksys WRT54GL routers representing two different networks with hosts and neither routers are connected to the internet. One network is 198.192.x.x and the other is 10.10.x.x.
What is the correct approach for connecting these two networks?
Side note: For my equipment, I have these two routers and one semi-old network switch and several hubs.
again, I'm just trying to get a better understanding about how networking works beyond reading the books. I have been in a pc networking degree for over 5 years and I still don't fully understand how networks communicate as in the situation above. I mean, I understand what NAT and ARP are and how complex networking infrastructures work to route ip traffic, but on the most basic scale, and as far as my own home set up, I want to be able to make things work with the least amount of tools possible -- for learning purposes.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.