Questions that include employing tools of the IPROUTE2 Utility Suite, especially ip and tc.

learn more… | top users | synonyms

1
vote
2answers
28 views

How to use routing to use the next available inetface

My system has 2 interfaces (eth0, eth1). I open a socket and bind it with an ip attached to eth0, now I want the OS to route the packets to another ip (which attached to eth1 but i'm not sure it's ...
2
votes
1answer
30 views

traffic routing with DNS

I have 2 gateway machines. 1 debian (main - 192.168.1.1), 1 centos (backup 192.168.1.2). There are 2 networks, 1 LAN and 1 WAN, going through "main" and from there over ISP1 "backup" is on LAN and it ...
0
votes
1answer
32 views

redhat 9 persist default gateway

We changed the IP addresses of our RedHat 9 system that controls a conveyor/sorter system. When originally installed many years ago someone chose 192.0.0.10 as the IP! But for some reason it defaults ...
0
votes
1answer
36 views

“ip rule show” does not take any arguments

I'm trying to get the routing rules for a specific IP but the ip rule command throws an error. Shouldn't this work like the add/del etc. ? At least that seems to me from the docs. $ ip rule list ...
0
votes
0answers
69 views

Why do I get “duplicate” local IP addresses on different interfaces?

I have two network interfaces(a wireless and an USB dongle) attached to an Ubuntu server and both get the same local IP address. Is there any reason for this or a way to force it assign distinct IP ...
0
votes
0answers
33 views

Route dies on Ubuntu 14.04.2

So I have this routing setup in EC2 on a Ubuntu machine: 10.50.0.0/24 dev eth0 proto kernel scope link src 10.50.0.163 x.x.x.x via 10.50.0.80 dev eth0 proto static y.y.y.y via 10.50.0.80 dev ...
0
votes
1answer
128 views

Help translating this `ip` command to `route` command in `post-up` hook

I am having trouble getting a static routing ip command to become permanent by way of the post-up hook in /etc/network/interfaces. Here are the relevant details: /etc/network/interfaces # The ...
2
votes
0answers
171 views

Running a systemd service file after the network is up to bypass an OpenVPN default gateway

I would like to add a static route using a systemd service file on system boot. I have a DMZ network on a separate 192.168 class C network reachable via my default gateway. I also use OpenVPN to ...
1
vote
2answers
173 views

How can I bring up up a non-boot (ONBOOT=no) network interface with iproute2?

Have a network interface that does not come up on boot-up: [belminf@tito ~]$ grep ONBOOT /etc/sysconfig/network-scripts/ifcfg-enp0s3 ONBOOT=no I know I could do the following for DHCP: ...
1
vote
0answers
68 views

How do you create an ip alias using iproute utils?

While reading the O'Reilley book on Apache Web Server, they gave an example on using ifconfig to set ip aliases on an interface: ifconfig ep0 192.168.123.2 ifconfig ep0 192.168.123.3 alias netmask ...
1
vote
1answer
60 views

I need dhclient to flush IP address/routes when link goes down

I am running one Ubuntu Server 14.04 with network configuration using /etc/network/interfaces and so ifup/ifdown scripts. I realised that if I configure one interface in DHCP mode, then I unplug the ...
2
votes
2answers
173 views

iproute2 command to enable a IPv4 address

I am investigating how to have iproute2 commands replace the old ifconfig and ifup ifdown command, and I found out something interesting. My NIC setup is: [16:07:41 root@vm network-scripts ]# cat ...
1
vote
0answers
64 views

Interface on Linux for IP range to divide incoming traffic

In order to divide incoming traffic I use the "ip link" command: ip link add link eno1 name eno1.vlan10 type vlan id 10 I want to do the same for a network range, so that I have a named interface ...
3
votes
0answers
64 views

delay in IP route deletion

(Apologies if this is the wrong StackExchange for this question, but there does seem to be some confusion regarding appropriate targeting of IP networking questions) I am very much a network newbie, ...
0
votes
0answers
231 views

default route of br0 gets dev eth0 instead of dev br0

On my LinuxMint laptop, i have a recurring problem with my bridge br0. On each start up, the default route does not work. The routing table uses eth0 instead of br0 probably because of dhcp. i roam ...
2
votes
1answer
34 views

Make a request through vpn interface

I want to be able to make request through a specific network interface, like this: ping -I eth0.1 google.be ping -I eth0.2 google.be This example works on my multihomed OpenWRT router. I now want ...
2
votes
1answer
140 views

Assymetric routing problems in LINUX

Assymetric routing problems are driving me crazy! I am trying to build a multi-homed server with 3 NICs. Each NIC is connected to 3 different subnets: eth0: LAN connected, 10.99.72.38; function: ...
2
votes
0answers
309 views

how to open up socks/SSH on different network interfaces?

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 ...
0
votes
0answers
26 views

Detailed protocol statistics with ss?

What replaces netstat -es? ss -s doesn't provide nearly enough protocol level statistics.
2
votes
1answer
2k views

what do the numbers mean in ip rule show command

If I type ip rule show command in my machine, I get the output as, 0: from all lookup local 32766: from all lookup main 32767: from all lookup default What do the numbers 0,32766 and 32767 ...
7
votes
4answers
4k views

List ports a process PID is listening on (preferably using iproute2 tools)?

I'm looking to list all ports a PID is currently listening on. How would you recommend I get this kind of data about a process? NOTE: I was surprised I could not easily find an answer to this!
8
votes
3answers
2k views

'ip addr' command shows 'UP' even there is no address associated with that interface

I would like to understand what is meant by an network interface up? Because ip addr or ifconfig command shows an interface as up even when there is no IP associated with it. for example on RHEL7 : ...
4
votes
1answer
141 views

Is nameif deprecated? If so is there an equivalent replacement?

I read that the nameif is deprecated, although I still see it on my Ubuntu 14.04 system. If this command is deprecated, is the command cited for removal or will it still be available? This command ...
3
votes
2answers
1k views

Delete IP address alias by label name

I would like to delete an alias I created using: ip addr add 192.168.1.1 dev eth0 label eth0:100 without having to know the IP address. Basically, I would like to do ip addr del dev eth0 label ...
0
votes
1answer
149 views

Impact of using route command when route doesn't exist or already exist

I made a script for this question Monitor an internet link to a remote host this script will be run by cron and, every minute or so, it will reexecute the commands route add .... route del .... I ...
7
votes
1answer
177 views

What's the exact behaviour of the command: ip address change?

I have been fiddling with IPv6 and address lifetimes. I found out that the valid_lft attribute will make a v6-address disappear automagically, if used correctly. To extend an address' lifetime I would ...
1
vote
2answers
344 views

how to route local ip subnet to vpnc tunnel

I have a vpnc client that will connect to Cisco and I put any information to /etc/vpnc/default then I run vpnc-connect status connected. All routes will be replaced to tun0. The targeted 10.10.0.9 ...
1
vote
1answer
270 views

API for IPROUTE2 in any programming language

Is there any API that can be used to manipulate Linux routing table? I want to write a program that listens to sockets and then modifies routing table accordingly, just a simple code, but need an API. ...
0
votes
1answer
42 views

Adding a route with time-limited validity?

I have read different routing protocols, each one adds routes with limited time validity to routing table. Is there a method in Linux/Ubuntu, without installing any routing daemon, to add a time ...
3
votes
1answer
127 views

How does Linux handle 2 identical destinations in its routing table?

I have this is my routing table (in that order): 10.3.68.0/22 via 172.16.100.9 dev vlan4 10.3.68.0/22 dev eth3 proto kernel scope link src 10.3.69.254 eth3 has ip 10.3.69.254/22. Why does ...
3
votes
0answers
475 views

graph TCP connection performance based on `ss -i`

A nearby question has brought to my attention the ss utility on Linux, another utility to investigate sockets. It would appear that it may be a great tool to monitor the performance of, say, an ssh ...
6
votes
2answers
611 views

what's the format spec for `ss -D `?

Background of the question: I am trying to sum up the total bandwidth, but ss -i cleverly converted numbers to more readable format like Kbps/s or Mbps/s, which is not accurate. So does ss -o with ...
6
votes
1answer
1k views

What do I need to add a virtual IPsec adapter?

I'm trying to set up an IPsec connection manually from the console with iproute2. What I need is a virtual interface (at best, a virtual IP address could also be sufficient) that IPsec-transforms ...
5
votes
3answers
8k views

route traffic out different gateway by destination network

I have several gateways and would like to route some traffic out of different gateways based on its destination. I'm guessing I'd need to use a combination of iproute2 and iptables rules, but am not ...
1
vote
0answers
393 views

iptables one IP through another network interface

This question is very similar to what I am trying to do: iptables --set-mark - Route diferent ports through different interfaces However I attempted to follow the answer but I was unable to make it ...
9
votes
1answer
7k views

Linux as router with multiple internet providers

Linux as router: I have 3 Internet providers, each with its own modem. Provider1, which is gateway address 192.168.1.1 Connected to linux router eth1/192.168.1.2 Provider2, gateway address ...
16
votes
4answers
22k views

Can I create a virtual ethernet interface named eth0?

I am running Arch based on the Linux 3.10.5-1 kernel. The system uses the new de-facto naming conventions of ethernet interfaces enp*s* and wlp* etc. This is a problem however, as my educational ...
1
vote
2answers
1k views

iptables: what the difference between filter and mangle

I am using iptables to to mark the package and want to route based on the marks. First I added the ip rule: sudo ip rule add fwmark 1 prohibit (The "prohibit" is just for test, I will change it ...
5
votes
2answers
2k views

What is the difference between `/sbin/ip route` and `/sbin/route`?

Linux comes with two utilities /sbin/route /sbin/ip route What is the difference between the two and what is the rule of thumb to use when you decide which one of the two you should use? I know ...
0
votes
1answer
635 views

ip function exit code

I use use ip by system("ip link set eth0 up") in a C program. I know that system returns -1 if it fails and returns what the called function returns(exit). E.g., if eth0 is not exist on the system, it ...