Networking Forums

Networking Forums > Computer Networking > Linux Networking > TCP/IP gurus, please help! Can this be a valid gateway address?

Reply
Thread Tools Display Modes

TCP/IP gurus, please help! Can this be a valid gateway address?

 
 
HisNameWasRobertPaulson
Guest
Posts: n/a

 
      09-12-2003, 02:15 AM
I am stumped by this one so, I will get right to it:

Ip address: 68.2.20.180
Netmask: 255.255.252.0
Gateway: 68.14.232.1

Can this be a valid gateway? I say no, simply because this gateway
(host) does not reside on this network. But, my buddy has cable and
says that this is his current working configuration... how can this
be?

Thanks for any answers!
+++
-Mike
 
Reply With Quote
 
 
 
 
alt
Guest
Posts: n/a

 
      09-12-2003, 04:25 AM
HisNameWasRobertPaulson wrote:

> I am stumped by this one so, I will get right to it:
>
> Ip address: 68.2.20.180
> Netmask: 255.255.252.0
> Gateway: 68.14.232.1
>
> Can this be a valid gateway? I say no, simply because this gateway
> (host) does not reside on this network. But, my buddy has cable and
> says that this is his current working configuration... how can this
> be?
>
> Thanks for any answers!
> +++
> -Mike


no. the first two octets would have to be 68.2 at least. The valid IP range
relative to your IP Address is 68.2.20.0 to 68.2.23.255

--
Donovan Hill
 
Reply With Quote
 
Jem Berkes
Guest
Posts: n/a

 
      09-12-2003, 04:32 AM
> Ip address: 68.2.20.180
> Netmask: 255.255.252.0
> Gateway: 68.14.232.1
>
> Can this be a valid gateway? I say no, simply because this gateway
> (host) does not reside on this network. But, my buddy has cable and
> says that this is his current working configuration... how can this
> be?


Totally possible. My IP is 142.161.x.x and my gateway is 205.200.x.x

This simply means that IP packets that can't be delivered locally are sent
out the Internet pipe destined to the gateway; the Internet connection is
the ISP's anyway and they can let you reach a different 'network' address
if the want.
 
Reply With Quote
 
David Efflandt
Guest
Posts: n/a

 
      09-12-2003, 05:39 AM
On 11 Sep 2003, HisNameWasRobertPaulson <(E-Mail Removed)> wrote:
> I am stumped by this one so, I will get right to it:
>
> Ip address: 68.2.20.180
> Netmask: 255.255.252.0
> Gateway: 68.14.232.1
>
> Can this be a valid gateway? I say no, simply because this gateway
> (host) does not reside on this network. But, my buddy has cable and
> says that this is his current working configuration... how can this
> be?


A gateway does not have to be in the same network. My adsl ISP uses a
netmask of 255.255.255.255, so there is no local network on that
connection, just local IP and remote IP (gw). It is just that if you do
that with static IPs, you need to set a host route to the gw IP before
you can use it as a gw:

> /sbin/ifconfig ppp0

ppp0 Link encap:Point-to-Point Protocol
inet addr:68.20.32.39 P-t-P:68.20.39.254 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:556982 errors:0 dropped:0 overruns:0 frame:0
TX packets:623069 errors:0 dropped:2 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:144034347 (137.3 Mb) TX bytes:54424260 (51.9 Mb)

> /sbin/route -n

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
68.20.39.254 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 68.20.39.254 0.0.0.0 UG 0 0 0 ppp0

Note that eth1 used for pppoe does not show in routing table because I
just set it to an unused private IP with 255.255.255.255 netmask (because
its ethernet IP is not really used for anything).

Also note that while both these IPs are within the 68.20.32.0 -
68.20.39.255 block of that Redback, a dialup example shows that they do
not necessarily have to be:

Jul 17 08:36:56 wireless1 pppd[8036]: local IP address 67.73.173.94
Jul 17 08:36:56 wireless1 pppd[8036]: remote IP address 209.244.31.161

--
David Efflandt - All spam ignored http://www.de-srv.com/
http://www.autox.chicago.il.us/ http://www.berniesfloral.net/
http://cgi-help.virtualave.net/ http://hammer.prohosting.com/~cgi-wiz/
 
Reply With Quote
 
Neil Horman
Guest
Posts: n/a

 
      09-12-2003, 12:19 PM
HisNameWasRobertPaulson wrote:
> I am stumped by this one so, I will get right to it:
>
> Ip address: 68.2.20.180
> Netmask: 255.255.252.0
> Gateway: 68.14.232.1
>
> Can this be a valid gateway? I say no, simply because this gateway
> (host) does not reside on this network. But, my buddy has cable and
> says that this is his current working configuration... how can this
> be?
>
> Thanks for any answers!
> +++
> -Mike


I think that you can do this, but its a little wierd to do. Makes
sense, though, since the cable and phone companies tend to do wierd
things on their networks for one reason or another most of the time.
The long and the short of it is, you can have many static routes, each
specifying a next hop gateway in your route table, and I think you can
even have a default gateway that does not reside on your local subnet,
but if you do, then you must have either:

a) a route entry to specify the next hop address for every other host on
the network you may want to connect to (not really practical )

b) a route entry specifying the next hop address to reach the default
gateway - a gateway to the gateway so to speak. (wierd, but valid)

Traditionally of course, a default gateway resides on the same subnet
that a host which uses that gateway does, for reason that, well, make
sense. I don't know why the cable or phone companies would make this
more complicated then it needs to be, but then again, I don't understand
why the phone company pays b-list celebrities (and ALF) to tell us that
calling someone collect saves cash for everyone involved

HTH
Neil

--
/************************************************** *
*Neil Horman
*Software Engineer
*Red Hat, Inc.
*(E-Mail Removed)
************************************************** */

 
Reply With Quote
 
James Knott
Guest
Posts: n/a

 
      09-12-2003, 12:28 PM
Jem Berkes wrote:

>> Ip address: 68.2.20.180
>> Netmask: 255.255.252.0
>> Gateway: 68.14.232.1
>>
>> Can this be a valid gateway? I say no, simply because this gateway
>> (host) does not reside on this network. But, my buddy has cable and
>> says that this is his current working configuration... how can this
>> be?

>
> Totally possible. My IP is 142.161.x.x and my gateway is 205.200.x.x
>
> This simply means that IP packets that can't be delivered locally are sent
> out the Internet pipe destined to the gateway; the Internet connection is
> the ISP's anyway and they can let you reach a different 'network' address
> if the want.



And how does the computer know where to send the packet? It uses the
gateway to forward the packet, but it won't recognize that gateway as
valid.

--

Fundamentalism is fundamentally wrong.

To reply to this message, replace everything to the left of "@" with
james.knott.
 
Reply With Quote
 
James Knott
Guest
Posts: n/a

 
      09-12-2003, 12:29 PM
Your example, is a ppp connection, where the other end of the connection is
on a different network.


David Efflandt wrote:

> On 11 Sep 2003, HisNameWasRobertPaulson <(E-Mail Removed)> wrote:
>> I am stumped by this one so, I will get right to it:
>>
>> Ip address: 68.2.20.180
>> Netmask: 255.255.252.0
>> Gateway: 68.14.232.1
>>
>> Can this be a valid gateway? I say no, simply because this gateway
>> (host) does not reside on this network. But, my buddy has cable and
>> says that this is his current working configuration... how can this
>> be?

>
> A gateway does not have to be in the same network. My adsl ISP uses a
> netmask of 255.255.255.255, so there is no local network on that
> connection, just local IP and remote IP (gw). It is just that if you do
> that with static IPs, you need to set a host route to the gw IP before
> you can use it as a gw:
>
>> /sbin/ifconfig ppp0

> ppp0 Link encap:Point-to-Point Protocol
> inet addr:68.20.32.39 P-t-P:68.20.39.254 Mask:255.255.255.255
> UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
> RX packets:556982 errors:0 dropped:0 overruns:0 frame:0
> TX packets:623069 errors:0 dropped:2 overruns:0 carrier:0
> collisions:0 txqueuelen:3
> RX bytes:144034347 (137.3 Mb) TX bytes:54424260 (51.9 Mb)
>
>> /sbin/route -n

> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use Iface
> 68.20.39.254 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
> 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
> 0.0.0.0 68.20.39.254 0.0.0.0 UG 0 0 0 ppp0
>
> Note that eth1 used for pppoe does not show in routing table because I
> just set it to an unused private IP with 255.255.255.255 netmask (because
> its ethernet IP is not really used for anything).
>
> Also note that while both these IPs are within the 68.20.32.0 -
> 68.20.39.255 block of that Redback, a dialup example shows that they do
> not necessarily have to be:
>
> Jul 17 08:36:56 wireless1 pppd[8036]: local IP address 67.73.173.94
> Jul 17 08:36:56 wireless1 pppd[8036]: remote IP address 209.244.31.161
>


--

Fundamentalism is fundamentally wrong.

To reply to this message, replace everything to the left of "@" with
james.knott.
 
Reply With Quote
 
Clifford Kite
Guest
Posts: n/a

 
      09-12-2003, 01:22 PM
David Efflandt <(E-Mail Removed)> wrote:
> On 11 Sep 2003, HisNameWasRobertPaulson <(E-Mail Removed)> wrote:
>> I am stumped by this one so, I will get right to it:
>>
>> Ip address: 68.2.20.180
>> Netmask: 255.255.252.0
>> Gateway: 68.14.232.1
>>
>> Can this be a valid gateway? I say no, simply because this gateway
>> (host) does not reside on this network. But, my buddy has cable and
>> says that this is his current working configuration... how can this
>> be?


> A gateway does not have to be in the same network. My adsl ISP uses a
> netmask of 255.255.255.255, so there is no local network on that
> connection, just local IP and remote IP (gw). It is just that if you do
> that with static IPs, you need to set a host route to the gw IP before
> you can use it as a gw:


>> /sbin/ifconfig ppp0

> ppp0 Link encap:Point-to-Point Protocol
> inet addr:68.20.32.39 P-t-P:68.20.39.254 Mask:255.255.255.255
> UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
> RX packets:556982 errors:0 dropped:0 overruns:0 frame:0
> TX packets:623069 errors:0 dropped:2 overruns:0 carrier:0
> collisions:0 txqueuelen:3
> RX bytes:144034347 (137.3 Mb) TX bytes:54424260 (51.9 Mb)


>> /sbin/route -n

> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use Iface
> 68.20.39.254 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
> 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
> 0.0.0.0 68.20.39.254 0.0.0.0 UG 0 0 0 ppp0


Here is an example of how to add a gateway to a non-PPP, non-local network:

corncob:~# route add 172.16.16.16/32 dummy0
corncob:~# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.16.16.16 * 255.255.255.255 UH 0 0 0 dummy0
192.168.0.0 * 255.255.255.0 U 0 0 0 dummy0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo

corncob:~# route add default gw 172.13.13.13 dummy0
corncob:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.16.16.16 0.0.0.0 255.255.255.255 UH 0 0 0 dummy0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 dummy0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 172.13.13.13 0.0.0.0 UG 0 0 0 dummy0

corncob:~# ifconfig
dummy0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1135 errors:0 dropped:0 overruns:0 frame:0
TX packets:1135 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0

--
Clifford Kite Email: "echo xvgr_yvahk-(E-Mail Removed)|rot13"
PPP-Q&A links, downloads: http://ckite.no-ip.net/
/* They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety." Benjamin Franklin */

 
Reply With Quote
 
Jem Berkes
Guest
Posts: n/a

 
      09-12-2003, 02:45 PM
>> Totally possible. My IP is 142.161.x.x and my gateway is 205.200.x.x
>>
>> This simply means that IP packets that can't be delivered locally are
>> sent out the Internet pipe destined to the gateway; the Internet
>> connection is the ISP's anyway and they can let you reach a different
>> 'network' address if the want.

>
>
> And how does the computer know where to send the packet? It uses the
> gateway to forward the packet, but it won't recognize that gateway as
> valid.


The netmasks define what is local and what isn't. In my case the netmask is
255.255.255.255, so that 205.200 address can be "reached" even from my
current IP of 142.161. Since I "dial-in" (ADSL) the terminal server takes
care of the actual packet work; you probably wouldn't see something like
this happen on an ethernet connected to IP routers.
 
Reply With Quote
 
Clifford Kite
Guest
Posts: n/a

 
      09-12-2003, 03:16 PM
Clifford Kite <(E-Mail Removed)> wrote:

> Here is an example of how to add a gateway to a non-PPP, non-local network:


> corncob:~# route add 172.16.16.16/32 dummy0
> corncob:~# route
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use Iface
> 172.16.16.16 * 255.255.255.255 UH 0 0 0 dummy0
> 192.168.0.0 * 255.255.255.0 U 0 0 0 dummy0
> 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo


> corncob:~# route add default gw 172.13.13.13 dummy0

^^^^^^^^
That's what I get for trying to change this by hand to show a private
network rather than the actual one above that popped into my head.

> corncob:~# route -n
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use Iface
> 172.16.16.16 0.0.0.0 255.255.255.255 UH 0 0 0 dummy0
> 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 dummy0
> 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
> 0.0.0.0 172.13.13.13 0.0.0.0 UG 0 0 0 dummy0

^^^^^^^^ And again!

> corncob:~# ifconfig
> dummy0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
> inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
> UP BROADCAST RUNNING NOARP MTU:1500 Metric:1
> RX packets:0 errors:0 dropped:0 overruns:0 frame:0
> TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:0


> lo Link encap:Local Loopback
> inet addr:127.0.0.1 Mask:255.0.0.0
> UP LOOPBACK RUNNING MTU:16436 Metric:1
> RX packets:1135 errors:0 dropped:0 overruns:0 frame:0
> TX packets:1135 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:0


--
Clifford Kite Email: "echo xvgr_yvahk-(E-Mail Removed)|rot13"
PPP-Q&A links, downloads: http://ckite.no-ip.net/
/* Bluffing in a poker game can win big; bluffing in a newsgroup
only attracts sharks. */
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
My Router does not accept a gateway ip that has a subnet address different from the laptop ip address keethyanandpr@gmail.com Wireless Internet 15 03-18-2007 04:03 PM
How to get default Gateway address, subnet address, DNS names using C/C++ Matrixinline Linux Networking 2 01-11-2007 04:32 AM
new to wifi - I have no valid ip address,.. ray Windows Networking 0 09-15-2006 12:27 PM
DHCP gives client address but no gateway address mheymann Windows Networking 4 06-09-2006 12:29 PM
Does SMTP need valid FROM address? Terry Pinnell Broadband 12 05-28-2004 02:29 PM



1 2 3 4 5 6 7 8 9 10 11