Newsgroup: it.comp.os.linux.sys
Titolo: ip di uscita su eth0 con piu ip virtuali

Distro RH 7.2
ho un server con due schede di rete eth0 ed eth1;
la scheda eth1 ha una propria rete privata e fa da dhcp server;
la scheda eth0 ha un ip statico e 9 ip virtuali statici;
l'ip primario su eth0 è quello che corrisponde all'hostname del server;
quando tento delle connessioni verso altre macchine su sottoreti 
diverse, invece di uscire con l'ip primario (1.5.28.158), ne viene 
scelto uno di quelli virtuali :
ping 1.5.4.50
PING 1.5.4.50 (1.5.4.50) from 1.5.28.69 : 56(84) bytes of data.
64 bytes from 
1.5.4.50
: icmp_seq=0 ttl=254 time=248 usec
64 bytes from 
1.5.4.50
: icmp_seq=1 ttl=254 time=216 usec
64 bytes from 
1.5.4.50
: icmp_seq=2 ttl=254 time=245 usec
64 bytes from 
1.5.4.50
: icmp_seq=3 ttl=254 time=230 usec
  route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use 
Iface
1.5.28.0        0.0.0.0         255.255.252.0   U     0      0        0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         1.5.28.11       0.0.0.0         UG    0      0        0 eth0
0.0.0.0         1.5.28.11       0.0.0.0         UG    0      0        0 eth0
0.0.0.0         1.5.28.11       0.0.0.0         UG    0      0        0 eth0
0.0.0.0         1.5.28.11       0.0.0.0         UG    0      0        0 eth0
0.0.0.0         1.5.28.11       0.0.0.0         UG    0      0        0 eth0
0.0.0.0         1.5.28.11       0.0.0.0         UG    0      0        0 eth0
0.0.0.0         1.5.28.11       0.0.0.0         UG    0      0        0 eth0
0.0.0.0         1.5.28.11       0.0.0.0         UG    0      0        0 eth0
0.0.0.0         1.5.28.11       0.0.0.0         UG    0      0        0 eth0
0.0.0.0         1.5.28.11       0.0.0.0         UG    1      0        0 eth0
eth0      Link encap:Ethernet  HWaddr 00:30:6E:12:1F:0F
           inet addr:1.5.28.158  Bcast:1.5.31.255  Mask:255.255.252.0
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:212137 errors:0 dropped:0 overruns:0 frame:0
           TX packets:78267 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:100
           RX bytes:72531598 (69.1 Mb)  TX bytes:11941985 (11.3 Mb)
           Interrupt:11
eth0:0    Link encap:Ethernet  HWaddr 00:30:6E:12:1F:0F
           inet addr:1.5.28.130  Bcast:1.5.31.255  Mask:255.255.252.0
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           Interrupt:11
eth0:1    Link encap:Ethernet  HWaddr 00:30:6E:12:1F:0F
           inet addr:1.5.28.176  Bcast:1.5.31.255  Mask:255.255.252.0
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           Interrupt:11
eth0:2    Link encap:Ethernet  HWaddr 00:30:6E:12:1F:0F
           inet addr:1.5.28.177  Bcast:1.5.31.255  Mask:255.255.252.0
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           Interrupt:11
eth0:3    Link encap:Ethernet  HWaddr 00:30:6E:12:1F:0F
           inet addr:1.5.28.72  Bcast:1.5.31.255  Mask:255.255.252.0
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           Interrupt:11
eth0:4    Link encap:Ethernet  HWaddr 00:30:6E:12:1F:0F
           inet addr:1.5.28.74  Bcast:1.5.31.255  Mask:255.255.252.0
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           Interrupt:11
eth0:5    Link encap:Ethernet  HWaddr 00:30:6E:12:1F:0F
           inet addr:1.5.28.232  Bcast:1.5.31.255  Mask:255.255.252.0
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           Interrupt:11
eth0:6    Link encap:Ethernet  HWaddr 00:30:6E:12:1F:0F
           inet addr:1.5.28.233  Bcast:1.5.31.255  Mask:255.255.252.0
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           Interrupt:11
eth0:7    Link encap:Ethernet  HWaddr 00:30:6E:12:1F:0F
           inet addr:1.5.28.68  Bcast:1.5.31.255  Mask:255.255.252.0
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           Interrupt:11
eth0:8    Link encap:Ethernet  HWaddr 00:30:6E:12:1F:0F
           inet addr:1.5.28.69  Bcast:1.5.31.255  Mask:255.255.252.0
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           Interrupt:11
eth0:9    Link encap:Ethernet  HWaddr 00:30:6E:12:1F:0F
           inet addr:1.5.28.157  Bcast:1.5.31.255  Mask:255.255.252.0
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           Interrupt:11
eth1      Link encap:Ethernet  HWaddr 00:30:6E:12:1F:10
           BROADCAST MULTICAST  MTU:1500  Metric:1
           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:100
           RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
           Interrupt:11 Base address:0x2000
è una malfunzione ?
è possibile forzare l'uscita dall'ip primario ?
Grazie anticipate !!
Chris

Mi rispondo da solo;
su /etc/sysconfig/network era configurato il default GATEWAY, ma era 
configurato anche su qualche ifcfg-eth0:x;
dopo aver tolto le definizioni di GATEWAY dagli IP virtuali (e restart 
network) il route -n è diventato:
# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use 
Iface
1.5.28.0        0.0.0.0         255.255.252.0   U     0      0        0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         1.5.28.11       0.0.0.0         UG    0      0        0 eth0
# ping 1.5.4.50
PING 1.5.4.50 (1.5.4.50) from 1.5.28.158 : 56(84) bytes of data.
64 bytes from 
1.5.4.50
: icmp_seq=0 ttl=254 time=247 usec
64 bytes from 
1.5.4.50
: icmp_seq=1 ttl=254 time=223 usec
bye
Chris