Tagged Questions

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

learn more… | top users | synonyms

1
vote
1answer
22 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
23 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
8 views

Detailed protocol statistics with ss?

What replaces netstat -es? ss -s doesn't provide nearly enough protocol level statistics.
2
votes
1answer
88 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 ...
4
votes
4answers
170 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!
5
votes
3answers
220 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
78 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
172 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
54 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 ...
5
votes
1answer
72 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
120 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
117 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
30 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
84 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 ...
2
votes
0answers
295 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
323 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 ...
4
votes
0answers
537 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
3k 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
323 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 ...
8
votes
1answer
3k 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 ...
13
votes
4answers
10k 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
385 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 ...
4
votes
2answers
851 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
353 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 ...