ubuntu 网络配置 ip dns
来源:互联网 发布:prisma 知乎 编辑:程序博客网 时间:2024/05/17 21:45
修改网络配置文件
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface 网络回环地址 默认配置
auto lo
iface lo inet loopback
# The primary network interface
auto eth0 #系统启动自动加载
iface eth0 inet static #inet标识ipv4 inet6 标识ipv6 statci静态地址 dhcp 动态地址
address 192.168.1.101 #静态ip地址
netmask 255.255.255.0 # 子网掩码
network 192.168.1.0
broadcast 192.168.1.255 #子网广播地址
gateway 192.168.1.1 #网关
# dns-* options are implemented by the resolvconf package, if installed # resolvconf package会把dns写入/etc/resolv.conf
dns-nameservers 192.168.1.100 #DNS
dns-nameservers 202.*.*.* # 备用DNS
修改dns配置文件 /etc/resolv.conf,如上述resolvconf package会把dns 写入/etc/resolv.conf ,如没有相关包自己写入
nameserver 10.10.2.8
nameservers 202.*.*.* # 备用DNS
重启网络
sudo ifdown eth0 #禁用网卡
sudo ifup eth0 #启用网卡
sudo service networking restart #重启网络服务
sudo reboot #重启计算机
临时配置网络
用下面命令临时设置网络重启服务或者计算机都会清空设置
sudo ifconfig eth0 192.168.1.101 netmask 255.255.255.0;route add default gw 192.168.1.1;echo nameserver 192.168.1.100 >/etc/resolv.conf
网络命令
ipconfig (window) ifconfig (linux) 查看ip配置
arp 令用于查询本机ARP缓存中IP地址-->MAC地址的对应关系、添加或删除静态对应关系等
ping 检查网络是否通
ubuntu 网络不稳定 可能原因IP冲突
- ubuntu 网络配置 ip dns
- ubuntu下配置网络(IP、网关、DNS)
- ubuntu配置IP & DNS
- ubuntu配置ip dns
- Ubuntu配置IP、DNS
- ubuntu下IP、DNS配置
- ubuntu下IP、DNS配置
- ubuntu下IP、DNS配置
- ubuntu下IP、DNS配置
- centos ubuntu 配置ip dns
- ubuntu 静态IP配置 以及 DNS 配置
- Ubuntu 下 IP 地址与DNS配置
- ubuntu-server-12.04.2配置IP、DNS
- ubuntu 配置ip,dns,netmask,mac
- ubuntu配置静态IP和静态DNS
- Ubuntu Server 14.04 配置固定IP、DNS
- Ubuntu 15.04配置静态IP和DNS
- debian/ubuntu系统,IP DNS MTU 配置
- Python学习23:函数装饰器的使用(方法重用)
- 看来时间的考虑公司快乐的歌了看电视剧立刻感受到了
- HDU4355 Party All the Time (三分搜索)
- 曹格自曝女儿暗恋feyman 儿子默默奉献喜欢黄多多
- SQL server 数据库的连接
- ubuntu 网络配置 ip dns
- 装Windows系统的三种方法分享!
- comboBox
- php-mysql扩展
- hdu 1249 N个三角形把平面分成几个区域
- Tk Tutorial - 11. Fonts, Colors, Images
- 链表和数组的优缺点
- Hibernate的HQL多参数查询
- 使用GDI加载PNG实现自定义不规则按钮