LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   /etc/init.d/networking restart (ERRORS) (https://www.linuxquestions.org/questions/linux-networking-3/etc-init-d-networking-restart-errors-637610/)

lrt 04-24-2008 04:05 PM

/etc/init.d/networking restart (ERRORS)
 
i have two interfaces both assigned static ip addresses. here is /etc/network/interfaces
Code:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.1.102
netmask 255.255.255.0
network 192.168.1.0
gateway 192.168.1.1

auto eth1
iface eth1 inet static
address 192.168.2.1
netmask 255.255.255.0
network 192.168.2.0
gateway 192.168.1.102

eth1 is serving dhcp addresses. here is my subnet declaration in dhcpd.conf

Code:

subnet 192.168.2.0 netmask 255.255.255.0 {
  range 192.168.2.10 192.168.2.50;
  option routers 192.168.2.1;
}

when i try to start the network i get the following error:

Code:

root@pandion:/home/leandro# /etc/init.d/networking restart
 * Reconfiguring network interfaces...
SIOCADDRT: No such process
Failed to bring up eth1.
[ OK ]

my theory is that i don't think it likes the gateway address for eth1 (which is the ip address of eth0). if i comment the gateway line for eth1 in the interfaces file and then restart networking i get a different error:

Code:

root@pandion:/etc/default# /etc/init.d/networking restart
 * Reconfiguring network interfaces...
RTNETLINK answers: No such process
[ OK ]

i'm also doing ip forwarding and internet connection sharing from eth1 to eth0 with syscntl.conf and some iptables rules. this works fine because all my dhcp clients can browse the web and receive leased addresses.

what i don't understand is why i am getting those errors when i restart networking????? is the gateway address wrong???

andybrr 04-24-2008 04:07 PM

Interfaces
 
Hi,

What happens if you try to bring the interfaces with ifconfig ethx ip_address up ?

Anderson

Quote:

Originally Posted by lrt (Post 3131813)
i have two interfaces both assigned static ip addresses. here is /etc/network/interfaces
Code:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.1.102
netmask 255.255.255.0
network 192.168.1.0
gateway 192.168.1.1

auto eth1
iface eth1 inet static
address 192.168.2.1
netmask 255.255.255.0
network 192.168.2.0
gateway 192.168.1.102

eth1 is serving dhcp addresses. here is my subnet declaration in dhcpd.conf

Code:

subnet 192.168.2.0 netmask 255.255.255.0 {
  range 192.168.2.10 192.168.2.50;
  option routers 192.168.2.1;
}

when i try to start the network i get the following error:

Code:

root@pandion:/home/leandro# /etc/init.d/networking restart
 * Reconfiguring network interfaces...
SIOCADDRT: No such process
Failed to bring up eth1.
[ OK ]

my theory is that i don't think it likes the gateway address for eth1 (which is the ip address of eth0). if i comment the gateway line for eth1 in the interfaces file and then restart networking i get a different error:

Code:

root@pandion:/etc/default# /etc/init.d/networking restart
 * Reconfiguring network interfaces...
RTNETLINK answers: No such process
[ OK ]

i'm also doing ip forwarding and internet connection sharing from eth1 to eth0 with syscntl.conf and some iptables rules. this works fine because all my dhcp clients can browse the web and receive leased addresses.

what i don't understand is why i am getting those errors when i restart networking????? is the gateway address wrong???


lrt 04-24-2008 05:30 PM

haven't tried that.. however, i won't be able to try until tomorrow... i will update then.. why should that method be any different though??

lrt 04-25-2008 10:00 AM

ok i tried that and the command completes without errors....

but i'm not sure how that helps me...

datopdog 04-26-2008 03:08 AM

your configuration for eth1 is wrong the gateway has to be on the same network. 192.168.1.102 is not on 192.168.2.0/24

lrt 04-28-2008 01:35 PM

so what does the gateway address for eth1 need to be if i am assigning everything statically???

datopdog 04-28-2008 01:51 PM

why do u need multiple default gateways anyway ?

lrt 04-28-2008 02:53 PM

this >>>post<<< (unfortunately not here) has answered my question pretty thoroughly.. apparently i don't even need a gateway address set for eth1. the only gateway address i need to assign is for eth0.. dhcp clients on the eth1 subnet will receive a gateway address of my eth1 ip address (192.168.2.1). in other words, i don't need multiple gateways (i just wasn't aware of this).

the post was specific to windows 2003 server... but it was a networking question so i assume it still applies to my problem... if anyone could confirm this solution that would be great...

HOWEVER, when i do a /etc/init.d/networking restart, i still get this error message:

Code:

RTNETLINK answers: No such process
i'm not sure what this means, but now i am pretty sure it has nothing to do with my gateway address setting since i know the setting is correct...

any thoughts on this error are welcome. please!!! :)

datopdog 04-29-2008 01:15 AM

its correct that you need one gateway most times, please look at /var/log/syslog when you restart networking to see what is causing the RTNETLINK error

lsteacke 04-29-2008 11:38 AM

Usually the error

Code:

RTNETLINK answers: No such process
Comes from the kernel trying to instantiate a route that does not exist. Please post the output of

Code:

route -n
so we can have a look.

Mountain 03-09-2009 08:21 PM

I have the exact same error.

Here is route -n output:
Code:

myuser@myserver:$ route -n
Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
192.168.1.0    0.0.0.0        255.255.255.0  U    0      0        0 eth0
192.168.1.0    0.0.0.0        255.255.255.0  U    0      0        0 eth1
169.254.0.0    0.0.0.0        255.255.0.0    U    1000  0        0 eth0
0.0.0.0        192.168.1.1    0.0.0.0        UG    100    0        0 eth1
0.0.0.0        192.168.1.1    0.0.0.0        UG    100    0        0 eth0
myuser@myserver:$


lsteacke 03-10-2009 10:11 AM

I think that has something to do with having 2 default routes, both the same. What is your desired configuration? What are you attempting to accomplish? Can you also please post the output of ifconfig -a

Mountain 03-10-2009 11:43 AM

Thank you. You were right. I removed the gateway designation from the second interface, and now it works.

What is the best configuration for my file server with 2 GigE interfaces? I'd like to maximize the file server's responsiveness to clients on the LAN. The machine has minimal need to communicate with the WAN.

I'm also curious how I would set up a direct connection between this file server and another computer used for backup (say, using a crossover cable) so that when I do the initial backup, all those GB of traffic don't clog up the LAN.

And if I wanted to give one (Linux) client a priority connection (both ways) to the file server, is there an easy way to do that? The client also has 2 GigE interfaces, and one is not used currently.

Thanks.

Mountain 03-10-2009 11:44 AM

With the resolution:
Code:

$ ifconfig -a
eth0      Link encap:Ethernet  HWaddr xxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
          inet addr:192.168.1.5  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: xxxxxxxxxxxxxxxxxx/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:78914 errors:0 dropped:0 overruns:0 frame:0
          TX packets:40231 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:52699848 (52.6 MB)  TX bytes:3980091 (3.9 MB)

eth1      Link encap:Ethernet  HWaddr xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
          inet addr:192.168.1.6  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fxxxxxxxxxxxxxxxxxxxxxx1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8356 errors:0 dropped:0 overruns:0 frame:0
          TX packets:139 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:976698 (976.6 KB)  TX bytes:17645 (17.6 KB)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1966 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1966 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:156568 (156.5 KB)  TX bytes:156568 (156.5 KB)

pan0      Link encap:Ethernet  HWaddr xxxxxxxxxxxxxxxxxxxxxx 
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)



All times are GMT -5. The time now is 01:42 PM.