Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 04-18-2013, 02:52 PM   #1
LQ Newbie
Registered: Sep 2012
Location: Deltaville VA
Distribution: Navigatrix
Posts: 21

Rep: Reputation: Disabled
How to add a static route to wired router without dropping wifi internet.

Trying to educate myself on network routing and have run into a problem I think I know the solution to, just don't know how to fix it. Explantions found in searches are way past my learning curve.

Fedora 17 (Xfce4.10)
(wlan0) Wireless nic used for internet gateway
Reserved DHCP address
Gateway address

(em1) wired network card
Presently no assigned ip address
Want to connect to another wireless router via ethernet
Gateway address

A little history... figured out in order to connect to both routers at the same time,I needed to change the ip of the wired router, and that went ok. Problems start when I leave the wired router configured as a DHCP server. If I connect to the wired lan, I loose the internet routing on the wireless lan. Disconnect from the wired lan and it's back. Not loosing the wireless connection just the internet path. Assume Fedora is assigning higher priority to the wired DHCP server and looking for a path to the internet which doesn't exist.

Ok, disable DHCP on the wired router. Problem is now the "Network Connections Manager" is asking the router for an address, which it cannot supply.

Assume I need to set up a "static route" on both my box and the wired router so they can find each other. Don't mind futzing with the settings on the router (Love that reset button) but am more than a little leery about messing with etc/sysconfig files without a little guidance.

The Fedora documentation is a little dense, so any pointers would be appreciated.


After some additional searching tried the following with both networks connected and DHCP running on both
[david@wilson ~]$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         UG    0      0        0 em1   U     0      0        0 wlan0   U     0      0        0 em1

[david@wilson ~]$ sudo route del default gw
[david@wilson ~]$ sudo route add default gw

[david@wilson ~]$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         UG    0      0        0 wlan0   U     0      0        0 wlan0   U     0      0        0 em1
Thought I had a (temporary) solution. However running
resulted in a return from not google's ip (?) No internet access as before
despite the right gateway

The search continues grasshopper..

Last edited by captdavid1949; 04-18-2013 at 03:43 PM.
Old 04-18-2013, 07:53 PM   #2
LQ Newbie
Registered: Sep 2012
Location: Deltaville VA
Distribution: Navigatrix
Posts: 21

Original Poster
Rep: Reputation: Disabled
Solved... sort of

Simple.. but like the jitterbug it plumb evaded me.

In network manager edit the current wired connection and change from "Automatic"
to Automatic (DHCP) Addresses only
Save and exit

Open Terminal
# route del default gw (wired connection gateway)
# route add default gw (wireless connection gateway)

Done! Internet access available with both networks up, running DHCP.

Note: Found this to work only until I disconnected from wired network. Upon reconnection default gateway reverted to wired network. Work around is as follows:

Open file /etc/sysconfig/network-scripts/ifcfg-[my-wired-connection-name]
Change Entries DEFROUTE=yes and IPV6_DEFROUTE=yes to =no
Save changes

"Your Mileage May Vary" as I have probably done a bunch of things that ain't right, but it works for me.


Last edited by captdavid1949; 04-18-2013 at 08:38 PM.


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
permanently add static route glock19 Linux - Networking 27 07-27-2015 04:59 PM
ADSL WIFI ROUTER, SETTING DIFERENT IP RANGES BETWEEN WIRED and WIFI Corsari Linux - Networking 12 12-12-2012 08:27 AM
Wired network static IP default route won't save correctly in Ubuntu 9.10 Skaperen Linux - Networking 1 12-29-2009 10:13 PM
Static LAN (wired and WiFi) IP in Debian setup problems. CloudyWizzard Debian 15 03-29-2009 02:07 AM
Static route to a router? Milkman00 Linux - Networking 9 02-09-2003 11:11 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:19 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration