473,586 Members | 2,839 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Gateway of Different subnet?

usafshah
104 New Member
is it possible to have default gateway of different subnet from IP?

Like IP: 192.168.0.154
G/W: 192.168.16.1


will it work? please explain in both cases


Thanks in advance.
Nov 15 '07 #1
3 9506
AHMEDYO
112 New Member
HI...

I think and im not sure your gateway must be found withing your Switch MAC Addresses table (Can resolve using ARP), and if you plug your Machine withing switch this switch must have MAC address for your gateway, thats mean no problem if different subnet or not, may be you have router have 2 IPs from two different subnets in same interface that pluged to your switch, you can use any IP as gateway, you cant use gateway that metric greater that 1,just your gateway cant be after 1 hop
that i think

Good Luck
Nov 16 '07 #2
usafshah
104 New Member
Thanks for your response,

I have a cable modem and my pc is connected with it. so no switch etc, My pc gets IP automatically from cable modem(may be from isp or whatever) let me show you the ip and gateway that has been assigned to comp.

82.8.51.173 / 22
mask: 255.255.252.0
gateway: 82.8.48.1


is the gateway IP different than the machine IP? because the subnet mask is not /24 i'm not good at subnets
Nov 16 '07 #3
Scotter
80 New Member
Thanks for your response,

I have a cable modem and my pc is connected with it. so no switch etc, My pc gets IP automatically from cable modem(may be from isp or whatever) let me show you the ip and gateway that has been assigned to comp.

82.8.51.173 / 22
mask: 255.255.252.0
gateway: 82.8.48.1


is the gateway IP different than the machine IP? because the subnet mask is not /24 i'm not good at subnets

Yeah, thats your public IP address, and your gateway is you ISP's router. the gateway is like the address your computer sends traffic to that it doesn't know where it is, like google.com isn't on your local network, so it forwards traffic to the gateway, so the gateway can find it. the /22 mask is used to give 1022 addresses on a subnet, instead of the normal 254. but yes, your computer and gateway are on the same subnet.
Dec 3 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
19972
by: ohynes | last post by:
hey newbie here wondering if there is anyone out there who can help me im trying to make a c# subnet calulator using the IPAddress class i cant seem to figure out how to do all the subnet calculations now i can do them on paper but thats about it just starting to learn c sharp
2
1089
by: pcserver | last post by:
I would like to ask which class should i use for getting my PC's gateway ip and can send an email to smtp?thanks I am going to write a program that will check my pc gateway regularly, and send an email if the ip has been changed.
0
1313
by: jonhrs | last post by:
Hi, I am trying to find/write some vb.net code which will attain the default gateway of a server. This app will access a cross section of server platforms from NT4.0 server to Windows 2003 and check that they are using the correct time source (which in most cases, is the DG, except in our datacentres!) Unfortunately, I am unable to do...
0
1802
by: pmclinn | last post by:
How do you grab a users default gateway? Connection-specific DNS Suffix . : ksde.local IP Address. . . . . . . . . . . . : 10.117.161.108 Subnet Mask . . . . . . . . . . . : 255.255.248.0 Default Gateway . . . . . . . . . : 10.117.160.254
8
4350
by: google_groups3 | last post by:
Below is a snippet of code I am using. I want to set the IP, subnet and default gateway of my local computer via code. However, when I do it, I get a "not found" (error number 5) error on the default gateway line. Dim GateArray() As String = {"99.99.99.1"} 'Array Dim inPar As ManagementBaseObject = Nothing Dim outPar As...
1
1779
by: Terry Olsen | last post by:
Is there an "elegant" way to determine if an IP address is on my subnet? Or do I just compare the first 2 or 3 octets?
4
5126
by: Morten Fagermoen | last post by:
Hi! I try to get the subnet location info using the code below found at http://msdn2.microsoft.com/en-us/library/system.directoryservices.activedirectory.activedirectorysubnet.location.aspx. But it only tells me that "instance" is used before it has been assigned a value. Can anyone tell me what to do to get my subnet location info? ...
18
2377
by: Grant Edwards | last post by:
Could whoever is responsible for the gateway that is grabbing my postings off of Usenet and e-mailing them out please fix the headers in the mail messages so that I don't get the bounce messages? While you're at it, might as well fix it for everybody else too. ;) Its a bit rude to send out mass e-mail messages with headers faked up so...
1
2135
by: =?Utf-8?B?Q2FybG9z?= | last post by:
Guys, I have a little problem here. I have an AD domain with one DC and 2 other member servers and when I go to My Network Places and browse the network, I can seamless see a list of all workstations (my 2 member servers and my single DC) and servers. The network IP is 10.10.10.0/24 I have a second VLAN, 10.10.20.0/24 where I have another...
0
7911
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7839
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8200
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8338
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7954
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8215
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
3836
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1448
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.