How to Create file Route static for Sub interface eth (specify source and destination )
Use command
~]# cd /etc/sysconfig/network-scripts/
Create file route-eth0 ; eth0 = Interface
~]# vim route-eth0 ### open file and Edit
Insert configuration route
ip -> Gateway -> interface -> out by ip src
Example
10.10.1X.0/24 via 192.168.1.1 [dev interface]
172.2X.5X.4/32 via 172.27.50.254 dev eth0:1 src 172.27.50.3
12X.200.100.3/32 via 172.27.50.254 dev eth0:1 src 172.27.50.3 ; eth0 :1 = sup for eth0
Then save file route-eth0
~]# service network restart
How to check route
use command
~]# route ;It show route tables and
~]# ip route show ; for check out by ip src
ไม่มีความคิดเห็น:
แสดงความคิดเห็น