• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

How does route info get populated at boot?

RMSe17

Member

I have an Ubuntu server that has two network cards, one of them is used for iscsi (eth1) and the other is used for everything else (eth0). Whenever I restart the unit, it gets a line in the route that tells everything to use eth1, and then another line that tells everything to use eth0. Both are labeled "default". I can't connect to the box remotely, nor can the box perform any of it's functions unless I go to the server, log in, and manually run "sudo route del default" after which everything works fine.

Where does this line come from? What has access to the route during the restart procedure? I need to edit that, and remove the unwanted line...
I may have edited some config file that i have forgotten about, since getting the two network cards to work properly required me to edit stuff in some locations. I did all the editing while looking at various forum posts, and I dont remember what I did.

Thanks,
RMSe17
 
Remove the gateway from eth1's configuration, everything should be in /etc/network/interfaces unless Ubuntu's changed how they manage that.
 
Yeah.....I agree with Nothinman. I've gotten hung up on this before. When you configure a NIC, it often asks for a gateway. The problem here is that gateway is usually preceeded by the word default. You can only have one default gateway, but can set custom routes using iptables if you want to force an adapter to connect to particular networks. If your default gateway is set for eth1, it will try to route everything through it. If it's on the same network as eth0, it may pick one or the other....or both.

If you're doing iSCSI, you don't want it to route through the gateway. Normally, you'll want that on a dedicated switch or vlan with jumbo frames enabled. AFAIK, you don't ever want to route iSCSI traffic. It's going to slow down the connection and cause possible packet loss/collisions that might degrade your iSCSI connection. Ultimately, you'll want a gig link where possible with iSCSI since the average iSCSI connection will run about 600mbit of bandwidth in bursts for large file copies.

-Scar
 
When you configure a NIC, it often asks for a gateway. The problem here is that gateway is usually preceeded by the word default. You can only have one default gateway, but can set custom routes using iptables if you want to force an adapter to connect to particular networks. If your default gateway is set for eth1, it will try to route everything through it. If it's on the same network as eth0, it may pick one or the other....or both.

Well anytime you specify a gateway on a NIC it's the default because it's the generic gateway, not one for a specific network. The route command simply converts 0.0.0.0 to default in it's output. And custom routes are set with the route command, not iptables. If you specify more than one default gateway it'll likely just use the one that was added last since each 'route add' command will just replace/update older entries.
 
Thanks! I will look into removing the gateway from that entry. From what I remember the gateway was the machine's own IP address, for lack of anything better.
 
Thanks! I will look into removing the gateway from that entry. From what I remember the gateway was the machine's own IP address, for lack of anything better.

I'm surprised it let you do that because that would be even worse than nothing at all, if the machine did have routing configured and you set it as it's own default gateway the packets would probably just end up looping.
 
I think that is exactly what is happening, because until I delete the default entry, ping requests never register anything, not even as a missed ping. I have to ctrl-c out of a ping command.
 
Thanks a lot, I removed the gateway entry from my static eth1 setup in /etc/network/interfaces
After the restart, the system now comes up fine, with everything working. Saved me from reinstalling. (I am still mostly a Windows Linux user, where if I need to do things manually under the hood, I know almost nothing and have to follow instructions.
 
I think that is exactly what is happening, because until I delete the default entry, ping requests never register anything, not even as a missed ping. I have to ctrl-c out of a ping command.

Linux ping doesn't return anything but responses and always runs until you hit ctrl+c, it'll tell you if it gets an ICMP DEST UNREACH packet but that's about it.
 
Back
Top