052手動添加內網網卡而且配置文件

Vcenter添加f5網卡ip

配置f5 ip
[root@cnsz142585 network-scripts]# cat ifcfg-eth1 
DEVICE=eth1
HWADDR=00:50:56:9E:78:12 #實際eth1的mac
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=none
IPADDR=172.17.129.47
NETMASK=255.255.254.0   
USERCTL=notable

from後面是主機f5的ip
[root@cnsz142585 network-scripts]# cat rule-eth1  
table f5 from 172.17.129.47 pre 10000配置

第一行第一個域爲f5 ip的網段,第二行via後面是f5的網關
[root@cnsz142585 network-scripts]# cat route-eth1 
172.17.128.0/23 dev eth1 table f5
default via 172.17.128.200 table f5route

添加最後一行
[root@cnsz142585 network-scripts]# cat /etc/iproute2/rt_tables 
#
# reserved values
#
255     local
254     main
253     default
0       unspec
#
# local
#
#1      inr.ruhep
100     f5network


啓動f5網卡
[root@cnsz142585 ~]# ifup eth1
Determining if ip address 172.17.129.47 is already in use for device eth1...scope

查看相關信息
[root@cnsz142585 ~]# ip rule
0:      from all lookup local 
10000:  from 172.17.129.47 lookup f5 
32766:  from all lookup main 
32767:  from all lookup default tab

[root@cnsz142585 ~]# ip route show table f5
172.17.128.0/23 dev eth1  scope link 
default via 172.17.128.200 dev eth1
 vi

相關文章
相關標籤/搜索