我在linux7.3上.安装了一块网卡,想设置成2个I.P,分别是192.168.0.35和10.10.10.34。用ifconfig -a的输出结果是.
[root@localhost root.]# ifconf.ig -a教育
eth.0 Link encap:Ethernet HWad.dr 00:50:56:42:A5:E0.
inet addr:.192.16.8.0.35 Bcast:192.168.0.255 Mask:255.255.255.0( 游戏 )
. . UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 汽车
RX pa.ckets:700 errors:0 drop.ped:0 overruns:0 frame:0电影
TX packets:77 errors:0 drop.ped:0 overr.uns:0 carrier:0电脑
. .collisions:0 txqueuelen:100.
RX bytes:100081. (97.7 Kb) TX bytes:4471 (4.3 Kb)..
Interrup.t:10 Base a.ddress:0x10a0 鲜花
eth0:0 Link encap:E.thernet HWaddr 00:50.:56:42:A5:E0( 游戏 )
inet ad.dr:10.10.10.34 Bcast:10.10.10.255 Mask:255.255.255..0教育
UP BROADCAST RUNNING .MUL.TICAST MTU:1500 Metric:1( 游戏 )
Interrupt:10 Bas.e address:0x10a.0[成人用品]
lo Link encap:Loca.l .Loopback投资
. inet addr:127.0.0.1 . Mask:255.0.0.0.
UP LOOPBACK RU.NNING MTU:16436 Me.tric:1域名
RX packets:14 .errors:0 dr.opped:0 overruns:0 frame:0(广告)
TX packets:14 er.rors:0 dro.pped:0 overruns:0 carrier:0 健康
collisions:0 txqu.eue.len:0.
RX bytes:1096 (1.0 Kb.) TX bytes:109.6 (1.0 Kb).
当我ping .一.个192.192.192.101的IP时,它为什么会选择从10.10.10.34的IPping呢?如何才能让它从192.168.0.35这个.IP去ping?--------------彩票
[
root@loc.a.lhost root]# ping 192.192.192.101 电子
PING 192.192.192.101 (192.192.192.101) from 10.10.1.0.34 :. 56(84) bytes of data..服务器
还有我现在作一个client程序,怎么在我的程序里绑定192.168.0.35这个IP去connect .se.rver,而不是10.10.10.34?.
谢谢!