LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-12-2017, 07:00 AM   #1
fishkake
LQ Newbie
 
Registered: Dec 2006
Posts: 15

Rep: Reputation: 0
NIC interfaces strange behaviour (Debian)


Hi all

I felt like I was getting somewhere with understanding my network, but its all gone a bit strange now. Sorry if there's a bit too much going on here, but I thought it best to be thorough. First the details:

My home ISP router is 192.168.0.1

Windows PCs on WiFi and LAN on DHCP working fine.

"19KDEB" running minimalist Debian 8.7.1 (no desktop environment).

eth0 is a built in Intel gigabit, connected through a switch to my router. eth1 is a PCMCIA 10/100 ethernet connected to another offline PC. Both cards have been working previously.

I always log in as root for testing purposes.

/etc/network/interfaces:
Code:
source /etc/network/interfaces.d/*

#The loopback interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0 eth1
iface eth0 inet static
 address 192.168.0.80
 netmask 255.255.255.0
 gateway 192.168.0.1

iface eth1 inet static
 address 192.168.27.80
 netmask 255.255.255.0
 gateway 192.168.27.80
When I boot and log in, ifconfig confirms the above. And I can ping 192.168.0.1 with "-I eth0" or without "-I" at all.

Ping -I eth1 192.168.0.1 fails to ping my router, as expected.

However, ping bbc.co.uk returns:
Code:
PING bbc.co.uk (212.58.244.23) From 192.168.27.80 ... unreachable"
This is understandable, however adding "-I eth0" also doesn't work. It resolves the IP but won't ping it.

Now, if I change /etc/network/interfaces to:

Code:
source /etc/network/interfaces.d/*

#The loopback interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0 eth1
iface eth0 inet static
 address 192.168.0.80
 netmask 255.255.255.0
 gateway 192.168.0.1
(In other words, remove eth1) then I CAN ping bbc.co.uk.

Can anyone explain what is happening here?

Also, finally, and possibly related, why does ifdown eth0 return "interface eth0 not configured"?

I know I'm a bit scattergun here, but if anyone can provide any information on the above I would appreciate it. Thanks!
 
Old 04-12-2017, 07:28 AM   #2
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873
The "gateway" on the other nic, being listed last is the default? There's normally only ONE gateway (per machine). Comment out (#) the other gateway and it will likely function with both interfaces configured.
 
Old 04-12-2017, 08:02 AM   #3
fishkake
LQ Newbie
 
Registered: Dec 2006
Posts: 15

Original Poster
Rep: Reputation: 0
OK, this went a little inconsistent, so its hard to say what proves what.

However, your gateway idea makes a small amount of sense to my poor understanding of networks. And it does seem to have made things more stable.

And I suppose it would make sense that this was unstable if something was somehow uncertain which of the two specified gateways to use.

So maybe you've solved my problem. Tell you what, take a brownie point now, and I'll take it back if it turns out you were wrong. :-)

Thanks!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange TC behaviour hesisaboury Linux - Networking 2 06-17-2012 02:20 AM
Debian font size strange behaviour GTrax Debian 5 08-10-2007 03:20 AM
strange behaviour marsques Slackware 11 02-15-2006 06:05 PM
Strange behaviour Anmol SUSE / openSUSE 2 10-27-2005 11:05 PM
strange mouse behaviour with logitech pilot mouse in debian 3.0r2 g-string 3 Debian 0 11-12-2004 06:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration