On 12/04/2013 03:45 PM, ToddAndMargo wrote:
>> On Dec 4, 2013 16:14, ToddAndMargo <[log in to unmask]> wrote:
>>
>> > On Wed, Dec 4, 2013 at 2:41 PM, ToddAndMargo <[log in to unmask]>
>> wrote:
>> >> Hi All,
>> >>
>> >> SL 6.5, 64 bit.
>> >>
>> >> I had to manually configure a Tread Net TEW-638PAP as a wireless
>> >> bridge yesterday. In the process, I had to change my default
>> >> router (a.k.a. gateway) three times. (Networking too, but
>> >> that worked.) The TEW-638PAP was hooked to my second
>> >> Ethernet port (eth1).
>> >>
>> >> Problem, I had to reboot to get the new default route to
>> >> stick.
>> >>
>> >> Now I know of two places I can put my default router:
>> >>
>> >> /etc/sysconfig/network <--- where I put it
>> >> GATEWAY=192.168.10.100 and
>> >>
>> >> /etc/sysconfig/network-scripts/ifcfg-eth1
>> >> GATEWAY=192.168.10.100
>> >>
>> >> I am using /etc/sysconfig/network and the "vi" method.
>> >>
>> >> To check my default router setting, I used "netstat -rn"
>> >> and looked for the tags "UG". (It is at the bottom of
>> >> the list.)
>> >>
>> >> To try to get the new default router setting to take,
>> >> I used:
>> >>
>> >> service network restart; netstat -rn
>> >> and
>> >> ifdown eth1; ifup eth1; netstat -rn
>> >>
>> >> No joy with either method. Whatever gateway I had when
>> >> I booted, was the one I was stuck with. Reboot
>> >> was the only way to make the change. I even tried
>> >> manually configuring it with "route". No joy there
>> >> either. :'(
>> >>
>> >> What did I do wrong?
>> >>
>> >> Many thanks,
>> >> -T
>>
>>
>> On 12/04/2013 12:20 PM, Paul Robert Marino wrote:
>> > ip route delete default via xxx.xxx.xxx.xxx dev eth0
>> > then
>> > ip route add default via yyy.yyy.yyy.yyy dev eth0
>> >
>> > replace xxx.xxx.xxx.xxx with your current router and yyy.yyy.yyy.yyy
>> > with the new one
>> >
>> > there is also an "ip route replace " syntax as well if you need it
>> > see "man ip" for more details ;-)
>>
>>
>> Hi Paul,
>>
>> Worked beautifully. Thank you!On 12/04/2013 02:42 PM, Paul Robert
>> Marino wrote:> The delete failed
>> This is because when it ran ip route delete default via it used the new
>> address instead of the old one.
>> So the commands failed.
>> This is actually a fairly common one.
>> It always happens with those scripts when you modify the configs;
>> because they only look at the config file and ignore the current running
>> state.
>> Those scripts were written for ifconfig and route commands on the 1.x
>> kernel and latter patched to use the up command incrementally and as
>> such there are some core things they don't do quite the way you would
>> expect.
>> Again as I've said multiple times they need a fundamental rewrite and
>> network manager isn't the answer for servers
>>
>>
>>
>> -- Sent from my HP Pre3
>>
>> ------------------------------------------------------------------------
>
>> Any idea why restarting the network service did not catch
>> my change to /etc/sysconfig/network?
>>
>> And, should I be setting my router in /etc/sysconfig/network
>> or /etc/sysconfig/network/scripts/ifcfg-eth1?
>>
>> -T
>>
>> Fun command line:
>>
>> $ ip route | grep -i default | awk '{print $3}'
>> 192.168.240.1
>
>
> On 12/04/2013 02:42 PM, Paul Robert Marino wrote:> The delete failed
> > This is because when it ran ip route delete default via it used the new
> > address instead of the old one.
> > So the commands failed.
> > This is actually a fairly common one.
> > It always happens with those scripts when you modify the configs;
> > because they only look at the config file and ignore the current running
> > state.
> > Those scripts were written for ifconfig and route commands on the 1.x
> > kernel and latter patched to use the up command incrementally and as
> > such there are some core things they don't do quite the way you would
> > expect.
> > Again as I've said multiple times they need a fundamental rewrite and
> > network manager isn't the answer for servers
> >
> >
> >
> > -- Sent from my HP Pre3
> >
> > ------------------------------------------------------------------------
>
> That explains it. Thank you.
https://bugzilla.redhat.com/show_bug.cgi?id=1038344
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computers are like air conditioners.
They malfunction when you open windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|