<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Need to change gateway in Linux in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/need-to-change-gateway-in-linux/m-p/4747208#M43495</link>
    <description>The default gateway is normally configured in either the global network configuration file /etc/sysconfig/network or in one of the interface-specific configuration files, named like /etc/sysconfig/ifconfig-*.&lt;BR /&gt;&lt;BR /&gt;If your gateway is 11.22.33.44, you'll find a setting:&lt;BR /&gt;&lt;BR /&gt;GATEWAY=11.22.33.44&lt;BR /&gt;&lt;BR /&gt;in one of the above-mentioned files.&lt;BR /&gt;&lt;BR /&gt;If you only change the GATEWAY= line in the file, the change would take effect only after you reboot the system or run ifdown &amp;amp; ifup on the appropriate network interface.&lt;BR /&gt;&lt;BR /&gt;To make the change immediately, you must also use the "route" command to change the current gateway. For example, to change the gateway immediately from 11.22.33.44 to 22.33.44.55:&lt;BR /&gt;&lt;BR /&gt;route del default gw 11.22.33.44&lt;BR /&gt;route add default gw 22.33.44.55&lt;BR /&gt;&lt;BR /&gt;If you only use the "route" command, the gateway will be changed, but your change will be lost the next time the system is rebooted. So you must *both* use the route command to make the actual change, *and* edit the configuration file so that the change will be permanent.&lt;BR /&gt;&lt;BR /&gt;If only the gateway is changed (and the host IP address and netmask will stay as-is), the change can be made without restarting any services. &lt;BR /&gt;&lt;BR /&gt;You should not make this change over a regular SSH/telnet/rlogin etc. connection, as deleting the old default gateway may break your session. A remote console system like iLO uses a separate network interface at the hardware level, so it would be safe to use.&lt;BR /&gt;&lt;BR /&gt;A reboot is not strictly _necessary_, but very much recommended: it ensures any connections that are interrupted by the gateway change are cleaned up, and it confirms the new gateway is correctly configured.&lt;BR /&gt;&lt;BR /&gt;MK</description>
    <pubDate>Wed, 02 Feb 2011 12:08:13 GMT</pubDate>
    <dc:creator>Matti_Kurkela</dc:creator>
    <dc:date>2011-02-02T12:08:13Z</dc:date>
    <item>
      <title>Need to change gateway in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-to-change-gateway-in-linux/m-p/4747207#M43494</link>
      <description>Hi Gurus,&lt;BR /&gt;&lt;BR /&gt;I need to change the gate way in my linux box.&lt;BR /&gt;&lt;BR /&gt;root @up-p03:~# uname -a&lt;BR /&gt;Linux up-p03 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux&lt;BR /&gt;root @up-p03:~# more /etc/redhat-release&lt;BR /&gt;Red Hat Enterprise Linux Server release 5.4 (Tikanga)&lt;BR /&gt;root @up-p03:~#&lt;BR /&gt;&lt;BR /&gt;Pls guide me the procedure to o it in a production Box.&lt;BR /&gt;&lt;BR /&gt;Do reboot needed?&lt;BR /&gt;what are the files needed to modify?&lt;BR /&gt;any services needed to restarted?&lt;BR /&gt;&lt;BR /&gt;many thanks for your help.&lt;BR /&gt;&lt;BR /&gt;Rgds&lt;BR /&gt;Sree</description>
      <pubDate>Wed, 02 Feb 2011 08:01:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-to-change-gateway-in-linux/m-p/4747207#M43494</guid>
      <dc:creator>Sreer</dc:creator>
      <dc:date>2011-02-02T08:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: Need to change gateway in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-to-change-gateway-in-linux/m-p/4747208#M43495</link>
      <description>The default gateway is normally configured in either the global network configuration file /etc/sysconfig/network or in one of the interface-specific configuration files, named like /etc/sysconfig/ifconfig-*.&lt;BR /&gt;&lt;BR /&gt;If your gateway is 11.22.33.44, you'll find a setting:&lt;BR /&gt;&lt;BR /&gt;GATEWAY=11.22.33.44&lt;BR /&gt;&lt;BR /&gt;in one of the above-mentioned files.&lt;BR /&gt;&lt;BR /&gt;If you only change the GATEWAY= line in the file, the change would take effect only after you reboot the system or run ifdown &amp;amp; ifup on the appropriate network interface.&lt;BR /&gt;&lt;BR /&gt;To make the change immediately, you must also use the "route" command to change the current gateway. For example, to change the gateway immediately from 11.22.33.44 to 22.33.44.55:&lt;BR /&gt;&lt;BR /&gt;route del default gw 11.22.33.44&lt;BR /&gt;route add default gw 22.33.44.55&lt;BR /&gt;&lt;BR /&gt;If you only use the "route" command, the gateway will be changed, but your change will be lost the next time the system is rebooted. So you must *both* use the route command to make the actual change, *and* edit the configuration file so that the change will be permanent.&lt;BR /&gt;&lt;BR /&gt;If only the gateway is changed (and the host IP address and netmask will stay as-is), the change can be made without restarting any services. &lt;BR /&gt;&lt;BR /&gt;You should not make this change over a regular SSH/telnet/rlogin etc. connection, as deleting the old default gateway may break your session. A remote console system like iLO uses a separate network interface at the hardware level, so it would be safe to use.&lt;BR /&gt;&lt;BR /&gt;A reboot is not strictly _necessary_, but very much recommended: it ensures any connections that are interrupted by the gateway change are cleaned up, and it confirms the new gateway is correctly configured.&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Wed, 02 Feb 2011 12:08:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-to-change-gateway-in-linux/m-p/4747208#M43495</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2011-02-02T12:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: Need to change gateway in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-to-change-gateway-in-linux/m-p/4747209#M43496</link>
      <description>Hi Sree,&lt;BR /&gt;&lt;BR /&gt;Please follow the instructions as mentioned by matti for adding a default gateway.&lt;BR /&gt;&lt;BR /&gt;if you want to add route for a particular network then use the command&lt;BR /&gt;#iproute add &lt;NETWORK&gt; via &lt;GATEWAY ip=""&gt;&lt;BR /&gt;&lt;BR /&gt;to make this permanent edit the config file&lt;BR /&gt;/etc/sysconfig/network-scripts/route-ethX&lt;BR /&gt;&lt;BR /&gt;network address/mask via gateway&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Abushad&lt;/GATEWAY&gt;&lt;/NETWORK&gt;</description>
      <pubDate>Thu, 03 Feb 2011 07:24:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-to-change-gateway-in-linux/m-p/4747209#M43496</guid>
      <dc:creator>Abushad</dc:creator>
      <dc:date>2011-02-03T07:24:27Z</dc:date>
    </item>
  </channel>
</rss>

