LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-08-2015, 09:40 PM   #1
willc86
Member
 
Registered: Dec 2014
Posts: 56

Rep: Reputation: Disabled
simple networking question


hello everyone, pretty sure this is a dumb question, but I was wondering if it is possible to find the gateway of a given ip?

lets say 131.22.111.111/22 (fake ip)

the reason i ask is i had to set up the printer at a room manually, and I had to add in the subnet mask and the gateway.

I pretty much went to a windows machine from my office to get the gateway and added that gateway address 131.22.1.64. lets say the office room had a subnet of 131.22.90.x

however, when i added it to the printer, turned out the gate way was different. turned out the gateway was 131.22.1.22
and lets say this room had a subnet of 131.22.80.x

what determines the gateway? if the network is 131.22.0.0/22, shouldnt it be same gateway no matter which room? why wouldnt the printer work with the gateway of the office?
(using fake ip addresses)

to add on, we are using a linux dns server
 
Old 05-08-2015, 09:56 PM   #2
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,879

Rep: Reputation: 644Reputation: 644Reputation: 644Reputation: 644Reputation: 644Reputation: 644
No.
The gateway is completely arbitrary and unrelated to network/netmask.
"Usually" (on soho router setups) it is a member of the subnet but that's not necessary.
 
Old 05-09-2015, 12:13 AM   #3
shockingbehavur
LQ Newbie
 
Registered: May 2015
Posts: 17

Rep: Reputation: 0
simple networking question

for starters a print server will be needed use it that way the print server looks similar to an internet router/modem and the printer will get shared this way
 
Old 05-12-2015, 07:38 PM   #4
MikeDeltaBrown
Member
 
Registered: Apr 2013
Location: Arlington, WA
Distribution: Slackware
Posts: 96

Rep: Reputation: 10
The only time a gateway is needed is for communication with hosts that are not on the local sub-net. As long as the IP address and netmask are correct, the printer should work with computers that are "local". If your office is part of a large company, you may have VLANs separating different business segments (ie. finance, HR, engineering, production). If this is the case then you would need the correct gateway address for computer outside your local subnet to work with your printer but computers inside your local subnet would work.

To clarify what decendant_command wrote, a gateway _does_ need to be on the subnet. Otherwise your computer (or printer) wouldn't know how to get to it. More technically, the gateway must be a member of the same broadcast domain as the hosts it services.

The gateway (address) is determined by the network administrator during design. Usually it is the lowest or highest address in the broadcast domain. For the case of 131.22.111.111/22:
Network address (unusable): 131.22.108.0
Possible Gateway addr (low): 131.22.108.1
Possible Gateway addr (hi): 131.22.111.254
Broadcast addr: 131.22.111.255

It looks to me that multiple broadcast domains are being used. Maybe you should talk to your network administrator.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple networking question scoop_yo Slackware 5 05-12-2008 12:21 PM
simple networking question ruwach Linux - Networking 5 08-02-2004 07:25 AM
Simple Networking Question Kroenecker Linux - Networking 3 07-15-2004 08:25 AM
simple samba and networking question seriv Linux - Newbie 6 07-28-2003 10:50 AM
simple question: where do the networking settings locate? gsbarry Linux - Networking 1 02-08-2003 12:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration