LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-28-2012, 05:39 PM   #1
5883
Member
 
Registered: Aug 2004
Posts: 173

Rep: Reputation: 0
move cable from eth1 to eth0, but cannot ping eth0


hi everyone,

we designed embedded board, running basic linux,
no fancy stuff (e.g. network manager).

it has 2 ethernet ports: eth0, eth1

1. plugin cable to eth1, restart board.
it comes back, eth1 is alive, i can ping it.

2. move the cable from eth1 to eth0,
run "udhcpc --reties 4 -n -q -i eth0"
ifconfig shows eth0 now has a valid ip addr, also it's UP.

3. but i cannot ping eth0


i'm not familiar with network stuff,
the 2 device drivers for the 2 ports are working (in the sense i just plug in 1 cable each time).
does that mean the network stack is wrong ?
can someone walk through me with these ?

Last edited by 5883; 11-28-2012 at 05:49 PM.
 
Old 11-28-2012, 08:00 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
I guess your lan may have some issue maybe arp. I don't like to use ping myself. Is this between a computer to this board? Does it work on 0 from boot with cable attached?

Use ifconfig to set static ip in your lan subnet. Be sure to flush arp or wait a while until it clears out.
 
Old 11-29-2012, 04:06 PM   #3
5883
Member
 
Registered: Aug 2004
Posts: 173

Original Poster
Rep: Reputation: 0
Jefro,

you are making the right suggestion, i got it but don't know how to fix it.

1. say initially i have ethernet cable in eth0 for this embedded board, after reboot,
arp -n says
? (10.50.182.160) at bc:30:5b:df:b9:25 [ether] on eth0

2. move cable from eth0 to eth1,
# udhcpc --retries 4 -n -q -i eth1
eth1 is up

3. # arp -n
? (10.50.182.160) at <incomplete> on eth0
ping doesn't work for eth1

4. # arp -d 10.50.182.160 -i eth0
it doesn't return error, but the arp entry is still there

5. if i do
ifconfig eth0 down,
now arp table is clean
if i try all these in my desktop linux, arp table gets updated as soon as i move the cable.

so i'm so lost now,
1. why "arp -d" doesn't work ?
2. if i don't want to do "ifconfig eth0 down", it might involved too much
is there an easy way ?

thanks for your help !








Quote:
Originally Posted by jefro View Post
I guess your lan may have some issue maybe arp. I don't like to use ping myself. Is this between a computer to this board? Does it work on 0 from boot with cable attached?

Use ifconfig to set static ip in your lan subnet. Be sure to flush arp or wait a while until it clears out.
 
Old 11-30-2012, 04:39 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
I may not have said that well. I meant that arp on the other segment.

Describe lan segment.
 
Old 11-30-2012, 06:03 PM   #5
5883
Member
 
Registered: Aug 2004
Posts: 173

Original Poster
Rep: Reputation: 0
i believe this is our linux kernel/driver problem, arp is totally messed up.
just 1 board with 2 NICs, both NICs connects to the same router.

after i disconnect eth0 cable,
if i play with with "arp -d", "ifconfig eth0 up/down" with different combinations,
i could still ping eth0 even without the cable.

but any thoughts are welcome.

Quote:
Originally Posted by jefro View Post
I may not have said that well. I meant that arp on the other segment.

Describe lan segment.
 
  


Reply



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
eth1 interface goes down if eth0 interfaces cable is unplugged? harshalshete Linux - Networking 3 10-21-2011 07:49 AM
Production server with static IPs on eth0 and eth0:1 - need private LAN on eth1 stardotstar Linux - Networking 8 07-03-2010 12:27 AM
both eth0 and eth1 ping fail when one ethernet cable is unplugged powah Linux - Networking 12 04-10-2007 02:54 PM
Ping does not work between eth0 and eth1 Colin123 Linux - Networking 1 09-28-2005 01:10 PM
x86 board PCM 6892 with dual ethernet port.eth1 doesnt ping if eth0 cable removed rani_162 Linux - Newbie 0 07-23-2005 12:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

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