LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 04-06-2005, 01:47 AM   #1
cranium2004
Member
 
Registered: Feb 2004
Distribution: FC4,RHEL4
Posts: 223

Rep: Reputation: 30
configuring eth interfaces problem


hello,

I have Local interfaces are configured as
[root@localhost root]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:08:A1:43:61:F5
inet addr:10.0.1.100 Bcast:10.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:240 (240.0 b)
Interrupt:9 Base address:0xbc00

eth1 Link encap:Ethernet HWaddr 00:80:48:C3:11:94
inet addr:10.0.1.200 Bcast:10.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:915 (915.0 b) TX bytes:420 (420.0 b)
Interrupt:11 Base address:0xdc00

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:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:784 (784.0 b) TX bytes:784 (784.0 b)


and Routing table
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 10.0.1.100 0.0.0.0 UG 0 0 0 eth0


When i ifdown eth1 at start in rc.local so that it will not start by default my configuration for kernel routing table is
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 10.0.1.100 0.0.0.0 UG 0 0 0 eth0

I want to make eth0 alone work by successfully pinging to another pc which is connected by crossover wire. what cheages shoul i do? I tried with
route add -net 0.0.0.0 netmask 0.0.0.0 gw 10.0.1.100
but it fails with error
SIOCADDRT: Network is unreachable

Then i up eth1 and my routing table is as given above. then i give following commands
route del -net 0.0.0.0 netmask 0.0.0.0 gw 10.0.1.100
route add -net 0.0.0.0 netmask 0.0.0.0 gw 10.0.2.100 //10.0.2.100 is eth0 of other pc

but besides that i get following erorros
ping 10.0.2.100
PING 10.0.2.100 (10.0.2.100) 56(84) bytes of data.
From 10.0.1.200 icmp_seq=1 Destination Host Unreachable
From 10.0.1.200 icmp_seq=2 Destination Host Unreachable
From 10.0.1.200 icmp_seq=3 Destination Host Unreachable
 
Old 04-06-2005, 05:53 AM   #2
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,516

Rep: Reputation: 239Reputation: 239Reputation: 239
have you tried using the 192.168.1.0
subnet?
Or is there a reason you use the 10?
 
Old 04-06-2005, 07:18 AM   #3
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
Quote:
Originally posted by bigearsbilly
have you tried using the 192.168.1.0
subnet?
Or is there a reason you use the 10?
that's the idea, to exapnd some more, I see these IP addresses:

eth0 10.0.1.100 255.0.0.0

eth1 10.0.1.200 255.0.0.0

and what you should do is place the two network cards in different 'IP subnets' (or bridge the interfaces, which is more of a hack than a fix.) To do this, use a different private IP space, such as 192.168.1.0 255.255.255.0 for either of the two interfaces. I would suggest changing the one that has the crossover to the other computer so it and the other system have say 192.168.1.1 and 192.168.1.2 as their IP addresses. The reason you have route problems is because both of your current IP addresses are on one subnet that includes all addresses from 10.0.0.1 to 10.255.255.254 and the system can't figure out which interface to use. If you change one of the IP addresses, you should not need to do anything to the routing tables.
 
Old 04-06-2005, 07:23 AM   #4
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
It also appears that you posted two threads, this one and http://www.linuxquestions.org/questi...hreadid=310235

The two posts appear to be about the same setup, and I think the two questions you asked are likely related.
 
Old 04-06-2005, 07:44 AM   #5
cranium2004
Member
 
Registered: Feb 2004
Distribution: FC4,RHEL4
Posts: 223

Original Poster
Rep: Reputation: 30
Hello Darin,
Thanks for reply. Does that mean i can not set both NICs to same subnet or having more that 2 NICs need to set all to different subnets?
What is happening is that i make ifdown eth1 at bootup in rc.local, so when pc starts eth1 does not ups but some times when i up eth1 eth0 goes disappeared from route -n but displays in ifconfig command. and if eth1 or eth0 is up or down my computer always wants eth1 to be active to send traffice on net.
Why is this happening? is that because both NIC on same subnet or anything else reason is there?
 
Old 04-07-2005, 07:55 AM   #6
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
Quote:
Originally posted by cranium2004
Hello Darin,
Thanks for reply. Does that mean i can not set both NICs to same subnet or having more that 2 NICs need to set all to different subnets?
The practical answer is no. The idea of different subnets is mostly to differentiate physical networks so if you have two different network cards it's best to have different subnets.
Quote:
What is happening is that i make ifdown eth1 at bootup in rc.local, so when pc starts eth1 does not ups but some times when i up eth1 eth0 goes disappeared from route -n but displays in ifconfig command. and if eth1 or eth0 is up or down my computer always wants eth1 to be active to send traffice on net.
Why is this happening? is that because both NIC on same subnet or anything else reason is there?
This is due to them being on the same IP subnet, Linux can be set to work that way but it requires more advanced configuration so that's why the routing table goes banannas when you bring up a second NIC on the same subnet. Again different IP subnets usually means different physical (wired) networks.
 
  


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
Configuring network interfaces..takes AGES! coolblue Linux - Newbie 6 07-20-2005 08:33 AM
Configuring Network card in Suse 9.3, both set to eth-id:00 ?? A6Quattro SUSE / openSUSE 1 07-16-2005 04:07 AM
Two eth interfaces, but one only with internet... Creak Linux - Networking 6 03-12-2005 02:52 AM
What file does debian use for configuring network interfaces? Royle Debian 2 02-10-2005 05:43 PM
Configuring ethernet interfaces by hand question.. tarballed Linux - Networking 2 07-17-2003 03:36 PM

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

All times are GMT -5. The time now is 08:22 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