开发者社区> 问答> 正文

Linux 如何进行网络配置?

Linux 如何进行网络配置?

展开
收起
gxx1 2022-03-30 23:05:10 472 0
1 条回答
写回答
取消 提交回答
  • 1.进入目录/etc/netWork/目录

    2.用 vi 编辑器 J 开 interfaces 文件

    auto eth0

    iface eth0 inet static 采取静态地址

    address 192.168.0.111v静态 IP 地址

    netmask 255.255.255.0子网掩码

    gateway 192.168.0.1 网关

    3 /etc/init.d/networking restart

    4.如下所示:

    This file describes the netuork Interfaces avallable on your systenand how to act ivate them. For more informat ion, see interfaces (5) ,

    The loopback netuork interface

    auto lo

    lface lo inet loopback

    The primary netuork interface

    allow-hotplug ethộ

    withface etho inet dhcp

    iface etho inet static

    address 192.168.0.111

    netmask255.255.255.0

    ateuay 192 , 168.0.1

    ins-nameserver 192.168.0.1

    ins-search locaIhost

    2022-03-30 23:06:43
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
Alibaba Cloud Linux 3 发布 立即下载
ECS系统指南之Linux系统诊断 立即下载
ECS运维指南 之 Linux系统诊断 立即下载