Results 1 to 6 of 6
Hi,
today I tried to configure a network route to a host for testing my network interface.
Code:
route add 192.168.1.15 eth0
As I have to eth interfaces and both ...
- 08-30-2010 #1Just Joined!
- Join Date
- Jul 2010
- Posts
- 10
configuring network route
Hi,
today I tried to configure a network route to a host for testing my network interface.
As I have to eth interfaces and both interface got their IP from DHCP (192.168.1.11 and 192.168.1.12) and are in the same subnet, I shut the other interface down:Code:route add 192.168.1.15 eth0
Code:ifconfig eth1 down
Then I tried to test the interface by doing a ping to 192.168.1.15.
Problem:
When I unplug the cable from eth0 (and eth1 is still plugged) the ping still works. Somehow my linux (it's debian) powers up again eth0 and pings over this port.
How can I stop my linux doing this. I just want to have the route added only on the one interface - not the other.
Is it maybe some case of a default-gateway?
Thanks for your help.
- 08-31-2010 #2
eth1 may has the option auto, which automatically powers it on when a connection can be established. You can look this up here: /etc/network/interfaces
- 08-31-2010 #3Just Joined!
- Join Date
- Jul 2010
- Posts
- 10
My /etc/network/interfaces has (only for eth0)
allow-hotplug eth0
iface eth0 inet dhcp
- 08-31-2010 #4Code:
#man 5 interfaces
Please READ the manual pages if there are some. They are there just for this purpose!Lines beginning with "allow-" are used to identify interfaces that
should be brought up automatically by various subsytems. This
may be done using a command such as "ifup --allow=hotplug eth0 eth1",
which will only bring up eth0 or eth1 if it is listed in an
"allow-hotplug" line. Note that "allow-auto" and "auto" are synonyms.
- 08-31-2010 #5Just Joined!
- Join Date
- Jul 2010
- Posts
- 10
Thanks for this hint. That was actually the problem!
Yes, I know, RTFM!
- 08-31-2010 #6
True, RTFM and finally SOLVE answered questions. It makes it easier and safes time to everybody.


Reply With Quote