netFusion Forums  

Go Back   netFusion Forums > Main Category > CentOS / Linux Info

CentOS / Linux Info Quick Hints for tasks in CentOS and Linux

Reply
 
Thread Tools Display Modes
  #1  
Old 11-15-2009, 11:17 AM
netFusion netFusion is offline
Administrator
 
Join Date: Oct 2005
Posts: 72
netFusion has disabled reputation
Default Change Default Gateway in CentOS

Q. How do I setup up a default Gateway for all interfaces (eth0 and eth1) under CentOS Linux 5?

A.There are different ways to setup TCP/IP hosts so that you can reach to remote destinations. The simplest one is to setup default gateway by modifying the /etc/sysconfig/network

Setup a default Gateway

Open /etc/sysconfig/network file:
# vi /etc/sysconfig/network

Setup GATEWAY={Router-IP}, if router IP is 74.86.49.129, type:
GATEWAY=74.86.49.129


Save and close the file. Here is my complete file:
NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=wan.nixcraft.in
GATEWAY=74.86.49.129


You need to restart networking service:
# /etc/init.d/network restart
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 11:20 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright © 2001-2007 netFusion, LLC. All Rights Reserved