ragged-rigid
ragged-rigid
ragged-rigid
ragged-rigid
Setting a Default Gateway for Redhat / CentOS systems? @ www.digitalpains.net

Setting a Default Gateway for Redhat / CentOS systems?

mailservice

There are two possible ways for adding a default gateway.

Option 1: You can add a gateway definition to  the /etc/sysconfig/network file. This definition will apply to all network interfaces.

Let’s say that your gateway is 192.168.4.1,  then you need to add the following line to /etc/sysconfig/network file.
GATEWAY=192.168.4.1

Option 2: You can define a default gateway for a specific interface. For this approach you need to modify your nterface definition. Let’s say we want to modify eth0 then you need to add the same definition to the  /etc/sysconfig/network-scripts/ifcfg-eth0 file.

For both options, your modifications will be activated after you restart your networking service.

root@centos ~]# /etc/init.d/networking restart

Related posts:

  1. Keeping the old kernel as default after a kernel upgrade
  2. KVM And Bridge Network Definition On Ubuntu
  3. Ubuntu KVM Virtualization Host: Networking
  4. Disabling SELinux on CentOS
  5. Configuring an additional Yum repository.

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

 
about
jobs support