Welcome to Soft32 Linux Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Problems setting up DNS, gateway und subnetmask!

 
   Soft32 Home -> Linux2 Arch -> Setup RSS
Next:  QMail relaying with firewall  
Author Message
Tamer Higazi

External


Since: Mar 09, 2006
Posts: 4



(Msg. 1) Posted: Tue Dec 27, 2005 8:10 pm
Post subject: Problems setting up DNS, gateway und subnetmask!
Archived from groups: comp>os>linux>setup (more info?)

Hi!
I have received from my ISP an IP, DNS, Subnetmask and the DNS
Serverentries to add to my ubuntu linux machine

My interfaces File /etc/network/interfaces:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0

# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
mapping hotplug
script grep
map eth0

# The primary network interface


auto eth0

iface eth0 inet static
address 81.10.53.22
netmask 255.255.255.252
gateway 10.0.0.138
dns-search lan
dns-nameservers 163.121.128.134 212.103.160.18

My File /etc/hosts:

127.0.0.1 localhost.localdomain localhost ubuntu
# The following lines are desirable for IPv6 capable hosts
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

If I enter the command route:

Kernel IP Routentabelle
Ziel Router Genmask Flags Metric Ref Use Iface
81.10.53.20 * 255.255.255.252 U 0 0 0 eth0

If I run explicitly this command to add the gateway to my eth0 interface:


sudo route add default gateway 10.0.0.138 eth0

I receive this errormessage:
SIOCADDRT: Das Netzwerk ist nicht erreichbar (Network unreachable)


For any help solving my problem, thanks in advance

Tamer
Back to top
Login to vote
Moe Trin

External


Since: Dec 26, 2004
Posts: 1120



(Msg. 2) Posted: Wed Dec 28, 2005 7:46 am
Post subject: Re: Problems setting up DNS, gateway und subnetmask! [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Wed, 28 Dec 2005, in the Usenet newsgroup comp.os.linux.setup, in article
<43b1d7dc$0$3797$9b4e6d93@newsread2.arcor-online.net>, Tamer Higazi wrote:

>I have received from my ISP an IP, DNS, Subnetmask and the DNS
>Serverentries to add to my ubuntu linux machine

The information is wrong.

>iface eth0 inet static
>address 81.10.53.22
>netmask 255.255.255.252

Looking at RFC1878, that mask says there are four IP addresses on this
segment:

81.10.53.20 "Network" address - probably not usable for a host
81.10.53.21
81.10.53.22
81.10.53.23 "Broadcast" address - not usable

>gateway 10.0.0.138

And how does one reach that address? It is not one of the four addresses
noted above.

>My File /etc/hosts:

Generally, it is a good idea to list the IP address of "this" host, so it
can boot properly if the name server is not reachable.

>If I enter the command route:

Yes

>sudo route add default gateway 10.0.0.138 eth0
>
>I receive this errormessage:
>SIOCADDRT: Das Netzwerk ist nicht erreichbar (Network unreachable)

Yes - because you can not reach 10.0.0.138 from 81.10.53.20/28. The
gateway MUST be on the "local" interface (which _probably_ means it
is 81.10.53.21).

Old guy
Back to top
Login to vote
slackware guy

External


Since: Dec 22, 2005
Posts: 22



(Msg. 3) Posted: Wed Dec 28, 2005 8:00 am
Post subject: Re: Problems setting up DNS, gateway und subnetmask! [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Following up on Old guy's post, the other available address
(81.10.53.21) must be a machine that has the routing information to
your gateway otherwise you are stuck.

If you can ping that address, then find out from you ISP that is the
gateway for your network segment and if not they need to give you the
correct configuration or they need to verify the information you have.
It is possible you may have have a typographical error ('typo').
Back to top
Login to vote
Enrique Perez-Terron

External


Since: Nov 15, 2005
Posts: 322



(Msg. 4) Posted: Wed Dec 28, 2005 11:39 am
Post subject: Re: Problems setting up DNS, gateway und subnetmask! [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Wed, 28 Dec 2005 01:10:04 +0100, Tamer Higazi <no.TakeThisOut@email.de> wrote:

> Hi!
> I have received from my ISP an IP, DNS, Subnetmask and the DNS
> Serverentries to add to my ubuntu linux machine
>
> My interfaces File /etc/network/interfaces:
[...]
> auto eth0
>
> iface eth0 inet static
> address 81.10.53.22
> netmask 255.255.255.252
> gateway 10.0.0.138
> dns-search lan
> dns-nameservers 163.121.128.134 212.103.160.18
>
> My File /etc/hosts:
>
> 127.0.0.1 localhost.localdomain localhost ubuntu
> # The following lines are desirable for IPv6 capable hosts
> fe00::0 ip6-localnet
> ff00::0 ip6-mcastprefix
> ff02::1 ip6-allnodes
> ff02::2 ip6-allrouters
> ff02::3 ip6-allhosts
>
> If I enter the command route:
>
> Kernel IP Routentabelle
> Ziel Router Genmask Flags Metric Ref Use Iface
> 81.10.53.20 * 255.255.255.252 U 0 0 0 eth0
>
> If I run explicitly this command to add the gateway to my eth0 interface:
>
>
> sudo route add default gateway 10.0.0.138 eth0
>
> I receive this errormessage:
> SIOCADDRT: Das Netzwerk ist nicht erreichbar (Network unreachable)

How come that you have a routable address for the linux machine, but
a non-routable gateway address?

Given the IP and mask of the card, it should be on a network
comprising the four addresses

81.10.53.20
81.10.53.21
81.10.53.22
81.10.53.23

where the first is considered the network as such (when is that used?
I never found out that) and the last one is the broadcast address for
that network. However, the gateway address is not part of that network,
and so the routing algorithm does not know how to reach it.

Even when the gateway is reachable, routing over it does not work (for
me, at least) unless you also add a host route.

sudo route add -host 10.0.0.138 eth0

I have never understood why this is required. I seems to indicate that
the usual mechanism for direct transmission is not used for gateways,
and so I suspect that it is actually possible to use a gateway that is
not on the same network at the configured IP address/mask, thanks
to the host route. You could try it, just execute the host route
command shown above, and see if a subsequent gateway command works.

Indeed, I just tried it on my computer, and it works. (Of course I could
not try sending anything over it, but the route add commands worked; I
could list the routes with netstat -rn.)

-Enrique
Back to top
Login to vote
Alan Adams

External


Since: Dec 10, 2005
Posts: 73



(Msg. 5) Posted: Thu Dec 29, 2005 5:01 pm
Post subject: Re: Problems setting up DNS, gateway und subnetmask! [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In message <slrndr5qsd.9c.ibuprofin.DeleteThis@compton.phx.az.us>
ibuprofin.DeleteThis@painkiller.example.tld (Moe Trin) wrote:

> On Wed, 28 Dec 2005, in the Usenet newsgroup comp.os.linux.setup, in article
> <43b1d7dc$0$3797$9b4e6d93@newsread2.arcor-online.net>, Tamer Higazi wrote:
>
> >I have received from my ISP an IP, DNS, Subnetmask and the DNS
> >Serverentries to add to my ubuntu linux machine

I *think* what you have is the information for connecting your machine via a
modem. You appear however to be using a router.

The interpretation, if my guess is correct is as follows:

On the WAN (ADSL or whatever) side of your router are two addresses -
81.10.53.21, and 81.10.53.22. One of these is your router's IP address for
the WAN interface, and the other is the remote end of the link. You don't
need to worry about these if your router is connecting.

On the LAN side of your router, i.e. the wiring between the router and your
machine, you are using the private network 10.0.0.x. For this to work your
machine needs to have an address in the 10.0.0.<1-254> range. The router is
10.0.0.138, so don't use that for your machine.

(For this network, the "official" subnet mask is 255.0.0.0, giving addresses
from 10.0.0.1 to 10.255.255.254. However you need to use the mask that is
set on the router, which may be different. Addresses below 10.0.0.254 will
work with any likely mask, provided the mask you set on your machine does
match that on the router.)

You may well find that the router is also the DNS server and DHCP server,
which simplifies things quite a lot.

I can't help you with the routing commands - I'm new to Linux myself.

>
> The information is wrong.
>
> >iface eth0 inet static
> >address 81.10.53.22
> >netmask 255.255.255.252
>
> Looking at RFC1878, that mask says there are four IP addresses on this
> segment:
>
> 81.10.53.20 "Network" address - probably not usable for a host
> 81.10.53.21
> 81.10.53.22
> 81.10.53.23 "Broadcast" address - not usable
>
> >gateway 10.0.0.138
>
> And how does one reach that address? It is not one of the four addresses
> noted above.
>
> >My File /etc/hosts:
>
> Generally, it is a good idea to list the IP address of "this" host, so it
> can boot properly if the name server is not reachable.
>
> >If I enter the command route:
>
> Yes
>
> >sudo route add default gateway 10.0.0.138 eth0
> >
> >I receive this errormessage:
> >SIOCADDRT: Das Netzwerk ist nicht erreichbar (Network unreachable)
>
> Yes - because you can not reach 10.0.0.138 from 81.10.53.20/28. The
> gateway MUST be on the "local" interface (which _probably_ means it
> is 81.10.53.21).
>
> Old guy

--
Alan Adams, from Northamptonshire
alan.adams.DeleteThis@orchard-way.freeserve.co.uk
http://www.nckc.org.uk/
Back to top
Login to vote
Moe Trin

External


Since: Dec 26, 2004
Posts: 1120



(Msg. 6) Posted: Fri Dec 30, 2005 8:15 am
Post subject: Re: Problems setting up DNS, gateway und subnetmask! [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Thu, 29 Dec 2005, in the Usenet newsgroup comp.os.linux.setup, in article
<772213e14d.Alan.Adams.RemoveThis@orchard-way.freeserve.co.uk>, Alan Adams wrote:

>On the LAN side of your router, i.e. the wiring between the router and your
>machine, you are using the private network 10.0.0.x. For this to work your
>machine needs to have an address in the 10.0.0.<1-254> range. The router is
>10.0.0.138, so don't use that for your machine.
>
>(For this network, the "official" subnet mask is 255.0.0.0, giving addresses
>from 10.0.0.1 to 10.255.255.254.

Couple of problems. Who is defining the "official" in the sentence above?
Are you assuming that because the address is between 0.0.0.0 and
127.255.255.255, this must use a 255.0.0.0 or /8? If so, have a look at
RFC1517 to RFC1519 from late 1993 - we're not using Class A, B, or C
address names any more. That would also be a 'network' mask, as putting
16,777,215 hosts on a single subnet is like trying to fit everyone in
London into a single airplane. It would be a very tight fit.

>However you need to use the mask that is set on the router, which may be
>different. Addresses below 10.0.0.254 will work with any likely mask,
>provided the mask you set on your machine does match that on the router.)

Yes, the masks have to match, but "any" likely mask? What about the
255.255.255.252 mask mentioned by the O/P?

>I can't help you with the routing commands - I'm new to Linux myself.

The routing commands actually used are detailed on the 'route' man page.

[compton ~]$ whatis route
route (Cool - show / manipulate the IP routing table
[compton ~]$

However each distribution has their own cute little tool designed to "help"
with networking setup - only problem is that each tool is very different
from those of other distributions. Also, networking is normally set up at
boot time by scripts and configuration files in /etc/ but as with the tools,
each distribution does it's own thing.

Old guy
Back to top
Login to vote
Alan Adams

External


Since: Dec 10, 2005
Posts: 73



(Msg. 7) Posted: Fri Dec 30, 2005 5:16 pm
Post subject: Re: Problems setting up DNS, gateway und subnetmask! [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In message <slrndrb5bm.rb8.ibuprofin.TakeThisOut@compton.phx.az.us>
ibuprofin.TakeThisOut@painkiller.example.tld (Moe Trin) wrote:

> On Thu, 29 Dec 2005, in the Usenet newsgroup comp.os.linux.setup, in article
> <772213e14d.Alan.Adams.TakeThisOut@orchard-way.freeserve.co.uk>, Alan Adams wrote:
>
> >On the LAN side of your router, i.e. the wiring between the router and your
> >machine, you are using the private network 10.0.0.x. For this to work your
> >machine needs to have an address in the 10.0.0.<1-254> range. The router is
> >10.0.0.138, so don't use that for your machine.
> >
> >(For this network, the "official" subnet mask is 255.0.0.0, giving addresses
> >from 10.0.0.1 to 10.255.255.254.
>
> Couple of problems. Who is defining the "official" in the sentence above?
> Are you assuming that because the address is between 0.0.0.0 and
> 127.255.255.255, this must use a 255.0.0.0 or /8? If so, have a look at
> RFC1517 to RFC1519 from late 1993 - we're not using Class A, B, or C
> address names any more. That would also be a 'network' mask, as putting
> 16,777,215 hosts on a single subnet is like trying to fit everyone in
> London into a single airplane. It would be a very tight fit.
>
> >However you need to use the mask that is set on the router, which may be
> >different. Addresses below 10.0.0.254 will work with any likely mask,
> >provided the mask you set on your machine does match that on the router.)
>
> Yes, the masks have to match, but "any" likely mask? What about the
> 255.255.255.252 mask mentioned by the O/P?

I was assuning, if it wasn't clear, that the 10.0.0.0 network was being
defined by the router. Routers, in my experience usually come set with a
class A or C network defined. (Either 10.0.0.0/8 or 192.168.x.0/24). It is
usual, though obviously not essential, to leave the router set and alter the
rest to match. You can of course alter the router to match your network,
provided you aren't using somebody else's network number, i.e. you need to
be on a private range.

The latter solution is simpler if you already have a network, but it can be
a little tricky to set the router up initially, or after a reset. Using
secondary addresses is the way I solve that one.

>
> >I can't help you with the routing commands - I'm new to Linux myself.
>
> The routing commands actually used are detailed on the 'route' man page.
>
> [compton ~]$ whatis route
> route (Cool - show / manipulate the IP routing table
> [compton ~]$
>
> However each distribution has their own cute little tool designed to "help"
> with networking setup - only problem is that each tool is very different
> from those of other distributions. Also, networking is normally set up at
> boot time by scripts and configuration files in /etc/ but as with the tools,
> each distribution does it's own thing.
>
> Old guy

--
Alan Adams, from Northamptonshire
alan.adams.TakeThisOut@orchard-way.freeserve.co.uk
http://www.nckc.org.uk/
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Problems setting up CUPS - I'm running FC5 and trying to set up CUPS for an HP DeskJet 812C. I have two problems. 1) Printing from the FC5 machin...

Setting up Debian: XServer problems and Gnome doesn't start - Hello, I have some problems with my Debian system I've just set up. After booting Debian, the monitor keeps switching...

Newbie question: problems setting DISPLAY to X server - Hi, On my local machine (llamas.hi.inet: Linux FC3): [jdiaz@llamas ~]$ xhost + access control disabled, clients can..

set up linux gateway - does anybody know how to set up broadband gateway in linux server? i m using redhat 8.0. 10s for help..newbie

RH9 and Gateway E-4100 - I am having difficulty installing RedHat 9 on a Gateway E-4100 (Intel 865 Chipset). The installation completes but the...

RedHat 7.3 on Gateway X500 goes to sleep? - I have installed RedHat 7.3 on a Gateway X500 ( I think that is what it is) and every so often if no one is using the....
       Soft32 Home -> Linux2 Arch -> Setup All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 Windows
 Linux
 Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]