欢迎来到天天文库
浏览记录
ID:14327240
大小:149.00 KB
页数:19页
时间:2018-07-27
《linux双网卡双ip设置》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、Linux双网卡双IP设置电信:IP:61.147.67.189网关:61.147.67.161网通:IP:122.195.134.157网关:122.195.134.1291)添加路由表修改/etc/iproute2/rt_tables,添加内容:252tel电信路由表251cnc网通路由表2)如创建一个配置文件/etc/iproute.sh,文件权限要设置成可执行,内容如下#!/bin/shiprouteflushtableteliprouteadddefaultvia61.147.67.193deveth0src61.147.67.200ta
2、bletelipruleaddiifethXtableteliprouteflushtablecnciprouteadddefaultvia122.195.134.129deveth1src122.195.134.136tablecncipruleaddiifethXtablecnc#说明:ethX代表IP配置的网卡,比如eth0是电信,3/etc/wtiproute.sh#!/bin/shrouteadd-net1.24.0.0netmask255.248.0.0gw122.195.134.129routeadd-net1.56.0.0netma
3、sk255.248.0.0gw122.195.134.129routeadd-net1.188.0.0netmask255.252.0.0gw122.195.134.129routeadd-net14.204.0.0netmask255.254.0.0gw122.195.134.129routeadd-net27.8.0.0netmask255.248.0.0gw122.195.134.129routeadd-net27.36.0.0netmask255.252.0.0gw122.195.134.129routeadd-net27.40.0.0ne
4、tmask255.248.0.0gw122.195.134.129routeadd-net27.50.128.0netmask255.255.128.0gw122.195.134.129routeadd-net27.54.192.0netmask255.255.224.0gw122.195.134.129routeadd-net27.98.224.0netmask255.255.224.0gw122.195.134.129routeadd-net27.106.128.0netmask255.255.192.0gw122.195.134.129rou
5、teadd-net27.112.0.0netmask255.255.248.0gw122.195.134.129routeadd-net27.115.0.0netmask255.255.128.0gw122.195.134.129routeadd-net27.131.220.0netmask255.255.252.0gw122.195.134.129routeadd-net27.192.0.0netmask255.224.0.0gw122.195.134.129routeadd-net36.32.0.0netmask255.252.0.0gw122
6、.195.134.129routeadd-net36.248.0.0netmask255.252.0.0gw122.195.134.129routeadd-net42.48.0.0netmask255.254.0.0gw122.195.134.129routeadd-net42.63.0.0netmask255.255.0.0gw122.195.134.129routeadd-net42.224.0.0netmask255.240.0.0gw122.195.134.129routeadd-net47.153.128.0netmask255.255.
7、192.0gw122.195.134.129routeadd-net47.154.0.0netmask255.255.0.0gw122.195.134.129routeadd-net47.200.192.0netmask255.255.192.0gw122.195.134.129routeadd-net58.16.0.0netmask255.248.0.0gw122.195.134.129routeadd-net58.24.0.0netmask255.254.0.0gw122.195.134.129routeadd-net58.30.64.0net
8、mask255.255.192.0gw122.195.134.129routeadd-net58.30.128.0netm
此文档下载收益归作者所有