@[TOC](目录)
## 1. 配置IPADDR/NETMASK
1. 直接配置(重启后失效)
```
ifconfig eht0 10.238.107.1 netmask 255.255.255.0 up
```
2. 新增网卡文件(永久)
```
touch touch /etc/sysconfig/network/ifcfg-eht0
```
修改配置文件
```
vi /etc/sysconfig/network/ifcfg-eht0
```
```
BOOTPROTO='static'
BROADCAST=''
IPADDR='10.238.107.34'
NETMASK='255.255.255.0'
NETWORK=''
STARTMODE='auto'
```
## 2. 配置网关
```
touch /etc/sysconfig/network/routes
```
```
vi touch /etc/sysconfig/network/routes
```
![在这里插入图片描述](https://ucc.alicdn.com/images/user-upload-01/20200628164554497.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L1NlbWFudGVtZQ==,size_16,color_FFFFFF,t_70)