Office1 and Office2 are in the same building but different room. We drag a line from Office1's router to Office2's ubuntu server hoping that we can connect the two offices
Main Topics
Browse All TopicsHello to all,
I have two office network set up with two different DSL account. I'm trying to find a way to share the network printer and share files between these two offices. I'm not exactly sure what's the correct way of doing this. Here is how I have it set up.
Office 1:
gateway: 192.168.1.1
subnet: 255.255.255.0
printer: static ip 192.168.1.200
Office 2:
gateway 192.168.1.2
subnet: 255.255.255.128
In Office2, I have a ubuntu server running with two network card. Eth0 is connected to Office2 with static ip 192.168.1.99
Eth1 is connected to Office1 with DHCP.
I'm using samba printer share right now to share the printer. It seems to be working once a while, not very stable. Also i'm still not able to share files in between office1 and office2.
What is the correct way to do this?
Please help.
Kevin
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
O.K. Since you have a cable that can connect the two offices you have the following two options.
1) Change the subnet mask in Office2 to 255.255.255.0, make sure you have no IP address conflicts, and then connect the two offices via switches. Remove/turn off one of the DHCP servers from one of the offices. Now both offices are a single network.
2) Change on of the offices IP subnet to something different, then get a router (or setup a computer with two NIC's as a router) and connect the two offices. With this both offices are independent networks that can talk to each other.
First of all, thank you for your help giltjr.
We found that option 2 fit our situation better. I'm going to need a little help on setting up these two network card on our office2 ubuntu server.
At this point, i'm able to print from office2 using office1's network printer. This is possible through samba on our ubuntu server in office2. However, I"m not able to go on the internet with the ubuntu server. I can not ping any external ip or domains.
cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface (office2)
auto eth0
iface eth0 inet static
address 192.168.1.99
netmask 255.255.255.128
network 192.168.1.128
gateway 192.168.1.2
broadcast 192.168.1.128
# The secondary network interface (office1)
auto eth1
iface eth1 inet dhcp
Thank you
Sorry for taking so long to get back.
Steps that need to be taken.
Decide what IP subnet you will use for Office2. I would suggest using 192.168.2.0/24. That way office1 is ".1" and office2 is ".2".
Change everything in Office2 to use the new IP subnet. This means you need to change the scope on the DHCP server and change the IP address on its Internet router/gateway, then release renew all DHCP IP addresses on each client. If you have any static IP addresses coded, they will have to be changed and updated with the new IP address on your Internet router/gateway.
On the ubuntu box you will want to code a static IP address on eth1 within offices1 subnet. I would suggest using the same last octet for both interfaces, that is end up with:
eth0 for office2 and it have 192.168.2.99 mask 255.255.255.0
eth1 for office1 and it have 192.168.1.99 mask 255.255.255.0
On the ubuntu box you will also need to decide with Internet connection it will use and only configure a gateway address on that interface pointing to that subnets gateway/router to the Internet.
On the ubuntu box you will also need to enable IP forwarding.
On all computers in office2 you will need to add a route like (assuming these computers are Windows boxes):
route add 192.168.1.0 mask 255.255.255.0 192.168.2.99
On all computers in office1 you will need to add a route like (assuming these computers are Windows boxes):
route add 192.168.2.0 mask 255.255.255.0 192.168.1.99
Or you could add the routes to your Internet router/gateway. That is:
On office2's internet router/gateway add a route for 192.168.1.0 mask 255.255.255.0 that points to 192.168.2.99
On office1's internet router/gateway add a route for 192.168.2.0 mask 255.255.255.0 that points to 192.168.1.99
Business Accounts
Answer for Membership
by: giltjrPosted on 2008-09-10 at 09:51:48ID: 22440341
Are both offices in the same location or different locations?