|
|
Subscribe / Log in / New account

Moving on from net-tools

Moving on from net-tools

Posted Jan 6, 2017 13:15 UTC (Fri) by thyrsus (guest, #21004)
Parent article: Moving on from net-tools

There are two things I haven't figured out how to get iproute2 to do:

arp -Ds <host> <interface> pub

...which is useful when proxying an IP address in situations like this: http://www.ncsysadmin.org/meetings/1303/NCSA_2013-03-11-5...

ifconfig <interface>:<n> <addr> netmask <netmask> up

...which adds a name to the interface, and you can manipulate most properties of the new name without changing any properties of the original interface.

I vaguely think I see my way to getting the effects of the ifconfig incantation while getting different artifacts, but I don't see how to do the former at all. Perhaps it's added in a later version than my CentOS 7:

$ ip -V
ip utility, iproute2-ss130716


to post comments

Moving on from net-tools

Posted Jan 6, 2017 13:33 UTC (Fri) by thyrsus (guest, #21004) [Link] (1 responses)

I worked harder at the ifconfig equivalent and found this synonym with no extra "artifacts":

ip addr add <address>/<mask bits> broadcast + dev <interface> label <interface>:<n>

Moving on from net-tools

Posted Jan 10, 2017 16:56 UTC (Tue) by nix (subscriber, #2304) [Link]

That's not quite a synonym. One of the many problems with ifconfig in this area is that it's outright lying to the user because its input and output formats are not flexible enough to accept or report what's actually happening. In this case, it's falsely claiming that there are two network interfaces, when in fact there's only one, with two addresses. ip(8) gets this case right (and makes it clear that you all the added addresses are peers -- there's no primary and aliased interface as ifconfig suggests there is.)

Moving on from net-tools

Posted Jan 6, 2017 22:01 UTC (Fri) by thyrsus (guest, #21004) [Link] (1 responses)

Found it! "arp -Ds <host> <interface> pub" is done with

ip neigh add proxy <host> dev <interface>

...except "ip neigh show" doesn't list them - I see it succeeded with "arp -a".

Moving on from net-tools

Posted Jan 6, 2017 22:20 UTC (Fri) by TomH (subscriber, #56149) [Link]

I imagine that "ip neigh show proxy" will show them though...


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds