Questions tagged [iproute2]

iproute2 (ip) is a tool used to manipulate network configurations.

The ip command is meant to replace ifconfig/route commands on Linux. This command lets you perform advanced configurations that were not possible with ifconfig/route.

See:

242 questions
4
votes
1 answer

Iproute2 tools vs conntrack tools

I have a linux box which is setup as firewall/gateway for the network. Was just wondering why ss and other iproute2 tools show much less than iptables conntrack. Is it because the router function is happening in kernel only? ss -na Shows only two…
Adrian Cornish
  • 531
  • 1
  • 4
  • 12
4
votes
0 answers

Setting up multiple IPv6 routes over a single interface on Linux

tldr; A LAN device is able to get 2 separate internet connection (1 NATted from ISP Router, 1 from manual PPP connection). Able to separate ISP-WAN and PPP-WAN IPv4 into 2 routes using ip rules but not IPv6. Apologies for the lengthy post. My…
RuMAN S
  • 51
  • 3
3
votes
1 answer

How to group interfaces for the purpose of using ip-rule's suppress_ifgroup feature?

I found out about ip-rule's "suppress_ifgroup X" feature which seems to allow me to tell the kernel to ignore a route from the given table with an outgoing interface that belongs to that group X. But I couldn't find any information of how I would…
sellibitze
  • 143
  • 7
3
votes
2 answers

Secondary IP in its own netns namespace

Is there a way I can move a secondary IP into its own namespace while keeping the primary IP on the original device? If I have 10.0.0.1 and 10.0.0.2 on device eth0, but I want 10.0.0.2 to be in its own netns test, the closest I've come to that…
pilcrow
  • 459
  • 5
  • 19
3
votes
1 answer

iproute2 interface statistics seem wrong

For some reason, ip -s link does not show the same numbers as /proc/net/dev, specifically the overrun count. For a given interface, ip shows no overrun packets: $ ip -s link show eth-ext1 7: eth-ext1: mtu 1500 qdisc…
dorian
  • 427
  • 1
  • 8
  • 24
3
votes
2 answers

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 [Route] Destination 10.10.0.10/32 Table=2 but this is…
cynexit
  • 31
  • 1
  • 3
3
votes
0 answers

Getting NATed traffic returned back to the right interface

On a custom board (running a 4.x kernel), I have two physical ethernet interfaces and one radio modem that gives me a ppp-interface. iproute2 has been installed, and I am using nftables (not iptables). My issue is that I want to forward specific UDP…
mroek
  • 31
  • 1
3
votes
2 answers

How to create permanent linux network namespace

I know that ip netns add xxx command can be used to create a linux network namespace, but it is not permanent, meaning after server reboot the created namespace will be gone. Then how can I create a permanent one which can survive server reboot?
Zii
  • 31
  • 1
  • 3
3
votes
0 answers

policy routing for local outcoming connections

I have a multihomed setup with two upstream providers. And I want to confine some connections to use only one provider — local outgoing connections that is. So, I've made a custom routing table, which has a directly-connected network route and a…
Alexander Sergeyev
  • 253
  • 1
  • 2
  • 10
3
votes
1 answer

what is the "ip route" equivalent of "route add -host" in linux?

Specifically, route add -host allows me to specify the host via hostname to add a route to a host, e.g., route add -host www.google.com gw 192.168.1.1 However, I cannot find a way to do this using ip route. The closest I can get is ip route add…
3
votes
2 answers

I have two default entries in my route table

After connecting to my OpenVPN server, I see my routing table as: Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface default 10.199.1.5 128.0.0.0 UG 0 0 0…
jkang
  • 151
  • 3
3
votes
1 answer

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.144.1.8 dev ppp0 proto none metric 1 I'd like to…
TomRoche
  • 243
  • 4
  • 11
3
votes
1 answer

Change source IP address based on the system user

I would like to make a certain user have a specific source IP address. For this purpose, I added a secondary IP address to the network interface and tried to enforce the source IP using ip6tables and policy routing. Summary: All IPv6-traffic gets…
Lekensteyn
  • 6,241
  • 6
  • 39
  • 55
3
votes
1 answer

OpenVPN --route-up Missing environment variables when passing to script

I'm diving into the glory of OpenVPN and I'm having a bit of trouble manually configuring the routing tables. I'm on Arch Linux. I know OpenVPN automatically updates the routing tables when connecting but I want to write a script to update them…
Nikto
  • 31
  • 1
  • 3
3
votes
1 answer

Reply on the same interface as incoming with DNATed IP

A server has 3 ifaces, 2 internal (eth1/2) in different public networks, one external (eth0). There is a service (openvpn) that can't bind to some IPs/ifaces, only to all or one, but I need it to accept connections (UDP) on internal ifaces only. The…
Anatoli
  • 51
  • 1
  • 5
1 2
3
16 17