6 1网络基础 1.3网络接囗卡 口计算机与网络的连接是通过网络接口卡实现 ■网络接口卡( Network Interface Card),称为通信适配器或网络适配器 ( network adapter),俗称为网卡。 口网卡上面装有处理器和存储器(包括RAM和ROM)。 ■网卡和局域网之间的通信是通过电缆或双绞线以串行传输方式进行,网卡 和计算机之间的通信则是通过计算机主板上的O总线以并行传输方式进 行,因此网卡的一个重要功能就是要进行串行/并行转换。 由于网络上的数据传输速率和计算机总线上的数据传输速率并不相同,因 此在网卡中必须装有对数据进行缓存的存储芯片。 可南中医药大学/阮晓龙/13938213680/ht/ linuxxg nactcmeaucn/htp/w5 xuewen cn
1网络基础 3网络接口卡 口网络接口指的是网络设备的各种接口,主要为以太网接口。 常见的以太网接口类型有R」-45接口、RJ-1接口、SC光纤接口、FDD接口 以及 Console接口等。 PC型 5C型 光杯体器,并怎为式是开卧业 为放们 手需,温机上阳的要 型 LC型 开速里子开列壳旨图 证型升时的在 为松,(对于获 过士售,于光好缓 可南中医药大学/阮晓龙/13938213680/ht/ linuxxg nactcmeaucn/htp/w5 xuewen cn
8 2网络配置 21 entos网络配置 Centos中使用多个配置文件进行网络配置。 表32 Centos主要网络配置文件 查置文件名称 功能 /etc/sysconfig/network-scriptsnf" IP地址、子网掩码配置文件 letcresolv con DNs配置文件 /etc/sysconfig/network 主机名配置文件 /etc/hosts 受置主机和P绑定信息 可南中医药大学/阮晓龙/13938213680/ht/ linuxxg nactcmeaucn/htp/w5 xuewen cn
we so Home /chool 文内D工①出项卡 9 a●+。·5·A·曹::0白·②, 2网络配二 [rootecentos7teach -J cat /etc/sysconfig/network-scripts/ifefg-ens3 Centos网络配置 BROWSER ONLYEno IPV4 FAILURE FATALEno IPV6INITayes IPV6_AUTOCONFyes TYPEs" Ethernet,表示类型为以太网 IPV6_DEFROUTEyes BOOTPROTO"static",表示启用静态的地址 IPV6 FAILURE FATALEnO 默认是nne如果想要动态获取P地址这里应 IPV6_ADDR_GEN_MDDEastable-privacy 该修改为dhcp DEFROUTE·yes,表示默认路由 UUID:04fdcf6d-021b-4caa-b471-5a65e1771age DEVICEaens32 NAME·ens32",和网 标签,如果这里是eth0 PREF工X=24 UUD.网卡的唯一标识,系统自动生成 GATEMAY-10 10.3.1 DNs1=211.69.32.8 HWADDR,网卡的MAC地址 DNs2=211.69.32.10 ADDR10103213,表示设置的P地址,这 IPV6_ PRIVACYano 个功能,可以在 [rootacentos7teach -]a 卡配置文件中配置多个印地址,如果配置第二 写为伊ADDR1,依次类推 PREFD=24,设置子网施码,往意,这里设置 魔码的方法 2552552550,26代表255255255.192 REFIXO与上面的ADDR功能类似 主效,认下阳挂件中言的关地址 letc/sysconhiginetwork文件中设置网关 DNs1211869328°,设置DNs地址 可南中医药大学/航晓龙/出m
we so Home /chool 文内D工①出项卡 10 a●+。·5·A·曹::0白·②, 2网络配 [rootacentos?teach -): cat /etc/resolv. conf easerver 69.33.manager Centos网络配置 rootacentos7teach -J cat /etc/sysconfig/network g cat /etc/hosts 27.0.0.1 localhost TestName localhost localhost 4. local domain #/etc/nsswitchconf 8 An example Name service Switch config file. This file should be orted with the most-used services at the beginning The entry[ NOTFOUN。= 0' means that the search for a e no Is server responding) then the search continues with the next entry. a valid entries include: solu Use NIS+ (NIs version 3) Use NIS (NIS version 2), also called YP Use DNs (Domain Name Service) Use the local database ( db) files compat Use NIS on compat mode hesiod use Hesiod for user lookups [NOTFOUNDareturn stop searching if not found so far in front of files"for entries you want to be oked rst atabases passwd: db files nisplus nis 可南中医药大学/阮晓龙/出