Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have added a secound nic in a debian box. That nic is ment for doing some test stuff, so those devices connected should just be able to access the debian box or be accessed from it.

To set up the nic, I have added to /etc/network/interfaces

iface eth1 inet static

Those values shows up when I do an ifconfig, and route shows:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         adim.hhv3         UG    0      0        0 eth0     *        U     0      0        0 eth1     *        U     0      0        0 eth0

SO it seems to me as if everything is set up correctly, but when I try to access any of the devices on the 192.168.0.x network, I just get a "no route to host" error. Have I forgotten or overlooked something? (presently I cannot test the other way around. The nic leds are indicating that there is a link)

Things get weirder. I have set up an old wireless router that acts as a dhcp server on the eth1 network. Then eth1 works just as intended - but if I try to set it manually, it does not work. When setting manually, I just use the above mentioned interfaces file.

Set from dhcp:

root@sorbus:~# ip addr (removed loopback and eth0)
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:11:95:84:6b:6c brd ff:ff:ff:ff:ff:ff
inet brd scope global eth1
inet6 fe80::211:95ff:fe84:6b6c/64 scope link 
   valid_lft forever preferred_lft forever

root@sorbus:~# ip route
default via dev eth0  proto static dev eth1  proto kernel  scope link  src dev eth0  proto kernel  scope link  src 

And now it seems to work also for the manual setup.... :-/ Good that it works but it would be nice to know why...

(I cannot use dhcp on the 192.168.0 since it messes up my resolv.conf - at least I have not seen any way of stopping it from doing it)

share|improve this question
route is deprecated. use ip route or routel instead, same for ifconfig (use ip addr instead). ip route has a nice option: ip route get will tell you what route the kernel will use to contact –  BatchyX Feb 1 '13 at 20:25
Thanks BatchyX. I have just been using dhcp for so long that my command-fu has been a bit outdated. –  MortenSickel Feb 1 '13 at 20:29
What does your network setup look like? Specially the net on eth1. ASCII art is fine. –  vonbrand Feb 11 '13 at 4:20
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.