1 / 14

红旗 Linux

红旗 Linux. 网络配置. 网络通信协议. TCP/IP NWLink NetBEUI DLC. TCP/IP 协议的安装与设置. IP 地址 32 位( IPV4 ) 128 位( IPV6 ) NetworkID + HostID (如何区分) 特殊地址 127.0.0.1 HostID 全为“ 0” HostID 全为“ 1”. TCP/IP 协议的安装与设置. 子网掩码 32 位 全 1 开头,全 0 结尾 作用:划分 NetworkID 与 HostID 与运算. 子网掩码. Source IP: 192.168.0.22

bary
Download Presentation

红旗 Linux

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 红旗Linux 网络配置

  2. 网络通信协议 • TCP/IP • NWLink • NetBEUI • DLC

  3. TCP/IP协议的安装与设置 • IP地址 • 32位(IPV4) • 128位(IPV6) • NetworkID + HostID(如何区分) • 特殊地址 • 127.0.0.1 • HostID全为“0” • HostID全为“1”

  4. TCP/IP协议的安装与设置 • 子网掩码 • 32位 • 全1开头,全0结尾 • 作用:划分NetworkID与HostID • 与运算

  5. 子网掩码 Source IP: 192.168.0.22 Subnet Mask: 255.255.255.0 Dest IP:192.168.2.22 Subnet Mask: 255.255.255.0

  6. 子网划分 1. IP地址范围:192.168.0.1---192.168.0.254 划分为多个子网,每个子网可容纳25台主机 如何划分? 2. IP地址范围:192.168.0.1---192.168.4.254 划分为多个子网,每个子网可容纳400台主机 如何划分?

  7. 默认网关 • 通信的两种情况 • 与目标主机在同一子网 • 与目标主机不在同一子网 • 通信机制 • 同一网段广播获取MAC地址直接通讯 • 不同网段将数据包交给网关 • 默认网关的概念 • 缺省路由

  8. 配置与测试TCP/IP • 图形配置工具 • IP Address • Subnet Mask • Default Gateway • DNS • 常见命令 • Ifconfig • Ping

  9. 配置与测试TCP/IP • 文本模式图形配置工具 • netconfig • IP Address • Subnet Mask • Default Gateway • DNS

  10. 配置与测试TCP/IP • 命令行配置 • ifconfig • IP Address • Subnet Mask • route • default gateway • /etc/resolv.conf • DNS

  11. 配置与测试TCP/IP • ifconfig 的用法 • 停用网卡 • ifconfig eth0 down • 启用网卡 • ifconfig eth0 up • 配置IP地址与子网掩码 • ifconfig eth0 192.168.0.180 netmask 255.255.255.0 • 注意:ifconfig配置的信息临时生效,系统重启后消失。

  12. 配置与测试TCP/IP • 网络配置脚本 • /etc/sysconfig/network-scripts • ifdown:停用网卡 • ifup:启用网卡 • ifcfg-eth0:第一块网卡配置信息文件

  13. 配置与测试TCP/IP • 通过修改配置文件配置网络 • ifcfg-eth0的内容 • DEVICE=“eth0” • BOOTPROTO=“none” • ONBOOT=“yes” • IPADDR=“192.168.0.80” • NETMASK=“255.255.255.0” • GATEWAY=“192.168.0.1”

  14. 故障检查 • Ping 127.0.0.1 • Ping 本机IP • Ping 缺省网关 • Ping 远程主机

More Related