Questions tagged [iproute2]
iproute2 (ip) is a tool used to manipulate network configurations.
242
questions
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
478
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
633
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 ...
-1
votes
2
answers
2k
views
Debian - Dual WAN - Static Route on a DHCP Interface
I've got two WAN interfaces coming into a Debian 8 VM.
WAN 1 - All Internet and local traffic. (0.0.0.0/0) Has a a static IP, thus IP, netmask and gateway are fixed values.
WAN 2 - Specific private ...
0
votes
1
answer
95
views
Linux IP-tables Forwarding loose Source IP on access.log [closed]
Team,
We have configured IP tables with forwarding request coming on eth1(public IP x.x.x.x) interface to other server. We are able to forward all requests but problem is loosing origin public IP(...
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.
...
0
votes
2
answers
2k
views
Does each custom routing table (w/default gateway) need a link scope route?
My Centos machine has a custom routing table foo_table containing just a default gateway route:
# ip route add default via 10.0.2.1 table foo_table
# ip route show table foo_table
default via 10.0....
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 ...
0
votes
0
answers
560
views
Multi WAN ipv4 forward Ubuntu
I want to setup a dual ethernet ubuntu machine as Multi-WAN load-balance router with ipv4 forwarding and NAT for my internal network.
I searched for some days now, but only found some tutorials how ...
0
votes
1
answer
946
views
create vpn tunnel at exist interface
guys. I'm testing our company's firewall product.And there have a problem bothers me. "The firewall" works as bridge mode have eth1 interface.I want to simulate a client remote access "the firewall" ...
2
votes
0
answers
169
views
What is "send bps" value in ss --info output?
If run ss --info, there is a send #bps in the output. I've found out that it's value is about twice bigger than real data flow speed.
From ss's source code, send_bps is:
s.send_bps = (double) info-&...
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>
...
3
votes
2
answers
7k
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
[...
0
votes
1
answer
771
views
How to add ip route to route traffic through interface when destination is also that interface
I have been testing keepalived and preparing to roll out on my vps.
My setup is:
(...)
2: ens4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
...
0
votes
1
answer
2k
views
Properly manage iptables rules on Docker host
I am using Gentoo and Docker. I have bunch of own iptables rules, and keep them in /var/lib/iptables/rules-save.
Docker adding bunch of own rules when start. It seems that iptables is auto-saving ...
1
vote
1
answer
305
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 ...
1
vote
1
answer
846
views
How to create a protocol-based default route using iproute2
I'm trying to create two routes --
Send all packets with IP protocol version 100 to 1.1.1.1 (via device eth1)
Send all other IP packets to 2.2.2.2 (via device eth2)
Reviewing the man pages of ip-...
0
votes
0
answers
539
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....
1
vote
1
answer
3k
views
unable to install source route - RTNETLINK answers: No such process (IPsec / strongswan)
Basically I'm trying to connect a pfSense to an EdgeRouter via IPsec site2site.
(public ip networks obfuscated by '1.2.')
[pfsense] <-> [edgerouter]
public: 1.2.156.229/30 <-&...
1
vote
1
answer
2k
views
OpenVPN with same subnet on two remote sites
i have some issue with an OpenVPN concentrator while using TUN device.
The scenario is that:
OpenVPN Server
VPN Subnet: 10.10.10.1/24
PC1 OpenVPN Client
VPN IP: 10.10.10.50
PC Local subnet/IP: 192....
4
votes
2
answers
5k
views
Physical interface MAC rather than macvlan MAC is sent as ARP response [closed]
On Arch Linux ARM (Raspberry Pi) Kernel 4.4.37, I created a macvlan e.g.
ip link add link eth0 mac0 type macvlan
The macvlan virtual NIC then appears in the list so I assign it an IP address, and ...
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 ...
3
votes
0
answers
654
views
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)....
0
votes
2
answers
6k
views
How to make ip route settings persistent in CentOS?
I need to route the outgoing traffic via a virtual ip address. I can do this using the 'ip' tool from the iproute-package.
Using ip route I can see which address is used as the source and I can ...
2
votes
1
answer
2k
views
How to load-balance traffic across two independent NAT devices using Linux kernel?
I have a network with several Linux workstations/servers on it, and two Internet connections, each with a consumer-grade NAT router in front of it. So for concreteness, let's say the devices are:
...
0
votes
1
answer
834
views
2 NIC 2 Gateways one router one internet gateway
I have a router with two nets
eth0: 192.168.1.0/24, default gateway is 192.168.1.1
eth2: 10.0.88.0/24, default gateway is 10.0.88.1
Both networks use Gateway 192.168.2.1 to the Internet being ...
0
votes
1
answer
2k
views
Ubuntu 16.04 Random outgoing IP
I have several IP address configured as static in my server. I want to route a random IP to any network outgoing request.
curl, wget, ping.. etc.
How to achieve this with iptables or any other ...
0
votes
1
answer
306
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....
3
votes
2
answers
7k
views
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 ...
3
votes
1
answer
2k
views
IPv6 routing with unnumbered interface - beyound scope error
I have set up an unnumbered L2tp tunnel from home to a remote host.
While trying to ping ipv6.google.com, the I received a beyond scope error, I know that prior to some time, link-local addresses are ...
1
vote
1
answer
197
views
Configure iproute2 for multiple NICs and validating
In attempt to avoid split routing for a CentOS 6 server with multiple NICs, I am working on configuring iproute2 to direct traffic that originated from a particular NIC (VLAN) to return only via that ...
3
votes
0
answers
2k
views
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 ...
4
votes
1
answer
9k
views
VRF on Linux using network namespaces
My ultimate goal is to implement Virtual Routing and Forwarding (VRF) in Linux. The method that seems to be most widely accepted is to set up different network name spaces (one for each separate ...
0
votes
1
answer
69
views
policy routing to guests on other server
After long searching I've found the answer to my challenge, but the last step fails.
I have two identical servers that both serve multiple guests. The servers have two interfaces: one for the ...
1
vote
0
answers
717
views
vpn-over-ssh ipv6 tunnel getting permission denied connecting to tcp
Using my script, I can establish a working vpn for ipv4 and even able to ping ipv6 addresses.
However, trying to connect to an ipv6 address I get "permission denied".
➜ ping -6 ipv6.google.com -c1
...
0
votes
3
answers
2k
views
Assigning multiple IPs to the same machine with one interface
I have a server with a single physical interface eth0. I intend on running VMs on this server. To that end I have an IPv4 block which is routed to said server. What I'm trying to achieve is to spin-up ...
3
votes
1
answer
8k
views
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 ...
1
vote
0
answers
66
views
Multiple VPNs - can't activate more than one
I have a small problem. In my setup (linux, kernel 3.10.17) I have one ethernet port and multiple WWAN interfaces; each WWAN has its own VPN already activated. The VPNs are connected to the same ...
3
votes
2
answers
2k
views
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 ...
0
votes
1
answer
1k
views
Can not ping from specific vlan tagging interface
On my box I have following interfaces(vlan tagging):
eth2.556: 172.16.1.17
eth2.201: 192.168.208.143
All default route via 172.16.1.1
I can ping all other IP using 192.168.208.x, but can not ping ...
9
votes
3
answers
8k
views
Command-line utility to test fwmark in ip rule / ip route?
I am trying to find a tool that will allow me to find the route a packet will take that comes in on a device, and has a particular destination address.
ip route get will do most of what I am looking ...
1
vote
1
answer
2k
views
multiple default routes with iproutes2
I am very confused by the semantics of ip rules when it comes to the default route.
Sometimes, I can have multiple default routes using different gateways:
# ip route
default via 10.0.0.4 dev eth0 ...
4
votes
2
answers
9k
views
iproute rt_table and mark not working on linux
I have this configuration which comes from official and unofficial guides and questions readings here and a lot of failed tests.
CentOS 7 and Ubuntu server 15 (LAMP and only eth0).
/etc/iproute2/...
1
vote
1
answer
2k
views
iproute2: Database /etc/iproute2/rt_tables is corrupted
I'm setting up two IP addresses on one eth and one IP address on a second NIC using iproute2. There are some really good articles here and here which explain well how to do that.
However, checking ...
0
votes
1
answer
99
views
2 network cards routing
I have 2 network cards with public ips. I am running 2 services. So how do I route the connections.
For now only one interface ip is working although both are pingable from internet.
My routing ...
0
votes
1
answer
5k
views
How to prevent the pppd to remove the default route?
We use multiple providers, one of them to create connection uses pppoe through pppd daemon on ubuntu 14.04.
Early without multiple providers pppd manages default route by itself (creating it when ...
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 ...
15
votes
3
answers
33k
views
How can I move an interface out of a network namespace?
If I move an interface temporarily into a netns with
ip link set eth10 netns myns
then it no longer is visible in the root, only within the namespace myns.
How do I move it back, something like (...
1
vote
1
answer
500
views
Cant set IPv6 Address on centos6
Im having this issue recently.
the iproute2 utility cant add a ipv6 address
/sbin/ip -6 addr add 2001:0db8:0:f101::1/64 dev eth0
RTNETLINK answers: Invalid argument
that ip is just copied from ...
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 ...