Re: Multiple IPv4 addresses per NIC (w/o aliases, VLANs, etc.)
I'm under the impression that ifconfig is deprecated on linux, so this may be why it's not supporting the full feature set.. Richard Kolb II On Tue, Sep 18, 2018 at 10:24 AM, Derek Atkins wrote: > Kyle Smith writes: > > > Totally legitimate feature/functionality. I never understood why ifconfig > > doesn't seem to support the full feature set of the kernel, probably > just to > > maintain legacy compatibility. IIRC it dates back to at least 2.2 and > predates > > IPv6 being compiled into most distros. > > > > Having multi IP addresses on a single device is pretty critical to having > > Linux act as a reasonably complex router, gateway, NAT gateway, etc. > > It really only needs multiple addresses on a single physical device. > It doesn't really matter if they are the same logical device or if they > are virtual. I.e., it doesn't matter if it's eth0 or eth0:0. > > This is from personal experience. > > -derek > > -- >Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory >Member, MIT Student Information Processing Board (SIPB) >URL: http://web.mit.edu/warlord/PP-ASEL-IA N1NWH >warl...@mit.eduPGP key available > ___ > gnhlug-discuss mailing list > gnhlug-discuss@mail.gnhlug.org > http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/ > ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: Multiple IPv4 addresses per NIC (w/o aliases, VLANs, etc.)
Kyle Smith writes: > Totally legitimate feature/functionality. I never understood why ifconfig > doesn't seem to support the full feature set of the kernel, probably just to > maintain legacy compatibility. IIRC it dates back to at least 2.2 and predates > IPv6 being compiled into most distros. > > Having multi IP addresses on a single device is pretty critical to having > Linux act as a reasonably complex router, gateway, NAT gateway, etc. It really only needs multiple addresses on a single physical device. It doesn't really matter if they are the same logical device or if they are virtual. I.e., it doesn't matter if it's eth0 or eth0:0. This is from personal experience. -derek -- Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory Member, MIT Student Information Processing Board (SIPB) URL: http://web.mit.edu/warlord/PP-ASEL-IA N1NWH warl...@mit.eduPGP key available ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: Multiple IPv4 addresses per NIC (w/o aliases, VLANs, etc.)
Totally legitimate feature/functionality. I never understood why ifconfig doesn't seem to support the full feature set of the kernel, probably just to maintain legacy compatibility. IIRC it dates back to at least 2.2 and predates IPv6 being compiled into most distros. Having multi IP addresses on a single device is pretty critical to having Linux act as a reasonably complex router, gateway, NAT gateway, etc. - Kyle On Mon, Sep 17, 2018 at 4:10 PM Ken D'Ambrosio wrote: > So, I didn't know this was "a thing." And, apparently, "ifconfig" > doesn't know it, either. However, with "ip addr add", you can assign > multiple IPv4 addresses to a given interface: > > methusalah # ifconfig tun0 > tun0: flags=4305 mtu 1500 > inet 192.168.23.50 netmask 255.255.255.255 destination > 192.168.23.49 > inet6 fe80::6d4d:9731:4512:1f75 prefixlen 64 scopeid > 0x20 > unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 > txqueuelen 100 > (UNSPEC) > RX packets 0 bytes 0 (0.0 B) > RX errors 0 dropped 0 overruns 0 frame 0 > TX packets 9 bytes 432 (432.0 B) > TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 > > methuselah FAQ # ip addr add 10.20.30.40/32 dev tun0 > > methuselah FAQ # ip addr show tun0 > 4: tun0: mtu 1500 qdisc > fq_codel > state UNKNOWN group default qlen 100 > link/none > inet 192.168.23.50 peer 192.168.23.49/32 scope global tun0 > valid_lft forever preferred_lft forever > inet 10.20.30.40/32 scope global tun0 > valid_lft forever preferred_lft forever > > And yet ifconfig doesn't even show the new info. Note that this is > dinstinct from "tun.0" or "tun:0" (VLAN and alias, respectively). > > Is the ability to have multiple v4 addresses against a given NIC a new > feature? Is it somehow bogus? Maybe it's an extension of the way that > v6 works, since v6 has always allowed multiple addresses/NIC -- perhaps > aliases are deprecated? > > Just wondering if anyone else has noticed this... > > -Ken > > ___ > gnhlug-discuss mailing list > gnhlug-discuss@mail.gnhlug.org > http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/ > ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/