Ubuntu Networking :: Default Routes For Specific Interfaces?

Oct 15, 2010

I've got a 10.04 machine with two ethernet interfaces. I have two separate outside internet connections. This machine is connected to both interfaces. But it DOES NOT route between them. It's just a host on both subnets. Again, no routing is to go through this host. I'd like to force traffic originating on each ethernet port out to that network's internet connection.

Here's the desired setup:
eth0 192.168.12.37/24 gw 192.168.12.1
eth1 192.168.1.37/24 gw 192.168.1.1

I'd like traffic on the 192.168.1.37 address to go out through the 192.168.1.1 gateway. I have a program bound to that address and need it's traffic to go out ONLY through the 192.168.1.1 gateway. Any other traffic on the machine should go out the 192.168.12.1 gateway.

The logic is: source IP is 192.168.1.37, dest IP is any then go out only through 192.168.1.1 source IP is 192.168.12.37, dest IP is any then go out through 192.168.12.1 first or 192.168.1.1 next. The point is source on the .1.37 address must always go out the .1.1 gateway and NEVER through .12.1. Whereas traffic on the .12.37 address should try going out the .12.1 gateway first but can go out the .1.1 gateway if the .12.1 connection is down. I could live with this failover option. I could accept that traffic on the .12.37 address was likewise limited to its own gateway.

View 3 Replies


ADVERTISEMENT

Ubuntu Networking :: Wrong Metric In Routes For 4 Interfaces

Apr 27, 2011

On a server with 4 network interfaces, sometimes not all 4 are plugged in. All 4 interfaces have the same IP address. Sometimes the machine cannot access the local LAN, but can access the internet via a router on the local LAN, after a reboot. What I find is that the routing table looks like this:

Code:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.30.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
172.30.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
172.30.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth2
172.30.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth3
0.0.0.0 172.30.0.2 0.0.0.0 UG 1 0 0 eth0
0.0.0.0 172.30.0.2 0.0.0.0 UG 2 0 0 eth1
0.0.0.0 172.30.0.2 0.0.0.0 UG 3 0 0 eth2
0.0.0.0 172.30.0.2 0.0.0.0 UG 4 0 0 eth3

On the console I cannot reach any local host, but I can reach internet hosts. Pinging the gateway router 172.30.0.2 gets no answer. When I manually change it to this:
Code:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.30.0.0 0.0.0.0 255.255.0.0 U 1 0 0 eth0
172.30.0.0 0.0.0.0 255.255.0.0 U 2 0 0 eth1
172.30.0.0 0.0.0.0 255.255.0.0 U 3 0 0 eth2
172.30.0.0 0.0.0.0 255.255.0.0 U 4 0 0 eth3
0.0.0.0 172.30.0.2 0.0.0.0 UG 1 0 0 eth0
0.0.0.0 172.30.0.2 0.0.0.0 UG 2 0 0 eth1
0.0.0.0 172.30.0.2 0.0.0.0 UG 3 0 0 eth2
0.0.0.0 172.30.0.2 0.0.0.0 UG 4 0 0 eth3

Then all is well (can ping local hosts including the gateway router). I do have metric specified in the /etc/network/interfaces file like this:
Code:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 172.30.16.8
netmask 255.255.0.0
network 172.30.0.0
broadcast 172.30.255.255
metric 1

auto eth1
iface eth1 inet static
address 172.30.16.8
netmask 255.255.0.0
network 172.30.0.0
broadcast 172.30.255.255
metric 2

auto eth2
iface eth2 inet static
address 172.30.16.8
netmask 255.255.0.0
network 172.30.0.0
broadcast 172.30.255.255
metric 3

auto eth3
iface eth3 inet static
address 172.30.16.8
netmask 255.255.0.0
network 172.30.0.0
broadcast 172.30.255.255
metric 4

Apparently that metric setting applies only to the gateway route, not the LAN route. Is there a way to specify the LAN route metric, too?

View 1 Replies View Related

Networking :: Why Accept Routes In Bgp / When Have Default Gateway From ISP?

Apr 7, 2010

I am realtively new to BGP. I use BGP in my network to advertise my /20 subnet. What i would like to know is what is the point of accepting routes from your neighbouring AS(ISP)?My ISP has given me a default gateway, and no matter what I want to reach on the internet I have to go through that default gateway, so why populate the routing table with soo many routes?also, as i understand it, there are 3 kinds of routes that you can accept, those are full routes, directly connected routes and default routes. What is the diffrence between them and again how do they affect routing since my network only has the one default gateway?

View 2 Replies View Related

Fedora Networking :: Static Routes Aren't Added After Editing Routes-wlan0?

May 8, 2011

How do I add a route that doesn't go away after a reboot? I tried adding to /etc/sysconfig/network-scripts/route-wlan0 and /etc/sysconfig/static-routes but neither of them did anything when I restarted network and NetworkManager. route command does not show the new route that I added. I tried this too - routes.html and there were no errors but the new route doesn't show up with the route command.I added "192.168.13.88/255.255.255.255 via 192.168.13.101 dev wlan0"

View 2 Replies View Related

CentOS 5 Networking :: Disable IPv6 On Specific Interfaces?

Apr 10, 2011

Now that IPv6 is becoming more and more common, I found the need to disable IPv6 on some interfaces but have it enabled on other. I found that /proc/sys/net/ipv6/conf/*/disable_ipv6 does exactly that. I am now wondering if anybody knows, why are networking scripts so counterintuitive. /etc/sysconfig/network has an option:

NETWORKING_IPV6=yes

All this option does is disable some ipv6 services (dhcpv6...), it does not disable IPv6 in whole (as one would assume...that's why you had to disable it with module parameters). Searching for more IP6 related config option, one can find that /etc/sysconfig/network-scripts/ifcfg-* scripts can contain:

IPV6INIT=yes

Again, this option does not disable IPv6 protocol on the interface, it just skips running ifup-ipv6/ifdown-ipv6 scripts. I added a /sbin/ifup-pre-local. Now, this script runs before ethX entries are created (other scripts run when it's already too late) in /proc directory, so it modifies default values which are then used after those entries are created:

#!/bin/bash
#
[ -f "/etc/sysconfig/network-scripts/$1" ] && . /etc/sysconfig/network-scripts/$1

[code]...

View 1 Replies View Related

Ubuntu Networking :: 2+ Internet Interfaces - Control Application Specific Usage?

Mar 24, 2010

I currently have two internet interfaces installed, one is ethernet (eth0) and the second is wireless (wlan0). Many command line applications allow you to specify which interface should be used, but many gui apps don't provide this option or at least I haven't found it. I have some questions:

1. How would I tell Firefox to use only my wlan0 interface? If it's possible in Firefox, is this also possible with Google Chrome?

2. If a program doesn't provide a command line argument to support this, is there a standalone application that could help manage preferences for multiple applications?

View 2 Replies View Related

Networking :: Bind The Devices To Specific Rfcomm Interfaces Via Udev?

May 8, 2010

# rfcomm -a
rfcomm0: 00:1A:89:09:8C:77 channel 1 clean
rfcomm1: 00:07:E0:2E:99:43 channel 3 clean
Then I connect by the mobile, and:
# rfcomm -a
rfcomm0: 00:1A:89:09:8C:77 channel 1 clean
rfcomm1: 00:07:E0:2E:99:43 channel 3 clean
rfcomm2: 00:1BC:0F:5C:AB -> 00:07:E0:2E:99:43 channel 1 connected [reuse-dlc release-on-hup tty-attached]

What the heck is that rfcomm2, when that mobile is bound to rfcomm1? Is it udev that makes fun of me? If so, how to bind the devices to specific rfcomm interfaces via udev?

[Code]...

View 9 Replies View Related

Networking :: Definition: "a Process That Replaces A Series Of Related, Specific Routes In A Route Table With A More Generic Route"

Oct 21, 2010

I got this definition:"a process that replaces a series of related, specific routes in a route table with a more generic route." honestly I found it not so clear.. I want to know if this definition is correct and also more details about this subject..

View 1 Replies View Related

Fedora Networking :: Two Network Interfaces - Setup Default Gw Route?

Mar 26, 2009

So I have two network Interfaces

eth0 - NAT behind a router
eth1 - Public IP

When ever I restart the machine, both interfaces pull a IP, but the it randomly chooses eth0 or eth1 to have the gateway. I want the gateway to be eth0 always.

[Code]...

Is there some file or setting I can modify in Fedora10 that will always choose 192.168.1.1 on eth0 as the default gateway?

View 2 Replies View Related

Ubuntu Networking :: ADVISEADDR: Error In Specifying Interfaces: No Existing Ip Interfaces Found

Jan 7, 2010

I have a weird issue that I have not seen on any forum. My jaunty on DELL studio laptop seems connected to net, but I can not access any network service (ssh, firefox etc.). But when I connect a cable the cable lights blink as it should be and in wireless connection my wifi light blinks.

It was working 2 days ago without problem, and I have not done big changes recently.I removed and reinstalled network-manager and network-manager-gnome. Nothing changed. I see a message in each restart as follows (when Openafs is starting). I can reproduce it with "/etc/init.d/openafs-client restart"

Code:

ADVISEADDR:error in specifying interfaces: no existing ip interfaces found

#lspci

Code:

04:00.0 Network controller: Intel Corporation Wireless WiFi Link 5100
08:00.0 Ethernet controller: Broadcom Corporation NetLink BCM5784M Gigabit Ethernet PCIe (rev 10)
#lshw -c network

[code].....

View 5 Replies View Related

Ubuntu Networking :: Adding Interfaces To /etc/network/interfaces?

Apr 16, 2010

If I try to add a new interface (eth1) to /etc/network/interfaces, I get

Code:
* Reconfiguring network interfaces... SIOCSIFADDR: No such device
eth1: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device

[Code]...

How do I add 2 interfaces and get anyone of them to work, as available ?

View 5 Replies View Related

Fedora Networking :: Enable 3 Interfaces \ When Start One Interface The Another Interfaces Goes Down?

Jan 25, 2010

I have 3 Interfaces for a different LAN's and when I start one interface the another interfaces goes down.How can it's possible?I configure my ethernets as:

Code:
/sbin/ifconfig eth0 172.16.3.108 netmask 255.255.0.0 broadcast 172.0.255.255
/sbin/ifconfig eth1 172.16.3.109 netmask 255.255.0.0 broadcast 172.0.255.255
/sbin/ifconfig eth2 172.16.3.1110 netmask 255.255.0.0 broadcast 172.0.255.255

View 12 Replies View Related

Debian :: Can't Set Default Gateway By Interfaces File / What To Do?

Jul 29, 2011

I recently switched from Ubuntu server to Debian server, and I carried over many of the same configurations. This is pretty much a fresh install.

I cannot get the default gateway to stick by using the /etc/network/interfaces. I can ping my default gateway but nothing beyond it either by name or IP. code...

I would like the default gateway to stick between reboots. Could someone point me in the right direction?

View 4 Replies View Related

Ubuntu Networking :: Routes Are Not Persistent

Sep 1, 2010

I have a ubuntu 10.04.1 install with openvpn, so I have some routes in my /etc/networking/interface file. But for what ever reason when it boots the routes don't come up and I have to restart the networking before they come up. Once I do that all is well. Any idea's why it's doing that?

View 1 Replies View Related

Networking :: Routes Not Persistent ?

Sep 1, 2010

I have a ubuntu 10.04.1 install with openvpn, so I have some routes in my /etc/networking/interface file. But for what ever reason when it boots the routes don't come up and I have to restart the networking before they come up. Once I do that all is well.

View 4 Replies View Related

General :: Custom TCP Parameters For Multiple Interfaces - Change The Default Values

Feb 16, 2011

My question is about TCP parameters in Linux. By now, I want to change the default values of:

Initial Timeout
ACK Delay
Idle Connection Timeout

I have a Linux Box with kernel 2.6.x and 2 ethernet interfaces. I know TCP is a stack that doesn't have anything to do with ethernet devices. Said that, the question: is there a way to set custom values for each interface? For example, a server listening to connections in eth0 would use one value for Idle Connection Timeout and another server listening to connections in eth1 could use a different value for that parameter.

View 4 Replies View Related

Ubuntu Networking :: OpenVPN On 10.04 Server - Routes Fail

Jul 18, 2010

New ubuntu desktop user here. I've been working with Ubuntu servers for over 3 yrs, using Windows as clients. I have OpenVPN running on an ubuntu 10.04 server, and it has worked well with Windows OpenVPN clients connecting. I took those same settings and applied them to this new install of Ubuntu 10.04 Desktop, and now openvpn seems to be failing when we get to the routes (I wrestled with the network-manager "secrets" issue for hours, but that works now).

I performed the following:
sudo openvpn --config fogbank-ny1.ovpn
--all is well, we're connecting/yay then *screech* FAIL--

Code:
Sun Jul 18 07:17:14 2010 PUSH: Received control message: 'PUSH_REPLY,route 10.8.0.0 255.255.255.0,redirect-gateway def1,dhcp-option DNS 10.8.0.1,route 10.8.0.0 255.255.255.0,topology net30,ping 30,ping-restart 600,ifconfig 10.8.0.10 10.8.0.9'
Sun Jul 18 07:17:14 2010 OPTIONS IMPORT: timers and/or timeouts modified
Sun Jul 18 07:17:14 2010 OPTIONS IMPORT: --ifconfig/up options modified
Sun Jul 18 07:17:14 2010 OPTIONS IMPORT: route options modified
Sun Jul 18 07:17:14 2010 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Sun Jul 18 07:17:14 2010 ROUTE default_gateway=192.168.10.1
Sun Jul 18 07:17:14 2010 TUN/TAP device tun0 opened
Sun Jul 18 07:17:14 2010 TUN/TAP TX queue length set to 100
Sun Jul 18 07:17:14 2010 /sbin/ifconfig tun0 10.8.0.10 pointopoint 10.8.0.9 mtu 1500
Sun Jul 18 07:17:14 2010 /sbin/route add -net <mypublicip> netmask 255.255.255.255 gw 192.168.10.1
Sun Jul 18 07:17:14 2010 /sbin/route add -net 0.0.0.0 netmask 128.0.0.0 gw 10.8.0.9
Sun Jul 18 07:17:14 2010 /sbin/route add -net 128.0.0.0 netmask 128.0.0.0 gw 10.8.0.9
Sun Jul 18 07:17:14 2010 /sbin/route add -net 10.8.0.0 netmask 255.255.255.0 gw 10.8.0.9
Sun Jul 18 07:17:14 2010 /sbin/route add -net 10.8.0.0 netmask 255.255.255.0 gw 10.8.0.9
SIOCADDRT: File exists
Sun Jul 18 07:17:14 2010 ERROR: Linux route add command failed: external program exited with error status: 7
Sun Jul 18 07:17:14 2010 Initialization Sequence Completed

I am using the suggested openvpn routes. If I connect from Windows (actually the .ovpn file is taken directly from the working windows machine).. all is well, routes work fine all traffic is routed thru the VPN -- same way it's worked for over a yar. I assume that this is what is causing networkmanager to fail as well. those logs indicate that it has connected to the vpn, but is probably stopping when it gets to routes.

View 1 Replies View Related

Ubuntu Networking :: 10.4 - NIC Bonding - Make Routes Behave Themselves?

Dec 3, 2010

I just set up NIC bonding in Ubuntu 10.4, following these instructions, and I've got it working except for one problem: Every time I up or down a network device, or every time the system reboots, my routes go all to hell with eth0 and eth1 entries next to my bond0 entries. When the eth0 and eth1 entries show up, my connection is hosed and I have to go in via the maintenance IP to kill each route one at a time, leaving only bond0. Here's how I want my routes to look at all times:

Code:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.87.9.0 0.0.0.0 255.255.255.0 U 0 0 0 bond0
0.0.0.0 10.87.9.1 0.0.0.0 UG 100 0 0 bond0
Here's my /etc/network/interfaces:

[Code]...

View 3 Replies View Related

Networking :: Route 2 Subnets Between 2 Routes?

Oct 28, 2010

I have some CISCO,Linux related problem with 2 Class C subnets:

192.168.64.0 -> PC5
192.168.65.0 -> PC6

Here's a picture of my situation: [URL]

HQ has to have 2 STATIC routes in order those 2 "PCs" mentioned above to have end to end connectivity with NETWORK A and NETWORK B. Now I try with

route0 -> network: 0.0.0.0, mask: 0.0.0.0, nexthop: Serial 0/0/0
route1 -> network: 0.0.0.0, mask: 0.0.0.0, nexthop: Serial 0/0/1

And it seems to work but I don't think it's proper! I feel it's kinda wrong ... but all my other attempts to set another couple of static routes ends in "Request timed out" and thus connection lost.

View 1 Replies View Related

Ubuntu Networking :: Discovering Network Printers And Configuring Routes

Apr 6, 2010

1. My machine [running Karmic Koala] is part of a corporate LAN with NIC details below

Quote:

2. My routing table:

Quote:

3. The network printer's details [as read from the printer's display interface]:

Quote:

My question:

This printer can be discovered by windoze machines using "Find printers" and then added. [Am not sure how this works!]

But when I try to discover the same from my ubuntu machine, its not getting discovered. Tried pinging the ip [172.20.254.158] which gives the following:

Quote:

Now I tried fiddling around with the route command along with good amount of googling but to no avail.

1. Is there a way I could add that printer to my machine?

2. If yes, how could I? Does it involve adding routes?

View 2 Replies View Related

Ubuntu Networking :: Setup Routes For A Gateway That Resides On A Different Subnet

Jul 29, 2011

I'm trying to setup routes for a gateway that resides on a different subnet. Our ISP leased us a block of IPs and told us to route through the current gateway, which is on a different subnet than our current block of addresses. To test, I've enabled one of the new addresses on one of the existing machines, which works. That machine has an address on the same subnet as the gateway, however.

The gateway address is 24.111.1.177 One of the new addresses I'm trying to use is 96.2.192.130, netmask= 255.255.255.240, broadcast= 96.2.192.143 Obviously, I can't just specify that gateway in /etc/network/interfaces without some routing, which is where the trouble I'm having is. The machine I'm trying to set this up on is part of 2 networks - one internal, on two different NICs.

[Code]...

View 8 Replies View Related

Networking :: Adding Persistent Routes In RHEL5?

May 13, 2011

At work I have been given the "opportunity" to provide admin support on a bunch of RHEL3, 4, and 5 servers. My latest problem is, as the subject hints at, adding persistent (or permanent) routes on a RHEL5 server. I've successfully done this with a couple of RHEL4 servers by adding the relevant information to the /etc/sysconfig/network-scripts/route-eth0 file like this:

GATEWAY0=xx.56.200.129
NETMASK0=255.255.255.128
ADDRESS0=xx.56.200.250

On the RHEL5 servers I do not see a route-ethX file. Do I just add the file and the route info? Or has this functionality been moved to another location?

View 2 Replies View Related

Networking :: Multiple Routes Based On Source IP?

Jan 29, 2010

I have 2 NICs in one box, both connected to two different routers.Is there a way to make NIC1 handle lets say 204.x.x.x and NIC2 handle the restncoming requests though.Basically, I have apache running, and I things to go through a specific NIC based on source.

View 1 Replies View Related

Networking :: How To Setup Static Routes - Gateway ?

Jan 18, 2011

I have a temporary system up with wlan0 and eth2.

I want the eth0 address to be the gateway for accessing the internet on wlan0.

How do I setup static routes?

I'm not too keen with networking...

Code:

View 1 Replies View Related

Networking :: What Routes To Add In Order To Make VPN Work

Feb 5, 2010

i installed the free PacketIX vpn client on my ubuntu 9.04. it created a virtual network adapter, i was able to configure and connect to the VPN service but when i add a default route to the routing table so that all internet traffic goes through the VPN, my internet connection stops working until i remove the line i added.
here's my routing table before :

Code:
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.222.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 vpn_vpn
0.0.0.0 192.168.222.2 0.0.0.0 UG 0 0 0 eth0
and after i add the route:
[Code].....

View 2 Replies View Related

Ubuntu Networking :: Make Router To Access Point To Routes LAN Which Use Wireless

Mar 3, 2010

i have a router, i use it to connect my LAN to internet. Now, my LAN only coneck via cable, i want to try make my router to be a Acces point to routes the LAN whitch use Wireless.

View 1 Replies View Related

Fedora Networking :: Network-Manager PPTP Add Routes

Jan 13, 2010

I currently managed it to get a pptp-connect to my home network. now I have another little problem. NetworkManager always routes the whole network traffic over my home network if i am connected to the home network.If i set the "Use this connection only for resources on its network" I have do manually say:

Code:
route add -net 192.168.1.0 netmask 255.255.255.0 dev ppp0
After that only the correct traffic runs over the vpn. Now my question is it possible to setup the route via the networkmanager gui?

View 3 Replies View Related

Fedora Networking :: Adding Another Network To Routes And Shorewall?

May 10, 2011

First I will give some background. We have a currently working network that the Previous network Admin assigned an internal IP scheme of 200.1.1.0/24. I have no idea why he would have done such a thing, but it is my job to fix it (and keep our systems up and running). We have a Fedora 10 box on the 200 network that is acting as a router and a firewall (shorewall to be exact).

I added another NIC card (thank you again to all the great people on this forum for helping me get that working) and it is eth2. Assigned it a 10.100.1.A/24 (This is just a variable for the real IP). The other end of the cable that I plugged into that NIC connects to a Cisco Layer 3 switch. I assigned the port that connects to the other end of the cable the IP address of 10.100.1.B/24

Ok, I added the static route of ˜ip route add 10.100.1.0/24 via 10.100.1.A dev eth2' I added loc2 (which is my eth2 adapter) to the /etc/shorewall/zones file. I set eth2 on loc2 in the /etc/shorewall/interfaces file. loc2 eth2 detect I set the lines in the /etc/shorewall/policies file loc loc2 ACCEPT info loc2 loc ACCEPT info I can ping the cisco switch from the linux server itself. From a PC on the original network I can ping the new NIC card in the linux server, but cannot ping the cisco switch, so I figure it has to be either the route or shorewall.

View 13 Replies View Related

Networking :: Setup Static IP Routes On 4 Debian Machines?

Oct 30, 2009

I have 4 debian boxes networked together through a basic 5 port switch. I am trying to simulate 2 Local Area Networks joined together by a WAN. Right now I can communicate with A <--> B, B<----> C, C<----->D. However, I cannot communicate with Host A to Host D which is the whole point of this experiment. It has to be my static routing is not right. This is a confusing area to me. Right now my routes are

[code]....

View 1 Replies View Related

Networking :: Sending Messages Through Alternate Routes To Same Destination?

Jan 11, 2010

I am doing a university course and am struggling to find a method of sending 1 message down route A and then the next message to the same destination via route B, alternating between the two with each new message sent.I am going to use a Linux computer with two Ethernet cards connected to two different networks via a routers and then to the destination host via a switch.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved