Questions tagged [routing]

the process by which data packets on communication networks are forwarded into the direction of their ultimate destination by routers.

Filter by
Sorted by
Tagged with
33 votes
5 answers
107k views

Why do ICMP Redirect Host happen?

I'm setting up a Debian box as a router for 4 subnets. For that I have defined 4 virtual interfaces on the NIC where the LAN is connected (eth1). eth1 Link encap:Ethernet HWaddr 94:0c:6d:82:0d:...
El Barto's user avatar
  • 973
33 votes
3 answers
54k views

Find interface for route to specific host

On a multihomed Linux machine, how can I find out what network interface will be used to send a packet to a specific host? I need to do this programmatically and I'd rather not parse and interpret the ...
Rob H's user avatar
  • 659
29 votes
1 answer
87k views

What CAN cause 'RTNETLINK answers : No such process' when adding a route

I have come up against this error a number of times, but haven't yet found an explanation of what the error means, or what can cause the problem. I'm not posting my configs or the specific route I'm ...
TaninDirect's user avatar
28 votes
2 answers
51k views

ip route show src field

I read the man page of ip and still do not understand what src is and I could not find much documentation. Please, if you can explain it thoroughly or point to some link it a good answer.
coredump's user avatar
  • 407
26 votes
4 answers
42k views

ip address scope parameter

In Linux, the command ip address add [...] has a scope argument. The man page says that the scope is "the scope of the area where this address is valid". Follows the list of legal scopes: global ...
rolaf's user avatar
  • 578
23 votes
2 answers
12k views

Aws vpc default route table in CloudFormation

Am I missing something but is there no way to add a route via CloudFormation to the default route table that comes provisioned with a VPC?
Sleeper Smith's user avatar
19 votes
5 answers
87k views

Windows static routes w/o specifying gateway (next hop)

I have the following scenario: Computer A: 198.51.100.8, netmask 255.255.255.0 Computer B: 203.0.113.9, netmask 255.255.255.0 Both computers are on the same LAN segment; no default gateway is ...
fission's user avatar
  • 3,651
18 votes
4 answers
31k views

How is route automatic metric calculated on Windows 7?

KB299540 explains how Windows XP automatically assign metrics to IP routes: The following table outlines the criteria that is used to assign metrics for routes that are bound to network interfaces ...
Etienne Dechamps's user avatar
15 votes
2 answers
14k views

Add static route with Ansible

How do I add and delete routes in my route table with Ansible? I can't seem to find any network or system modules for this.
Jay's user avatar
  • 275
14 votes
4 answers
30k views

MULTI: bad source address from client - any one-off solutions?

Setup: I have the an openvpn client/server setup (config files at bottom), and I get the infamous MULTI: bad source address from client [192.168.x.x], packet dropped message at server. The server has ...
m000's user avatar
  • 450
13 votes
4 answers
53k views

second ip address on the same interface but on a different subnet

Is it possible in CentOS 5.7 64bit to have a second IP address on one interface (eg. eth0) - alias interface configuration - in a different subnet? Here is the original config for eth0 more etc/...
fptstl's user avatar
  • 131
13 votes
2 answers
8k views

Why isn't there a route for localhost in Ubuntu?

$ sudo docker run --rm ubuntu:14.04 route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 172.17.42.1 0.0.0.0 UG ...
Balazs Rau's user avatar
12 votes
1 answer
5k views

How to achieve per-packet multipath routing on Linux?

Linux Kernel before 3.6 used route caching to do IPv4 multipath routing, which meant routing between two separate lines/ISPs was quite easy. From 3.6 the algorithm changed to being per-packet, meaning ...
bao7uo's user avatar
  • 1,714
9 votes
8 answers
28k views

Several IP address within the same subnet on the same host

Is it possible (well the real wording should be "Is it correct") to have several IP adresses that belongs to the same subnet, on the same host ? Here is an example: #Host 1 eth0 -> 10.0.0.1/24 ...
ereOn's user avatar
  • 519
9 votes
3 answers
7k views

Limiting interface bandwidth with tc under Linux

I have a linux router which has a 10GBe interface on the outside and bonded Gigabit ethernet interfaces on the inside. We have currently budget for 2GBit/s. If we exceed that rate by more than 5% ...
hookenz's user avatar
  • 14.6k
9 votes
6 answers
20k views

Securing a guest VM to give it internet access, but block access to host LAN

I have a Linux guest VM running under a Windows host. If I set the networking mode to NAT, the guest can get internet access (which I want), but can also access the hosts LAN (which I dont). For ...
Francis Appa's user avatar
9 votes
2 answers
51k views

Openvpn routing for lan to lan through tun

I am trying to setup an OpenVPN tun to connect two lan's The open vpn connection is up and working but there is a problem with my routing or nat or something. What I need is an example of what a ...
Alex's user avatar
  • 91
9 votes
4 answers
65k views

How can I forward the HTTP and SSH port to my internal server using iptables?

I do not have the router so I made my CentOS 6.4 Linux system into a router, forwarding the public network traffic to my local LAN. It has two NIC cards, one for the public IP address (eth1) and ...
Rahul's user avatar
  • 93
9 votes
3 answers
19k views

What is the local routing table used for?

I am trying to understand what is the local routing table. If I add a random address in it with the following command: sudo ip route add to local <any-ip-address> dev <network interface> ...
Lilás's user avatar
  • 223
9 votes
2 answers
28k views

Get linux to change default route if one path goes down?

I'm configuring a gateway/router linux box. It is performing masquerading/NAT. The primary Internet interface is a 3G modem, but if that goes down, I would like it to try a different interface ...
askvictor's user avatar
  • 864
8 votes
3 answers
57k views

Properly configure two eth interfaces on different subnets

Can anyone with heavy background in both Linux and Networking help me out? I've scoured the Internet looking for a clear answer for this and I've even compared a box I have access to with the same ...
beaconfield's user avatar
8 votes
2 answers
18k views

Permanently adding source policy routing rules

Somebody answered my earlier question by describing how to create a new routing table with source policy routing: echo 13 eth3 >> /etc/iproute2/rt_tables ip route add default via 10.20.0.1 ...
Lorin Hochstein's user avatar
8 votes
4 answers
28k views

connect two routers with different subnet

I've seen a lot of questions about this, but haven't really understood/didn't match my issue. I'm a newbie regarding networking. I got two routers, both are connecting to the wan (giving them ...
JoBe's user avatar
  • 276
8 votes
3 answers
4k views

Routing table hits?

With iptables -L -n -v, you can get the number of times each firewall rule has been applied, which is very useful in debugging. I'd like to know if there's a similar way to find out how many times a ...
Lee B's user avatar
  • 3,470
8 votes
5 answers
21k views

Use specific interface for outbound connections (Ubuntu 9.04)

I have two ethernet interfaces in my computer, which is running Ubuntu 9.04. Both interfaces sport static IPs, but use separate gateways. My /etc/network/interfaces file looks something like this: ...
Marcus Griep's user avatar
8 votes
2 answers
11k views

How do I forward localhost traffic to a remote host with iptables?

I would like to set up my CentOS 6.5 box to forward connections to localhost (127.0.0.1) to the same port on a remote machine (e.g. 10.0.3.10). I've tried the iptables rule below, but when I attempt ...
Jonathan's user avatar
  • 227
8 votes
6 answers
42k views

Trying to understand the correct way to create a static route in CentOS, please assist

I've been trying to understand what's the correct way to add a static route on a CentOS 6.x machine. In some forums they say to create a file named route-dev_name (for example route-eth0) with the ...
Itai Ganot's user avatar
  • 10.8k
7 votes
1 answer
2k views

2 ethernet connections between two Switches

I'm setting up servers at our new office and I brought a spare managed switch with 2 Gig ports to run all of our phones(VOIP) and workstations. Now for the servers I've got a separate gigabit switch(...
Jacob's user avatar
  • 9,242
7 votes
1 answer
6k views

Advanced routing with firewall marks and `rp_filter`

Today is routing day. You should now how to add an IP route, basic use of ip rule, and good understanding of iptables to read this. This is cross posted (in French) on LinuxFr. Problem I have an ...
Adrien Clerc's user avatar
6 votes
2 answers
4k views

IPv6 routing problem

I've received a native IPv6 /64 subnet from my server provider, but I can't get it to play the way I want it. I'm running virtual machines, and I want them to have their own public ip(s). Let's ...
brain's user avatar
  • 163
6 votes
1 answer
4k views

Making an `ip rule` higher priority than `local`

I'm trying to redirect a subsection of incoming traffic to a different destination using fwmarks. The procedure 1) Mark matching incoming packets: iptables -t mangle -A PREROUTING -i pppoe0 -p tcp -...
Coops's user avatar
  • 6,105
6 votes
3 answers
2k views

Amazon CloudFront and EC2: Global Load Balancing

We have an app that is going to store and serve up a decent amount of data in S3 to a global audience where latency should be minimized. So, we've been doing tests with Amazon CloudFront and have seen ...
Matt Rogish's user avatar
  • 1,512
6 votes
1 answer
26k views

HAProxy load balancing based on source ip (IP subnet)

I have x cluster. This cluster look like Cluster 1 192.168.1. (Server type 1) 192.168.2. (Server type 2) 192.168.3.1 (Server type 3) <Redis server> Cluster 2 192.167.1. (Server type 1) 192....
Vivek Goel's user avatar
6 votes
2 answers
17k views

Debian/OVH: How to configure multiple Failover IP on the same Xen (Debian) Virtual Machine?

I have a problem on a Xen virtual machine (running latest Debian), when I try to configure a second failover IP address. OVH reports that my IP is misconfigured and they complaint they receive a ...
Dmitri Sologoubenko's user avatar
6 votes
2 answers
461 views

When to start using OSPF

We have 4 offices in different countries. They are all connected via VPN to each other (i.e. at least one VPN tunnel from each office to all other three). Each office has between 1 and 4 separate ...
wolfgangsz's user avatar
  • 8,917
6 votes
1 answer
6k views

How can I route different traffic over different interfaces (routes) by protocol?

I have two different WAN interfaces in a Linux (iptables) router. How could I achieve a situation where different traffic is routed over different interfaces, depending on the protocol (destination ...
Ville Mattila's user avatar
6 votes
1 answer
153k views

Setting a static route for a specific network adapter with two network adapters

I have a virtual windows server 2008 r2 with 2 virtual network adapters, one is part of a domain and the other isn't. When I ping to a specific PC that is part of the domain it connects to it through ...
Moshisho's user avatar
  • 183
6 votes
2 answers
35k views

Changing OpenVPN DHCP pool

I have a config at the moment which is working almost fine until some clients connect, the server starts to kick the clients off from the server or something like that. As I have checked every clients ...
Z T's user avatar
  • 279
5 votes
2 answers
35k views

How to set a static route for an external IP address

I'm putting a new router on our network to help manage our private network connections and to better control routing to the outside. I've decided to simplify this question by removing references to a ...
HorusKol's user avatar
  • 781
5 votes
1 answer
4k views

Rotating outgoing IPs using iptables

I am trying to rotate outgoing IPs using iptables. I want to rotate outgoing connections between three IPs, one by one. Here is what I'm doing with iptables: root@server:~# iptables -t nat -I ...
Mike's user avatar
  • 425
5 votes
1 answer
5k views

New KVM guests cannot access outside LAN

I have a KVM host (at 192.168.0.10) that currently has one working KVM guest (at 192.168.0.12). On attempting to install a new KVM guest today, I reached a problem where the network on the new guest ...
Chris's user avatar
  • 53
5 votes
3 answers
30k views

How to set which IP to use for a HTTP request?

This is probably a silly question. I'm doing some http requests using wget from the command line, and I want those connections to be made through one specific IP of the 4 IPs my server has. Those http ...
GetFree's user avatar
  • 1,530
5 votes
3 answers
7k views

Simple Multihomed Linux Server Issue

I have a Linux server running CentOS 6.4 that is used as an iSCSI target. The server is multi-homed with two NICs, both on the same subnet. iSCSI multipathing takes care of the load-balancing/failover,...
tfrederick74656's user avatar
5 votes
2 answers
25k views

Docker based reverse proxy with NginX for multiple domains

I'm trying to create a docker based multi-container setup with a reverse proxy for multiple domains to serve, where the websites, the databases and the nginx based reverse proxy run in containers, but ...
elaspog's user avatar
  • 253
5 votes
1 answer
15k views

how do I set static routes in windows domain to all computers at once

Setup, its a test lab and we have some odd requirements Windows 2012 Server running AD/DNS/DHCP 500 client machines used w/4 physical network interfaces each 2 interfaces are test resources, ...
Greg Mason's user avatar
5 votes
3 answers
5k views

OpenBSD: Gateway outside subnet (works in Linux)

We need to set up an OpenBSD host to use a default gateway that's outside of it's subnet. This is all I need to do on Linux (not the actual IPs) to achieve it: ifconfig eth0 33.33.33.33/31 up route ...
kshade's user avatar
  • 65
5 votes
1 answer
4k views

"route add default -iface em1" in rc.conf on FreeBSD

I have two NICs on my FreeBSD server, which are set up like this in rc.conf: ifconfig_em0="10.0.0.1 netmask 255.255.255.0" # LAN NIC ifconfig_em1="DHCP" #...
poplitea's user avatar
  • 467
5 votes
2 answers
3k views

Policy based routing

I found very good article on load balancing at http://www.diegolima.org/wordpress/?p=36.. I could not implement it though as my requirement is slightly different from pure load balancing. We have two ...
Silkograph's user avatar
5 votes
1 answer
11k views

Is it possible to configure HAProxy to choose a backend server based on a request's source IP? If so, how?

The title pretty much says it all. Basically, I want to route a request to a specific backend server based on the request's source IP. i.e., HTTP Request from 192.168.100.1 -> HAProxy -> ...
John's user avatar
  • 536
5 votes
2 answers
2k views

IP Routing - how does it work again? [closed]

Can someone explain how IP routing works to me? E.g. if I ping 123.123.123.123, how does each router know which way to go as shown in a traceroute dump.
JavaRocky's user avatar
  • 481