Re: Routing of outgoing packets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



2010/10/1 Mitja MiheliÄ <mitja.mihelic@xxxxxxxx>:
>
> On 09/30/2010 05:02 PM, John Doe wrote:
>> From: Mitja MiheliÄ<mitja.mihelic@xxxxxxxx>
>>> I am trying to use hping to chek the latency of our network.
>>> Somehow things are not going to plan and I thought someone might be able
>>> to shed some light on the subject.
>>> Here is the setup:
>>> (the IP addresses gvien here are fake, but they do represent the correct
>>> state of the networking setup)
>>> vlan   Âinterface   ÂIP           Âmask
>>> V2 Â Â Â Âeth0 Â Â Â Â Â 192.168.20.20 Â Â32
>>> V4 Â Â Â Âeth1 Â Â Â Â Â 172.16.4.40 Â Â Â Â32
>>> V6 Â Â Â Âeth2 Â Â Â Â Â 172.16.6.60 Â Â Â Â32
>>>
>>> The default route is set to eth1.
>>> The idea is to use eth2 for pinging only, the other two interfaces are
>>> used by another service and management access.
>> Could you show the ifconfig and route outputs...?
>>
>> JD
> The Centos version is 5.5.
>
> This is the kernel we are using
> (http://rpms.mcnc.org/web100/el5/distro-compat/i386/):
> 2.6.18-164.15.1.el5.web100PAE #1 SMP Mon May 17 17:01:51 EDT 2010 i686
> athlon i386 GNU/Linux
>
> The IP addresses are presented as private addresses, netmasks are real.
>
> Here is the ifconfig output:
> [root@server ~]# ifconfig
> eth0 Â Â ÂLink encap:Ethernet ÂHWaddr 00:16:35:82:45:A0
> Â Â Â Â Â inet addr:192.168.254.236 ÂBcast:192.168.254.239
> Mask:255.255.255.240
> Â Â Â Â Â inet6 addr: fe80::216:35ff:fe82:45a0/64 Scope:Link
> Â Â Â Â Â UP BROADCAST RUNNING MULTICAST ÂMTU:1500 ÂMetric:1
> Â Â Â Â Â RX packets:139602 errors:0 dropped:0 overruns:0 frame:0
> Â Â Â Â Â TX packets:58914 errors:0 dropped:0 overruns:0 carrier:0
> Â Â Â Â Â collisions:0 txqueuelen:1000
> Â Â Â Â Â RX bytes:211203420 (201.4 MiB) ÂTX bytes:4285647 (4.0 MiB)
> Â Â Â Â Â Interrupt:186 Memory:dc000000-dc012800
>
> eth1 Â Â ÂLink encap:Ethernet ÂHWaddr 00:16:35:82:45:A2
> Â Â Â Â Â inet addr:192.168.254.244 ÂBcast:192.168.254.247
> Mask:255.255.255.248
> Â Â Â Â Â inet6 addr: fe80::216:35ff:fe82:45a2/64 Scope:Link
> Â Â Â Â Â UP BROADCAST RUNNING MULTICAST ÂMTU:1500 ÂMetric:1
> Â Â Â Â Â RX packets:15 errors:0 dropped:0 overruns:0 frame:0
> Â Â Â Â Â TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
> Â Â Â Â Â collisions:0 txqueuelen:1000
> Â Â Â Â Â RX bytes:1130 (1.1 KiB) ÂTX bytes:1116 (1.0 KiB)
> Â Â Â Â Â Interrupt:194 Memory:da000000-da012800
>
> eth2 Â Â ÂLink encap:Ethernet ÂHWaddr 00:15:17:C5:84:4D
> Â Â Â Â Â inet addr:192.168.254.18 ÂBcast:192.168.254.23
> Mask:255.255.255.248
> Â Â Â Â Â inet6 addr: fe80::215:17ff:fec5:844d/64 Scope:Link
> Â Â Â Â Â UP BROADCAST RUNNING MULTICAST ÂMTU:1500 ÂMetric:1
> Â Â Â Â Â RX packets:29 errors:0 dropped:0 overruns:0 frame:0
> Â Â Â Â Â TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
> Â Â Â Â Â collisions:0 txqueuelen:1000
> Â Â Â Â Â RX bytes:2280 (2.2 KiB) ÂTX bytes:1236 (1.2 KiB)
> Â Â Â Â Â Memory:dfde0000-dfe00000
>
> lo    ÂLink encap:Local Loopback
> Â Â Â Â Â inet addr:127.0.0.1 ÂMask:255.0.0.0
> Â Â Â Â Â inet6 addr: ::1/128 Scope:Host
> Â Â Â Â Â UP LOOPBACK RUNNING ÂMTU:16436 ÂMetric:1
> Â Â Â Â Â RX packets:21 errors:0 dropped:0 overruns:0 frame:0
> Â Â Â Â Â TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
> Â Â Â Â Â collisions:0 txqueuelen:0
> Â Â Â Â Â RX bytes:4240 (4.1 KiB) ÂTX bytes:4240 (4.1 KiB)
>
>
> And the route command output:
> [root@server ~]# route -n
> Kernel IP routing table
> Destination   ÂGateway     ÂGenmask     ÂFlags Metric Ref
> Use Iface
> 192.168.18.122 Â 192.168.254.225 Â255.255.255.255 ÂUGH Â 0 Â Â Â0
> 0 eth0
> 192.168.254.16 Â 0.0.0.0 Â Â Â Â Â255.255.255.248 ÂU Â Â 0 Â Â Â0
> 0 eth2
> 192.168.254.240 Â0.0.0.0 Â Â Â Â Â255.255.255.248 ÂU Â Â 0 Â Â Â0
> 0 eth1
> 192.168.18.160 Â 192.168.254.225 Â255.255.255.240 ÂUG Â Â0 Â Â Â0
> 0 eth0
> 192.168.254.224 Â0.0.0.0 Â Â Â Â Â255.255.255.240 ÂU Â Â 0 Â Â Â0
> 0 eth0
> 192.168.1.64 Â Â 192.168.254.225 Â255.255.255.192 ÂUG Â Â0 Â Â Â0
> 0 eth0
> 192.168.1.128 Â Â192.168.254.225 Â255.255.255.128 ÂUG Â Â0 Â Â Â0
> 0 eth0
> 169.254.0.0 Â Â Â0.0.0.0 Â Â Â Â Â255.255.0.0 Â Â ÂU Â Â 0 Â Â Â0
> 0 eth2
> 0.0.0.0 Â Â Â Â Â192.168.254.241 Â0.0.0.0 Â Â Â Â ÂUG Â Â0 Â Â Â0
> 0 eth1
>
> --
> Mitja
> _______________________________________________
> CentOS mailing list
> CentOS@xxxxxxxxxx
> http://lists.centos.org/mailman/listinfo/centos
>

This may be too late, but came across this searching for my old
iproute conversations.
Each NIC needs its own "source based route" otherwise, it will use the
sytem wide default route.
In other words, add "nic specific default routes" in addition to the
"system wide default route".

Once you have nic specific source routes, you may notice a big
difference between the following two seemingly identical commands:
ping -I eth2 208.67.222.222
ping -I 192.168.x.y  208.67.222.222
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux