Ubuntu系统网络配置
2016-12-01 20:35
381 查看
http://jingyan.baidu.com/article/f25ef25414e8ea482d1b8265.html
Ubuntu网络配置如下:Ubuntu上连了两块网卡,eth0为外网的eth1为内网的eth0上IP为自动获取eth1上为手工设置
1、打开Ubuntu的/etc/network/interfaces文件 。默认内容如下
auto lo iface lo inet loopback
2、如果以DHCP方式配置网卡,则改为:auto eth0 iface eth0 inet
dhcp也可以在命令行下直接输入下面的命令来获取地址sudo dhclient eth0
3、如果你想配置静态IP地址,你需要编辑/etc/network/interfaces,并输入以下几行(假设你的网卡是eth0)
sudo vi /etc/network/interfaces
# The primary network interface
auto eth0
iface eth0 inet static //指定为static
address 192.168.17.110 //IP地址
gateway 192.168.17.1 //网关
netmask 255.255.255.0 //子网掩码
network 192.168.17.0 //这个广播网络 有没有匀可
broadcast 192.168.17.255 //广播 有没有匀可
4、编辑好以后步骤后退出,重新启动你的网络设备
sudo /etc/init.d/networking restart
5、设置Ubuntu网络配置系统的hostname使用以下命令格式来改系统的hostname,或者直接编辑/etc/hostname sudo hostname xchen 来设置DNS
sudo vi /etc/resolv.conf
enter the following details
search test.com
nameserver 192.168.17.2
Ubuntu网络配置如下:Ubuntu上连了两块网卡,eth0为外网的eth1为内网的eth0上IP为自动获取eth1上为手工设置
1、打开Ubuntu的/etc/network/interfaces文件 。默认内容如下
auto lo iface lo inet loopback
2、如果以DHCP方式配置网卡,则改为:auto eth0 iface eth0 inet
dhcp也可以在命令行下直接输入下面的命令来获取地址sudo dhclient eth0
3、如果你想配置静态IP地址,你需要编辑/etc/network/interfaces,并输入以下几行(假设你的网卡是eth0)
sudo vi /etc/network/interfaces
# The primary network interface
auto eth0
iface eth0 inet static //指定为static
address 192.168.17.110 //IP地址
gateway 192.168.17.1 //网关
netmask 255.255.255.0 //子网掩码
network 192.168.17.0 //这个广播网络 有没有匀可
broadcast 192.168.17.255 //广播 有没有匀可
4、编辑好以后步骤后退出,重新启动你的网络设备
sudo /etc/init.d/networking restart
5、设置Ubuntu网络配置系统的hostname使用以下命令格式来改系统的hostname,或者直接编辑/etc/hostname sudo hostname xchen 来设置DNS
sudo vi /etc/resolv.conf
enter the following details
search test.com
nameserver 192.168.17.2
相关文章推荐
- vmware ubuntu系统配置,网络配置
- CentOS和Ubuntu系统简要网络配置及常用网络管理工具汇总
- ubuntu 网络文件系统(NFS) 安装 配置
- Ubuntu系统网络应用服务器Apache配置基础
- VirtualBox 配置虚拟网卡(桥接),实现主机-虚拟机网络互通(适用于ubuntu系统)
- ubuntu系统的网络配置
- Ubuntu 16.04.1 Server 64bit 系统安装后的网络配置(Vmware Workstation 12.5 & Windows 10 X64 环境)
- DM3730开发板使用uboot通过网络下载内核和文件系统 ubuntu下配置 TFTP
- Linux(三)——ubuntu系统的网络配置
- ubuntu系统初始化网络及mysql配置
- Ubuntu系统网络配置
- 双系统网络配置(Win7+Ubuntu16.04LTS)--驱动安装及其它
- ubuntu系统下smokping网络监控工具安装配置详解
- Ubuntu系统安装、网络配置、lamp环境搭建
- ubuntu下配置pxe启动网络安装系统(pxe+dhcp+tftp+nfs)
- vmware中安装Ubuntu16.10server系统以及配置网络
- 服务器DELL-R720安装Ubuntu14.04系统与配置网络
- Ubuntu网络配置(重启有效)及双系统安装
- evolution错误--Ubuntu手记之系统配置