LinuxQuestions.org
Help answer threads with 0 replies.
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 03-25-2006, 01:45 PM   #1
__spc__
Member
 
Registered: Feb 2006
Location: Bridgend, Wales
Distribution: Kubuntu 10.04.25 (Feb 2011)
Posts: 172

Rep: Reputation: 30
route shows two default paths - how to remove one?


Hi,

'route' shows me:

Destination Gateway Genmask Flags Metric Ref Use Iface
localnet * 255.255.255.0 U 0 0 0 eth0
localnet * 255.255.255.0 U 0 0 0 eth1
localnet * 255.255.255.0 U 0 0 0 wlan0
loopback * 255.0.0.0 U 0 0 0 lo
default 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0
default 192.168.1.1 0.0.0.0 UG 1 0 0 eth0

How can I bet permanently remove eth0 as a default?

Thanks.
 
Old 03-25-2006, 02:11 PM   #2
nixcraft
Member
 
Registered: Nov 2004
Location: BIOS
Distribution: RHEL3.0, FreeBSD 5.x, Debian 3.x, Soaris x86 v10
Posts: 379

Rep: Reputation: 30
Delete default gw 192.168.1.254:

route del default gw 192.168.1.254

Delete gw 192.168.0.1 for network 10.10.10.0/24
route del -net 10.10.10.0/24 gw 192.168.0.1

Or
route del eth0

If you are using Debian then remove it from config file /etc/network/interfaces, look for line such as follows:
gateway 192.168.1.254

Hope this helps read man page of route for more info and examples
 
Old 03-25-2006, 02:28 PM   #3
__spc__
Member
 
Registered: Feb 2006
Location: Bridgend, Wales
Distribution: Kubuntu 10.04.25 (Feb 2011)
Posts: 172

Original Poster
Rep: Reputation: 30
I tried: route del default dev eth0

But when next I boot up Linux, the removed default path is back. I want to remove this path as when I ping my router on 192.168.1.1, I get host unreachable:

PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
From 192.168.1.106 icmp_seq=1 Destination Host Unreachable
From 192.168.1.106 icmp_seq=2 Destination Host Unreachable
From 192.168.1.106 icmp_seq=3 Destination Host Unreachable
From 192.168.1.106 icmp_seq=5 Destination Host Unreachable
From 192.168.1.106 icmp_seq=6 Destination Host Unreachable
From 192.168.1.106 icmp_seq=7 Destination Host Unreachable

Interestingly, .106 is the IP address I assigned to my eth0 NIC. This why I want to remove this path. However, AFTER executing 'route del default dev eth0', I still get the same PING error.

Only when I do 'ifconfig eth0 down' do I get the successful ping, i.e. a ping from .102.

This is not what I want to have to do however - I want all my devices up (and wlan0 on .102 as default). How do I manage this?

Many thanks for any further pointers...

Last edited by __spc__; 03-25-2006 at 04:19 PM.
 
Old 03-28-2006, 02:34 AM   #4
ddnehal1
LQ Newbie
 
Registered: Feb 2006
Posts: 1

Rep: Reputation: 0
Check your /etc/sysconfig/network-scripts/ifcfg-eth0 file. if you find Gatway entry init, Remove that entry. just specified gatway entry in /etc/sysconfig/network. you might have entry in each of your ethXXX file in network-scripts and also in network file.
 
Old 03-30-2006, 11:50 AM   #5
__spc__
Member
 
Registered: Feb 2006
Location: Bridgend, Wales
Distribution: Kubuntu 10.04.25 (Feb 2011)
Posts: 172

Original Poster
Rep: Reputation: 30
Hi,

I don't have those files/folders, under Slackware 10.2.

I have sorted things by properly configuring /etc/rc.d/rc.inet1.conf, using dhcp on all NICs and assigning the IP addresses I need with DHCP_IPADDR[x]=.

The only problem now is that Linux pauses for an age when trying to DHCPCD eth0, since eth0 is not connected (but is from time to time, hence why I want it there), before progressing to DHCPCD wlan0.

Cheers - Steven.
 
  


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
two default route - help me fabiolpi Linux - Networking 2 07-06-2005 07:35 AM
remove route the_cranky_don Linux - Networking 5 04-24-2005 11:19 PM
Apache 2.0 Only shows default page wasaabi4784 Linux - Software 5 08-27-2004 04:19 PM
Route to subnet exists but I get "Network unreachable" when adding default route fciuffani Linux - Networking 4 08-18-2004 03:11 PM
Route dialup modem packets back through dialup instead of default route cable modem jogress Linux - Networking 1 10-21-2003 04:48 PM

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

All times are GMT -5. The time now is 08:39 AM.

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