1. Trang chủ
  2. » Công Nghệ Thông Tin

Fedora Linux Network Services pdf

15 149 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 15
Dung lượng 115,68 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

• Network Configuration Files • Interface control command and scripts • Basic routing using route command... Network configuration files important network configuration files in the /etc

Trang 1

Fedora Linux Network Services

Trang 2

In this part

• Network Interface (naming, type )

• Network Configuration Files

• Interface control command and scripts

• Basic routing using route command

Trang 3

Network interface

• The first Ethernet NIC is given the alias eth0, the second Ethernet NIC is given the alias eth1, and so on

• Loopback lo

Trang 4

Network configuration files

important network configuration files in the /etc/sysconfig directory

• Set up the IP addresses of your network interfaces Make changes to:

• /etc/sysconfig/network-scripts/ifcfg-eth0

• /etc/sysconfig/network-scripts/ifcfg-eth1

Trang 5

Network configuration Files

• Make a local file of hostname to IP address mappings Make changes to:

• /etc/hosts

• Set up the device order from which hostnames are looked up Make changes to:

• /etc/nsswitch.conf

Trang 6

SETTING UP THE IP

ADDRESS

• If you haven’t set the IP address already in the installation process, you need to edit the configuration files by hand

• To set the IP address on your first Ethernet interface eth0, edit the

/etc/syscon-fig/network-scripts/ifcfg-eth0 file

Trang 7

• The /etc/sysconfig/network-scripts/ifcfg-eth0 file

• DEVICE=”eth0”

• BOOTPROTO=”none”

• BROADCAST=192.168.1.255

• IPADDR=”192.168.1.10”

• NETMASK=”255.255.255.0”

• NETWORK=192.168.1.0

• ONBOOT=”yes”

• USERCTL=no

• IPXNETNUM_802_2=””

• IPXPRIMARY_802_2=”no”

• IPXACTIVE_802_2=”no”

• IPXNETNUM_802_3=””

• IPXPRIMARY_802_3=”no”

• IPXACTIVE_802_3=”no”

• IPXNETNUM_ETHERII=””

• IPXPRIMARY_ETHERII=”no”

• IPXACTIVE_ETHERII=”no”

Trang 8

SETTING UP A DEFAULT

GATEWAY

• Change the /etc/sysconfig/network file

to contain just the IP address of the gateway, like this:

• 192.168.1.1

Trang 9

SETTING UP THE DNS

SERVERS

• Edit /etc/resolv.conf to contain a list of nameservers, like so:

• nameserver 192.168.1.1

• nameserver 203.14.1.3

Trang 10

SETTING UP THE DEVICE ORDER FROM

WHICH HOSTNAMES ARE LOOKED UP

• The place to set up this configuration is in the

/etc/nsswitch.conf file Edit

• the following line: hosts:files nisplus dns

• The order of the words files, nisplus, and dns determines which method is checked first Files refers to the /etc/hosts file, nisplus refers to any nisplus

• servers you may have on your network, and dns refers to any DNS servers you have set

up your machine to reference.

Trang 11

Starting up network services from xinetd

• /etc/xinetd.conf

• At the end of the xinetd.conf file is a line that indicates that all the files in the

• /etc/xinetd.d

• are also included in the configuration

This means that you need to go through the files in that directory as well in order

Trang 12

Other important network configuration files

in the /etc/sysconfig directory

• Network configuration files in

/etc/sysconfig/network-scripts

• IFCFG-NETWORKINTERFACENAME

• IFUP AND IFDOWN

Trang 13

Interface control command and scripts

Trang 14

Configuring the network

card

• ifconfig eth0 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255

• A file is created in

ifcfg-eth0

Trang 15

Gateways and Routers

• route add -net 192.168.1.0

• route add default gw 192.168.1.1

Ngày đăng: 27/06/2014, 19:20