LinuxQuestions.org
Review your favorite Linux distribution.
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 04-22-2007, 08:51 PM   #1
flycast
Member
 
Registered: Jul 2006
Posts: 89

Rep: Reputation: 15
Cant connect to my router


I have two network cards. One is getting it's IP dynamically from the router connected to the internet. The second I have set the IP statically (192.168.1.1) and have a router connected to it. If I ping 192.168.1.1 I get the splash page from the locally running Apache as if I requested 127.0.0.1 rather than the web interface that I should get from the router.

What do I do to be able to start talking to the router connected to eth1?
 
Old 04-22-2007, 09:41 PM   #2
sparc86
Member
 
Registered: Jul 2006
Location: Joinville, Brazil
Distribution: Debian, CentOS
Posts: 301

Rep: Reputation: 31
Quote:
Originally Posted by flycast
I have two network cards. One is getting it's IP dynamically from the router connected to the internet. The second I have set the IP statically (192.168.1.1) and have a router connected to it. If I ping 192.168.1.1 I get the splash page from the locally running Apache as if I requested 127.0.0.1 rather than the web interface that I should get from the router.

What do I do to be able to start talking to the router connected to eth1?


Well, I've read for four times your post and I'm not sure if I got it.

Anyway, have you tried this?---->

#route add default gw ip.of.your.router


it should makes your host to talk with your router, anyway.


Let us know if it worked for you.
 
Old 04-23-2007, 01:46 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
your second nic is set to use 192.168.1.1 and if you ping it you get a web page back? i think you must have invented a brand new icmp packet if you think you can get a web page from a ping... just a tad impossible. either way, that seems to be doing exactly what you've told it to...
 
Old 04-24-2007, 07:21 PM   #4
flycast
Member
 
Registered: Jul 2006
Posts: 89

Original Poster
Rep: Reputation: 15
Ooops! I am such a dope!

I meant that I can ping 192.168.1.1 and get a ping back. When I hit that address in my web browser I get the "Seeing this instead of the website you are expecting" splash page from the Apache server running on the same machine.

The 'route add default gw ip.of.your.router' did not help.
 
Old 04-24-2007, 07:35 PM   #5
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Eh? Your router has IP address 192.168.1.1 and you assigned the very same address to your eth1? Looks like a nice IP address conflict to me.
 
Old 04-24-2007, 07:59 PM   #6
flycast
Member
 
Registered: Jul 2006
Posts: 89

Original Poster
Rep: Reputation: 15
I agree. I changed my configuration (see below) and did another little test. I have two nic cards. I am currently connected to a 2Wire router to the internet through eth0. I can ping the 2Wire router (192.168.1.254) through eth0. I moved my cable connected to the 2Wire router to the Linksys router so eth0 faces the Linksys router. I can ping the Linksys router (192.168.1.1). Both routers work and can be reached through eth0.

When I move the nic end of the cable to eth1 and try to ping either router on the other end I cannot get a connection. The only thing different is the nic (eth1). It would seem that something is rotten in Denmark as far as the eth1 nic card goes. The strange thing is that I can ping the card itself (192.168.1.200) just fine. My configuration is:
Quote:
# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]=""

# Config information for eth1:
IPADDR[1]="192.168.1.200"
NETMASK[1]="255.255.255.0"
USE_DHCP[1]="no"
DHCP_HOSTNAME[1]=""
What now?

Last edited by flycast; 04-24-2007 at 08:01 PM.
 
Old 04-24-2007, 08:47 PM   #7
flycast
Member
 
Registered: Jul 2006
Posts: 89

Original Poster
Rep: Reputation: 15
Also, here is my routing tables (something I am totally not familiar with).
PHP Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    
Use Iface
192.168.1.0     
*               255.255.255.0   U     0      0        0 eth0
192.168.1.0     
*               255.255.255.0   U     0      0        0 eth1
loopback        
*               255.0.0.0       U     0      0        0 lo
default         home            0.0.0.0         UG    0      0        0 eth0 
 
Old 04-24-2007, 08:56 PM   #8
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
You can't have both cards on same subnet.

Edit: Perhaps you should tell us what you are trying to do. The whole setup you have there doesn't seem very sensible.

Last edited by Emerson; 04-24-2007 at 09:00 PM.
 
Old 04-24-2007, 09:14 PM   #9
flycast
Member
 
Registered: Jul 2006
Posts: 89

Original Poster
Rep: Reputation: 15
Please see this post.
 
  


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
howto connect router to router? kvasarnomad Linux - Networking 4 09-04-2005 09:14 PM
i can't connect to my router... badweed Linux - Wireless Networking 8 08-23-2005 11:05 AM
connect through router.. mahamkali Linux - Networking 14 10-11-2004 01:28 PM
Want To Connect to my Router warnesey333 Linux - Networking 34 10-02-2004 11:41 AM
Connect through router 67bbc Linux - Networking 10 02-14-2003 12:25 AM

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

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