source:
chapter07/network.xml@
d16b694b
Last change on this file since d16b694b was 1d317bb, checked in by , 20 years ago | |
---|---|
|
|
File size: 1.4 KB |
Rev | Line | |
---|---|---|
[673b0d8] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?> |
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ | |
3 | <!ENTITY % general-entities SYSTEM "../general.ent"> | |
4 | %general-entities; | |
5 | ]> | |
[3be4d97] | 6 | <sect1 id="ch-scripts-network"> |
[00a2bd12] | 7 | <title>Configuring the network script</title> |
[673b0d8] | 8 | <?dbhtml filename="network.html"?> |
9 | ||
10 | <indexterm zone="ch-scripts-network"> | |
11 | <primary sortas="d-network">network</primary> | |
12 | <secondary>configuring</secondary></indexterm> | |
[00a2bd12] | 13 | |
14 | <sect2> | |
15 | <title>Creating network interface configuration files</title> | |
16 | ||
[1d317bb] | 17 | <para>The following command creates a sample <filename>ipv4</filename> file for the |
[a088964] | 18 | <filename>eth0</filename> device:</para> |
[00a2bd12] | 19 | |
[a088964] | 20 | <screen><userinput>cd /etc/sysconfig/network-devices && |
21 | mkdir ifconfig.eth0 && | |
22 | cat > ifconfig.eth0/ipv4 << "EOF" | |
[00a2bd12] | 23 | ONBOOT=yes |
[a088964] | 24 | SERVICE=ipv4-static |
[00a2bd12] | 25 | IP=192.168.1.1 |
[ba85054d] | 26 | GATEWAY=192.168.1.2 |
[c0155c7] | 27 | PREFIX=24 |
[00a2bd12] | 28 | BROADCAST=192.168.1.255 |
[f67f5cf] | 29 | EOF</userinput></screen> |
[00a2bd12] | 30 | |
31 | </sect2> | |
32 | ||
[f67f5cf] | 33 | <sect2 id="resolv.conf"> |
[45340ae] | 34 | <title>Creating the /etc/resolv.conf file</title> |
[f67f5cf] | 35 | <indexterm zone="resolv.conf"><primary sortas="e-/etc/resolv.conf">/etc/resolv.conf</primary></indexterm> |
[45340ae] | 36 | |
[1d317bb] | 37 | <para>Create the file by running the following:</para> |
[45340ae] | 38 | |
[f67f5cf] | 39 | <screen><userinput>cat > /etc/resolv.conf << "EOF" |
[45340ae] | 40 | # Begin /etc/resolv.conf |
41 | ||
[a088964] | 42 | domain {<replaceable>[Your Domain Name]</replaceable>} |
[f67f5cf] | 43 | nameserver <replaceable>[IP address of your nameserver]</replaceable> |
[45340ae] | 44 | |
45 | # End /etc/resolv.conf | |
[f67f5cf] | 46 | EOF</userinput></screen> |
[45340ae] | 47 | |
48 | </sect2> | |
49 | ||
[00a2bd12] | 50 | </sect1> |
Note:
See TracBrowser
for help on using the repository browser.