LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 09-05-2003, 03:50 AM   #1
shyam
LQ Newbie
 
Registered: Aug 2003
Posts: 11

Rep: Reputation: 0
Lightbulb SIOCADDRT: Network is unreachable


When i m adding the gateway (provide by ISP) to the NIC(192.168.1.6) used for LAN ,I m getting error as below.


[root@Ezynet sysconfig]# route add -net 192.168.1.0 netmask 255.255.255.0 gw 61.3.129.130 dev eth1
SIOCADDRT: Network is unreachable
[root@Ezynet sysconfig]#


Pl help
 
Old 09-05-2003, 03:54 AM   #2
ugenn
Member
 
Registered: Apr 2002
Posts: 549

Rep: Reputation: 30
is the network interface up? show us the result of your ifconfig listing.
 
Old 09-05-2003, 04:01 AM   #3
AltF4
Member
 
Registered: Sep 2002
Location: .at
Distribution: SuSE, Knoppix
Posts: 532

Rep: Reputation: 31
try this:

you need to set up your IP (your provider should have given you one) and your default gateway. your connection to the provider probably should have an IP in the 61.3.129.0/24 range (check your documentation) or be provided over DHCP

the default gateway:
/sbin/route add default gw 61.3.129.130
 
Old 09-05-2003, 04:02 AM   #4
shyam
LQ Newbie
 
Registered: Aug 2003
Posts: 11

Original Poster
Rep: Reputation: 0
Yes it is....

[root@Ezynet admin]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:20:ED:11:83:77
inet addr:192.168.1.6 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:71 errors:0 dropped:0 overruns:0 frame:0
TX packets:46 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
Interrupt:11 Base address:0xc400

eth1 Link encap:Ethernet HWaddr 00:02:96:30:01:3D
inet addr:10.23.0.9 Bcast:10.23.0.15 Mask:255.255.255.240
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
Interrupt:11 Base address:0xa000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:3924 Metric:1
RX packets:25 errors:0 dropped:0 overruns:0 frame:0
TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
 
Old 09-05-2003, 04:05 AM   #5
shyam
LQ Newbie
 
Registered: Aug 2003
Posts: 11

Original Poster
Rep: Reputation: 0
I have tried by issuing this command

/sbin/route add default gw 61.3.129.130

But error as before i. e.



[root@Ezynet admin]# /sbin/route add default gw 61.3.129.130
SIOCADDRT: Network is unreachable
[root@Ezynet admin]#
 
Old 09-05-2003, 04:28 AM   #6
Looking_Lost
Senior Member
 
Registered: Apr 2003
Location: Eire
Distribution: Slackware 12.0, OpenSuse 10.3
Posts: 1,120

Rep: Reputation: 45
Is this machine directly connected to the internet?

If so one of your eth cards will have to have your real IP address provided by your ISP as said below something in the range 61.3.129.0/24 either got by dhcp or told to you by your ISP. You've got two private addresses there.

Adding a gateway to a machine when the gateway isn't in the same subnet won't work.
 
Old 09-05-2003, 05:03 AM   #7
shyam
LQ Newbie
 
Registered: Aug 2003
Posts: 11

Original Poster
Rep: Reputation: 0
Yes it is connected to the internet. But i cannot ping to any address in internet.

Information provided by my ISP is

IP - 10.23.0.9
Subnetmask - 255.255.255.0
Gateway - 61.3.129.130
DNS - 61.0.128.65
61.0.0.5

Last edited by shyam; 09-05-2003 at 05:08 AM.
 
Old 09-05-2003, 05:19 AM   #8
ugenn
Member
 
Registered: Apr 2002
Posts: 549

Rep: Reputation: 30
i think the problem is that the gw is not in the same subnet as your host. the ip (is this statically assigned?) configured on eth1 is likely wrong. it should be in the 61.3.129.xx range for it to see the gw (that or the gw needs to be in the 10.23.0.xx ragne). u might want to check with your ISP again on those values.

Last edited by ugenn; 09-05-2003 at 05:22 AM.
 
Old 09-07-2003, 11:08 PM   #9
shyam
LQ Newbie
 
Registered: Aug 2003
Posts: 11

Original Poster
Rep: Reputation: 0
But with this setup it is working normal in Windows environment.

IP - 10.23.0.9
Subnetmask - 255.255.255.0
Gateway - 61.3.129.130
DNS - 61.0.128.65
61.0.0.5

Local LAN IP - 192.168.1.4


I m able to browse to internet from any machine in the network through the Gateway with the setup given above.
 
Old 09-08-2003, 07:19 AM   #10
ugenn
Member
 
Registered: Apr 2002
Posts: 549

Rep: Reputation: 30
are u masquerading or using IP aliasing?
 
Old 09-08-2003, 07:39 AM   #11
shyam
LQ Newbie
 
Registered: Aug 2003
Posts: 11

Original Poster
Rep: Reputation: 0
i m using masquerading.
 
Old 09-08-2003, 09:00 AM   #12
ugenn
Member
 
Registered: Apr 2002
Posts: 549

Rep: Reputation: 30
can u show your network layout?
 
Old 09-09-2003, 02:53 AM   #13
shyam
LQ Newbie
 
Registered: Aug 2003
Posts: 11

Original Poster
Rep: Reputation: 0
http://www.pecon.co.in/htmls/layout.gif


As per the layout given i want to use my Linux box in place of PC-2 which is running on win 98 platform. In this PC-2 i m using a proxy(wingate) to share the internet in my local network.
 
Old 09-09-2003, 09:54 AM   #14
ugenn
Member
 
Registered: Apr 2002
Posts: 549

Rep: Reputation: 30
.

Last edited by ugenn; 09-09-2003 at 09:57 AM.
 
Old 09-09-2003, 10:11 AM   #15
ugenn
Member
 
Registered: Apr 2002
Posts: 549

Rep: Reputation: 30
that's really odd. there was another thread some days ago with the same problem (http://www.linuxquestions.org/questi...threadid=89484)

If I'm not wrong, a gateway must always be on the same subnet to forward packets. There must be some non-standard implementation in Windows' networking code to be able to work.

One more test you might want to try is issue tracert on the present win98 gateway and take note of the IP on the first hop and try using that IP as the gw if it returns a different value than what was configured.

not sure if it's going to work but it's worth a try :P
 
  


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
Network Unreachable? biledaemon Slackware 4 10-24-2005 02:05 PM
Network Is Unreachable!!!!!!!!!!!!!!!!!!!!! koodoo Linux - Newbie 4 02-19-2005 09:51 AM
Network is unreachable??? Tnichols Linux - Networking 15 12-19-2003 09:44 PM
Network is unreachable kakarizz Linux - Networking 1 12-16-2003 09:16 AM
SIOCADDRT : Network is Unreachable nishi_k_79 Linux - Networking 1 10-16-2003 11:18 AM


All times are GMT -5. The time now is 04:03 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration