Debian Redhat network config

For  Debian Linux

# dhcp
auto eth0
iface eth0 inet dhcp

# static
auto eth0
iface eth0 inet static
address 10.16.3.99
netmask 255.255.255.0
network 10.16.3.0
broadcast 10.16.3.255
gateway 10.16.3.1

/etc/init.d/networking restart

For Redhat Linux

临时修改网卡IP
ifconfig eth0 172..16.0.5/16 up

添加网关 
route add default gw 172.16.0.111

临时修改默认的DNS
vim /etc/resolv.conf
vim /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
HWADDR=00:0C:29:36:**:**
TYPE=Ethernet
UUID=7eaffa26-ee97-4d23-a333-a84da8341***
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=172.16.0.103
NETMASK=255.255.255.0
GATEWAY=172.16.0.111
DNS1=114.114.114.114
DNS2=8.8.8.8
时间: 2024-10-05 23:36:19

Debian Redhat network config的相关文章

network config - centos7

OS: v7.5 Platform: VMware 14.1 When we complete the minimum installation, the network card configuration. 1. show status #nmcli d 2. Alter cfg #cd /etc/sysconfig/network-scripts/ The native example is ens32. #vi ifcfg-ens32 Modify the “ONBOOT” value

network config

ifcfg-ens32 1 --static 2 TYPE=Ethernet 3 BOOTPROTO=static 4 DEFROUTE=yes 5 IPV4_FAILURE_FATAL=no 6 IPV6INIT=yes 7 IPV6_AUTOCONF=yes 8 IPV6_DEFROUTE=yes 9 IPV6_FAILURE_FATAL=no 10 NAME=ens32 11 UUID=62fdc2e9-3be7-4558-a846-f6ba391d8db7 12 ONBOOT=no 13

Linux系统(Ubuntu/Debian/RedHat/CentOS)超级简单的samba配置文件smb.conf

1.超简单的smb.conf 该配置文件对Ubuntu和CentOS都好用. #============== Global Settings ============== [global] ## Browsing/Identification ### workgroup = mshome server string = samba security = share wins support = no guest account = wslu #============== Share Defin

RH network

Red hat enterprise linux variants Two install sets available 两种安装方案 Server rhel server rhea advanced platform Desktop rhel desktop workstation option Multi-OS option RH network A comprehensive software delivery,system management,and monitoring framew

openSuSE DNS SERVER CONFIG

system:openSuSE 12.3(much better and frendly than the 12.1 in network config)1,network config,attention the Domain Name,site is the zone name,linux-johv is mac name2,dns config by yast2a)NS Records of 211.168.192.in-addr.arpa and site.test.com are sa

Switching from Redhat Linux to Oracle Linux in about 5,000 easy steps

Wayback When I remember being at Oracle Open World when Larry Ellison unveiled Oracle Enterprise Linux (OEL, which is now just Oracle Linux, or OL).    I think I even have a foam Oracle penguin and maybe even a t-shirt somewhere.  I was trying to und

redhat 5 系列 diy mini linux 之二

本文接上篇,假设mini linux挂载在宿主机的/mnt/boot和/mnt/sysroot下,本文的一些脚本都是简化的,只求达到我们的目的,linux的工作流程比想象中复杂的多 现在我们有一个可用的mini linux,让我们对它进行一些扩展 重新挂载根文件系统为读写 首先给minlinux提供个fstab配置文件,内容如下: 在rc.sysinit里面添加mount -o remount,rw / 如果此时mini linux 的etc目录下没有mstab文件,则使用 mount -o -

Network Basic Commands Summary

Network Basic Commands Summary set or modify hostname a)     temporary ways hostname NEW_HOSTNAME, but if you reboot your system, it will disabled. b)    permanent ways: edit "/etc/sysconfig/network" HOSTNAME, then restart system, it will effect

docker network

前言:前面的部分一直都是单机跑docker,但实际生产环境不可能只用一台来跑.肯定会用到多台,因为他们都是内部私有ip,那么多台主机之间的容器如何通信?这个是个很头疼的问题!目前主流几种方法如下: 1.使用路由机制打通网络 2.使用Open vSwitch(OVS)打通网络 3.使用flannel来打通网络 4.使用Quagga来实现自动学习路由 第一种:使用路由机制打通网络 使用linux的路由来打通网络 优点: 常规路由技术 使用传统网络技术 简单 高性能 缺点: 与现有网络融为一体 灵活性