4

I have a Windows 7 laptop accessing the internet through Verizon wireless MIFI configured as 192.168.1.1. It supports only 5 wireless connections, so I don't want to use up connections unnecessarily. That laptop has an ethernet nic which I have given a static IP of 192.168.0.5. Everything else on the 192.168.0.0 network acquires an address via DHCP from a DLink router whose address is 192.168.0.1. Also on that network are a printer, some network cameras, and a linux pc. The linux pc does not have a wireless card (and I don't want to buy one). The linux pc is located at 192.168.0.122. I can ping the linux pc from the windows pc. But I cannot access the internet from the linux pc. I can ping everything on the 192.168.0.0 network EXCEPT the ethernet card in the Windows PC. It seems as though my DLink router will not route requests to the 192.168.0.5 nic on the windows pc.

My windows pc has a default route pointing to the 192.168.1.0 network. It also has a route telling it to route all traffic destined for the 192.168.0.0 network through the 192.168.0.5 interface.

I have tried adding a default route to the linux pc to "gateway" 192.168.0.5, but that does not work. I have also tried adding a default route to the linux pc to the gateway 192.168.0.1 (the DLink router) but that will not give me internet access either (over the 192.168.1.0 network). I tried these two different routes at different times - I did not set them both at the same time.

I suppose this is a simple problem to solve, but I cannot seem to solve it. How can I give internet access over the 192.168.1.1 MIFI to my linux pc on 192.168.0.122?

Thanks

EDIT: Additional Info

                                      Internet
                                         |
                                         |
                                      MIFI (192.168.1.1) (wireless)
                                         |
                                         |
                                        (192.168.1.3) (wireless)
                                         Windows 7 PC
Dlink Router (192.168.0.1) ------------ (192.168.0.5) (wired)
  |
  |
  |linux pc (192.168.0.122) (wired)
  |
  |printer (192.168.0.100) (wireless)
  |
  |network cameras, etc (192.168.0.103) (wireless)

Only the windows pc is multi-homed with a wireless nic that connects to the MIFI wirelessly, and an ethernet nic with a wired connection to the DLink router. (The DLink permits both wired and wireless connections.) I don't want to use Windows internet connection sharing because I believe it will set up the ethernet nic as a gateway on 192.168.0.1 and a DHCP server. I already have the Dlink performing that role and I don't want to change that if I do not have to. (The Dlink permits me to make DHCP reservations and I really like that feature. I don't want to lose it.)

1
  • Please provide some more information about your network topology (a diagram would be helpful). You have a D-Link router, but your internet connection appears to be on your (dual-homed?) Windows desktop? Also You say your internet uplink has the address 192.168.1.1, while your LAN has 192.168.0.x. Which box does the routing between the two networks?
    – Ansgar Wiechers
    Sep 3, 2012 at 2:00

2 Answers 2

3

Your D-Link router is actually working as a switch or bridge, while the actual router for your LAN would be your Windows box. Just setting a default route won't suffice, because a default route only applies to packets from the host itself. It doesn't make a host route packets from one interface to another.

If you want to keep your setup as it is (which deems me somewhat less than optimal), you need to enable routing on your Windows box. Microsoft calls this Internet Connection Sharing. See this article on how to set it up. It doesn't matter if you want this or not, your setup cannot possibly work as intended unless you do it.

2
  • OK. I did not realize that the routing table only applies to packets originating on the host. Sep 3, 2012 at 16:03
  • No, the routing table applies to all packets, but to be able to act as a router, the box must be configured to forward packets from one interface to another. That's what ICS does. Sep 3, 2012 at 16:37
0
  1. The D-Link router needs to have it's DG set to 192.168.0.5 (The Winows 7 PC).

  2. You need to configure ICS (Internet Connection Sharing) on the Windows 7 PC.

  3. All other devices behind the D-Link router need to have the D-Link router set as their DG.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .