Results 1 to 4 of 4
Hello,
In my office I use Linux Mint 6 XFCE.
We have two internet access: one through a Debian (on the Debian we have also all the files shared with ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 04-10-2009 #1Just Joined!
- Join Date
- Apr 2009
- Posts
- 2
One PC on two networks: possible?
Hello,
In my office I use Linux Mint 6 XFCE.
We have two internet access: one through a Debian (on the Debian we have also all the files shared with Samba) and one through a wifi connection (not connected to the debian).
On my PC I have a usb wifi dongle and a network card.
I would like to :
- Be connected to the Internet through my wifi dongle, using the Wifi modem
- Be connected to the Debian to browse the shared file, but I don't want to use the internet connection of the Debian.
This is my etc/network/interfaces:
auto lo
iface lo inet loopback
#iface pan0 inet dhcp
iface eth2 inet dhcp
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.254
iface wlan0 inet dhcp
address 192.168.1.253
netmask 255.255.255.0
gateway 192.168.1.254
wireless-key c6774663dd
wireless-essid Wifi Office
auto eth2
Then I setup my route. I tried many combinations but all failed. And the result is:
- my computer (when both wifi dongle and ethernet are plugged) always use the internet provided by the debian server, not the wifi router.
- If i want to use the wifi router for surfing, i have to unplugged the ethernet cable.
-And If i want to browse the file on the debian server: i must plug the ethernet cable and unplug the wifi dongle.
I tried on my route those combinations:
route add default gw 192.168.2.254 wlan0 : don't works (192.168.2.254 is the ip from the wifi router)
route add -net 192.168.0.0 netmask 255.255.255.0 eth2 : don't works (the ip of the Debian server is 192.168.0.1)
route add default gw 192.168.2.254 wlan0 + route add -net 192.168.0.0 netmask 255.255.255.0 eth2 : don't works
In all cases the computer surf the web through the Debian server.
Any idea how to solve this problem?
Many thanks in advance for your help.
Gazou
- 04-10-2009 #2
Try shutting down both interface and then starting the wifi first. This should set the default gateway to the wifi then bring up your eth interface. Unless you have it hard coded some place this should work. Sorry I don't know the workings of Mint or where to check for hard codings.
- 04-10-2009 #3both of these interfaces are configured on the same network(192.168.1.0/24), based on the settings you have provided, also you are specifying dhcp, when you should be specifying static, since you are setting the NIC's with static informationCode:
iface eth2 inet dhcp address 192.168.1.100 netmask 255.255.255.0 gateway 192.168.1.254 iface wlan0 inet dhcp address 192.168.1.253 netmask 255.255.255.0 gateway 192.168.1.254 wireless-key c6774663dd wireless-essid Wifi Office
- 04-20-2009 #4Just Joined!
- Join Date
- Apr 2009
- Posts
- 2
[SOLVED] One PC on two networks: possible?
Hello all,
- Lazydog: i tried you trick, but when both interfaces are on, the ethernet one is used as default to surf.
- coopstah13: I made a mystake when i post my inetfaces config file. In fact the eth2 was in 192.168.0.1 and the wifi was 192.168.1.254, and it doesn't worked also. Anyway, you gave me the way and now it works.
How I did.
- I changed the router IP to become 10.0.0.1 instead of 192.168.1.254. My wifi dongle is setup in DHCP
- I setup the ethernet card as it. 192.168.0.100 255.255.255.0. I didn't declare the gateway: when I did it, I surfed througth the eth2 not the wifi.
Also I didn't declared anaything on the route: the route by default was set automatically on the wifi dongle.
And like this it works: i can access the shared file on the server and surf througth the wifi dongle!
For info this is my /network/interfaces:
auto lo
iface lo inet loopback
#iface pan0 inet dhcp
auto wlan0
iface wlan0 inet dhcp
gateway 10.0.0.1
netmask 255.0.0.0
wireless-key c6774663dd
wireless-essid Milan
auto eth2
iface eth2 inet static
address 192.168.0.100
netmask 255.255.255.0
#gateway 192.168.0.1
Hope it will help someone.
Thanks for your help anyway!
Gazou


Reply With Quote
