Questions tagged [iproute2]
The iproute2 tag has no usage guidance.
60
questions
0
votes
0
answers
19
views
How to see if any tc/iproute2 rules are in effect?
I've seen this question, but for me on Debian (bookworm), the output is not empty even if I delete everything (tc qdisc delete dev eth root) on an interface, tc qdisc show dev eth still shows this:
...
0
votes
0
answers
63
views
Fixing routes for an OpenVPN client using a http-proxy to connect to the commercial VPN server
On my OpenWRT router I do use passwall and a couple of internet censorship circumventing proxies.
In order to maximise the security of my home internet I am using a *reputable commercial *
VPN product....
0
votes
0
answers
100
views
What is the relationship between iproute2 and DHCP?
If I use DHCP on my router it allows me not to care about static routes? Do I need to use iproute2 toolset only when setting static routes without DHCP configured?
0
votes
1
answer
2k
views
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 ...
0
votes
0
answers
966
views
How to configure route between tun0 to access local machine?
I have the following structure. All machines are Linux based.
Server
------------------------
eth0 WAN
tun0 192.168.2.1 peer 192....
1
vote
1
answer
2k
views
"ip neigh flush" command removes entries with "extern_learn" and "permanent" set
If arp/neighbor entries are programmed with both "extern_learn" and "permanent", "ip neigh flush" command throws "Invalid argument" error, but the entries are ...
0
votes
1
answer
136
views
supress iproute2 error message
iproute2 has a message on fail that I do not know how to suppress.
I want to save the output of iproute2 to a variable for later use. if my network is up all is well and the output is something like:
...
0
votes
2
answers
989
views
How do I override the automatic address assignments on the loopback device?
Background
On modern linux systems the preferred way of managing network interfaces, ip addresses and routes, and related things is tools from the iproute2 package.
I am trying to set up a somewhat ...
1
vote
2
answers
2k
views
Routing using iproute2 after NAT
In a Linux system, which acts as a gateway on my lan, I tried to route traffic using iproute2.
Moreover, before routing it is necessary to perform the NAT, since
the linux machine is connected to a ...
2
votes
0
answers
1k
views
Route based on Source IP Address via 2 gateways on same NIC
In a Linux system, which acts as a gateway on my lan, I would like to route traffic based on source IP addresses.
I have 2 network cards and one of these cards has 2 different default gateways.
I know ...
4
votes
1
answer
265
views
Respond to ICMP while having multiple local tables in Linux
I have an IP range and I want to listen on all IP addresses, assume that is 10.0.0.0/8
Using TPROXY and packet mark I can respond to TCP traffic. This range should be in local table, but I don't want ...
0
votes
0
answers
499
views
Linux - Routing traffic with a fallback default gateway [duplicate]
I am trying to set up a fallback connection on a Linux machine that has access to two different routers on different subnets on running on the same network. I have been reading several other posts ...
1
vote
1
answer
469
views
what is meaning of 'default' in ip route command
from man ip-route, I see the example ip route add default via 192.168.1.1 dev eth0, but the command SYNOPSIS didn't match these command. How dose 'default' in the command work?
0
votes
1
answer
415
views
how can I implement nat in Linux now?
I used to be able to do it with iproute2 (ip rule and ip route), but it's been deprecated.
I now found tc-nat. From the man-page:
tc ... action nat DIRECTION OLD NEW
However, when using it:
...
1
vote
1
answer
838
views
ERSPAN Type I support by iproute2
Has ERSPAN Type 1 ever been supported by "ip link add" command, which is part of iproute2? Apparently only Type 2 or 3 are supported by its recent versions: "erspan_ver version - specifies the ERSPAN ...
0
votes
1
answer
476
views
Debian 10 - static route doesn't override default
My /etc/network/interfaces:
auto lo
iface lo inet loopback
auto wan
iface wan inet static
address $myPublicIP
netmask $ispSubnet
gateway $ispGateway
auto vpn
iface vpn inet ...
0
votes
1
answer
30
views
With Linux policy routing, from and to together misbehave
I have the following IP configuration (some output omitted):
# ip ad sh
1: lo:
inet 127.0.0.1/8 scope host lo
2: eth0:
inet 11.224.79.54/28 brd 11.224.79.63 scope global eth0
3: eth1:
...
0
votes
0
answers
645
views
Why is ip defaulting to tap0 interface
I am trying to configure a few interfaces on my network. I have created tap0 for my VBox VMs and set enp6s0 (my Ethernet connection) to manual. I would like for my host to connect via br0 which is why ...
0
votes
0
answers
381
views
Use tc and iptables to simulate latency between multiple datacenters
I'm trying to simulate network latency, drops, etc between multiple datacenters (dc) using tc and iptables.
With iptables, I have configured each node to mark which dc a packet to traveling to: Here ...
1
vote
0
answers
539
views
The bucket size in TC-HTB
I study the behavior of tc-HTB.
I did a tc setting like the below.
After reading The bucket in tbf, I expect its burst size will be rate / HZ.
sudo /sbin/tc qdisc del dev s1-eth1 root
sudo /sbin/tc ...
2
votes
1
answer
2k
views
Creating Network Bridge in ArchLinux stops internet connectivity
I tried to add a new bridge interface in ArchLinux. I followed the instructions from the wiki but after assigning the bridge to the real interface I cannot connect anymore to other IPs from outside (...
7
votes
1
answer
16k
views
What does “scope” do in ip route and why it is necessary to setup static route in Linux?
If I want to replace default dhcp route rules with static ones, I have to add a rule ip route add scope link dev eth0. Or I will get an error: “Nexthop has a invalid gateway”.
Here are my ...
3
votes
1
answer
2k
views
How does iproute2's `ip link show` determine link state?
I have a network interface that ip link show reports like this:
3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default
link/ether 02:...
1
vote
0
answers
468
views
How to setup iproute2 to share Internet connection from one interface (eth1) to another (eth0)?
How can I give Internet access for Workstation ?
I already did on RPi:
echo "1" > /proc/sys/net/ipv4/ip_forward
ip route add default via 192.168.8.1
iptables -t nat -A POSTROUTING -o eth1 -j ...
2
votes
2
answers
1k
views
Can I create three “veth” interfaces to build a virtual LAN in Linux?
In Linux with iproute2, I knew how to create two veth (Virtual Ethernet) NICs and separated them into two network namespaces, then I got two virtual NICs and virtual 'cable' connected them.
Now I ...
0
votes
1
answer
181
views
Getting second IP from Ethernet iface works, WiFi does not work
Physical interface:
root@ubuntu:~# ip addr show enp1s0
2: enp1s0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:e0:4c:68:...
0
votes
1
answer
3k
views
ifconfig and ip link show display different interfaces
I've configured a eno2 interface by mistake on Debian Stretch, now I've deleted it from /etc/network/interfaces and now is like this:
# The loopback network interface
auto lo
iface lo inet loopback
#...
0
votes
0
answers
182
views
Nicer output of 'bridge link'
The command brctl is being replaced by the ip and bridge commands.
With brctl show or brctl show br0 it was possible to list all network devices that were connected to that bridge.
% brctl show br0
...
1
vote
0
answers
71
views
Bridging two interfaces while siphoning some traffic
Objective
I'm looking to do something like this:
Where the "mini router" is helping to control and secure a legacy system that cannot be updated for complex reasons and resides somewhere out "in the ...
0
votes
0
answers
321
views
change BIND DNS response using iptables data
I have BIND DNS server configured with two views. both have different set of zone data. when end user querying the DNS server I need to dynamically route and change his request according to his needs. ...
0
votes
0
answers
416
views
ip rule show command doesn't work
While executing ip rule show the command gives the following error
# ip rule show
RTNETLINK answers: Address family not supported by protocol
Dump terminated
How do I fix this issue. Is there any ...
1
vote
2
answers
1k
views
How to sniff a virsh virtual bridge from a virtual machine
So I want to sniff the traffic from a virtual bridge (virbr2) from a virtual machine. I can successfully sniff virbr2 directly from the host machine, but when setting that interface to the virtual ...
0
votes
1
answer
841
views
How can I route a subnet to a different interface with iproute2?
so I am trying to setup routing with iproute, so a certain client subnet can access a firewalled internet uplink on another interface.
The server has four interfaces:
2: enp2s0f0: <BROADCAST,...
3
votes
2
answers
5k
views
Which utility uses /etc/network/interfaces
I am attempting to setup a WiFi network with dnsmasq on ArchLinux where I have NetworkManager and iproute2 (not net-tools anymore in ArchLinux).
As I am reading some tutorials they offen refer to /...
0
votes
0
answers
671
views
How to add route to the same subnet via two interfaces simultaneously?
I am currently using GNU/Linux
Have the following routing table:
default via 192.168.1.1 dev eno1 proto static metric 100
10.0.0.0/8 dev enp1s0 scope link linkdown
169.254.0.0/16 dev virbr0 ...
1
vote
0
answers
458
views
Routing over VPN by using default gateway
I have a small Ubuntu box that runs some services used on my local network and on the internet. The default gw on this box is clearly my cable modem and all works fine... the relevant port forwarding ...
2
votes
1
answer
4k
views
Policy routing for OpenVPN server & client on the same router?
PROBLEM
An OpenVPN server instance (tun, udp, port 1194) is set up on a Linux-based router that also runs an OpenVPN client instance (tun, udp, port 1197) connecting it to a VPN provider. Both the ...
1
vote
2
answers
3k
views
How to bridge enp0s3 with a peer of veth?
My Lap: Ubuntu 15.10. And I have a wired NIC enp0s3. I want to create a veth pair veth0 and veth1 and bridge them with enp0s3, and set veth1 to a new netns ns1, so that processes in ns1 can access the ...
2
votes
1
answer
759
views
Why does my ip-route-add fail silently?
I'm trying to configure host A to use a remote Linux server B as the router to Internet. A's eno50332208 has ip address 172.16.100.131. The interface used as gateway on B has address 172.16.100.128.
...
1
vote
1
answer
1k
views
Making custom routing changes permanent in CentOS 7
I need to make some custom routing commands be maintained whenever the main LAN network interface is restarted/system rebooted.
I've been reading how to do this in CentOS 7 and accordingly to ...
1
vote
1
answer
5k
views
Squid 3.3 Transparent IPv4 and IPv6 Proxy with TPROXY
I'm attempting to change my Squid transparent setup from using generic NAT that's limited to IPv4 only and switching it to TPROXY, for IPv6 support. I'm having difficulties getting transparent clients ...
2
votes
1
answer
915
views
Understanding "ip route" command
I'm trying to set up a backup route for my network as a safety net when the primary link fails; by adjusting the administrative distance with the ip route command. I have one router (cisco 1900 series)...
6
votes
1
answer
5k
views
What does the output of 'ss -s' mean?
I have a problem understanding the output of the Linux ss (socket statistics) command. I can not understand the meaning of the output of ss -s
For example:
[root@dls2304-1 ~]# ss -s
Total: 973 (...
0
votes
1
answer
572
views
iproute2: How do i connect one machine to the internet via another
I have the following setup:
A > 169.254.8.125/16 <--(ad-hoc)--> 169.254.9.109/16 < B > 192.168.178.21/24 <--(wifi)--> 192.168.178.1/24 < AP/router > internet
I want to connect A to the ...
7
votes
1
answer
13k
views
IPsec in the Linux Kernel
I have some issues (questions) related tot the Linux Kernel implementation of IPsec and it's user-space interface.
The biggest question is which is the actual official project for the Linux Kernel ...
0
votes
1
answer
659
views
Granular routing with iptables and iproute2 over VPN
On a host at my house I have a host for a VPN that I need for a couple of purposes. Living temporarily in Japan, it functions as a NAT for some devices so I can still use my NETFLIX and some other ...
4
votes
2
answers
4k
views
What is the second "state" in "ip link show" output
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
The UP between the brackets means my link ...
1
vote
1
answer
1k
views
split routing with two PPPoE connections
I have a debian wheezy box running, which is supposed to function as router / firewall / webserver / samba server [...]. I have two accounts from my ISP: acc1 with one static IP, and acc2 with dynamic ...
1
vote
0
answers
91
views
Using TC from iproute, unable to match canid
I'm trying to use tc from iproute2 to prioritize packets sent to a canbus.
Before doing so I read this guide about the issue: http://rtime.felk.cvut.cz/can/socketcan-qdisc-final.pdf
Even using the ...
1
vote
1
answer
1k
views
Convert ifconfig command to iproute2
I am using this ifconfig command to set IP on a network interface
ifconfig eth0 x.x.x.x netmask x.x.x.x mtu 1400
Now they say that ifconfig is deprecated and I should use iproute2. I converted that ...