Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
09-05-2003, 03:50 AM
|
#1
|
LQ Newbie
Registered: Aug 2003
Posts: 11
Rep:
|
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
|
|
|
09-05-2003, 03:54 AM
|
#2
|
Member
Registered: Apr 2002
Posts: 549
Rep:
|
is the network interface up? show us the result of your ifconfig listing.
|
|
|
09-05-2003, 04:01 AM
|
#3
|
Member
Registered: Sep 2002
Location: .at
Distribution: SuSE, Knoppix
Posts: 532
Rep:
|
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
|
|
|
09-05-2003, 04:02 AM
|
#4
|
LQ Newbie
Registered: Aug 2003
Posts: 11
Original Poster
Rep:
|
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
|
|
|
09-05-2003, 04:05 AM
|
#5
|
LQ Newbie
Registered: Aug 2003
Posts: 11
Original Poster
Rep:
|
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]#
|
|
|
09-05-2003, 04:28 AM
|
#6
|
Senior Member
Registered: Apr 2003
Location: Eire
Distribution: Slackware 12.0, OpenSuse 10.3
Posts: 1,120
Rep:
|
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.
|
|
|
09-05-2003, 05:03 AM
|
#7
|
LQ Newbie
Registered: Aug 2003
Posts: 11
Original Poster
Rep:
|
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.
|
|
|
09-05-2003, 05:19 AM
|
#8
|
Member
Registered: Apr 2002
Posts: 549
Rep:
|
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.
|
|
|
09-07-2003, 11:08 PM
|
#9
|
LQ Newbie
Registered: Aug 2003
Posts: 11
Original Poster
Rep:
|
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.
|
|
|
09-08-2003, 07:19 AM
|
#10
|
Member
Registered: Apr 2002
Posts: 549
Rep:
|
are u masquerading or using IP aliasing?
|
|
|
09-08-2003, 07:39 AM
|
#11
|
LQ Newbie
Registered: Aug 2003
Posts: 11
Original Poster
Rep:
|
i m using masquerading.
|
|
|
09-08-2003, 09:00 AM
|
#12
|
Member
Registered: Apr 2002
Posts: 549
Rep:
|
can u show your network layout?
|
|
|
09-09-2003, 02:53 AM
|
#13
|
LQ Newbie
Registered: Aug 2003
Posts: 11
Original Poster
Rep:
|
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.
|
|
|
09-09-2003, 09:54 AM
|
#14
|
Member
Registered: Apr 2002
Posts: 549
Rep:
|
.
Last edited by ugenn; 09-09-2003 at 09:57 AM.
|
|
|
09-09-2003, 10:11 AM
|
#15
|
Member
Registered: Apr 2002
Posts: 549
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 03:14 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|