I have a Centos 5 machine here that, up until about a year ago, was happily running Icecast and serving streaming audio through through three network connections, consisting of one "local" connection (local address 192.168.1.5) and two cable modems to talk to the outside world. We shut this down about a year ago, but now I am attempting to get it going again on one outside connection instead of two. Simply changing the IP address on one of the network cards to use the new address isn't working, so the notes that I made when I set this thing up in the first place must be incomplete since I'm obviously missing something here. I have two "active" IP addresses that I want to use at the moment. eth0 is 192.168.1.5 and is working fine. I can log into the server with ssh and run icecast and listen to streaming audio just fine. eth1 is now supposed to be 204.83.105.1 so I configured the new address on that card with system-config-network. The third card (eth2) I plan to ignore for the time being so I haven't changed that or done anything with it at all. My /etc/iproute2/rt_tables looks like this. I haven't changed it from what it was when I originally set this thing up a few years ago. # # reserved values # 255 local 254 main 253 default 0 unspec # # local # #1 inr.ruhep 50 access1 60 access2 Note the access1 and access2 entries at the bottom of the file. I then ran the following three commands: ip route add 204.83.15.0/24 dev eth1 table access1 ip route add default via 204.83.15.254 dev eth1 table access1 ip rule add from 204.83.15.1/32 lookup access1 These are the same commands that I used to set up the previous Internet connection on this server -- The only thing that I have changed was the IP addresses. Here is the output from "ip route show": [root at audio ~]# ip route show 192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.5 204.83.15.0/24 dev eth1 proto kernel scope link src 204.83.15.1 169.254.0.0/16 dev eth1 scope link default via 204.83.15.254 dev eth1 That seems to indicate that the default route is 204.83.15.254 which is the correct gateway number for that Internet connection. However, a ping or traceroute command (ping google.com or whatever) gives me no output. I've missed a step somewhere. I hooked my laptop up to that Internet connection to insure that the modem and whatnot is working and it is, so there's obviously something wrong with my configuration. Can any of you folks tell me what I've missed? -- MELVILLE THEATRE ~ Real D 3D Digital Cinema ~ www.melvilletheatre.com
Frank Cox
2015-Jul-18 20:15 UTC
[CentOS] Multiple network cards - routing issue? (more info)
On Sat, 18 Jul 2015 11:41:53 -0600 Frank Cox wrote: output.> > I've missed a step somewhere. > > I hooked my laptop up to that Internet connection to insure that the modem > and whatnot is working and it is, so there's obviously something wrong with > my configuration. > > Can any of you folks tell me what I've missed?Here's something interesting. When I run a traceroute to 204.83.15.254 I get this: [frankcox at audio ~]$ traceroute 204.83.15.254 traceroute to 204.83.15.254 (204.83.15.254), 30 hops max, 40 byte packets 1 (204.83.15.1) 3000.077 ms !H 3000.068 ms !H 3000.052 ms !H It thinks that 204.83.15.254 is down, and that's the gateway address for eth1 that I want to be the default gateway. And 192.168.1.1 is the address of the router that eth0 is plugged into: [frankcox at audio network-scripts]$ ping 192.168.1.1 PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data. --- 192.168.1.1 ping statistics --- 3 packets transmitted, 0 received, 100% packet loss, time 1999ms I can ssh into the server through that router (and eth0) with no problem. That's how I'm communicating with it right now. [frankcox at audio network-scripts]$ /sbin/route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 204.83.15.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1 0.0.0.0 204.83.15.254 0.0.0.0 UG 0 0 0 eth1 -- MELVILLE THEATRE ~ Real D 3D Digital Cinema ~ www.melvilletheatre.com
On 07/18/2015 10:41 AM, Frank Cox wrote:> I then ran the following three commands: > > ip route add 204.83.15.0/24 dev eth1 table access1 > ip route add default via 204.83.15.254 dev eth1 table access1 > ip rule add from 204.83.15.1/32 lookup access1...> Can any of you folks tell me what I've missed?Does the system work correctly if you don't run those "ip route" commands?
On Sat, 18 Jul 2015 21:34:27 -0700 Gordon Messmer wrote:> Does the system work correctly if you don't run those "ip route" commands?It's exactly the same. And what I mean by exactly the same is EXACTLY the same. I rebooted the system which should clear out my route commands and whatnot, and discovered that everything (route -n and ip route show and whatnot) are exactly the same as before. Therefore, the ip route and ip rule commands apparently had no effect whatsoever -- what I got after entering the ip route commands is exactly what I have without entering those commands. Interesting. But since it's still exactly the same, it's still not working; it still fails in exactly the same way too. -- MELVILLE THEATRE ~ Real D 3D Digital Cinema ~ www.melvilletheatre.com