Questions tagged [route]
Command line tool for manipulating and listing the routing table.
617
questions
41
votes
3
answers
85k
views
Where does the route to 169.254.0.0 comes from?
Running CentOS 5.4
Why do I have route to 169.254.0.0 although it does not appear in Network > Ethernet Device > Route configuration dialog?
Destination Gateway Genmask Flags ...
39
votes
2
answers
132k
views
How to set the preferred network interface in Linux
I have my network set up like this:
In words: I have a machine (Calcium, running Arch Linux) that has two network interfaces. Interface eth0 is hooked up to a router, and is gigabit. Interface eth1 ...
35
votes
9
answers
46k
views
How to duplicate TCP traffic to one or multiple remote servers for benchmarking purposes?
Infrastructure: Servers in Datacenter, OS - Debian Squeeze, Webserver - Apache 2.2.16
Situation:
The live server is in use by our cusotmers every day, which makes it impossible to test adjustments ...
27
votes
1
answer
30k
views
Why OpenVPN use network 0.0.0.0 netmask 128.0.0.0 as a default route?
If you use redirect-gateway def1 option in OpenVPN config file,the server will add a default gateway on your route table, what I want to know is why OpenVPN did not use network 0.0.0.0 netmask 0.0.0.0 ...
24
votes
4
answers
204k
views
Unable to add a static route: SIOADDRT: Network is unreachable
I've been bashing my head against a wall for a few days trying to figure this out:
My ifconfig is:
eth0 Link encap:Ethernet HWaddr 00:50:56:BB:XX:XX
inet addr:192.168.36.132 Bcast:...
23
votes
2
answers
49k
views
Routing selection: specificity vs metric
I understand that Linux chooses the most specific route to the destination when it does routing selection. But what about a route's metric? Does it have a higher priority than route's specificity?
A ...
23
votes
6
answers
12k
views
Use IPtables or null route for blacklisting about 1 million IP addresses?
I've come across a situation where a client needs to blacklist a set of just under 1 million individual IP addresses (no subnets), and network performance is a concern. While I would conjecture that ...
22
votes
5
answers
75k
views
How to delete a route on a specific interface? [closed]
When I start a VPN connection, a new default route is added on the utun0 interface:
Destination Gateway Flags Refs Use Netif Expire
default utun0 ...
21
votes
2
answers
175k
views
Specify route to an interface in Windows cmd
I have a computer with 2 network interfaces.
One interface is connected to LAN network with IP 192.168.0.254, and the other is connected to a recorder server (192.168.0.233).
192.168.0.10 is the ...
20
votes
7
answers
83k
views
How can I configure openvpn server without push default gateway?
I need configure my openvpn server to provide some LAN resources, but I don't want route all traffic for my clients.
Here is my sample network description:
My LAN is 192.168.1.0/24. Openvpn network ...
20
votes
5
answers
16k
views
How to set up a VPN Incoming connection with Windows to tunnel Internet traffic?
I want to set up a VPN on a remote server to route all my Internet traffic for privacy reasons. I can set up an incoming connection and connect to it successfully. The problem is, I can just see the ...
19
votes
3
answers
32k
views
Routing from docker containers using a different physical network interface and default gateway
Background Information
I have a server with two network interfaces that is running Docker. Docker, like some virtualization tools, creates a Linux bridge interface called docker0. This interface is ...
18
votes
2
answers
20k
views
What is the difference between "route" and "ip route"?
I tried to understand the networking tools on Linux. I am confused now about what I should use to manipulate the static routing: route or ip route?:
route - show / manipulate the IP routing table
ip ...
14
votes
2
answers
10k
views
How does Linux pick which network interface to use?
Let's say I have a machine with two network adapters on different subnets, eth0 (10.0.100.5) and eth1 (10.0.200.5). Assuming both subnets have routes to the internet (though their own NATs) and to the ...
13
votes
5
answers
2k
views
Freebsd change default Internet channel route
I have two Internet channel and Gateway on freebsd. When I switch channel with the command route change default chan2, the command netstat -nr shows changed default route. But traceroute shows that ...
12
votes
3
answers
47k
views
Pick the default network interface
I have a server with 2 interfaces. eth0 is 100 times faster than eth1. Though for some reason, every reboot, the default interface is picked at random. To make things more annoying, they both use the ...
12
votes
3
answers
25k
views
How can I configure my DHCP server to distribute IP routes?
I have a DHCP server (Linux, IPCop, dnsmasq) running on my default gateway server 192.168.0.1. I have a VPN endpoint on another server in the network (192.168.0.4). Is it possible to configure the ...
12
votes
1
answer
19k
views
How many custom route tables can I have on Linux?
I've been working with custom route tables on Linux, and I'm a bit confused by some of the documentation and behavior of the "ip route" command. It seems that the only valid values should be 0-255 ...
11
votes
4
answers
81k
views
How to check a route exist between two hosts for a particular port?
How to check whether there is a route between two hosts for a particular port (e.g. 1433).
11
votes
2
answers
51k
views
What does this linux command mean "route add -net 224.0.0.0 netmask 240.0.0.0 eth0"
Could somebody explain what exactly this command means in relation to transmitting and receiving multicast traffic
route add -net 224.0.0.0 netmask 240.0.0.0 eth0
11
votes
1
answer
32k
views
Change default route to DHCP interface without a route push?
How can I change the default route to utilize eth1 (DHCP), instead of eth0 (static)? I want this to be a permanent solution persistent through reboots.
Kernel IP routing table
Destination Gateway ...
10
votes
3
answers
66k
views
Windows 7: Route single IP over different interface (wlan)
I am connected via Ethernet (10.1.1.1, interface 11) as well as via Wireless LAN (172.22.12.1, interface 12). I trying to route just a certain host (140.239.191.10 - which is whatismyipaddress.com for ...
10
votes
1
answer
13k
views
How to tunnel all Internet traffic via SoftEther?
My intention is to route all Internet traffic via a remote machine behind multiple NATs. The ISP's NAT servers are not under my control. I do control my own NAT server, which is a local router. Both ...
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>
...
9
votes
1
answer
3k
views
OpenBSD route via different gateways which have same IP but on different interfaces
I have multiple VPN connections which use the same gateway IP (I do not have the ability to change this as it is out of my control). These VPNs all provide access to different networks, and the ...
8
votes
1
answer
8k
views
Listing the routing table takes long time to complete
When I print routes defined on my computer using route, it takes about 5 to 20 seconds to complete. Why does it take so much time?
With VPN enabled:
$ time sudo route
Kernel IP routing table
(...)
...
8
votes
4
answers
74k
views
Static route toward a DNS Address, it is possible?
I need to add a static route on a windows server toward a web server with a service; I need to add a static route with this command on a Windows command prompt:
ROUTE ADD -p IPADREESS GATEWAYIP
Is ...
8
votes
2
answers
18k
views
Stop local emails being sent to relay host with postfix
I've recently signed up to SMTP2GO (smtpcorp). I've setup postfix on one of EC2 servers and have pointed it to my smtp2go account:
relayhost = [smtpcorp.com]:2525
Now all my mail is being routed ...
8
votes
1
answer
7k
views
ip rule and route doesn't get respected
I'm trying to route packets based on their source address, and have added the following:
# ip rule add from 10.10.10.0/16 dev eth0 table foobar
# ip route add default via 100.100.100.1 dev eth0 table ...
8
votes
4
answers
74k
views
Why ip route add doesn't work, but ip route add with less details and then change works?
I have a problem with ip route add. Surprisingly, I can add the route then change it, but I cannot directly add it:
# ip route add 192.168.0.0/16 via 192.168.255.254 src 192.168.1.101
RTNETLINK ...
7
votes
4
answers
2k
views
AWS VPC internet gateway and AWS services
Am I doing something wrong or is the AWS VPC ec2 instances not able to reach any of the AWS managed services (s3/sns/sqs) without a public route to the Internet Gateway in the routetable?
I was told ...
7
votes
1
answer
46k
views
forcing network traffic to route via a specific, non-default interface
I've got a bunch of Linux servers with multiple(3) NICs and associated network interfaces. I'm tripping over a bizarre routing problem, where traffic that should use the default route is not, and ...
7
votes
3
answers
23k
views
Linux adds the wrong default route
For some reason my Centos 5.9 Linux 2.6.18 x86_64 wants me to have two default routes.
Whenever I reboot the server, my routing table looks like this:
[root@server1 ~]# route -n
Kernel IP routing ...
7
votes
2
answers
9k
views
Linux ip route matching the source ip
I would like to know if it's possible to tell a Linux kernel to route all packets destinated to X via interface/ip Y but only in case the source IP address would be a specific one.
Any idea if this ...
6
votes
3
answers
18k
views
Multiples ip address on interface. I want to specify one of them for output
I ran curl on curlmyip.com, and I got the wrong output ip address.
My systemd service file is:
[Unit]
Description=Wired Networking
Wants=network.target dibbler-client.service
Before=network.target ...
6
votes
3
answers
55k
views
howto only tunnel specific hosts route through openvpn client on tomato [closed]
I am relatively newbie in networking world although I did coding and know some sysadmin background for a long time. and here I'm only one step from my destination.
The whole picture is : at home I ...
6
votes
3
answers
5k
views
In Linux, does using route to blackhole an IP result in better performance than dropping in iptables? [duplicate]
During a DDOS attack, if we are finding IPs we want to block will we see better performance using a null route as opposed to iptables?
Null routing we would do something like:
ip route add blackhole ...
6
votes
1
answer
49k
views
How to forward connection from one interface to another under linux
I have linux box which has two network interface, eth0, eth1. from eth1 I can access an internal website, say under port 8080. from outside the box, I can't access that network. my question is, is ...
6
votes
1
answer
63k
views
How can I permanently remove/delete a line in route with CentOS 6
root@new [~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
178.18.23.200 0.0.0.0 255.255.255.255 UH 0 0 0 ...
6
votes
1
answer
12k
views
Ubuntu, two NICs but only one with internet connection
I am having issue with my Ubuntu because I am unable to use wget or access any website with my current setup.
I have two NICs, enp2s0 and enp2s1.
enp2s0 is connected to the internet but connected to ...
6
votes
2
answers
4k
views
IPv6 default gateway route disappear after reboot
I'm using Debian Wheezy on a dedicated server which uses IPv4 and IPv6 at the same time.
ifconfig eth0
eth0 Link encap:Ethernet HWaddr 11:11:11:11:11:11
inet adr:90.0.0.1 Bcast:90....
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 ...
5
votes
6
answers
43k
views
How to route based on domain name?
I can route by IP range by the route command. But is there any domain based route solution?
5
votes
1
answer
6k
views
Default route is missing
I upgraded my server from Ubuntu 8.10 to 9.04 and now my default route is missing. So every time I boot I have to manually add it back with the command:
sudo route add default gw 192.168.10.1
How ...
5
votes
3
answers
619
views
How do VPN servers/clients avoid routing their own remote connection packets through themself?
I am trying to conceptualise how networking works under the hood for linux VPNs which use TUN interfaces.
My current best guess is as follows (please correct me):
Connection established to remote ...
5
votes
2
answers
10k
views
Making changes to default IPv6 route persistent in CentOS 7
I have several IPv6 addresses on a CentOS 7 server and need to make a specific v6 address the default address used in routing. I have been able to do this by modifying the route table.
ip -6 route ...
5
votes
1
answer
5k
views
How can I permanently remove a line in route with Debian-based distributions?
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.1.1 0.0.0.0 UG 202 0 0 eth0
default ...
5
votes
1
answer
4k
views
Wget works, Ping doesn't
There are some anomalies on a Virtuozzo virtualized Debian 4 (I know, I'm gonna upgrade this one asap, but there dependences). We run some Websites on this one. And a view Days ago exmi4 wasnt able to ...
5
votes
1
answer
3k
views
Set source address to use tun device does not work (Debian Squeeze)
There have been similar questions on StackExchange but none of the answers helped me, so I'll try a question of my own.
I have a VPN connection via OpenVPN. By default, all traffic is redirected ...
5
votes
2
answers
6k
views
"No route to host" until "ping" or "route"
I have two computers in one WiFi network:
A - client
B - server
Sometimes (once in ten times) after B reboot I am unable to ssh from A to B:
$ ssh 192.168.201.128
ssh: connect to host 192.168.201....