Re: [gentoo-user] Re: [SOLVED] What happened to my 2nd eth0?
On Tue, Feb 24, 2015 at 06:43:19AM +, Mick wrote PS. Did you look at setting your desired subnet rather than a local-link auto-configured address at your HDHomerun device? No go. I have an ancient HDHR-US model. The output from get help is... Supported configuration options: /ir/target protocol://ip:port /lineup/location countrycode:postcode /sys/copyright /sys/debug /sys/features /sys/hwmodel /sys/model /sys/restart resource /sys/version /tunern/channel modulation:freq|ch /tunern/channelmap channelmap /tunern/debug /tunern/filter 0x-0x [...] /tunern/lockkey /tunern/program program number /tunern/streaminfo /tunern/status /tunern/target ip:port According to the manufacturer's site, the latest models support a lot more stuff, including... /sys/ipaddr dhcp|ip mask gw dns ... which allows to get/set ipaddress, or work as a dhcp client. -- Walter Dnes waltd...@waltdnes.org I don't run desktop environments; I run useful applications
Re: [gentoo-user] Re: [SOLVED] What happened to my 2nd eth0?
On Thursday 26 Feb 2015 18:57:44 Walter Dnes wrote: Let's forget about additional routes with different metrics, and try to get the simplest case working, and move forward from there. If I have /etc/conf.d/net as... modules=( !iproute2 ) == Delete this for iproute2 usage == config_eth0= 192.168.123.251/29 broadcast 192.168.123.255 169.254.1.1/16 broadcast 169.254.255.255 routes_eth0= default via 192.168.123.254 169.254.0.0/16 via 169.254.1.1 ==Add this route for 169.254.0.0/16== or if your router can route packets for the 169.254.0.0/16 subnet (I doubt it) then change it to: 169.254.0.0/16 via 192.168.123.254 I'm still trying to wrap my brain around how the ADSL router decides whether to look for 169.254.0.0/16 on the ethernet cable to the TV tuner rather than on the phone line going to my ISP, and then the world. If the router has link-local configured it should be able to communicate with other devices in the same 169.254.0.0/16 subnet. However, I doubt that it will be NAT-ing packets to this subnet, because it is meant for ad-hoc device- to-device connections when there is no DHCP server in the local network. Have a look at the router's route and arp tables to see what it does on this matter. -- Regards, Mick signature.asc Description: This is a digitally signed message part.
Re: [gentoo-user] Re: [SOLVED] What happened to my 2nd eth0?
On Thu, Feb 26, 2015 at 1:26 AM, Walter Dnes waltd...@waltdnes.org wrote: I've been Googling and playing around a bit. I have the main ADSL connection to the world working via iproute2, but not the 169.254.0.0/16 net. I can't figure out what I'm doing wrong. My setup... * desktop PC 192.168.123.251/29, with NIC interface eth0 * HDHomerun network TV tuner in 169.254.0.0/16 Both are attached to an ADSL router at 192.168.123.254 I start off with /etc/init.d/net.eth0 stop to get to a known state. Then I run a script which issues the commands... ip link set eth0 down ip link set eth0 up ip address add 192.168.123.251/29 dev eth0 ip route add default via 192.168.123.254 metric 100 ip address add 169.254.1.1/16 dev eth0 ip route add 169.254.0.0/16 via 192.168.123.254 metric 0 ip address show ip route show The output from the commands is... RTNETLINK answers: File exists RTNETLINK answers: File exists These two errors are due to the fact that ip l set down dev eth0 doesn't delete assigned ip addresses, only assigned routes. So when you run ip a add ..., you're setting addresses that are already set. RTNETLINK answers: File exists This error is due to the fact that ip a add 168.254.1.1/16 dev eth0 includes an automatic ip r add 169.254.0.0/16 src 169.254.1.1 proto kernel scope link dev eth0 so there's already a route for 169.254.0.0/16. You could run ip r del 168.254.0.0/16 dev eth0 and then ip r add 169.254.0.0/16 via 192.168.123.254. 1: lo: LOOPBACK,UP,LOWER_UP mtu 65536 qdisc noqueue state UNKNOWN group default link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 brd 127.255.255.255 scope host lo valid_lft forever preferred_lft forever 2: eth0: NO-CARRIER,BROADCAST,MULTICAST,UP mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000 link/ether 00:1d:09:96:6c:1c brd ff:ff:ff:ff:ff:ff inet 192.168.123.251/29 scope global eth0 valid_lft forever preferred_lft forever inet 169.254.1.1/16 scope global eth0 valid_lft forever preferred_lft forever default via 192.168.123.254 dev eth0 metric 100 127.0.0.0/8 dev lo scope host 169.254.0.0/16 dev eth0 proto kernel scope link src 169.254.1.1 192.168.123.248/29 dev eth0 proto kernel scope link src 192.168.123.251 Like I said above, the default route to the world works, but not to 169.254.0.0. Once I get that figured out, the next questions are... 1) What is the setup in /etc/conf.d/net to accomplish that? You'd originally had routes_eth0= default via 192.168.123.254 metric 20 192.168.123.248/29 via 192.168.123.254 metric 0 169.254.0.0/16 via 169.254.1.1 metric 0 so you'd have to change the last line. 2) Should iproute2 be built with or without the iptables flag? There may be other use cases but the only one that I can think of is that this flag allows you to use iptables ... -j MARK --set-mark walt and then ip ru add ... fwmark walt
Re: [gentoo-user] Re: [SOLVED] What happened to my 2nd eth0?
Let's forget about additional routes with different metrics, and try to get the simplest case working, and move forward from there. If I have /etc/conf.d/net as... modules=( !iproute2 ) config_eth0= 192.168.123.251/29 broadcast 192.168.123.255 169.254.1.1/16 broadcast 169.254.255.255 routes_eth0= default via 192.168.123.254 ...and run /etc/init.d/net.eth0 restart, I can access the device on 169.254.0.0/16. If I comment out the modules=( !iproute2 ) line and run /etc/init.d/net.eth0 restart, I can't access the device. The above is the minimal net file require for ifconfig. I want to be able to work this down the road when ifconfig goes away, and iproute2 becomes mandatory. I'm still trying to wrap my brain around how the ADSL router decides whether to look for 169.254.0.0/16 on the ethernet cable to the TV tuner rather than on the phone line going to my ISP, and then the world. -- Walter Dnes waltd...@waltdnes.org I don't run desktop environments; I run useful applications
Re: [gentoo-user] Re: [SOLVED] What happened to my 2nd eth0?
On Thu, Feb 26, 2015 at 1:57 PM, Walter Dnes waltd...@waltdnes.org wrote: Let's forget about additional routes with different metrics, and try to get the simplest case working, and move forward from there. If I have /etc/conf.d/net as... modules=( !iproute2 ) config_eth0= 192.168.123.251/29 broadcast 192.168.123.255 169.254.1.1/16 broadcast 169.254.255.255 routes_eth0= default via 192.168.123.254 ...and run /etc/init.d/net.eth0 restart, I can access the device on 169.254.0.0/16. If I comment out the modules=( !iproute2 ) line and run /etc/init.d/net.eth0 restart, I can't access the device. The above is the minimal net file require for ifconfig. I want to be able to work this down the road when ifconfig goes away, and iproute2 becomes mandatory. No idea. I set up a test VM. I don't have a 169.254 device to try to access but I have the same ip a and ip r output for the net-tools and iproute2 setups (except for the eth0:1 label in the net-tools setup). gentest conf.d # cat net modules=!iproute2 config_eth0= 10.0.2.15/24 169.254.1.1/16 routes_eth0=default via 10.0.2.2 dns_servers_eth0=8.8.8.8 gentest conf.d # ip a 1: lo: LOOPBACK,UP,LOWER_UP mtu 65536 qdisc noqueue state UNKNOWN group default link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 brd 127.255.255.255 scope host lo valid_lft forever preferred_lft forever 2: eth0: BROADCAST,MULTICAST,UP,LOWER_UP mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 52:54:00:20:20:20 brd ff:ff:ff:ff:ff:ff inet 10.0.2.15/24 brd 10.0.2.255 scope global eth0 valid_lft forever preferred_lft forever inet 169.254.1.1/16 brd 169.254.255.255 scope global eth0:1 valid_lft forever preferred_lft forever gentest conf.d # ip r default via 10.0.2.2 dev eth0 metric 2 10.0.2.0/24 dev eth0 proto kernel scope link src 10.0.2.15 127.0.0.0/8 dev lo scope host 169.254.0.0/16 dev eth0 proto kernel scope link src 169.254.1.1 gentest conf.d # vi net gentest conf.d # cat net config_eth0= 10.0.2.15/24 169.254.1.1/16 routes_eth0=default via 10.0.2.2 dns_servers_eth0=8.8.8.8 gentest conf.d # rc-service net.eth0 restart gentest conf.d # ip a 1: lo: LOOPBACK,UP,LOWER_UP mtu 65536 qdisc noqueue state UNKNOWN group default link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 brd 127.255.255.255 scope host lo valid_lft forever preferred_lft forever 2: eth0: BROADCAST,MULTICAST,UP,LOWER_UP mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 52:54:00:20:20:20 brd ff:ff:ff:ff:ff:ff inet 10.0.2.15/24 brd 10.0.2.255 scope global eth0 valid_lft forever preferred_lft forever inet 169.254.1.1/16 brd 169.254.255.255 scope global eth0 valid_lft forever preferred_lft forever gentest conf.d # ip r default via 10.0.2.2 dev eth0 metric 2 10.0.2.0/24 dev eth0 proto kernel scope link src 10.0.2.15 127.0.0.0/8 dev lo scope host 169.254.0.0/16 dev eth0 proto kernel scope link src 169.254.1.1 I'm still trying to wrap my brain around how the ADSL router decides whether to look for 169.254.0.0/16 on the ethernet cable to the TV tuner rather than on the phone line going to my ISP, and then the world. 169.254 isn't supposed to be routable so the router might be set up not to route it out to the world. You'd be better off setting up a 192.168 address on the tuner, if possible.
Re: [gentoo-user] Re: [SOLVED] What happened to my 2nd eth0?
On Thu, Feb 26, 2015 at 05:59:26PM -0500, Tom H wrote 169.254 isn't supposed to be routable so the router might be set up not to route it out to the world. You'd be better off setting up a 192.168 address on the tuner, if possible. But if I include the line... modules=!iproute2 ...it works perfectly. What's frustrating is that it works under ifconfig, but not under iproute2. I'll check with the local linux user group in town (mailing list) to see if I can get any hints. -- Walter Dnes waltd...@waltdnes.org I don't run desktop environments; I run useful applications
Re: [gentoo-user] Re: [SOLVED] What happened to my 2nd eth0?
On Tue, Feb 24, 2015 at 05:08:50PM -0500, Tom H wrote # ip a sh dev wlan0 2: wlan0: BROADCAST,MULTICAST,UP,LOWER_UP mtu 1500 qdisc mq state UP group default qlen 1000 link/ether e8:2a:ea:0f:68:ec brd ff:ff:ff:ff:ff:ff inet 192.168.1.240/24 brd 192.168.1.255 scope global wlan0 valid_lft forever preferred_lft forever inet 192.168.1.250/24 brd 192.168.1.255 scope global secondary wlan0:0 valid_lft forever preferred_lft forever I've been Googling and playing around a bit. I have the main ADSL connection to the world working via iproute2, but not the 169.254.0.0/16 net. I can't figure out what I'm doing wrong. My setup... * desktop PC 192.168.123.251/29, with NIC interface eth0 * HDHomerun network TV tuner in 169.254.0.0/16 Both are attached to an ADSL router at 192.168.123.254 I start off with /etc/init.d/net.eth0 stop to get to a known state. Then I run a script which issues the commands... ip link set eth0 down ip link set eth0 up ip address add 192.168.123.251/29 dev eth0 ip route add default via 192.168.123.254 metric 100 ip address add 169.254.1.1/16 dev eth0 ip route add 169.254.0.0/16 via 192.168.123.254 metric 0 ip address show ip route show The output from the commands is... RTNETLINK answers: File exists RTNETLINK answers: File exists RTNETLINK answers: File exists 1: lo: LOOPBACK,UP,LOWER_UP mtu 65536 qdisc noqueue state UNKNOWN group default link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 brd 127.255.255.255 scope host lo valid_lft forever preferred_lft forever 2: eth0: NO-CARRIER,BROADCAST,MULTICAST,UP mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000 link/ether 00:1d:09:96:6c:1c brd ff:ff:ff:ff:ff:ff inet 192.168.123.251/29 scope global eth0 valid_lft forever preferred_lft forever inet 169.254.1.1/16 scope global eth0 valid_lft forever preferred_lft forever default via 192.168.123.254 dev eth0 metric 100 127.0.0.0/8 dev lo scope host 169.254.0.0/16 dev eth0 proto kernel scope link src 169.254.1.1 192.168.123.248/29 dev eth0 proto kernel scope link src 192.168.123.251 Like I said above, the default route to the world works, but not to 169.254.0.0. Once I get that figured out, the next questions are... 1) What is the setup in /etc/conf.d/net to accomplish that? 2) Should iproute2 be built with or without the iptables flag? -- Walter Dnes waltd...@waltdnes.org I don't run desktop environments; I run useful applications
Re: [gentoo-user] Re: [SOLVED] What happened to my 2nd eth0?
On Tue, Feb 24, 2015 at 06:43:19AM +, Mick wrote PS. Did you look at setting your desired subnet rather than a local-link auto-configured address at your HDHomerun device? Not yet. I'm still cleaning up some odds-n-ends of my simple upgrade from 32-bit to 64-bit mode. Also, as a matter of principle, I'd like to learn how to set up multiple routes using the iproute2 suite. This looks like a perfect learning opportunity. -- Walter Dnes waltd...@waltdnes.org I don't run desktop environments; I run useful applications
Re: [gentoo-user] Re: [SOLVED] What happened to my 2nd eth0?
On Tue, Feb 24, 2015 at 1:43 AM, Mick michaelkintz...@gmail.com wrote: On Monday 23 Feb 2015 08:39:42 Walter Dnes wrote: Looks like it's time to play around with the ip command and try to duplicate my current setup. Does anyone have a multi-route setup similar to mine configured with iproute2? The net.example file says # If you need more than one address, you can use something like this # NOTE: ifconfig creates an aliased device for each extra IPv4 address # (eth0:1, eth0:2, etc) # iproute2 does not do this as there is no need to # WARNING: You cannot mix multiple addresses on a line with other parameters! #config_eth0=192.168.0.2/24 192.168.0.3/24 192.168.0.4/24 # However, that only works with CIDR addresses, so you can't use # netmask. What exactly do they mean by... iproute2 does not do this as there is no need to There is no need to create virtual interfaces like eth0:1 to be able to have secondary IP addresses. The ip command adds them to the same eth0 interface. Labels (iproute2 aliases) aren't required but can be useful: # ip a sh dev wlan0 2: wlan0: BROADCAST,MULTICAST,UP,LOWER_UP mtu 1500 qdisc mq state UP group default qlen 1000 link/ether e8:2a:ea:0f:68:ec brd ff:ff:ff:ff:ff:ff inet 192.168.1.240/24 brd 192.168.1.255 scope global wlan0 valid_lft forever preferred_lft forever # ip a add 192.168.1.250/24 brd + label wlan0:0 dev wlan0 # ip a sh dev wlan0 2: wlan0: BROADCAST,MULTICAST,UP,LOWER_UP mtu 1500 qdisc mq state UP group default qlen 1000 link/ether e8:2a:ea:0f:68:ec brd ff:ff:ff:ff:ff:ff inet 192.168.1.240/24 brd 192.168.1.255 scope global wlan0 valid_lft forever preferred_lft forever inet 192.168.1.250/24 brd 192.168.1.255 scope global secondary wlan0:0 valid_lft forever preferred_lft forever # ip a sh label wlan0:0 inet 192.168.1.250/24 brd 192.168.1.255 scope global secondary wlan0:0 valid_lft forever preferred_lft forever # ip a fl label wlan0:0 # ip a sh dev wlan0 2: wlan0: BROADCAST,MULTICAST,UP,LOWER_UP mtu 1500 qdisc mq state UP group default qlen 1000 link/ether e8:2a:ea:0f:68:ec brd ff:ff:ff:ff:ff:ff inet 192.168.1.240/24 brd 192.168.1.255 scope global wlan0 valid_lft forever preferred_lft forever
[gentoo-user] Re: [SOLVED] What happened to my 2nd eth0?
On Sun, Feb 22, 2015 at 09:01:47AM +, Mick wrote On Sunday 22 Feb 2015 04:52:34 Walter Dnes wrote: My DSL router modem is at 192.168.123.254. I have an HDHomerun network TV tuner that insists on coming up somewhere in the 169.254.X.Y block. Up until upgrading from 32 to 64 bits, I was able to see a 2nd eth0 (i.e. eth0:1) using the following /etc/conf.d/net setup... config_eth0= 192.168.123.251/29 broadcast 192.168.123.255 169.254.1.1/16 broadcast 169.254.255.255 Is there a reason you need to define a broadcast if you are using CIDR notation? I've always done it that way. At one time I had a router that could be made to send logs to a specified IP address. By setting their broadcast addresses to 192.168.123.255, and having the router log to that address, I could make both of my machines pick up the remote logs from the router. routes_eth0= default via 192.168.123.254 metric 20 192.168.123.248/29 via 192.168.123.254 metric 0 Isn't the above redundant if you have defined an identical default route? 169.254.0.0/16 via 169.254.1.1 metric 0 Another item that stopped working a while ago... I have a dialup connection for emergency backup use. Before the format of the /etc/conf.d/net file changed, I could simultaneously... * have eth0 as default route with expensive metric 20 * have ppp0 take over when dialup is active, with a cheaper metric * still be able to have my 2 machines talk to each other over eth0, even while the dialup connection ppp0 is active * have eth0 take over again as default route when ppp0 drops Unless you have set up: modules=!iproute2 netifrc will not use ifconfig. I've noticed iproute2 showing up recently in emerge. ***YES IT WORKS***. Thank you very much. I am now getting OTA TV to my desktop again. Slight modification. Using that search string in Google, I found http://www.michaeldolan.com/Tutorials/Downloads/conf.d/net My revised /etc/conf.d/net script is modules=( !iproute2 ) config_eth0= 192.168.123.251/29 broadcast 192.168.123.255 169.254.1.1/16 broadcast 169.254.255.255 routes_eth0= default via 192.168.123.254 metric 20 192.168.123.248/29 via 192.168.123.254 metric 0 169.254.0.0/16 via 169.254.1.1 metric 0 edit... I finally found the documentation (see below). I still have to fix up the metric and broadcast parameters. For now, I'm happy to have the TV signal coming to my desktop. ...and ifconfig returns... eth0: flags=4163UP,BROADCAST,RUNNING,MULTICAST mtu 1500 inet 192.168.123.251 netmask 255.255.255.248 broadcast 192.168.123.255 ether 00:1d:09:96:6c:1c txqueuelen 1000 (Ethernet) RX packets 1049019 bytes 1501104544 (1.3 GiB) RX errors 0 dropped 5 overruns 0 frame 0 TX packets 569447 bytes 45295143 (43.1 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 20 memory 0xfdfc-fdfe eth0:1: flags=4163UP,BROADCAST,RUNNING,MULTICAST mtu 1500 inet 169.254.1.1 netmask 255.255.0.0 broadcast 169.254.255.255 ether 00:1d:09:96:6c:1c txqueuelen 1000 (Ethernet) device interrupt 20 memory 0xfdfc-fdfe lo: flags=73UP,LOOPBACK,RUNNING mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 loop txqueuelen 0 (Local Loopback) RX packets 8 bytes 480 (480.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 8 bytes 480 (480.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 I would have appreciated a news item telling me that /etc/conf.d/net was going to change default behaviour, before it happened and caused breakage on my system. Or did it happen, and I missed it? CONFIG_IP_MULTIPLE_TABLES=y I do not have that option available it in my current kernel, or in the backup from before I switched from 32-bit to 64-bit mode. Not that it matters, now that I have things working. Given that iproute2 is now the default, I assume that ifconfig will be dropped sometime down the road. Documentation could be better. At the top of /etc/conf.d/net I see... # This blank configuration will automatically use DHCP for any net.* # scripts in /etc/init.d. To create a more complete configuration, # please review /etc/conf.d/net.example and save your configuration # in /etc/conf.d/net (this file :]!). # Actually /usr/share/doc/openrc-version/net.example is where to look # for example setup. Guess what... neither of those example files exist. It's actually /usr/share/doc/netifrc-version/net.example.bz2 (Where would I be without Google?) Also using Google, I found http://www.policyrouting.org/iproute2.doc.html which is quite complex. Looks like it's time to play around with the ip command and try to duplicate my current setup. Does anyone have a multi-route setup similar to mine configured with iproute2? The net.example file says # If you need more than one address, you can use something like this # NOTE: ifconfig
Re: [gentoo-user] Re: [SOLVED] What happened to my 2nd eth0?
On Monday 23 Feb 2015 08:39:42 Walter Dnes wrote: Looks like it's time to play around with the ip command and try to duplicate my current setup. Does anyone have a multi-route setup similar to mine configured with iproute2? The net.example file says # If you need more than one address, you can use something like this # NOTE: ifconfig creates an aliased device for each extra IPv4 address # (eth0:1, eth0:2, etc) # iproute2 does not do this as there is no need to # WARNING: You cannot mix multiple addresses on a line with other parameters! #config_eth0=192.168.0.2/24 192.168.0.3/24 192.168.0.4/24 # However, that only works with CIDR addresses, so you can't use # netmask. What exactly do they mean by... iproute2 does not do this as there is no need to There is no need to create virtual interfaces like eth0:1 to be able to have secondary IP addresses. The ip command adds them to the same eth0 interface. When I use VPN I can see that my interface has a secondary LAN address created by VPN, but it does not have an additional virtual NIC. The only thing is that if my primary IP address goes down temporarily, the secondary address becomes primary and stays there. I need to look at the VPN configuration to see how to define the VPN LAN as a secondary subnet, but this is not related to your question. PS. Did you look at setting your desired subnet rather than a local-link auto-configured address at your HDHomerun device? -- Regards, Mick signature.asc Description: This is a digitally signed message part.