Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Adding eth1 for auto configuration

Here you can discuss every aspect of Debian. Note: not for support requests!
Post Reply
Message
Author
asajid
Posts: 4
Joined: 2006-08-16 11:52

Adding eth1 for auto configuration

#1 Post by asajid »

I am trying to configure secondary interface on my linux box in /etc/network/interfaces file but having issues when I add "auto eth1" line in the file. The /etc/init.d/networking command reads both "auto eth0" and "auto eth1" but eth0 stops working. eth0 is configured for DHCP and it gets the address but I cannot access the interface. As soon as I remove "auto eth1" eth0 is accessible but eth1 is not auto configurable any more and I loose it IP everytime the machine boots.

Does anyone have this issue??? Any help would be appreciated. Here is my interface file:
# 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

# The primary network interface
auto eth0
iface eth0 inet dhcp

# The secondary network interface
iface eth1 inet static
address 167.20.xxx.xx
netmask 255.255.255.248
gateway 167.20.xxx.xx

lacek
Posts: 764
Joined: 2004-03-11 18:49
Location: Budapest, Hungary
Contact:

#2 Post by lacek »

What do you mean by "cannot access the interface"?
What IP address the DHCP server gives to your interface? Is it on the same network as the static IP address?

asajid
Posts: 4
Joined: 2006-08-16 11:52

Adding eth1 for auto configuration

#3 Post by asajid »

eth0 is a private interface with 10.x.x.x address. I use it to access the box on SSH. But if I use "auto eth1", box is no more accessible remotely. Apparently, eth0 is getting DHCP address but stops functioning normally. Routing / default gateway appears normal with no change.

Thanks

Atif

lacek
Posts: 764
Joined: 2004-03-11 18:49
Location: Budapest, Hungary
Contact:

#4 Post by lacek »

After eth1 came up and eth0 stopped working, what do the following commands say?:
ifconfig -a
route -n
?

asajid
Posts: 4
Joined: 2006-08-16 11:52

Adding eth1 for auto configuration

#5 Post by asajid »

This is what I am gettting:

gprs-callgen2:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:11:43:DF:B3:90
inet addr:10.152.34.117 Bcast:10.152.35.255 Mask:255.255.254.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7128 errors:0 dropped:0 overruns:0 frame:0
TX packets:623 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:507293 (495.4 KiB) TX bytes:75915 (74.1 KiB)
Base address:0xdcc0 Memory:dfae0000-dfb00000

eth1 Link encap:Ethernet HWaddr 00:11:43:DF:B3:91
inet addr:167.20.xx.xx Bcast:167.20.255.255 Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:182 errors:0 dropped:0 overruns:0 frame:0
TX packets:110 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:17619 (17.2 KiB) TX bytes:13895 (13.5 KiB)
Base address:0xccc0 Memory:df8e0000-df900000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:31 errors:0 dropped:0 overruns:0 frame:0
TX packets:31 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3036 (2.9 KiB) TX bytes:3036 (2.9 KiB)

gprs-callgen2:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
167.20.xxx.xx 167.20.xxx.xx 255.255.255.248 UG 0 0 0 eth1
167.20.xxx.xx 0.0.0.0 255.255.255.248 U 0 0 0 eth1
167.20.xxx.0 167.20.xxx.xx 255.255.255.248 UG 0 0 0 eth1
10.152.34.0 0.0.0.0 255.255.254.0 U 0 0 0 eth0
0.0.0.0 167.20.xxx.xx 0.0.0.0 UG 0 0 0 eth1
0.0.0.0 10.152.34.1 0.0.0.0 UG 0 0 0 eth0

asajid
Posts: 4
Joined: 2006-08-16 11:52

Adding eth1 for auto configuration

#6 Post by asajid »

Got it. Its a routing issue. Somehow its adding another default route.

Thanks for responses.

Post Reply