[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to figure out the gateway number?

On Thu, Oct 23, 2003 at 09:52:22AM -0700, Andrew Kasza wrote:
| I have debian 3.0. I have to change the configuration
| of network
| (I mean I have to change IP, netmask and so on).
| I know my IP address, netmask, broadcast.


| Is there a way to figure out the network

Yep.  In fact, the method is so straight forward that you don't need
to specify these in the config file.

If you understand subnetting, the network address is the first one in
the subnet, and the broadcast is the last one.  Eg for a host in a /24 CIDR network (equivalent to the old "Class C"
designation) the network address is and the broadcast is  (the netmask for a /24 is, btw)

| and gateway number?

Ask the network admin.  There is no other way to know which node is
the gateway.  (DHCP is essentially the same as asking the network
admin, just in an automated, impersonal, way)  *Often* the address
after the network address (eg in the above example) is the
gateway, but that is just a typical method of operation and there are
no guarantees or requirements.  I can tell you, though, if your
network is using a Linksys "broadband router", then the linksys device
has address .1, and it is most likely actually being used as the
gateway.  (linksys' firmware doesn't allow you to give it a different

| Is it enough to do the following three steps?:
| 1step 'ifdown --all'
| 2step
| ' to change the file /etc/network/interfaces'
| 3step 'ifup --all'

Yes.  Or you could just take down the one interface you need to


Only two things are infinite, the universe and human stupidity, and I'm
not sure about the former.
        Albert Einstein

Attachment: pgpko8Bb92l5g.pgp
Description: PGP signature

Reply to: