Quote:
Originally Posted by nikmit
What are you trying to do?
|
I am trying to set up two interfaces to separate ISPs as described in the Split Access section of
http://lartc.org/howto/lartc.rpdb.multiple-links.html, only I am not supplying a default route on the main table, since traffic will be specifically routed out the desired interface. As mentioned above, however, I have the same problem, even if I add a default route on the main table. One of my interfaces is point-to-point, so I may be making a mistake in how that interface is set up since the $P2_NET and $P2 are the same in that case.
Quote:
Originally Posted by nikmit
Is it possible that the longer prefix on the ppp0 interface influences routing?
|
I don't understand to what you are referring.
Quote:
Originally Posted by nikmit
Could you dump arp and icmp during the pings? Anything interesting in /var/log/kern.log or /var/log/syslog?
|
The only things in /var/log/kern.log and /var/log/syslog were the messages about promiscuous mode turning on and off when I ran tcpdump. I dumped icmp and arp to separate files for each interface (replacing IP addresses with strings):
tcors01:~# ping -I eth2 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from ETH2_IP eth2: 56(84) bytes of data.
From ETH2_IP icmp_seq=1 Destination Host Unreachable
From ETH2_IP icmp_seq=2 Destination Host Unreachable
From ETH2_IP icmp_seq=3 Destination Host Unreachable
--- 8.8.8.8 ping statistics ---
4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3008ms, pipe 3
There was nothing for icmp on either interface:
tcors01:~# tcpdump -r /root/eth2_icmp.log
reading from file /root/eth2_icmp.log, link-type EN10MB (Ethernet)
tcors01:~# tcpdump -r /root/ppp0_icmp.log
reading from file /root/ppp0_icmp.log, link-type LINUX_SLL (Linux cooked)
For arp, there was nothing on the ppp0 interface (as expected), and the eth2 interface was not illuminating (to me, anyway):
tcors01:~# tcpdump -r /root/ppp0_arp.log
reading from file /root/ppp0_arp.log, link-type LINUX_SLL (Linux cooked)
tcors01:~# tcpdump -r /root/eth2_arp.log
reading from file /root/eth2_arp.log, link-type EN10MB (Ethernet)
16:20:12.813304 ARP, Request who-has 8.8.8.8 tell ETH2_IP, length 28
16:20:13.813191 ARP, Request who-has 8.8.8.8 tell ETH2_IP, length 28
16:20:14.812982 ARP, Request who-has 8.8.8.8 tell ETH2_IP, length 28
If I instead attempt to ping out ppp0, I see normal echo requests/replies from ppp0:
tcors01:~# ping -I ppp0 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from PPP0_IP ppp0: 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=46 time=712 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=46 time=429 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=47 time=329 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=47 time=329 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=46 time=329 ms
--- 8.8.8.8 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4001ms
rtt min/avg/max/mdev = 329.949/426.393/712.074/147.997 ms
tcors01:~# tcpdump -r /root/eth2_icmp.log
reading from file /root/eth2_icmp.log, link-type EN10MB (Ethernet)
tcors01:~# tcpdump -r /root/ppp0_icmp.log
reading from file /root/ppp0_icmp.log, link-type LINUX_SLL (Linux cooked)
16:27:35.631372 IP PPP0_IP > 8.8.8.8: ICMP echo request, id 25093, seq 1,length 64
16:27:36.343158 IP 8.8.8.8 > PPP0_IP: ICMP echo reply, id 25093, seq 1, length 64
16:27:36.633276 IP PPP0_IP > 8.8.8.8: ICMP echo request, id 25093, seq 2,length 64
I didn't want to dump a bunch of stuff and cause people's eyes to glaze over, but for the record, here is how I have things set up:
tcors01:~# ifconfig ppp0
ppp0 Link encap:Point-to-Point Protocol
inet addr:PPP0_IP P-t-P:PPP0_GW Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:64 (64.0 B) TX bytes:97 (97.0 B)
tcors01:~# ifconfig eth2
eth2 Link encap:Ethernet HWaddr 00:d0:69:45:19:95
inet addr:ETH2_IP Bcast:129.116.134.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2131 errors:0 dropped:0 overruns:0 frame:0
TX packets:562 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1607150 (1.5 MiB) TX bytes:68764 (67.1 KiB)
Interrupt:40 Base address:0x240
tcors01:~# netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
PPP0_GW * 255.255.255.255 UH 0 0 0 ppp0
ETH2_NET * 255.255.255.0 U 0 0 0 eth2
tcors01:~# ip route show
PPP0_GW dev ppp0 proto kernel scope link src PPP0_IP
ETH2_NET/24 dev eth2 proto kernel scope link src ETH2_IP
tcors01:~# ip route add ETH2_NET/24 dev eth2 src ETH2_IP table lan
tcors01:~# ip route add default via ETH2_GW table lan
tcors01:~# ip route add PPP0_GW dev ppp0 src PPP0_IP table cell
tcors01:~# ip route add default via PPP0_GW table cell
tcors01:~# ip route show table lan
ETH2_NET/24 dev eth2 scope link src ETH2_IP
default via ETH2_GW dev eth2
tcors01:~# ip route show table cell
PPP0_GW dev ppp0 scope link src PPP0_IP
default via PPP0_GW dev ppp0
tcors01:~# ip rule add from ETH2_IP table lan
tcors01:~# ip rule add from PPP0_IP table cell
tcors01:~# ip rule show
0: from all lookup local
32764: from PPP0_IP lookup cell
32765: from ETH2_IP lookup lan
32766: from all lookup main
32767: from all lookup default