Networking Forums

Networking Forums > Computer Networking > Linux Networking > Broadcast Address as Gateway

Reply
Thread Tools Display Modes

Broadcast Address as Gateway

 
 
Frank Lin
Guest
Posts: n/a

 
      06-20-2005, 06:32 AM
Is it possible/are there any methods to use a broadcast address as gateways?

Say,

ifconfig dummy0 192.168.1.0
route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.1.255

Frank

 
Reply With Quote
 
 
 
 
Alexander Graf
Guest
Posts: n/a

 
      06-20-2005, 07:20 AM
Frank Lin wrote:

> Is it possible/are there any methods to use a broadcast address as
> gateways?
>
> Say,
>
> ifconfig dummy0 192.168.1.0
> route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.1.255
>
> Frank

NO, broadcast is for example needed to ask for MAC addresses.
 
Reply With Quote
 
James Knott
Guest
Posts: n/a

 
      06-20-2005, 11:53 AM
Frank Lin wrote:

> Is it possible/are there any methods to use a broadcast address as
> gateways?
>
> Say,
>
> ifconfig dummy0 192.168.1.0
> route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.1.255


No. Broadcast and gateway are two entirely different functions. If you
used the same address for both, *EVERY* packet sent to the internet would
be received by every computer on the network. While they may ignore it,
they still have to deal with it.

Why would you want to?

 
Reply With Quote
 
James Knott
Guest
Posts: n/a

 
      06-20-2005, 12:07 PM
<posted & mailed>
Please don't ask for mailed replies in this manner.

Asked in the newsgroup, answered in the newsgroup.



Alexander Graf wrote:

> NO, broadcast is for example needed to ask for MAC addresses.


Different broadcast. There are two types of broadcasts on the local
network. One is for the network techology, such as ethernet. This is the
type of broadcast used by ARP, to determine an IP address. This type of
broadcast does not use an IP address and in fact, can be used for protocols
other than IP. Then there's the IP broadcast address, which is sent to all
IP devices on the same subnet. This broadcast address is determined by the
network IP address and subnet mask.

 
Reply With Quote
 
Frank Lin
Guest
Posts: n/a

 
      06-20-2005, 01:18 PM
James Knott wrote:

> Frank Lin wrote:
>
>> Is it possible/are there any methods to use a broadcast address as
>> gateways?
>>
>> Say,
>>
>> ifconfig dummy0 192.168.1.0
>> route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.1.255

>
> No. Broadcast and gateway are two entirely different functions. If you
> used the same address for both, *EVERY* packet sent to the internet would
> be received by every computer on the network. While they may ignore it,
> they still have to deal with it.
>
> Why would you want to?


Well, just had a thought on this hypothetical situation -- (not in real
practice)

A computer on 192.168.1.x wants to send packets to 192.168.2.x and the exact
gateway IP address on 192.168.1.x cannot be ascertained (say obtained from
DHCP and change from time to time).

 
Reply With Quote
 
James Knott
Guest
Posts: n/a

 
      06-20-2005, 04:33 PM
Frank Lin wrote:

>> Why would you want to?

>
> Well, just had a thought on this hypothetical situation -- (not in real
> practice)
>
> A computer on 192.168.1.x wants to send packets to 192.168.2.x and the
> exact gateway IP address on 192.168.1.x cannot be ascertained (say
> obtained from DHCP and change from time to time).


DHCP is primarily used to assign an IP address and in the process, can also
provide gateway, DNS and other info. If the IP address of the gateway
etc., is changed, that should be propagated to the clients by DHCP.


 
Reply With Quote
 
Moe Trin
Guest
Posts: n/a

 
      06-21-2005, 01:58 AM
In the Usenet newsgroup comp.os.linux.networking, in article
<rqzte.20326$(E-Mail Removed)>, Frank Lin wrote:

>Well, just had a thought on this hypothetical situation -- (not in real
>practice)
>
>A computer on 192.168.1.x wants to send packets to 192.168.2.x and the exact
>gateway IP address on 192.168.1.x cannot be ascertained (say obtained from
>DHCP and change from time to time).


The person who set up the DHCP server needs to learn about how computers
work. The person who designed the network in the first place should go
back to his day job at MacBurger-in-a-box.

Dynamic addressing was designed for the situation where there are to many
computers, and not enough IP addresses. See RFC0951, RFC1542, RFC2131 from
any Internet mirror. When RFC1597 (replaced by RFC1918) came out, this
reason for dynamic addressing disappeared. Others have adopted DHCP to
"simplify" setting up computers, but this depends on finding someone who
knows how to set up a DHCP server.

The correct solution is to shoot the fool that designed the network, along
with the one who misconfigured the DHCP server. Servers and routers
should NEVER be using dynamic addresses. DHCP is a bad enough security
risk (read section "Security Considerations" in the RFCs above), without
the addition of people "improving" it to a guaranteed security problem.

Old guy
 
Reply With Quote
 
James Knott
Guest
Posts: n/a

 
      06-21-2005, 02:25 AM
Moe Trin wrote:

> Dynamic addressing was designed for the situation where there are to many
> computers, and not enough IP addresses. See RFC0951, RFC1542, RFC2131
> from
> any Internet mirror. When RFC1597 (replaced by RFC1918) came out, this
> reason for dynamic addressing disappeared. Others have adopted DHCP to
> "simplify" setting up computers, but this depends on finding someone who
> knows how to set up a DHCP server.
>


Gee... That's the first time I've heard that one. Everything I've read on
the subject indicates that the purpose of DHCP was to simplify
configuration of the computer. Just plug it in and go, instead of keeping
track of and setting the IP address manually for each computer. Manual
configuration is easy, if you've got only a few computers. You don't want
to do that, if you're working in a building with over four thousand
employees, most of whom have computers, as I have.

Also, in many situations, the DHCP lease times are long enough, that they're
virtually permanent. For example, with my ISP, the lease is 7 days. This
means that I "own" my address, unless I turn my firewall off for more than
the time. So in this instance, DHCP is not used to conserve addresses.

 
Reply With Quote
 
Moe Trin
Guest
Posts: n/a

 
      06-22-2005, 02:02 AM
In the Usenet newsgroup comp.os.linux.networking, in article
<f96dnf24MP8I5yrfRVn-(E-Mail Removed)>, James Knott wrote:

>Gee... That's the first time I've heard that one. Everything I've read on
>the subject indicates that the purpose of DHCP was to simplify
>configuration of the computer. Just plug it in and go, instead of keeping
>track of and setting the IP address manually for each computer.


It's in the original RFC1531 document. I can't find my notes, but
the original concept came from a university (in Pennsylvania? not sure)
that expected it to be a major problem for them.

>Manual configuration is easy, if you've got only a few computers. You
>don't want to do that, if you're working in a building with over four
>thousand employees, most of whom have computers, as I have.


What operating system? I've got 1800 *nix boxes here, all with manual
configurations. It adds about a half minute to the setup of each host,
but as these are usually only set up once - it's not a problem. On the
rare occasion when we have a computer move from one subnet to another,
the PFY who physically moves the system can do that. The old and new
addresses and/or hostname is on the work order. Or someone from the hell
desk can log in over the net and change the appropriate config files
remotely so it will come up with the right address when it restarts after
the move.

If you have computers wandering in and out, DHCP might be a reasonable
solution, but we don't allow that. Likewise, if your users have super
user or admin privileges on the boxes, it could be a problem, but I'd
suspect there are bigger problems you have to solve in that case.

>Also, in many situations, the DHCP lease times are long enough, that they're
>virtually permanent. For example, with my ISP, the lease is 7 days. This
>means that I "own" my address, unless I turn my firewall off for more than
>the time. So in this instance, DHCP is not used to conserve addresses.


No, DHCP is the only solution for consumer situations like ISPs where the
customer is already outside their envelope just trying to figure out how
to plug in the power cord, never mind connecting something as complex as
an Ethernet cable. But the O/P wasn't talking about that situation. His
situation is a network where no one can spell IP, let alone understand how
to set it up. They were going to have the routers configured by DHCP,
something that the RFC specifically recommends NOT doing. In that case,
they'd be better to turn the router into a transparent bridge, and use
RFC3927 to set up networking. That's why microsoft pushed for seven years
to get that mechanism adopted.

Old guy
 
Reply With Quote
 
James Knott
Guest
Posts: n/a

 
      06-22-2005, 11:54 AM
Moe Trin wrote:

> What operating system? I've got 1800 *nix boxes here, all with manual
> configurations. It adds about a half minute to the setup of each host,
> but as these are usually only set up once - it's not a problem.


A real mixture. There was OS/2, Windows, AIX, VM/MVS and probably a few
others. This was in IBM Canada HQ.

> If you have computers wandering in and out, DHCP might be a reasonable
> solution, but we don't allow that. Likewise, if your users have super
> user or admin privileges on the boxes, it could be a problem, but I'd
> suspect there are bigger problems you have to solve in that case.


When I started there, everything was static, but there was a gradual move to
DHCP. There were a lot of people coming and going. Many of the employees
had ThinkPads.

> No, DHCP is the only solution for consumer situations like ISPs where the
> customer is already outside their envelope just trying to figure out how
> to plug in the power cord, never mind connecting something as complex as
> an Ethernet cable.


I had a static IP, with my first ISP. This was back in the days of dial up
& SLIP.

> But the O/P wasn't talking about that situation. His
> situation is a network where no one can spell IP, let alone understand how
> to set it up. They were going to have the routers configured by DHCP,
> something that the RFC specifically recommends NOT doing.


I agree that routers, servers etc shouldn't have temporary DHCP addresses.
However, it is possible, though not recommended to permanently assign a
DHCP address to a device.


 
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
DHCP gives client address but no gateway address mheymann Windows Networking 4 06-09-2006 12:29 PM
Broadcast Address Dan Linux Networking 1 03-02-2005 06:22 AM
Weird dhcp broadcast address Bill Unruh Linux Networking 1 05-29-2004 10:38 AM



1 2 3 4 5 6 7 8 9 10 11