You are not logged in.

#1 2011-06-15 17:23:31

explorer
Member
Registered: 2011-06-15
Posts: 38

netmask doen't mach route address

Now I can not result full answers of system, the computer is on work.

I use this image - archlinux-2010.05-core-x86_64.iso


First, edit /etc/rc.conf
lo="lo 127.0.0.1"
eth0="eth0 192.168.10.79 netmask 255.255.0.0 broadcast 192.168.0.255"
INTERFACES(lo eth0)
ROUTES(gateway)
DAEMONS(syslog-ng network netfs crond)

Second, edit /etc/resolv.conf
nameserver 192.168.0.1

Then system reboot, but a network doesn't work. Ping doesn't answer.


When I add a route through the terminal from root
# route add -net 192.168.10.79 netmask 255.255.0.0 gw 192.168.0.1

gives out the following error
netmask doen't mach route address

In Ubuntu works without problems.

Prompt how to solve a problem?

Last edited by explorer (2011-06-15 17:25:33)

Offline

#2 2011-06-15 18:24:13

oliver
Member
Registered: 2007-12-12
Posts: 448

Re: netmask doen't mach route address

Can you try using -host instead of -net?

From the route man page:
       -net   the target is a network.
       -host  the target is a host.

Offline

#3 2011-06-15 18:33:28

explorer
Member
Registered: 2011-06-15
Posts: 38

Re: netmask doen't mach route address

Didn't check, tomorrow I will check up and I will write result.

Offline

#4 2011-06-16 00:09:16

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: netmask doen't mach route address

explorer wrote:

eth0="eth0 192.168.10.79 netmask 255.255.0.0 broadcast 192.168.0.255"

That is an invalid configuration. Either remove the broadcast part and let ifconfig calculate it for you, or enter the correct value for your netmask (192.168.255.255)

Offline

#5 2011-06-16 07:53:47

explorer
Member
Registered: 2011-06-15
Posts: 38

Re: netmask doen't mach route address

I check up both councils, but the network doesn't work.

Offline

#6 2011-06-16 10:16:13

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: netmask doen't mach route address

Have you been through this wiki article?
https://wiki.archlinux.org/index.php/Network_Debugging

Offline

#7 2011-06-16 10:46:18

explorer
Member
Registered: 2011-06-15
Posts: 38

Re: netmask doen't mach route address

I check settings again and has read article, but the Internet doesn't work.

Offline

#8 2011-06-16 11:30:21

explorer
Member
Registered: 2011-06-15
Posts: 38

Re: netmask doen't mach route address

Essence of a problem that my address in one subnet 192.168.10.x, and the gateway in other subnet 192.168.0.x In Ubuntu has solved this problem  - enter mask 255.255.0.0 Arch Linux doesn't want to add these parameters in the routing table.

Weight of all has tried, but doesn't want to work.

Offline

#9 2011-06-16 23:31:07

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: netmask doen't mach route address

explorer wrote:

I check settings again and has read article, but the Internet doesn't work.

At which point in that article does things not work? Post the output of the relevant commands.

explorer wrote:

Essence of a problem that my address in one subnet 192.168.10.x, and the gateway in other subnet 192.168.0.x

They are not different subnets if you are using netmask 255.255.0.0

Offline

#10 2011-06-17 11:31:41

explorer
Member
Registered: 2011-06-15
Posts: 38

Re: netmask doen't mach route address

Options has left, as in the first message but no result.

If they not different why Ubuntu all works, and in Arch doesn't work?

Offline

#11 2011-06-18 01:45:46

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: netmask doen't mach route address

explorer wrote:

Options has left, as in the first message but no result.

Post the output of the following commands please. Use code blocks to make it easier to read too.

ip a sh
ip r sh
explorer wrote:

If they not different why Ubuntu all works, and in Arch doesn't work?

Obviously they're not the same. I don't use Ubuntu so I don't know what it's done for you.

Offline

#12 2011-06-18 05:21:32

xangelux
Member
Registered: 2010-05-29
Posts: 73

Re: netmask doen't mach route address

First of all, explain what are you trying to do, 192.x.x.x is a private set of ip's, so it is not a usable public ip address. Second, de broadcast is allways the last ip of the set, so in your case, broadcast shold be 192.168.255.255.  I've worked with Ubuntu and mainly it does things rather automatic if you set something wrong Ubuntu changes it to a default, this might be the case (I'm not sure of that)

Another thing is, 192.x.x.x is a C class ip address, maybe your configuration is set to use Subnetting instead of VLSM, subnetting doesn't support netmask other than the class subnet mask (in this case should be 255.255.255.0) I don't know for shure why does your system is do that.

Last edited by xangelux (2011-06-18 05:23:11)

Offline

#13 2011-06-19 14:52:13

explorer
Member
Registered: 2011-06-15
Posts: 38

Re: netmask doen't mach route address

fukawi2 wrote:

Post the output of the following commands please. Use code blocks to make it easier to read too.

ip a sh
ip r sh

Tomorrow I will post the answer to commands.

xangelux In Ubuntu I didn't have problems with network adjustment.

Offline

#14 2011-06-20 07:35:11

explorer
Member
Registered: 2011-06-15
Posts: 38

Re: netmask doen't mach route address

fukawi2 wrote:

Post the output of the following commands please. Use code blocks to make it easier to read too.

ip a sh
ip r sh

Answer:

command not found

Offline

#15 2011-06-20 08:33:24

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: netmask doen't mach route address

Install 'iproute2' package and try again

EDIT: This is indicates that you haven't UPDATED your system since you installed it since 'iproute2' is now a dependency of initscripts so it should be installed on ALL systems. It it pointless anyone trying to help you with an outdated system. Update first: https://wiki.archlinux.org/index.php/Beginners'_Guide#Update_the_System

Last edited by fukawi2 (2011-06-20 08:45:36)

Offline

#16 2011-06-20 09:50:50

explorer
Member
Registered: 2011-06-15
Posts: 38

Re: netmask doen't mach route address

fukawi2  How I can update system if the network doesn't work?

How to manual install iproute2 from the terminal?

Offline

#17 2011-06-20 11:32:58

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: netmask doen't mach route address

Download the 'iproute2' package manually and install it using pacman -U

Offline

#18 2011-06-22 11:28:39

explorer
Member
Registered: 2011-06-15
Posts: 38

Re: netmask doen't mach route address

In Arch Linux has own format of packages - *.pkg.tar.xz

fukawi2 wrote:
ip a sh

Answer

1: lo<LOOPBACK,UP,LOWER_UP>mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo

2: eth0:<BROADCAST,MULTICAST,UP,LOWER_UP>mtu 1500 qdisc pfifo_past state up qlen 1000
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff

inet 192.168.10.79/16 brd 192.168.10.255 scope global eth0
inet 192.168.10.79/32 scope global etho
fukawi2 wrote:
ip a sh

Answer

192.168.0.0/16 dev eth0 proto kernel scope link src 192.168.10.79
default via 192.168.0.1 dev eth0

Command: uname -a

Linux Server 2.6.33-ARCH #1 SMP PREEMENT THU May 13 11:32:37 CEST 2010 x86_64 Intel(R) Celeron(R) CPU 2.80GHz GenuineIntel GNU/Linux 

Offline

#19 2011-06-22 12:01:21

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: netmask doen't mach route address

# ip a sh
2: eth0:<BROADCAST,MULTICAST,UP,LOWER_UP>mtu 1500 qdisc pfifo_past state up qlen 1000
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
inet 192.168.10.79/16 brd 192.168.10.255 scope global eth0
inet 192.168.10.79/32 scope global etho

That's weird... You shouldn't have the address in there twice; there should only be the primary address (the one with /16). Also, your ether address shouldn't be xx:xx:xx:xx:xx:xx but I'll assume you've censored that for some reason.
Can you post your rc.conf file?

# ip r sh
192.168.0.0/16 dev eth0 proto kernel scope link src 192.168.10.79
default via 192.168.0.1 dev eth0

This appears valid. Are you able to `ping 192.168.0.1`?

Offline

#20 2011-06-22 15:25:37

explorer
Member
Registered: 2011-06-15
Posts: 38

Re: netmask doen't mach route address

fukawi2 wrote:

Can you post your rc.conf file?

Has made only changes, which in the first post.
If the full text is necessary, I will lay out tomorrow.
And also the answer and to the second question.

Offline

#21 2011-06-29 08:51:09

explorer
Member
Registered: 2011-06-15
Posts: 38

Re: netmask doen't mach route address

fukawi2 wrote:
Can you post your rc.conf file?
#
# /etc/rc.conf - Main Configuration for Arch Linux
#

# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# DAEMON_LOCALE: If set to 'yes', use $LOCALE as the locale during daemon
# startup and during the boot process. If set to 'no', the C locale is used.
# HARDWARECLOCK: set to "UTC" or "localtime", any other value will result
#   in the hardware clock being left untouched (useful for virtualization)
#   Note: Using "localtime" is discouraged.
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
# VERBOSE: Verbose level (from 1 to 8). man 3 syslog for level info
#
LOCALE="en_US.UTF-8"
HARDWARECLOCK="UTC"
TIMEZONE="Canada/Pacific"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"

# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# MODULES: Modules to load at boot-up. Blacklisting is no longer supported.
#   Replace every !module by an entry as on the following line in a file in
#   /etc/modprobe.d:
#     blacklist module
#   See "man modprobe.conf" for details.
#

MOD_AUTOLOAD="yes"
# MOD_BLACKLIST=() #deprecated
MODULES=()

# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"

# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="myhost"

#Static IP example
lo="lo 127.0.0.1"
eth0="eth0 192.168.10.79 netmask 255.255.0.0 broadcast 192.168.10.255"
INTERFACES (lo eth0)

gateway="default gw 192.168.0.1"
ROUTES(gateway)

# Enable these netcfg profiles at boot-up. These are useful if you happen to
# need more advanced network features than the simple network service
# supports, such as multiple network configurations (ie, laptop users)
#   - set to 'menu' to present a menu during boot-up (dialog package required)
#   - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network.d
#
# This requires the netcfg package
#
#NETWORKS=(main)

# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
#   - prefix a daemon with a ! to disable it
#   - prefix a daemon with a @ to start it up in the background
#
# If something other takes care of your hardware clock (ntpd, dual-boot...)
# you should disable 'hwclock' here.
#
DAEMONS=(hwclock syslog-ng network netfs crond)
fukawi2 wrote:
Are you able to `ping 192.168.0.1`?

Yes, only this.

Offline

#22 2011-06-29 12:40:47

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: netmask doen't mach route address

Your 'broadcast' is still invalid in your rc.conf. Remove the broadcast part completely so it's just this:

eth0="eth0 192.168.10.79 netmask 255.255.0.0"

Offline

#23 2011-06-29 12:50:43

explorer
Member
Registered: 2011-06-15
Posts: 38

Re: netmask doen't mach route address

fukawi2 wrote:

Your 'broadcast' is still invalid in your rc.conf. Remove the broadcast part completely so it's just this:

eth0="eth0 192.168.10.79 netmask 255.255.0.0"

Done. But network doesn't work.

Offline

#24 2011-06-29 23:30:49

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: netmask doen't mach route address

explorer wrote:

Done. But network doesn't work.

Did you restart the network?

/etc/rc.d/network restart

What is the output of these commands after the restart?

ping -c4 192.168.0.1
ping -c4 8.8.8.8

Offline

#25 2011-06-30 08:01:30

explorer
Member
Registered: 2011-06-15
Posts: 38

Re: netmask doen't mach route address

fukawi2 wrote:

Did you restart the network?

/etc/rc.d/network restart

Certainly, sometimes I do a hard reset for confidence.

fukawi2 wrote:
ping -c4 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data
64 bytes from 192.168.0.1:icmq-seq=1 ttl=64 time 3.55 ms
64 bytes from 192.168.0.1:icmq-seq=1 ttl=64 time 0.256 ms
64 bytes from 192.168.0.1:icmq-seq=1 ttl=64 time 0.244 ms
64 bytes from 192.168.0.1:icmq-seq=1 ttl=64 time 0.248 ms

---192.168.0.1 ping statistics
4 packets trasmitted, 4 recived, 0% packets loss, time 2999 ms 
rtt min/avg/max/mdev =0.244/1.076/3.557/1.432 ms
fukawi2 wrote:
ping -c4 8.8.8.8
connect: Network is unreachable 

Offline

Board footer

Powered by FluxBB