CentOS双网卡双IP设置
来源:互联网 发布:淘宝网睡袍 编辑:程序博客网 时间:2024/04/30 14:58
CentOS双网卡双IP设置
系统环境:CentOS Linux
网络环境: 两个IP地址,192.168.0.10和10.10.30.2,掩码是255.255.255.0,
这两个子网的网关地址分别是192.168.0.1和10.10.30.1。
1. 为网卡eth0配置ip地址192.168.0.10,为网卡eth1配置ip地址为10.10.30.2配置文件为:
/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/sysconfig/network-scripts/ifcfg-eth1
2. 配置默认网关为任意一个。这个默认网关,决定了系统主动去使用网络时,使用的接口。
配置文件:/etc/sysconfig/network
3. 编辑路由表 www.ahlinux.com
修改/etc/iproute2/rt_tables,添加内容:
252 net2
251 net3
#/etc/rc.local添加原路返回路由
ip route flush table net2
ip route add default via 192.168.0.1 dev eth0 src 192.168.0.10 table net2
ip rule add from 192.168.0.10 table net2
ip route flush table net3
ip route add default via 10.10.30.1 dev eth1 src 10.10.30.2 table net3
ip rule add from 10.10.30.2 table net3
本文来自于中国蓝客联盟
- 本文来自:Linux学习网
- CentOS 双网卡双 IP 设置
- CentOS 双网卡双 IP 设置
- CentOS双网卡双IP设置
- CentOS 双网卡双 IP 设置
- centos/rhel 6.2 单网卡em1:0设置双IP
- Centos系统的单网卡绑定双ip的设置
- centos双线双网卡双IP
- CentOS/Linux 双网卡绑定单一IP,网卡热备
- Linux CentOS修改网卡IP/网关设置
- CentOS 网卡、网关、DNS、IP设置
- Linux CentOS修改网卡IP/网关设置
- CentOS/Linux 网卡设置 IP地址配置
- CentOS/Linux 网卡设置 IP地址配置
- CentOS/Linux 网卡设置 IP地址配置
- centos 设置双网卡,双网关
- ubuntu/centos 上的双网卡设置
- CentOS下双网卡设置方法
- CentOS系统双网卡路由设置
- C#实现AES加密和解密函数
- ios学习经历
- 工作这几年做的一些项目
- C++ 函数的引用返回值
- ORACLE配置tnsnames.ora文件实例
- CentOS双网卡双IP设置
- 详细介绍HTML的增强标记
- ios 8 UITableView 编辑删除状态不点击“删除”,页面假死临时解决方案
- WinForm设置DataGridView某些行和列只读
- [JS]js中判断变量类型函数typeof的用法汇总
- 用一个链接同时可以打开两个帧页
- eoj1127 计算几何 任意多边形面积
- ajax进阶
- Wireshark使用技巧-GeoIP显示IP地理位置