network-script examples

Latest response

Hi,

I was looking through both the kernel docs and the man pages but I can't seem to find network-script examples. I find examples for bonding, vlans etc etc but nothing as simple as setting up a network script.

Am I looking in the wrong place ? Am I just supposed to remember all the options ?

Thanks,

Andrew

Responses

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s1-networkscripts-interfaces.html

Alternatively, install system-config-network and run it in the console to create a basic template for your NIC and edit the result.

Hello Andrew

It would be interesting to know what search terms you tried.

I see this is tagged as RHEL6, but in case anyone is looking for this info for RHEL7 we have an explanation of network scripts here: NetworkManager and the Network Scripts

but the equivalent configuration info is here:
Using the Command Line Interface (CLI)

Thank you

{edit links}

Hi Stephen, the two RHEL7 links you have in your post above did not work... I suspect the RHEL7 links you provided "docs-redacted.redacted.redhat.com" sub domain is unreachable by non red-hatters , but for your first link, I suspect you intended this location (NetworkManager and the Network Scripts RHEL7), and for the second link, I suspect you meant this location (Using the Command Line Interface, CLI RHEL7)

thank you, fixed them.

Maybe I should phrase this differently ? What manpage or docs that are installed on a rhel machine would allow me to see network script examples ? If I want to setup virtualhosts there's something for that, something for bonding etc etc but I can't find the really simple stuff.

Where would you look ? Or am I looklng for something that doesn't exist?

Thanks

Are you talking about things like
ifcfg-br0
ifcfg-bond0

or...
ifup-eth
ifdown-ipv6

I assume you are looking for something like the earlier examples and I agree, it would be nice to see examples of a simple (or complex) bridge or several types of bonds.

EDIT: this seems like a great situation for a Red Hat Labs application to build the ifcfg-* files for you.

It seems like there should be a rather finite set of outcomes based on:
* Type of device (bridge/bond)
* options for that type of device (delay, miimon)
* interfaces to include in the device (em1, p2p1)

EDIT2: I suppose I should have looked first...
https://access.redhat.com/labsinfo/networkbondinghelper

There is the built-in doc /usr/share/doc/initscripts-/sysconfig.txt

Looking in there I don't see any examples, only a section "Files in /etc/sysconfig/network-scripts/". The subheading "Base items" lists the directives I think you are looking for.

Thanks I just logged on to post that I'd found what you put above but you beat me to it. Thanks.