2

Every time I need to configure a network interface on Fedora/CentOS/RHEL I need to access its online documentation to check which configs and values I should use in the /etc/sysconfig/network-scripts/ifcfg-* file.

I couldn't find a reference manual or any other kind of documentation that is already shipped with the system that describes that.

Is there any documentation describing the network configuration that I can look at without access to the internet?

2 Answers 2

1

I don't know if manual page exists but on CentOS or Fedora you can try to investigate: /usr/share/doc/initscripts-*/sysconfig.txt.

4
  • Thanks. It seem to have all the info needed, although in my Fedora 22 box it is located at /usr/share/doc/initscripts/sysconfig.txt. Dec 3, 2015 at 17:56
  • @Cerri, on my CentOS * stands for version.
    – taliezin
    Dec 3, 2015 at 17:59
  • You're right. I checked a machine running CentOS 6.7 and the file is located at /usr/share/doc/initscripts-9.03.49/sysconfig.txt. Dec 3, 2015 at 18:06
  • I would say that /usr/share/doc/initscripts*/sysconfig.txt works for CentOS and Fedora then. Dec 3, 2015 at 18:07
0

You could try 'man ip' but it's overly helpful. I don't make the changes often enough for memory to suffice so I've resorted to keeping a post-it note in the server room for quick reference. The basics for IPv$ on Feora/RHEL/CentOS:

/etc/resolv.conf

search domain.com
nameserver 8.8.8.8
nameserver 8.8.4.4

/etc/sysconfig/network:

NETWORKING=yes
HOSTNAME=hostname.domain.com
GATEWAY=192.168.1.1
GATEWAYDEV=em1

/etc/sysconfig/network-scripts/ifcfg-em1

DEVICE=em1
HWADDR=[MAC address: often auto-filled]
TYPE=Ethernet
UUID=[leave if auto-filled. Else exclude]
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
IPADDR=192.168.1.12
NETMASK=255.255.255.0
NETWORK=192.168.1.0
BROADCAST=192.168.1.255

Virtual adapter (if desired)

/etc/sysconfig/network-scripts/ifcfg-em1:35

DEVICE=eth0:35
BOOTPROTO=static
BROADCAST=192.168.1.255
IPADDR=192.168.1.35
NETMASK=255.255.255.0
NETWORK=192.168.1.0
ONBOOT=YES

Then activate it:

service network restart

Source: My note. Here's a similar breakdown: https://gist.github.com/fernandoaleman/2172388

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .