intTypePromotion=1
zunia.vn Tuyển sinh 2024 dành cho Gen-Z zunia.vn zunia.vn
ADSENSE

Fedora Linux Network Services

Chia sẻ: Vn Minh | Ngày: | Loại File: PDF | Số trang:15

92
lượt xem
12
download
 
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

In this part • Network Interface (naming, type ....) • Network Configuration Files • Interface control command and scripts • Basic routing using route command 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.

Chủ đề:
Lưu

Nội dung Text: Fedora Linux Network Services

  1. Fedora Linux Network Services 1
  2. In this part • Network Interface (naming, type ....) • Network Configuration Files • Interface control command and scripts • Basic routing using route command 2
  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. 3
  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 4
  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 5
  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. 6
  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” 7
  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 8
  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 9
  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. 10
  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 to turn off any services you don’t want. 11
  12. Other important network configuration files in the /etc/sysconfig directory • Network configuration files in /etc/sysconfig/network-scripts • IFCFG-NETWORKINTERFACENAME • IFUP AND IFDOWN 12
  13. Interface control command and scripts 13
  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 /etc/sysconfig/network-scripts called ifcfg-eth0. 14
  15. Gateways and Routers • route add -net 192.168.1.0 • route add default gw 192.168.1.1 15
ADSENSE

CÓ THỂ BẠN MUỐN DOWNLOAD

 

Đồng bộ tài khoản
2=>2