本文為大家介紹雙網(wǎng)卡路由配置工具(雙網(wǎng)卡路由配置怎么設(shè)置),下面和小編一起看看詳細(xì)內(nèi)容吧。
雙網(wǎng)卡路由配置
1:在配置網(wǎng)卡的時(shí)候,記住可以給eth0添加網(wǎng)關(guān),但是不能給eth1添加自己的網(wǎng)關(guān)。
2:網(wǎng)卡配置完成后,開始設(shè)置路由表:
ip路由通過192.168.2.1添加192.168.4.0/24
見下表:
、vi /etc/iproute2/rt_tables
添加
252 tel(電信線路路由表)
251 cnc(網(wǎng)通線路路由表)
、設(shè)置tel和cnc路由表內(nèi)容
ip route flush table 電話
ip route add default via 192.168.1.1 dev eth0 src 192.168.1.2 table tel
ip rule add from 192.168.1.2 table 電話
ip 路由刷新表cnc
ip route add default via 192.168.2.1 dev eth1 src 192.168.2.2 table cnc
ip 規(guī)則從192.168.2.2 表cnc 添加
然后就可以了。你可以試試,telnet兩個(gè)公網(wǎng)ip,呵呵
好了,雙網(wǎng)卡路由配置工具(雙網(wǎng)卡路由配置怎么設(shè)置)的介紹到這里就結(jié)束了,想知道更多相關(guān)資料可以收藏我們的網(wǎng)站。