zoukankan      html  css  js  c++  java
  • How to configure network interface in Ubuntu

    How to configure network interface in Ubuntu

    How to configure network interface in Ubuntu

    It is likely that the computers in a network use dhcp to get ip addresses, that means these ip addresses will change frequently if you move the computer to another interface of the router or switch (which is exactly what I am facing right now), I want to configure my computer to use static ip address, the easiest way to do this is modify the configure file in /etc/network/interfaces, following these steps:
    1.Use ifconfig to figure out which interface you are currently using (eth0/1); 2.Use ip route show to find the default gateway (the first line starting with default); 3.Sudo gedit /etc/network/interfaces:
    Add the following information to that file:

    iface eth0 inet static
    address 172.31.8.22
    gateway 192.31.8.1
    netmask 255.255.255.0
    dns-nameservers 202.202.0.33 8.8.8.8 8.8.4.4

    4.Restart networking services:
    sudo service network-manager restart
    sudo service networking restart
    sudo service resolvconf restart

    Author: wujing

    Created: 2014-12-25 四 10:06

    Emacs 24.3.1 (Org mode 8.2.10)

  • 相关阅读:
    Web项目的WEB-INF目录使用说明以及重定向与转发
    HTTP中的重定向和请求转发的区别
    001杰信-创建MyEclipse与maven项目
    009Maven_建立私服——报错问题
    008Maven_建立私服
    007Maven_在Myeclipse创建web项目
    006Maven_在Myeclipse创建java项目
    005Maven_Myeclipse和Maven整合
    微服务架构下分布式事务方案
    推荐:Java性能优化系列集锦
  • 原文地址:https://www.cnblogs.com/wujingcqu/p/4183988.html
Copyright © 2011-2022 走看看