iproute

How exactly does Linux use the prefix length assigned to network interface?

How exactly does Linux use the prefix length assigned to network interface? I assigned IP address 192.168.0.1/24 to eth0 in two ways. A. Adding 192.168.0.1/24 as usual # ip addr add 192.168.0.1/24 dev eth0 # ping -c 1 192.168.0.2 PING 192.168.0.2 (192.168.0.2) 56(84) bytes of data. 64 bytes from 192.168.0.2: icmp_seq=1 ttl=64 time=0.051 ms — …

Total answers: 1

Meaning of prefix length with ip addr add noprefixroute

Meaning of prefix length with ip addr add noprefixroute When assigning an ip address to a network interface with ip addr add noprefixroute, what effect will the specified prefix length have? When noprefixroute is not used, the prefix length is used to automatically create and delete a route for the network prefix of the added …

Total answers: 1

Policy based routing cause NAT not to work correctly

Policy based routing cause NAT not to work correctly echo "200 rj45" >> /etc/iproute2/rt_tables echo "201 WIFI" >> /etc/iproute2/rt_tables ip route add default via 192.168.5.9 dev eth0 ip rule add from 192.168.5.8/24 table rj45 ip rule add from 192.168.61.128/24 table WIFI ip route add default via 192.168.5.9 dev eth0 table rj45 ip route add default …

Total answers: 1

Can't ping devices on LAN

Can't ping devices on LAN I’ve got 2 Access Points attached to my laptop’s ethernet port via a PoE switch. I’ve assigned static IPs & names to them with dnxmasq (successfully, I believe). However, ping and ssh say they’re unreachable. So what have I missed, and how can I successfully ping 10.0.0.10? More info: The …

Total answers: 1

Route traffic from one IP address through a different interface

Route traffic from one IP address through a different interface I have a local and a remote network. My local network has a router, ubuntu box and TV. The remote network has a router and a raspberry pi. The local ubuntu box and remote raspberry pi are connected through a wireguard tunnel. The goal is …

Total answers: 1

In which order is routing of packets defined if VRF and ip rules are defined?

In which order is routing of packets defined if VRF and ip rules are defined? On a system are VRFs, multiple routing tables and rules defined. A local service (SSH) is not reachable via one interface (WAN interface that is in a VRF) while it is reachable from other interfaces. Packet filter is disabled. I …

Total answers: 1

Macvtap connectivity lost after a few hours?

Macvtap connectivity lost after a few hours? I setup a macvtap interface like this: ip link add link eth0 vlan type macvlan mode bridge ip address add 10.0.0.17 dev vlan ip link set dev vlan up ip route flush dev eth0 ip route flush dev vlan ip route add 10.0.0.0/24 dev vlan metric 0 ip …

Total answers: 1

Route all traffic from one interface (default gateway) through OpenVPN / tun0 – policy based routing, dependent on source address/interface

Route all traffic from one interface (default gateway) through OpenVPN / tun0 – policy based routing, dependent on source address/interface I have a Debian Linux VPN router myvpnserver with 2 interfaces, eno1 and eno2: eno1 is connected to a LAN and an internet router. On this interface with static IP address, myvpnserver has its default …

Total answers: 1

Why is my namespace not detected?

Why is my namespace not detected? I tried form home,then sudo su – ip netns exec 5bd337503b01 ip addr show Cannot open network namespace "5bd337503b01": No such file or directory pwd shows /var/run/docker/netns Why? Asked By: Richard Rublev || Source Note: /var/run is a symlink to /run so it doesn’t really matter which is written …

Total answers: 1

How to access LAN behind VPN client from server?

How to access LAN behind VPN client from server? I have a cloud VM running an OpenVPN server On the other side, I have a Synology NAS inside a private network. I would like to access the client’s LAN (192.168.1.0/24) from the server. On the server, I fixed its VPN IP, and iroute to the …

Total answers: 1

Persistent static routes on Debian 11

Persistent static routes on Debian 11 I’m trying to set up a testing lab such as the following: P.D: Is not Metasploit, but Metasploitable. I’m running VirtualBox, and the routers are 2 VMs running Debian 11. Each router has 2 interfaces: ~# ls /sys/class/net/ enp0s3 enp0s8 lo For router 1 ~# cat /etc/network/interfaces […] # …

Total answers: 2

Reply on same interface as incoming, but with dynamic IP addresses

Reply on same interface as incoming, but with dynamic IP addresses I have a system with two network interfaces, both of which are connected to the internet with different IP addresses. I would like responses to incoming requests to be sent over the same interface that they were received at. The public IP addresses of …

Total answers: 1

The difference between ip link down and physical link absence

The difference between ip link down and physical link absence In Linux, is there any difference between after-ip link down-condition and real link absence (e.g. the switch’s port burned down, or someone tripped over a wire). By difference I mean some signs in the system that can be used to distinguish these two conditions. E.g. …

Total answers: 2

iproute2: How to display the TYPE of a network devices?

iproute2: How to display the TYPE of a network devices? With iproute2 userspace tools one can display the network devices using the ip commands verb link show( sometimes shortened to l sh ). The output generate does not display the TYPE of link/interface device. root@box:/# ip link show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue …

Total answers: 2

How can I get the ipv4 address from `ip link` like I used to see with ifconfig?

How can I get the ipv4 address from `ip link` like I used to see with ifconfig? When I run ip to get the ip address, I’m getting $ ip link 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 …

Total answers: 1

How to understand (the output of) ifconfig or ip addr show

How to understand (the output of) ifconfig or ip addr show The ifconfig command dumps a lot of information at you, especially if you have a lot of interfaces, and you don’t know where they come from. I’ve read through the "Ifconfig Command – Explained in┬áDetail" tutorial page, which gives a great rundown on most of …

Total answers: 2

Pretty display of "ip route"

Pretty display of "ip route" I’d like to use more of the iproute2 (ip command) utility instead of the deprecated net-tools (ifconfig, route, …). The main reason I keep going back to net-tools is the output of ip route which in my humble opinion is lacking in clarity compared to the old route that notably …

Total answers: 5

Is it possible to have multiple default gateways for outbound connections?

Is it possible to have multiple default gateways for outbound connections? I would like to have multiple NICs (eth0 and wlan0) in the same subnet and to serve as a backup for the applications on the host if one of the NICs fail. For this reason I have created an additional routing table. This is …

Total answers: 2