Jump to content

Hard set Gateway and other IP info on CentOS Linux


wildweaselmi
 Share

Recommended Posts

[root@usna0netweb02 etc]# nano /etc/sysconfig/network


NETWORKING=yes


NETWORKING_IPV6=yes


HOSTNAME=usna0netweb02.lab.mywiseguys.com


GATEWAY=10.6.56.129



[root@usna0netweb02 etc]# /etc/init.d/networking restart




NOTE:


If you only do the editing in the /etc/network/interfaces file they will be overwritten at boot time.


Please edit /etc/sysconfig/network as described in the article as well.



You can allso set the gateway on each device by editing :


nano /etc/sysconfig/networking/devices/ifcfg-eth0


nano /etc/sysconfig/networking/devices/ifcfg-eth1


And changing the gateway declaration.



Alternativly you could use the util :


system-config-network (from both command line and X.)


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...