static IP outside of subnet range

8,182

The systems all updated to the new IP scope because they were set to DHCP, and the printer didn't update since it was set statically. What you probably didn't do when you reset the printer IP, was to change the setting on the printer as well as in windows.

Routers connect networks. If the system knows that 192.168.254.x is reachable via it's LAN interface, and 192.168.1.x is reachable via its LAN interface, it will work sometimes. Just for grins, look at the routing table and see what it shows.

Share:
8,182

Related videos on Youtube

Singgi Prayogi
Author by

Singgi Prayogi

Updated on September 18, 2022

Comments

  • Singgi Prayogi
    Singgi Prayogi almost 2 years

    I have two questions, but let me explain the situation first. They are about the (static) IP address of a printer attached to the network.

    We had this networking setup, using a normal consumer router (Cisco):

    Printer IP address: 192.168.254.5 (static IP address)
    Default gateway:    192.168.254.1 (for all devices)
    Subnet mask:        255.255.255.0 (for all devices)
    

    Then the router got reset because there were some internet troubles. The settings ended up looking like this:

    Printer IP address:              192.168.254.5 (static IP address)
    Default gateway for the printer: 192.168.254.1 (only the printer)
    Default gateway for the rest:    192.168.1.1   (all other devices)
    Subnet mask:                     255.255.255.0 (for all devices)
    

    Well, obviously this didn't work so well. I managed to change the printer IP address to 192.168.1.5 (outside of the DHCP range) and set it's default gateway to 192.168.1.1. While this worked for Linux (Debian) which had found the printer via DNS-SD, apparently Windows can't deal with IP address changes.

    The tech guy came along and changed the printer IP address back to 192.168.254.5, keeping the default gateway intact. To my big surprise, this worked... somewhat. Sometimes there is 0% packet loss when pinging to the printer, sometimes there is a LOT of packet loss (10s of percents), and often after a while there is no connectivity at all (though, strangely, the printer can still be detected via DNS-SD).

    So here are the questions:

    1. Why can the printer be reached at all when it's outside the router subnet? I had expected this wouldn't work at all.
    2. Is this crazy setup the cause of the flaky LAN connection to the printer?

    Note: we have a few switches and (NAT) routers in the home, so those might complicate the network. I think there are usually about two or three switches between the computer and the printer.


    Edit: to clarify, my question isn't about how to get this to work, but about how routing works normally and what exactly goes wrong here -- why the packets don't end up where they are meant to go.

    • Ron Trunk
      Ron Trunk about 10 years
      Can you share the config from the router? My guess is that the router is also a DHCP server, and that seems to have changed.
    • Singgi Prayogi
      Singgi Prayogi about 10 years
      Yes, the router is also a DHCP server, but that didn't change with the reset. The printer was simply given a static IP-address outside the DHCP scope. Other than that, it's a normal consumer router with NAT etc.
    • Singgi Prayogi
      Singgi Prayogi about 10 years
      The DHCP range is 192.168.1.x, where x is in the range of 10-128. I don't know the router config before the reset aside from the standard gateway, but it did have a DHCP server.
    • Ricky
      Ricky about 10 years
      a) no, it shouldn't work at all, and b) you most certainly can change the address of a printer in windows. ('tho that's a super-user question.)
    • Singgi Prayogi
      Singgi Prayogi about 10 years
      For other reasons that go beyond the scope of this question, he attached the printer via an USB cable so networking issues were 'resolved'. He was unable to change the IP address in Windows, but that turned out to be unnecessary due to the USB connection. Still wondering why the printer did work for a moment. Maybe if I know why it worked (and know why exactly it should not work) I can convince a few people to use a more sane network config for the printer.
    • Admin
      Admin about 10 years
      I agree with @Ricky. You shouldn't get any connectivity with the description you've provided. Somewhere, one of those configurations don't match what you've described and you don't know it yet.
    • Ben West
      Ben West about 10 years
      It might be useful to know what your router is, and what the printer is. It may be that the printer has been able to update the router with a route to the other subnet
    • Singgi Prayogi
      Singgi Prayogi about 10 years
      The router is a Cisco EPC3925 with modified firmware (but those modifications appear minor), the printer a HP LaserJet 1320 series printer. And there are a few switches in between. I could check what those are, if that matters.
  • Singgi Prayogi
    Singgi Prayogi about 10 years
    About DHCP: yes, that was what I was trying to say. I'm not really looking for a solution, I am looking for an explanatiom what is going on here. Unfortunately, the router is now password-protected, so I can't take a look at the routing table.