All Questions
Tagged with iproute2 networking
45 questions
0
votes
0
answers
198
views
Requests between docker containers on same host using the public IP
I have a server with Docker and some containers executing. The host has a public ip and a service listening on port 80 from one of the containers.
If I try to wget the service using the public ip from ...
1
vote
0
answers
336
views
How to make secondary IP routable
I am trying to assign a secondary IP to my primary interface.
I added the IP to my eth0 interface
ip addr add 172.20.14.253/21 dev eth0
$ ip a show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,...
3
votes
1
answer
3k
views
Why is Linux policy-based routing (PBR) not working for ping?
First of all, it seems as if this question is about Linux, but it seems to me that it is about basic routing concepts.
I happen to have the following configuration:
What I am trying to do is to ...
2
votes
1
answer
2k
views
Use netns to bind programs to specific IP addresses
I have an IP address on my server, say, 192.168.0.3, I want to share in a net namespace, so to run apps there which will only be able to communicate to the internet using that 192.168.0.3.
I can "...
1
vote
1
answer
3k
views
How "ip route get" decides outgoing interface
Wondering what decides the outgoing interface. Here is my setup
Eno1 - 192.168.3 0.2/24, Gateway - 192.168.30.1
Eno2 - 192.168.50.2/24, Gateway - 192.168.50.1
My routing table looks like this -
[...
4
votes
1
answer
5k
views
Why I get "cache" in the output of `ip route get`?
I'm using kernel 5.11.0 and in the ip-route manual [1] it can be read:
Starting with Linux kernel version 3.6, there is no routing cache
for IPv4 anymore. Hence ip route show cached will never print ...
0
votes
0
answers
92
views
Clients couldn't query DNS server listening on router interface's secondary IP
I have a router where its interface has two IPs
$ ip addr
br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
link/ether <MA> brd ff:ff:ff:ff:ff:ff
...
2
votes
1
answer
570
views
How to force `ip route get` to ignore a specific device?
How can I do ip route get, but force it to ignore a specific device?
When I start my VPN, I run ip route get <vpn_server_ip> to determine what interface to use to connect to the VPN. Then I add ...
0
votes
1
answer
97
views
Routing between two networks
Basically I would like to know what should I do to connect two PCs in different networks and make them to see each other.
The diagram is like the following
linux-pc-1-1 (192.168.0.2 eth0) <---> (...
1
vote
1
answer
5k
views
Unable to Configure WireGuard to Use Secondary IP Address Instead of Main IP Address of the Server
The Setup
The main ethernet interface of my server is enp8s0, has one public IP address (116.202.221.254—server's main IP address), and here's how it is set up.
# ip addr show enp8s0
2: enp8s0: <...
2
votes
1
answer
12k
views
Response packet on the same interface as incoming in LAN
Currently, I'm struggling with the following scenario:
I have a server with 2 interfaces in 2 separate LAN subnets. IF1, IF2
I have a laptop which has an IP address from the first subnet
When I try ...
4
votes
1
answer
791
views
How is Netflix tracking that I'm behind a VPN?
Disclaimer:
This is not a "I need VPN to surf Netflix". Surfing without VPN at this site allows Netflix.
The question is instead the other way around: "There is a PC that needs to Internet through ...
0
votes
1
answer
2k
views
ip route and rule on boot
I'm trying to have the following rule and route added automaticaly on boot.
Adding them manually make things work.
I'm running CentOS.
ip rule add from 10.1.10.10/10 dev my-tun table my-table
ip ...
0
votes
0
answers
1k
views
Packets routed through wrong interface
This is a follow up on ip rule shouldn't beat ip route.
I've configured everything as per my last question.
But...
Running:
$ ip route get 10.10.10.10 from 10.0.0.13 iif test-interface
10.10.10....
0
votes
2
answers
223
views
Split access from multiple uplinks
Our setting is as follows:
+---------+ +------------+ /
| | | Modem | /
+------...
0
votes
2
answers
119
views
Why is the order of routing commands important in this case?
Why is the result different between this
ip tuntap add dev tun1 mode tun
ip link set up tun1
ip route add 1.2.3.4 via 192.168.0.1 dev eth0
ip addr add 10.0.0.1 peer 1.2.3.4 dev tun1
and this (last ...
0
votes
1
answer
2k
views
does the src field in an ip route entry have any effect on forwarding traffic?
does the src field in ip route have any affect on forwarding traffic? or is it only significant for output traffic?
what is the significance of an ip route entry that specifies both dev and src, ...
0
votes
2
answers
508
views
router's ip on subnet1 conflicts with identical host ip on subnet2
i'm trying to setup a linux machine as router for the following subnets:
+--------------------------------------------+ host3
...
0
votes
1
answer
695
views
IP routing table with non unique ID?
Is it possible to have multiple routing tables with the same ID? the name of the table would still be unique.
I cant find the information about this, seems is focusing on ip rule and add addr to the ...
0
votes
1
answer
1k
views
Routing issue with iproute2, two gateways and two network interfaces
I am trying to setup a layer 3 iptables firewall, with two interfaces.
My firewall has two physical interfaces : eno0, connected to my ISP's gateway, and eno1, connected to my local network gateway.
...
2
votes
1
answer
2k
views
IPTables Multi-VLAN NAT to Multiple IPs
I have a slight Problem with my NAT-Setup.
What I'm trying to do:
I have 2 VLANs (in this example 100 and 200) and want that they can access the Network via separate IPs. This should be accomplished ...
4
votes
2
answers
8k
views
systemd-networkd equivilent of "ip rule add..."
Basically the title says it all, what would be the equivalent to
ip rule add from 10.10.0.10/32 table 2
ip rule add to 10.10.0.10/32 table 2
in systemd-networkd?
I tried to setup something like
[...
1
vote
1
answer
349
views
How to route traffic destined for a port to an IP without altering the destination IP using iptables/iproute2?
I have to collect data from a number (>1000) of devices whose only authentication/authorization is via the source IP address connecting to them. These are network devices whose configuration is ...
0
votes
0
answers
552
views
Ubuntu 16.10: source based routing: packets are not redirected
I'm trying to configure source based routing on my ubuntu-machine.
As simplest example I'm trying to configure the only one interface on my machine.
All configuration taken from here: https://www....
0
votes
1
answer
318
views
routing multiple IPs on a single bond device - debian linux
I'm using linux server with nginx and additional IP-addresses for various web-sites.
It has main eth0 device with ipv4 (xx.xxx.210.245) and ipv6 (xxxx:xxxx:xxxx:xxxx:xxxx:ffff:6189:d2f5) and bond0 (xx....
37
votes
1
answer
4k
views
Why does removing an unused IP address from an interface kill connections unrelated to that address
Yesterday I did a quick reinstall of a (physical) server in the datacenter, and since I was short on time and with no easy access to our database I just assigned it an IP that I knew was available and ...
4
votes
1
answer
7k
views
Limiting bandwidth on Ubuntu Linux
I am in the situation where I have to simulate a P2P-environment (for my masters thesis in computer science). To do that I am using Docker with Ubuntu to create a bunch of virtual machines that is ...
1
vote
7
answers
4k
views
Create new subnet over existing subnet
I have three servers that currently have ips 192.168.1.1, 192.168.1.2, and 192.168.1.3. They can see each other and talk to each other. I would like to create a second subnet, on top of the 192.168....
3
votes
1
answer
3k
views
What is "the meaning" of this `ip route`?
I'm slowly learning more about IP routing and the ip toolset by investigating a VPN. After I start a particular VPN client, one of the (new) routes displayed by ip route show is
128.0.0.0/1 via 10....
0
votes
0
answers
294
views
How to set up a Linux gateway for multiple WAN networks?
I have a network with the following IPv4 and IPv6 addresses:
eth0 Link encap:Ethernet Hardware Adresse 30:85:a9:42:3e:60
inet Adresse:109.2xx.239.145 Bcast:109.2xx.239.255 Maske:255.255....
2
votes
1
answer
2k
views
How to route traffic through different interfaces based on the port number?
iptables -A PREROUTING -i usb0 -t mangle -p tcp --dport 8080 -j MARK --set-mark 1
iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD ...
0
votes
2
answers
4k
views
Failed to ping through gateway which is not default gateway
I have the following network interface configuration,
eth0: 192.168.78.1/24
eth1: 192.168.254.76/24 (Gateway 192.168.254.1)
eth2: 192.168.253.131/24 (Gateway 192.168.253.1)
where both gateways have ...
42
votes
4
answers
15k
views
Where is the statement of deprecation of ifconfig (on linux)?
A lot of people is stating that the ifconfig command is deprecated in favor of the ipone (on linux at least).
This is often used as an argumentation to switch from ifconfig to ip (see some comment ...
2
votes
1
answer
40k
views
ip route add works manually but throws "Error: an inet prefix is expected rather than ..." when run via bash script
I'm trying to run a script that should add this route to a table 11:
ip route add local 10.1.3.212 dev eth1 proto kernel scope host src 10.1.3.212 table 11
If I run this command manually, it is ...
0
votes
0
answers
75
views
What is the relationship between iproute2 and distro config files?
For various ip manipulation activities, what is the difference/relationship between iproute2 and modifying the distro's config files?
For instance, some sources recommend ip address del for deleting ...
9
votes
2
answers
16k
views
ip link set not assigning IP Address but ifup does
Since ip is set to replace ifconfig, I'm trying to get myself used to using the ip suite of commands. I'm trying to enable my NIC with
ip link set eth3 up
That doesn't assign an IPv4 address ...
11
votes
1
answer
7k
views
Macvlan based interface pings from host but not from namespace
[EDIT]
The production system is currently a mix physical and ESXi based system. We obviously would never use virtualbox even for a pre-production environment ! It was used here only to quickly narrow ...
1
vote
1
answer
420
views
Special setup for a linux server to route to itself
I've got two linux servers in question. When one server initiates a request for a specific IP address that the other server has, I would like the initiating server to route the request back to itself ...
10
votes
1
answer
34k
views
Static route without knowing the nexthop (linux)
I have an eth3 interface in a linux router, with an adsl modem. This adsl modem is in bridged mode, so the public IP is assigned to eth3 (say 11.22.33.44), and the modem is just not seen by my server.
...
0
votes
1
answer
194
views
Routing config between internet load balancers and backend
Im facing a problem due my lack of experiencie on routing.
I need to config the next things (all run on my computer virtualized, if works, i will pass it to hardware)
[internet] ---- [DMZR]--/--[...
192
votes
4
answers
85k
views
Should I quit using Ifconfig?
With the servers that mount Infiniband cards, when I use the ifconfig command, I get this warning:
Ifconfig uses the ioctl access method to get the full address
information, which limits hardware ...
4
votes
2
answers
3k
views
Why doesn't TUN device have BROADCAST flag?
When creating a TUN device in Linux, on my machine the created TUN device has following flags:
<POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP>
Clearly MULTICAST is listed in there but not BROADCAST. ...
2
votes
3
answers
3k
views
what's the difference between ICMP prohibited ICMP unreachable?
If I want to forbid a route to response a network, should I use
ip route add unreachable 209.10.26.51 or ip route add prohibit 209.10.26.51?
3
votes
3
answers
6k
views
TC hashing filters - single rule deletion
For traffic shaping I'm currently using a setup that looks exactly like the setup from LARTC, on this page:
http://lartc.org/howto/lartc.adv-filter.hashing.html
I have a simple problem with that - ...
2
votes
1
answer
3k
views
Howto redirect all SSDP packets to a specific interface via iproute2?
I have a faulty app which is sending SSDP packets on the wrong interface. I made the dev aware of the problem and it will be fixed in the new release but in the mean time I was hoping I could use ...