date
int64
1,220B
1,719B
question_description
stringlengths
28
29.9k
accepted_answer
stringlengths
12
26.4k
question_title
stringlengths
14
159
1,384,222,990,000
I'm unsure if this is hard or software issue but I really need to find out. I was running Windows 8.1 for some time, then swapped to Linux mint with kernel 3.13 which worked fine. I updated kernel to 3.19 without issues. Later I swapped to 4.0. One day, my network stopped working, (eth0) does not matter if I'm docked in station or using a cable. (this is at work, so we have many desks that I use..) Swapped to Elementary OS, 3.16 - Same issues. I tried to downgrade kernel, update my network drivers, update NetworkManager etc. Nothing works. I have checked: logs (syslog) dmesg New kernel New drivers (updated grub, initramfs) taken traffic dumps which shows broadcast traffic and my outgoing (but no other incoming) traffic ... etc I cannot find anything interesting, the interface shows traffic being sent out but it does still not seem to leave my computer really. Currently I have a script that brings eth0 down / up and restarts dhclient which is the only solution that works. IPv6 is disabled on all possible levels. wifi does not have this issue! Network: Card-1: Intel Ethernet Connection I218-LM driver: e1000e v: 2.3.2- port: 4080 bus-ID: 00:19.0 I'm also using VMware and bridge to eth0 for my virtual windows. (tried VirtualBox and VMware, does not change, so I don't think they ruin my eth0 connection) Anyone have any tip on how to troubleshoot this further? Only thing I know is to install windows again and see if it has the same issue (in case of HW failure) but that's a buttload of work right now.
Networkmanager was the issue. Update helped because it rendered my NM unusable. I just set dhcpaddress through "dhclient eth0" and it worked. So I uninstalled NM and installed wicd, to have a gui. Works like a charm. Advice if u have the same issue: Remove NetworkManager.
Linux network stops functioning after random time (wired)
1,384,222,990,000
Looking for an inexpensive embedded device that contains 2 Ethernet Ports, runs Linux (or some other type of Unix), and is under $50. My main concern is cost. It must be under $50 and have 2 Ethernet ports. It can be a bare circuit board, it doesn't need to be a complete device with cover and all.
http://soekris.com/ Not at the $50 level, but probably what you're looking for in general.
Low Cost, 2 Ethernet Ports & Runs Linux [closed]
1,384,222,990,000
I am using RHEL6, but I could not find the Ethernet interface configuration file ifcfg-eth0 under /etc/sysconfig/network-scripts. Issuing ifconfig -a shows that eth0 does exist. Could it be that the configuration file is hidden or saved in some other directory? If not, could I create such a file in the default directory(i.e., /etc/sysconfig/network-scripts) so that it would serve as the default configuration file?
You could find an example in /usr/share/doc*/initscript*, can't remember the exact name, but I'll provide a comprehensive example here: All fields are fairly easy to understand DEVICE=eth0 BOOTPROTO=none ONBOOT=yes NETWORK=10.0.1.0 NETMASK=255.255.255.0 IPADDR=10.0.1.27 Docs here
Where could I find the ifcfg-eth0 file?
1,384,222,990,000
I need to read permanent (burned-in) MAC address of network adapter. Since MAC address can be easily spoofed, I need to read the real one which is written on EEPROM. I need to do it using C++ on Linux. I tried using ethtool which is quite good and works fine. However on some systems it does not work as intented. ethtool -P eth0 returns this: Permanent address: 00:00:00:00:00:00 and ethtool -e eth0 returns this: Cannot get EEPROM data: Operation not supported Network Adapter has following info: driver: ucc_geth version: 1.1 firmware-version: N/A bus-info: QUICC ENGINE Linux kernel version is: 2.6.32.13 Question is: Can i fix this issue with any update(driver, kernel etc)? Additionally, I make the same ethtool calls with ioctl function in C++. Is there any way to fix this inside the code? Or is there any other way to get the permanent MAC address from EEPROM?
If you trust the local machine not to be spoofing, both ifconfig and ip addr will give you the MAC address of the hardware. If you don't trust the local machine, neither ethtool, ifconfig, nor ip is going to provide you the information you need. Because there are very legitimate reasons for MAC spoofing (for example, hot-fail on ethercards) all the drivers report only the currently "virtual" MAC address because if you need to spoof the address it wouldn't do well for some of the tools to report the firmware address and others to report the soft address. No ioctl can or should give you the hard-address. To get the hard-address requires reading the device registers directly and is thus completely device specific. A quick look through the ucc_geth.c driver seems to show that MAC address reassignment is supported by the chip itself (which makes sense as it needs to be able to pluck packets sent to its soft address off the ether). This means that you need to be very deliberate to ensure you are getting the hard address for which the driver liberally says: /* For more details see the hardware spec. */
ethtool get permanent MAC address returns all 0's
1,384,222,990,000
I'm quite new to Linux networking. I have a Debian PC with two Ethernet interfaces, one embedded on the motherboard and another on a PCI card. The first one, let say eth0 is connected to my router (which is connected to Inet). I want to "link" eth1 to eth0, in order to access my router (and Inet) when I plug a cable in eth1. The same way the eth0 cable is connected to one of my router's Ethernet ports. The Debian PC should also be able to access Inet and LAN, and thus not simply behave as a "virtual link" between the cable plugged in eth0 (coming from my router) and the cable plugged in eth1 (going to another PC). Is this achievable? How?
You can use a bridge interface. You can use brctl from bridge-utils to create a bridge interface. For example, $ brctl addbr br0 $ brctl addif br0 eth0 eth1 $ brctl show bridge name bridge id STP enabled interfaces br0 8000.00004c9f0bd2 no eth0 eth1 So after adding interfaces eth0 & eth1 into the bridge device br0 you're left with the following setup. You can use ifconfig to see it: $ ifconfig eth0 eth0 Link encap:Ethernet HWaddr BC:AE:AA:34:22:11 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 ... $ ifconfig eth1 eth1 Link encap:Ethernet HWaddr BC:AE:AA:34:11:22 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 ... And the bridge device with the IP address: $ ifconfig br0 br0 Link encap:Ethernet HWaddr BC:AE:C5:11:22:33 inet addr:192.168.1.20 Bcast:192.168.1.255 Mask:255.255.255.0 ...
Linking Ethernet interfaces
1,384,222,990,000
I changed out a NIC card that was the exact same make and model. The setup process for Ubuntu 11.04 was very seemless and easy so I figured it would be smart enough to setup up the replacement card. However, it gave the replacement card a new name of eth1 where all my scripts make reference to eth0, not to mention everywhere else in the OS eth0 may exist. Am I forced to track down every eth0 reference and change it to eth1 or is there a way to rename the replacement card back to eth0?
Check udev config files. A file like this: /etc/udev/rules.d/70-persistent-net.rules ties the NAME (ethX) to the Mac address. You probably have the old cards MAC tied to eth0. Remove its line and change the new card to eth0.
Replacing identical NIC cards creates eth1 instead of using eth0 in Ubuntu
1,384,222,990,000
I'm following this excellent article to use bridged networking with libvirt and KVM, however there are some fundamental knowledge I'm lacking for me to fully understand/follow it. The article says, No physical interfaces should ever be added to the virbr0 bridge, since it uses NAT to provide connectivity. Virtual interfaces will be added to the bridge when we create and launch virtual machines. and most importantly, you can’t use your main ethernet interface when adding physical ethernet interface to the bridge. thus we have to use an additional interface. I'm not too sure about the relations between physical interfaces, virtual interfaces, main interface and additional interface, thus when the article says he is using an additional interface, enp0s29u1u1, an interface provided by an ethernet to usb adapter. I'm totally lost what additional interface I should be using for my case, which is a vanilla Debian, with a single ethernet card. Please help.
A "physical interface" refers to an actual network device on your computer -- that is, something into which you can plug an ethernet cable, or a wireless network device. A "virtual interface" refers to network interfaces that aren't associated with a specific physical device: so, vlan interfaces, bridges, tun/tap interfaces, etc. Your "main interface" is the network interface with which you system's primary ip address (and default route) is associated. An "additional interface", in this context, is any physical interface other than your main interface. These two statements... No physical interfaces should ever be added to the virbr0 bridge, since it uses NAT to provide connectivity. Virtual interfaces will be added to the bridge when we create and launch virtual machines. ...are correct. The virbr0 bridge is associated with the libvirt "default" network and uses NAT to connect virtual machines to the outside world; you would not want to add a physical interface to this bridge. Libvirt creates tun/tap devices when you launch virtual machines and adds them to the bridge. However, the following statement... You can’t use your main ethernet interface when adding physical ethernet interface to the bridge. ...is a bit of a simplification. You can use your main ethernet interface as part of a bridge, but the procedure is a little more complicated than when using a secondary interface (and is a great way to accidentally disable your internet connectivity). Broadly, you need to: Create a bridge device Add your ethernet interface to the bridge Configure the bridge device with the ip address that was previously associated with your main interface For example, on my system, eth0 looks like this: # ip addr show eth0 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether 52:54:00:9b:a0:2a brd ff:ff:ff:ff:ff:ff altname enp1s0 inet 192.168.122.64/24 brd 192.168.122.255 scope global dynamic noprefixroute eth0 valid_lft 3570sec preferred_lft 3570sec inet6 fe80::d6:992e:d74a:c05a/64 scope link noprefixroute valid_lft forever preferred_lft forever That's the only physical interface on my system. We're also going to need to know our default route: # ip route default via 192.168.122.1 dev eth0 proto dhcp metric 100 192.168.122.0/24 dev eth0 proto kernel scope link src 192.168.122.64 metric 100 To add eth0 to a bridge, I would first create a bridge device: # ip link add br-example type bridge Then add eth0 to the bridge and remove any existing addresses from eth0: # ip link set eth0 master br-example # ip addr flush eth0 Add the address that used to be on eth0 to br-example and restore the default route: # ip addr add 192.168.122.64/24 dev br-example # ip link set br-example up # ip route add default via 192.168.122.1 At this point (a) I have a bridge br-example, (b) eth0 is a member of this bridge, and (c) I still have connectivity (via the brdige) out eth0. Following the instructions in your linked article, I could create a libvirt network associated with br-example and start attaching virtual machines to it; from a network perspective, these machines would look like any other device physically attached to the local network. Of course, the above procedure doesn't result in persistent changes; how do that differs by distribution and the article to which you've linked provides a good overview of the process.
Adding a physical ethernet interface to kvm qemu bridge
1,384,222,990,000
Is it possible to find out the details about Linux cards? For example we tried: dmidecode | grep -i network Function key-initiated network boot is supported Port Type: Network Port Port Type: Network Port Port Type: Network Port Port Type: Network Port # dmidecode | grep -i eth Type: Ethernet Type: Ethernet Type: Ethernet Type: Ethernet This details doesn't say anything about the network cards and performance etc. Any advice about tools that can give these details about network cards?
For getting the brand/model of the network card, usually you run: $ lspci | grep -i Ethernet 02:01.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01) Or for getting more detail of the NIC(s): $ sudo lshw -class network *-network description: Ethernet interface product: 82545EM Gigabit Ethernet Controller (Copper) vendor: Intel Corporation physical id: 1 bus info: pci@0000:02:01.0 logical name: eth0 version: 01 serial: 00:0c:29:25:4d:0e size: 1Gbit/s capacity: 1Gbit/s width: 64 bits clock: 66MHz capabilities: pm pcix bus_master cap_list rom ethernet physical logical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=e1000 driverversion=7.3.21-k8-NAPI duplex=full ip=192.168.5.143 latency=0 link=yes mingnt=255 multicast=yes port=twisted pair speed=1Gbit/s resources: irq:19 memory:fd5c0000-fd5dffff memory:fdff0000-fdffffff ioport:2000(size=64) memory:fd500000-fd50ffff Grepping dmesg for the network device might also help: $ dmesg | grep eth0 [ 1.635942] e1000 0000:02:01.0 eth0: (PCI:66MHz:32-bit) 00:0c:29:25:4d:0e [ 1.635960] e1000 0000:02:01.0 eth0: Intel(R) PRO/1000 Network Connection [ 3.736090] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None [ 3.742639] 8021q: adding VLAN 0 to HW filter on device eth0 As for dmidecode, dmidecode -t baseboard might show information about NICs that are built-in in the motherboard. PS As for Unix SE questions, when dealing with hardware questions, a full lscpi output is probably more useful.
How to find network card details on RHEL machines
1,384,222,990,000
This time I did not install firmware-linux-nonfree. I opted to avoid it and found that everything is working fine (well, my wireless indicator light doesn't work, but the adaptor does, so it's cool). Anyway, the last call to update-initramfs produced this error: W: Possible missing firmware /lib/firmware/tigon/tg3_tso5.bin for module tg3 W: Possible missing firmware /lib/firmware/tigon/tg3_tso.bin for module tg3 W: Possible missing firmware /lib/firmware/tigon/tg3.bin for module tg3 It is apparently the firmware for my ethernet adaptor. That is working fine, same as last install. How do I suppress this warning or fix the problem. I don't want the nonfree fw package as it conflicts with my AMD gf fw.
This isn't an error, just a warning. The tg3 module drives many Broadcom chipsets, and needs these firmware files only for BCM5705 TSO, BCM5703/BCM5704 TSO and BCM5701A0. If you include a currently loaded module in your initramfs, but not all possible firmware files it can theoretically request, update-initramfs gives you these warnings. These tell you that the generated initramfs file isn't quite as general as it could be. You can only hack around this, for example by creating dummy firmware files.
"Tigon" ethernet firmware: error message though working
1,384,222,990,000
This is for "research" not pragmatic purposes -- I want to know how this is supposed to work, since my guess below does not. In other words, I do not want an answer that involves /etc/network/interfaces or anything else distro specific, or NetworkManager. Please do not close this as a duplicate of a question which provides such answers. I'm trying to connect two GNU/Linux systems w/ a regular (not cross-over) ethernet cable. Rumor has it that this should not be a problem now-a-days. What I tried to do is add a private IP for the interface on both machines: ip addr add 10.0.0.1 dev eth0 And 10.0.0.2 on the other machine. Neither one is attached to a network that could be identified this way. I then added routes back and forth: ip route add 10.0.0.2 via 10.0.0.1 And vice versa. Subsequently, the output of ip addr and ip route seems to be correct (see below). As per John's comment, I also tried this without adding any route; in this case the ping simply times out. Both machines have iptables wide open; INPUT, OUTPUT, and FORWARD are ACCEPT with no rules. But this is what happens when I try a ping: > ping 10.0.0.2 PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data. From 10.0.0.1 icmp_seq=1 Destination Host Unreachable From 10.0.0.1 icmp_seq=2 Destination Host Unreachable Notice it's the local interface (10.0.0.1) that returns this. What additional steps are needed here and/or where have I gone wrong? The routing table after using ip route ... looks like: default via 192.168.0.1 dev wlan0 10.0.0.2 via 10.0.0.1 dev eth0 192.168.0.0/24 dev wlan0 proto kernel scope link src 192.168.0.19 Sans ip route ..., it looks the same but without line 2. Output from ethtool (both NICs are identical hardware) looks like: ethtool eth0 Settings for eth0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supported pause frame use: No Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised pause frame use: Symmetric Receive-only Advertised auto-negotiation: Yes Link partner advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Link partner advertised pause frame use: Symmetric Receive-only Link partner advertised auto-negotiation: Yes Speed: 100Mb/s Duplex: Full Port: MII PHYAD: 1 Transceiver: internal Auto-negotiation: on Supports Wake-on: pumbag Wake-on: d Current message level: 0x00000007 (7) drv probe link Link detected: yes The output from ip a for the ethernet NIC looks like: 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether b8:27:eb:f5:4f:7a brd ff:ff:ff:ff:ff:ff inet 10.0.0.2/32 scope global eth0 valid_lft forever preferred_lft forever inet6 fe80::ba27:ebff:fef5:4f7a/64 scope link valid_lft forever preferred_lft forever
As written in the comments, you need to fix the routing table. The syntax ip route add X via Y is used for gateway traffic, i.e. if the traffic to X should be sent to the (most time external address) Y. There need to be a extra route how Y could be reached. If Y is your own interface address and you do not solve the problem otherwise, you create a loop and the routing does not work. What you need is that the traffic to the other host is sent directly via the interface (not via a gateway). There many different possibilities, depending on the netmask you use: ip r add 10.0.0.2/32 dev eth0 # only 10.0.0.2 should go via eth0 ... ip r add 10.0.0.0/8 dev eth0 # 10.0.0.0 - 10.255.255.255 should go via eth0
Direct connection w/ ethernet cable
1,384,222,990,000
I have a computer that is connected to the router with DHCP and is in fully working order, what I am having issues with adding raspberry pi zero's in link-only mode. First I can get the pi's to connect by just editing the connection from DHCP to link-only but then I obviously lose internet as I can only have one wired device connected at a time and they aren't DHCP like my main ethernet connection. I then though it would be a simple job of adding a new connection with link-only set that I could use to connect the pi's while leaving my internet intact, this is where the issue started I was able to make the connection but for some reason unable to get it to assign itself to the pi, I get two different messages one is activation of network connection failed and the other is Unable to find a connection with UUID ('null'). I searched the internet and didn't find much as sugested in one of the posts I ran nmcli c show which returns a list of connections and here new connection all seem to have a UUID. I am stuck with this issue and would appreciate any help.
How to setup Networking via Network Manager's nmcli for a Raspberry Pi connected to a host PC via the USB port running in OTG mode. I successfully setup a bridged network to a Raspberry Pi Zero using Network Manager via the nmcli commandline interface. Raspberry Pi Setup I followed these instructions listed in the comments above to setup the Pi for OTG Ethernet connection. Modify the Pi's MiniSD card's filesystem Add the following to the SD card's /boot/config.txt # Enable USB OTG like ethernet dtoverlay=dwc2 Create an empty file called ssh in the SD card's /boot directory touch ssh And append the OTG ethernet module onto the boot loader via adding the following to the SD card's /boot/cmdline.txt after rootwait ` modules-load=dwc2,g_ether ` Setup Host PC Network Bridge Then I setup a bridge network interface on my PC's wired ethernet port. nmcli con add type bridge ifname br0 nmcli con modify bridge-br0 bridge.stp no nmcli con add type bridge-slave ifname eth1 master bridge-br0 Plugged in the Raspberry Pi Zero to the PC using the OTG port on the Pi. Checked the interface name using ifconfig. And then added the OTG interface to the network bridge. nmcli con add type bridge-slave ifname enp0s29f7u1u4u3 master bridge-br0 With everything set, I enabled the connections: nmcli con up bridge-br0 nmcli con up bridge-slave-eth1 nmcli con up bridge-slave-enp0s29f7u1u4u3 Verified all interfaces green with nmcli connection root@local:/etc/ssh# nmcli con NAME UUID TYPE DEVICE bridge-br0 ab1fab48-2c31-4ccc-90bf-db444751c080 bridge br0 bridge-slave-enp0s29f7u1u4u3 5efed614-89c7-48d4-996e-0a2e6e616846 802-3-ethernet enp0s29f7u1u4u3 bridge-slave-eth1 53c4d66a-3f9e-49f4-b954-92b13ecf96f8 802-3-ethernet eth1 Watch DHCP server for Raspberry Pi Address And then watched my DHCP server for the Raspberry Pi network address assignment. On your configuration, that information would be available via your router. SSH to Pi success: SSH into Pi root@local:/etc/ssh# ssh [email protected] [email protected]'s password: The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Wed Nov 1 19:33:48 2017 from 192.168.xxx.xxx pi@raspberrypi:~ $ uname -a Linux raspberrypi 4.4.38+ #938 Thu Dec 15 15:17:54 GMT 2016 armv6l GNU/Linux pi@raspberrypi:~ $ ifconfig lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:724 errors:0 dropped:0 overruns:0 frame:0 TX packets:724 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:58980 (57.5 KiB) TX bytes:58980 (57.5 KiB) usb0 Link encap:Ethernet HWaddr 8e:31:5b:06:db:bb inet addr:192.168.xxx.xxx Bcast:192.168.xxx.xxx Mask:255.255.255.0 inet6 addr: fe80::xxx:/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:756 errors:0 dropped:0 overruns:0 frame:0 TX packets:430 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:90941 (88.8 KiB) TX bytes:76278 (74.4 KiB) pi@raspberrypi:~ $ route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 192.168.xxx.xxx 0.0.0.0 UG 202 0 0 usb0 192.168.xxx.0 * 255.255.255.0 U 202 0 0 usb0 pi@raspberrypi:~ $ sudo -s root@raspberrypi:/home/pi# ping unix.stackexchange.com PING unix.stackexchange.com (151.101.65.69) 56(84) bytes of data. 64 bytes from 151.101.65.69: icmp_seq=1 ttl=55 time=27.2 ms 64 bytes from 151.101.65.69: icmp_seq=2 ttl=55 time=7.91 ms 64 bytes from 151.101.65.69: icmp_seq=3 ttl=55 time=6.40 ms 64 bytes from 151.101.65.69: icmp_seq=4 ttl=55 time=6.78 ms 64 bytes from 151.101.65.69: icmp_seq=5 ttl=55 time=7.87 ms ^C --- unix.stackexchange.com ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4006ms rtt min/avg/max/mdev = 6.404/11.240/27.219/8.012 ms root@raspberrypi:/home/pi# Addendum After reading through Part 2 of the Pi OTG Networking instructions, I will add the component that they provide to permanently set the Pi's MAC address. With a permanent MAC address, your DHCP server and/or router will stop giving sequential IP addresses with every reboot of the RPi. webonomic's says: You do this by appendign(sic) this to cmdline.txt on the boot partition on your pi: g_ether.host_addr=8a:3e:d4:ce:89:53 Just take the address form the ifconfig command of your laptop, after you have established a connection. They go on to mention changing the Pi's configuration from DHCP to Static IP. However, I do not recommend doing it that way. I always recommend setting up static leases on your network's DHCP server. This way, only the DHCP server needs to be modified in order to redesign your network. There are also useful methods for dividing up subnets in order to limit access to certain hosts from others. Most modern home routers allow setting up static leases. It's a good practice to utilize the full capabilities of your DHCP server. Additional notes I discovered that setting g_ether.host_addr is not enough to provide a constant MAC address for the Pi. There is a second requirement to set g_ether.dev_addr The Gadget documentation recommends also setting a manufacturer as well a product number. Linux-USB Gadget API Framework says: To better support DHCP, ZCIP, and related network autoconfiguration, you'll want to manage Ethernet addresses so that each peripheral reuses the same unique address every time it boots. You should assign those addresses using a registered IEEE 802 company id; this will also make the device appear to Linux hosts as an "ethN" interface, not as "usbN". It's easy to do this without a separate ID PROM (or an initrd) if you're using boot firmware like U-Boot: *#* manufacturing assigns Ethernet addresses; company id is xx:xx:xx setenv eth_a_host xx:xx:xx:01:23:45 setenv eth_a_gadget xx:xx:xx:67:89:ac setenv eth_i_vendor "Great Stuff, LLC" setenv eth_i_product "Our Cool Thing" setenv eth_args g_ether.host_addr=\$(eth_a_host) setenv eth_args $(eth_args) g_ether.dev_addr=\$(eth_a_gadget) setenv eth_args $(eth_args) g_ether.iManufacturer=\$(eth_i_vendor) setenv eth_args $(eth_args) g_ether.iProduct=\$(eth_i_product) *#* you can assign USB vendor/product/version codes too... setenv add_eth_args setenv bootargs $(eth_args) \$(bootargs) ... setenv bootcmd run add_eth_args\;bootm These parameters can also be appended to the cmdline.txt for better usability with DHCP servers.
NetworkManager Multiple Wired Connections Issues
1,384,222,990,000
I have to secure interfaces on Linux servers by setting bonding interfaces. The cabling information is not accurate. Is there a simple way to know if two interfaces are connected to the same LAN? Some interfaces have no IP, if possible I would prefer to not set dummies IPs. I finally did it using arping, it was already installed on the servers: ifconfig eth2 up ifconfig ethO up tcpdump -i eth2 -c 3 arp net 10.10.10.10 and in another terminal : arping -D -I eth0 10.10.10.10 tcpdump should displays lines like that: 16:15:43.032103 arp who-has 10.10.10.10 (Broadcast) tell 0.0.0.0 16:15:44.032277 arp who-has 10.10.10.10 (Broadcast) tell 0.0.0.0 16:15:45.032441 arp who-has 10.10.10.10 (Broadcast) tell 0.0.0.0 *-D is optional but it gives a nice 0.0.0.0 source address.
Some ideas, assuming interfaces are eth0 and eth1: Sniff on both interfaces at the same time for non unicast traffic. You should see all packets twice ( tcpdump -nni eth0 -c 10 broadcast or multicast & tcpdump -nni eth1 -c 10 broadcast or multicast & ) | sort Probe with an IP-less protocol. For example with this tool to generate DHCP requests: http://www.latinsud.com/pub/dhd/dhd.c ( sleep 1; ./dhd eth1 > /dev/null ) & tcpdump -nni eth0 udp and port 68 You should see something like this: 14:46:16.449738 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:50:56:99:76:cb, length 300 14:46:16.650330 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:50:56:99:76:cb, length 300
How to tell if two ethernet interfaces are on the same lan?
1,469,709,653,000
After an IP address is assigned to this network interface, with any of the the following commands: ip addr add 10.0.0.0 dev eth1 valid_lft forever preferred_lft forever ip addr replace 10.0.0.0 dev eth1 valid_lft forever preferred_lft forever ip addr add 10.0.0.0 dev eth1 ip addr replace 10.0.0.0 dev eth1 I can verify with ip addr that the IP address for eth1 is set to 10.0.0.0/32 which is excellent (I think): ... 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000 link/ether 08:00:27:4d:1e:43 brd ff:ff:ff:ff:ff:ff inet 10.0.0.0/32 scope global eth1 valid_lft forever preferred_lft forever inet6 fe80::a00:27ff:fe4d:1e43/64 scope link tentative dadfailed valid_lft forever preferred_lft forever ... I begin to ping myself...the ping command hangs on the 31st ping: username@computer:~$ ping 10.0.0.0 PING 10.0.0.0 (10.0.0.0) 56(84) bytes of data. 64 bytes from 10.0.0.0: icmp_seq=1 ttl=64 time=0.043 ms 64 bytes from 10.0.0.0: icmp_seq=2 ttl=64 time=0.034 ms ... 64 bytes from 10.0.0.0: icmp_seq=30 ttl=64 time=0.038 ms 64 bytes from 10.0.0.0: icmp_seq=31 ttl=64 time=0.041 ms Once the ping hangs, I can verify with ip addr that the IP address for eth1 is has disappeared: ... 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000 link/ether 08:00:27:4d:1e:43 brd ff:ff:ff:ff:ff:ff inet6 fe80::a00:27ff:fe4d:1e43/64 scope link tentative dadfailed valid_lft forever preferred_lft forever ... How can one assign a static IP address to a network interface using ip(8), and not let it disappear? (disappearing after system restart is OK) I am running Ubuntu 14.04. From researching on the Internet about my problem, it seems that modifying the file /etc/network/interfaces is the solution, but this is undesirable, because this solution is not as portable as the ip(8) command.
Your problem is not ip addr but some process (network manager?) which deletes the IP address. Unfortunately I am not aware of a possibility to determine which process made this access. In case the disturbing process calls ip it should be possible with process accounting (man acct) but not if the configuration is made directly via the NETLINK socket. You may kill or stop suspicious processes to find out which one does that.
how can one manually assign a permanent / static IP address with "ip addr add"?
1,469,709,653,000
While I know that lot of packet processing(CRC calculations, packet segmentation handling, etc) can be offloaded to NIC, then does each packet still cause an interrupt to CPU? Is there a difference if NIC is in promiscuous mode?
Normally, the NIC will only interrupt the CPU if it needs to send the received packet to the system. In non-promiscuous mode, this would only be for packets addressed to its MAC address, the broadcast address ff:ff:ff:ff:ff:ff, or a multicast address to which it has been subscribed. It also does validation before sending the packet to the CPU: the normal Ethernet CRC check, and IP/TCP/UDP checksums if the NIC has that capability and the driver has enabled this offloading. Some NICs have a limited number of multicast subscription addresses; if this is exceeded, it will send all multicast packets to the CPU, and the OS has to discard the ones it doesn't care about.
Does each network packet cause an interrupt to CPU?
1,469,709,653,000
I have an unmanaged dedicated server that I administer, running CentOS. Recently when I reboot the server, I am unable to use SSH. Both times this has happened the server host has determined the issue and explained it like this: "Please check now - I'm not sure how and why but eth0 and eth1 were both active on boot (there should only be one). I've fixed this and rebooted the server which came up cleanly with network connectivity. If you have any application that could be making this change, kindly disable the same as well." So in order for me to check into this myself, I am wondering where to look in order to see the settings he is describing there? That way I can configure it myself and try and determine if any programs are changing this. Note: I have been using the 'reboot' command, could this be resetting the ONBOOT status?
cd into /etc/sysconfig/network-scripts. In there, you will find ifcfg-eth0 and ifcfg-eth1. Edit them, and set the ONBOOT line's values to yes and no, respectively. (Or vice versa, if it's eth1 you'd rather come up on boot.) If you have to prevent the kernel from even attempting to touch the Ethernet hardware, you can pound out the eth1 line in /etc/modprobe.conf. Something like this: #alias eth1 e1000 The e1000 bit will be the driver name; it varies depending on the hardware in the machine. You'll find the line without the # at the start; add it. A better solution, if simply touching this hardware is a problem, is to remove access to it entirely at the hardware/VM level. If it's a VM, you'd remove it from the VM configuration. If it's real hardware, you'd disable the second Ethernet interface in the machine's firmware. (BIOS, EFI...)
How do I configure which ethernet connections are active on boot?
1,469,709,653,000
Netdiscover keeps showing a lot of "Unknown vendor" devices, when I generally can find the vendor pretty quickly via Google. Is there any way to manually update whatever OUI list Netdiscover uses?
EDITED after having found the update script. The OUI list is compiled into the Netdiscover binary, so you'll have to recompile it to update the list. You can download the source from the Netdiscover site, but the releases (up through 0.3beta6) are very old (circa 2007), so download a snapshot. The list itself is stored in src/oui.h in the Netdiscover source tree. You can edit this manually if you like, but there is also a generator script called update-oui-database.sh which downloads oui.txt from the IEEE and regenerates src/oui.h from scratch. Run this script before compiling. It looks like the standard ./configure && make && make install will compile and install the program. (If ./configure does not exist, you may need to run the ./autogen.sh script first.) By default it installs into /usr/local/sbin, but read through the output of ./configure --help to make sure. I originally suggested sending the oui.h changes back to the author, but since there's a script, he's not likely to find submitted changes helpful.
How can I update the OUI list used for Netdiscover?
1,469,709,653,000
I have this bizarre problem with my PC. Linux networking stops working after I play a game on Windows. Situation I have dual boot, Windows 10 for gaming and Manjaro linux for day-to-day use. I'm using a cable connection to my router, so it is fast and stable. I bought a new game recently, and my typical PC use looks like this: I turn on my PC and boot into linux for a few hours of work I reboot into windows, and I'm playing this game for like an hour or so I reboot into linux again After I switch back to linux and I try to use the internet, it stops after downloading a few hundred KB of data (maybe around 1 MB, hard to say exactly). Trying to debug and fix When it first happened, I thought it was some router issue or ISP problem. But no, other devices in my home network worked fine so not ISP. Cable itself and router are fine too because the internet works all the time on Linux after first boot and also on Windows when gaming. Other things I tried: Disconnect and connect using network applet ❌ Restart networking service sudo systemctl restart NetworkManager.service ❌ Unplug and plug network cable again ❌ Reboot into linux again ❌ Reboot into windows (internet works) and reboot into linux ❌ Turn off PC, wait a few seconds, and then start it into linux ❌ Turn off PC, cut off electricity, wait like 30s, switch electricity back, boot PC into linux ✅ The only way to make the internet work again is to cut off electricity, and then boot into linux. That looks like it is a hardware problem, but on the other hand, the internet works fine on Windows even just after playing game. I was also thinking that maybe something was overheating, but again, even after turning off my PC for a few hours (without cutting off electricity), it is still not working on Linux. I can't figure out what is going on. Do you have any idea what could be the cause? Debug info $ uname -a Linux piotrek-pc 6.5.13-1-MANJARO #1 SMP PREEMPT_DYNAMIC Tue Nov 28 20:33:05 UTC 2023 x86_64 GNU/Linux ---- $ journalctl -p 3 -b0 gru 05 23:29:12 piotrek-pc colord-sane[1041]: io/hpmud/pp.c 627: unable to read device-id ret=-1 ---- $ ping google.com ping: google.com: Temporary failure in name resolution ---- $ sudo systemctl status NetworkManager.service [sudo] password for piotrek: ● NetworkManager.service - Network Manager Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; preset: disabled) Active: active (running) since Tue 2023-12-05 23:29:11 CET; 1h 3min ago Docs: man:NetworkManager(8) Main PID: 943 (NetworkManager) Tasks: 4 (limit: 19101) Memory: 20.1M CPU: 233ms CGroup: /system.slice/NetworkManager.service └─943 /usr/bin/NetworkManager --no-daemon gru 05 23:29:14 piotrek-pc NetworkManager[943]: <info> [1701815354.5796] device (vethb5f8884): carrier: link connected gru 05 23:29:14 piotrek-pc NetworkManager[943]: <info> [1701815354.5798] device (docker0): carrier: link connected gru 05 23:29:14 piotrek-pc NetworkManager[943]: <info> [1701815354.5799] device (enp30s0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed') gru 05 23:29:14 piotrek-pc NetworkManager[943]: <info> [1701815354.5809] device (enp30s0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed') gru 05 23:29:14 piotrek-pc NetworkManager[943]: <info> [1701815354.5810] device (enp30s0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed') gru 05 23:29:14 piotrek-pc NetworkManager[943]: <info> [1701815354.5812] manager: NetworkManager state is now CONNECTED_SITE gru 05 23:29:14 piotrek-pc NetworkManager[943]: <info> [1701815354.5814] device (enp30s0): Activation: successful, device activated. gru 05 23:29:14 piotrek-pc NetworkManager[943]: <info> [1701815354.5818] manager: startup complete gru 05 23:29:14 piotrek-pc NetworkManager[943]: <info> [1701815354.6467] manager: NetworkManager state is now CONNECTED_GLOBAL gru 05 23:29:16 piotrek-pc NetworkManager[943]: <info> [1701815356.0664] agent-manager: agent[f36462a8b096765f,:1.35/org.kde.plasma.networkmanagement/1000]: agent registered ---- $ ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host noprefixroute valid_lft forever preferred_lft forever 2: enp30s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 30:9c:23:86:19:ee brd ff:ff:ff:ff:ff:ff inet 192.168.1.5/24 brd 192.168.1.255 scope global dynamic noprefixroute enp30s0 valid_lft 86140sec preferred_lft 86140sec inet6 fe80::6bad:f8d:8529:725d/64 scope link noprefixroute valid_lft forever preferred_lft forever ---- $ journalctl -p 3 -b0 -o short-iso 2023-12-06T17:52:47+0100 piotrek-pc colord-sane[1034]: io/hpmud/pp.c 627: unable to read device-id ret=-1 ---- $ sudo dmesg -T --level=emerg,alert,crit,err,warn --time-format iso 2023-12-06T17:52:36,153817+01:00 ACPI BIOS Warning (bug): Optional FADT field Pm2ControlBlock has valid Length but zero Address: 0x0000000000000000/0x1 (20230331/tbfadt-615) 2023-12-06T17:52:36,153947+01:00 Speculative Return Stack Overflow: IBPB-extending microcode not applied! 2023-12-06T17:52:36,153947+01:00 Speculative Return Stack Overflow: WARNING: See https://kernel.org/doc/html/latest/admin-guide/hw-vuln/srso.html for mitigation options. 2023-12-06T17:52:36,328872+01:00 mtrr: your CPUs had inconsistent variable MTRR settings 2023-12-06T17:52:36,467031+01:00 [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0) 2023-12-06T17:52:36,467146+01:00 [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0) 2023-12-06T17:52:36,467245+01:00 [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0) 2023-12-06T17:52:36,467425+01:00 [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0) 2023-12-06T17:52:36,467588+01:00 [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0) 2023-12-06T17:52:36,467754+01:00 [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0) 2023-12-06T17:52:36,467910+01:00 [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0) 2023-12-06T17:52:36,468064+01:00 [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0) 2023-12-06T17:52:36,468211+01:00 [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0) 2023-12-06T17:52:36,468367+01:00 [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0) 2023-12-06T17:52:36,468547+01:00 [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0) 2023-12-06T17:52:36,468705+01:00 [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0) 2023-12-06T17:52:36,468859+01:00 [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0) 2023-12-06T17:52:36,468979+01:00 [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0) 2023-12-06T17:52:36,469114+01:00 [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0) 2023-12-06T17:52:36,469249+01:00 [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0) 2023-12-06T17:52:36,480090+01:00 amd_pstate: the _CPC object is not present in SBIOS or ACPI disabled 2023-12-06T17:52:41,636165+01:00 vboxdrv: loading out-of-tree module taints kernel. 2023-12-06T17:52:41,679047+01:00 VBoxNetAdp: Successfully started. 2023-12-06T17:52:41,680999+01:00 VBoxNetFlt: Successfully started. 2023-12-06T17:52:42,529751+01:00 r8168 Copyright (C) 2023 Realtek NIC software team <[email protected]> This program comes with ABSOLUTELY NO WARRANTY; for details, please see <http://www.gnu.org/licenses/>. This is free software, and you are welcome to redistribute it under certain conditions; see <http://www.gnu.org/licenses/>. 2023-12-06T17:52:49,704231+01:00 ksplashqml[1546]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set ---- $ sudo lspci -v -d ::0200 1e:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15) Subsystem: Micro-Star International Co., Ltd. [MSI] RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller Flags: bus master, fast devsel, latency 0, IRQ 33, IOMMU group 12 I/O ports at f000 [size=256] Memory at fe604000 (64-bit, non-prefetchable) [size=4K] Memory at fe600000 (64-bit, non-prefetchable) [size=16K] Capabilities: [40] Power Management version 3 Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+ Capabilities: [70] Express Endpoint, MSI 01 Capabilities: [b0] MSI-X: Enable+ Count=4 Masked- Capabilities: [100] Advanced Error Reporting Capabilities: [140] Virtual Channel Capabilities: [160] Device Serial Number 01-00-00-00-68-4c-e0-00 Capabilities: [170] Latency Tolerance Reporting Capabilities: [178] L1 PM Substates Kernel driver in use: r8168 Kernel modules: r8169, r8168 // EDIT I did some testing and seems like gaming has nothing to do with this. It is Windows 10 that breaks networking somehow after reboot. I noticed that my router see my PC even after shutdown so probably network card is still working. After I cut off electricity and wait like 30s my router connection led is not active any more and then networking is working on Linux again. Is there any way to disable network card right after shutdown? I tried to search in BIOS but could not find option.
I will answer my own question because I was able to finally fix it. I found this on Manjaro forum and that lead me to checking what driver I'm using. lspci show two kernel modules available r8169 and r8168. And somehow I was using older module. I checked few more things and found this: $ ls -la /etc/modprobe.d/ total 28K drwxr-xr-x 2 root root 4,0K 12-07 08:19 . drwxr-xr-x 131 root root 12K 12-07 17:21 .. -rw-r--r-- 1 root root 16 2018-07-30 r8169_blacklist.conf inside $ cat /etc/modprobe.d/r8169_blacklist.conf blacklist r8169 Somehow new module was blacklisted. I checked in pacman who owns this file and it belongs to no package. Probably some leftover from some old package that is not here any more. I renamed this to /etc/modprobe.d/r8169_blacklist.conf.disabled, rebooted, and now networking works fine even after using Windows. Still not sure what changed on Windows that it broke my networking. Anyway, good that it works. Thanks everyone for your answers and interest in my problem.
Linux networking not working after playing a game on Windows
1,469,709,653,000
Why am I getting the "operation not permitted" with nmap - even when executed as root? $ sudo nmap 192.168.1.2 Starting Nmap 7.12 ( https://nmap.org ) at 2017-01-13 02:12 CST sendto in send_ip_packet_sd: sendto(5, packet, 44, 0, 192.168.1.2, 16) => Operation not permitted Offending packet: TCP 192.168.1.1:53769 > 192.168.1.2:2099 S ttl=47 id=47294 iplen=44 seq=2821662280 win=1024 <mss 1460> ... Omitting future Sendto error messages now that 10 have been shown. Use -d2 if you really want to see them. This is not an iptables issue - my OUTPUT chain is wide open: $ sudo iptables -L OUTPUT Chain OUTPUT (policy ACCEPT) target prot opt source destination Now, I do have a few different interfaces here, with VLANs and a bridge. This is working on some interfaces and not others: br0: Bridge over eth0 (untagged) and vbox0 (using VirtualBox), has IP 192.168.1.1 -> Not working (above). For kicks, removing vbox0 from the bridge doesn't fix anything. eth0.2: VLAN 2, with IP 192.168.2.1. Executing nmap on addresses in this subnet works as expected -> working. This seems significant, as this goes out the same physical NIC as eth0 (above). vbox1: Has IP 192.16.3.1. Executing nmap on addresses in this subnet works as expected -> working. This is a physical workstation - not being operated under any virtualization or container that might impose additional restrictions here. Bridge: $ brctl show bridge name bridge id STP enabled interfaces br0 8000.0015171970fc no eth0 vbox0 Granted, I can work-around this by using a less-privileged TCP connect scan (-sT) rather than the default TCP SYN scan (-sS) - but this doesn't explain why this is happening. Are there any known limitations here with the Ethernet bridging, or anything else I should be looking at? Edits (2017-01-14): Attempting to replicate in a clean VM (2 vCPU on an i7 physical system). Even after setting up the bridge, unable to reproduce. Disabling all Ethernet offloading options (using ethtool) does nothing to help. Running the latest compiled-from-source Nmap 7.40 does nothing to help. This appears to be a kernel issue? http://seclists.org/nmap-dev/2016/q4/131 . Not sure why I couldn't reproduce on the VM, despite the same versions. Possibly also hardware/driver-specific... This looks to be an issue with the iptable_nat module in the current 4.8.x kernels: https://bugzilla.redhat.com/show_bug.cgi?id=1402695 The scan still runs. This only seems to impact the start of the scan - for which I remain concerned as I may be missing results. It says that all messages after the first 10 have been omitted. However, even after repeating with the -d2 as prompted, I still see only 10. (Could be a bug in itself, however.) If I repeat the scan for a given port as listed (e.g. with -p 2099 for the example shown above), it scans successfully for that port - so it isn't as if certain ports are blocked. Running with --max-parallelism=1 drastically reduces the occurrence. Setting to 50 doesn't seem to help. Setting to 30 seems to work about half the time for a single host - but still eventually starts failing for a subnet scan. Progressively lower values lengthen the time it takes into a subnet scan for any failures to be observed - but even using 1 fails eventually. This does not appear to be a parallelism issue within nmap itself. Running multiple concurrent nmap scans with parallel and --max-parallelism=1 re-increases the occurrence of the issue. Host info: Ubuntu 16.10, kernel 4.8.0-34-generic #36-Ubuntu. Intel(R) Core(TM) i7-2600S, 32 GB RAM.
This looks to be an issue with the iptable_nat module in the current 4.8.x Linux kernels (< 4.8.16), as per https://bugzilla.redhat.com/show_bug.cgi?id=1402695. The 4.9 kernel includes a "real" fix - but as for Ubuntu, I am guessing we'll have to wait for Ubuntu 17.04 (Zesty Zapus) to see this officially. (4.9 will be included there, as per the release notes). As for Ubuntu 16.10 (Yakkety Yak), it looks like a fixed 4.8.16 kernel is pending release per https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1654584, which includes the following fixes: Revert "netfilter: nat: convert nat bysrc hash to rhashtable" Revert "netfilter: move nat hlist_head to nf_conn" I updated to this kernel using http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.8.16/ and the instructions at https://wiki.ubuntu.com/Kernel/MainlineBuilds. (I trust it will be further upgraded as usual as additional updates follow.) This not only resolved my issue, but resulted in a massive scanning performance improvement.
nmap raw packet privileges not working ("operation not permitted", even as root)
1,469,709,653,000
The RHEL 5 documentation is good about bonding pairs of ports in various ways. The Oracle team where I work want to get more complex than that. They want an active bonded pair, with a third interface ready as a passive backup. Has anyone tried bonding at this level of complexity? I thought about trying to layer bonding configurations. Could I configure bondeth0 as an active pair combining eth0 and eth2, and then create a bondeth1 with bondeth0 as active and eth1 as passive? So, eth0 + eth2 = bondeth0, configured as an active pair. bondeth0 + eth1 = bondeth1, configured for active/passive. Has anyone ever tried that? EDIT: Here's a more comprehensive description. These are two hosts in an Oracle 11g RAC/RDBMS cluster. eth0 is the unrouted management connection between the two hosts. eth1 and eth3 go from each host to its corresponding switch. eth2 goes from the host to the opposite host's switch. This way, no single networking failure takes down a host. Here's a rough drawing: __________ eth1 ____________ | Host 1 |================| Switch 1 | |________| eth3 |__________| eth2 | | | | | | | \-eth0--------eth0- | | \ | | | | eth2 ____________ eth3 __|_______ | Switch 2 |==============| Host 2 | |__________| eth1 |________| I don't need to worry about eth0; it's working just fine. The RHEL Documentation covers the basics of bonding well. Many examples of bonding are available. I've even found a great description of the six bonding modes. What I need to know is how to combine two modes across three ports.
You cannot do this, as you cannot bond bonds. What you should do is configure three ports in a Mode 4 bond to each switch, and use the ad_select=count bonding option. Each switch will negotiate a separate Aggregator ID, and only one Aggregator can be used at a time, so all traffic to and from a given Linux system will go via one switch. This will give you an "uneven" bond, where one Aggregator has two cables, and one Aggregator has one cable, giving the concept of a "primary" and "secondary" switch. The primary Aggregator will always be selected, but if the primary goes down then the secondary kicks in automatically. You also have a requirement of dedicated Oracle RAC control traffic. The last port (eth3) will be used for this. (Note: I don't know if Oracle support using crossover for this, I'm just going off your requirements) Network Diagram Note that Po on the switch denotes PortChannel, or an LACP bond. .-------------. .-------------. | Switch 1 | | Switch 2 | |-------------| |-------------| | Po1 | Po2 | | Po1 | Po2 | '-=--=-+-=--=-' '-=--=-+-=--=-' | | | | | | | | | '-----, | | | | '-----, | | | | | | | | | | | ,-----------' | | | | ,-------------- | -, | | | | | | | | | | | | | '-----, | | | | | | '-----, | | | | | | | | | | | .=--=---=--=. .=--=---=--=. |e0|e1|e2|e3| |e0|e1|e2|e3| +--+--+--+--+ +--+--+--+--+ | bond0 | | bond0 | |-----------| |-----------| | Host 1 | | Host 2 | '-----------' '-----------' Or to think about it another way: Host 1 eth0 = bond0 ---- Switch1 Po1 Host 1 eth1 = bond0 ---- Switch1 Po1 Host 1 eth2 = bond0 ---- Switch2 Po1 Host 1 eth3 ------------ Host 2 eth3 Host 2 eth0 = bond0 ---- Switch1 Po2 Host 2 eth1 = bond0 ---- Switch1 Po2 Host 2 eth2 = bond0 ---- Switch2 Po2 Host 2 eth3 ------------ Host 1 eth3 Configure each bond with BONDING_OPTS="miimon=100 mode=4 ad_select=count" If all your external traffic goes through a gateway, add xmit_hash_policy=layer2+3 to the bonding options to load balance, and configure Layer 3 load balancing on the switch's PortChannel interface as well.
RHEL 5 complex port bonding
1,469,709,653,000
For an embedded Linux system, if I have two or more network interfaces, how do I ensure that they always get the same interface names every boot In other words, I want, for example, eth0 to always map to one physical Ethernet port, eth1 to the next, etc. My Linux "distribution" is home-grown, and I use devtmpfs for populating /dev. I use busybox for init (and most everything else), along with custom init scripts for system startup and shutdown. I do not need hotplug facilities of mdev or udev -- I'm referring to "fixed" Ethernet ports.
This works for me with Linux 3.9.0 on an x86_64 architecture. #!/bin/sh # This assumes the interfaces come up with default names of eth*. # The interface names may not be correct at this point, however. # This is just a way to get the PCI addresses of all the active # interfaces. PCIADDRLIST= for dir in /sys/class/net/eth* ; do [ -e $dir/device ] && { PCIADDRLIST="`readlink -f $dir/device` ${PCIADDRLIST}" } done # Now assign the interface names from an ordered list that maps # to the PCI addresses of each interface. # IFNAMES could come from some config file. "dummy" is needed because of # my limited tr- and awk-fu. IFNAMES="eth0 eth1 eth2 dummy" for dir in `echo ${PCIADDRLIST} | tr " " "\n" | sort` ; do [ -e $dir/net/*/address ] && { MACADDR=`cat $dir/net/*/address` IFNAME=`echo $IFNAMES | awk '{print $1}'` IFNAMES=`echo $IFNAMES | awk '{ for (i=2; i<=NF; i++) printf "%s ", $i; }'` echo -n "$IFNAME " nameif $IFNAME mac=$MACADDR } done
How do you ensure physical network interfaces always get the same interface name across reboots on an embedded Linux system?
1,469,709,653,000
On one of my servers I set up a bond-device consisting of an onboard network-card and an PCIe network card. (eth1 and eth5) I set up the configugration according to man ifcfg-bonding - i.e. eth1 and eth5 will not be brought up on system boot, but bond0 will do this. Now the problem seems to be that eth5 takes too long to establish a link. Result is a running bond0 consisting of eth1 and eth5, but eth5 link is down. If I do a manual ifconfig eth5 up in this situation, eth5 will have a link and everything will be ok. Details: # cat /proc/net/bonding/pbond0 Ethernet Channel Bonding Driver: v3.2.5 (March 21, 2008) Bonding Mode: fault-tolerance (active-backup) Primary Slave: None Currently Active Slave: eth1 MII Status: up MII Polling Interval (ms): 100 Up Delay (ms): 0 Down Delay (ms): 0 Slave Interface: eth1 MII Status: up Link Failure Count: 0 Slave Interface: eth5 MII Status: up Link Failure Count: 0 # ethtool -i eth1 driver: bnx2 version: 2.0.18-suse firmware-version: 6.2.16 bc 5.0.4 UMP 1.1.9 # ethtool -i eth5 driver: e1000 version: 7.6.15.5-NAPI firmware-version: 5.6-2 The solution might be to give eth5 more time to settle the link during boot. This is propably very OS-specific (here: SLES10 SP4).
Assuming eth1 and eth5 are at least set to ONBOOT=yes (although it has no other configuration), you can use the POST_UP_SCRIPT variable in ifcfg-eth5 to call a sleep 5. Or, the other way round, in ifcfg-bond0 set PRE_UP_SCRIPT to give eth5 some time to settle. Compare with Suse Documentation.
Bond slave link up is too slow
1,469,709,653,000
I recently dug out some prototyping equipment from the trash and I want out figure out what the heck it is. It has a port labelled 'Ethernet' and when I plug it into a router the lights flash like its trying to pull an ip but it does not. My router is running DD-Wrt and I have a netbook with Knoppix I can use on the router. How could I go about sniffing the communication and figure out what IP the device wants and how to communicate with it?
Perhaps the easiest way is to use your netbook - just because you don't have to filter out unrelated traffic later. You can use tcpdump to dump all traffic on your ethernet device. After starting up tcpdump you connect your equipment. After nothing flashes any more you disconnect it and you can look at the dump with wireshark. The dump should contain ARP/dhcp etc. related traffic that originates from the trashed equipment. For example as root: # ifconfig (to checkout which ethernet device to capture) # tcpdump -ieth0 -w my.dump -s0 Ctrl+C or Ctrl+\ after some time As normal user under X11: $ wireshark my.dump
Ethernet Sniffing Embeded Device
1,469,709,653,000
Lately I have been having to switch between a wifi and wired internet connection with some frequency, and have found that the only way I am capable of doing this is to restart the computer. Here are the two cases of how this works: 1) Start computer with wireless automatically connected. This makes it impossible to later switch to an ethernet connection, even with wifi turned off. 2) Start computer with wifi hardware disabled and ethernet plugged in. This allows an ethernet connection, but if I unplug it and enable wifi, I cannot get a connection. How would I go about resolving this issue? Here are the contents of my /etc/network/interfaces file # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface auto lo iface lo inet loopback # The primary network interface allow-hotplug eth0 iface eth0 inet dhcp Edit: I have found a work-around script, but no solution so far. /etc/init.d/networking stop nano #this is where i unplug wire and enable wifi, or vice versa, then Ctrl-x /etc/init.d/networking start
Your problem lies in the fact that you're using two different things to manage your interfaces. NetworkManager (which is the usual default connection manager on Debian) does not manage any interfaces whose names are listed in /etc/network/interfaces by default. Either comment out the lines about eth0 in /etc/network/interfaces and have NetworkManager handle both connections or (a bit more involved), move the management of your wireless connection to /etc/network/interfaces.
Can't switch internet connections without restart (Debian)
1,469,709,653,000
I have multiple ARM devices on which Debian runs. I have a single image saved from the SD Card and intend to use it on all devices. Now I have the problem that, each time the MAC address of the eth, wlan, etc... port changes, it adds a new entry to the 70-persistent-net.rules file. For me this is a problem because in my /etc/network/interfaces file I only have eth0 set up. If the interface then gets linked to eth1, it won't connect to the network. Since no screen is connected it is a hassle to redo this process every time. Is there a way to tell the OS to always use eth0 when the MAC address of the ethernet interface changes?
This is what I put in my 70-persistent-net.rules file; you might only need the first two: SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth0", NAME="eth0" SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth1", NAME="eth1" SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth2", NAME="eth2" SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth3", NAME="eth3" SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth4", NAME="eth4" SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth5", NAME="eth5" SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth6", NAME="eth6" SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth7", NAME="eth7" SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth8", NAME="eth8" SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth9", NAME="eth9"
Don't add new ethernet interfaces, use it as eth0
1,469,709,653,000
Alias interfaces defined in /etc/network/interfaces cannot have multiple default gateways. Unfortunately I would like to use the same interface to access 2 different nets, and I need to define 2 addresses and 2 gateways, on the same interface. This alias interface has to be on eth1 interface because eth0 is used on the local network. If I define only one gateway for the main eth1 interface, and manually do route add default gw 1.2.3.4 for the alias eth1:0 it works. But I would like it to set up correctly at boot time automatically. This is my last trial /etc/network/interfaces : # The loopback network interface auto lo iface lo inet loopback # The external network interface, address on university internal network auto eth1 iface eth1 inet static address 172.x.y.33 netmask 255.255.255.224 network 172.x.y.32 broadcast 172.x.y.63 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers x.x.x.x dns-search mysite.org # multiple gateways are not allowed, so I try to add them like that: post-up route add default gw 172.x.y.62 metric 1 pre-down route del default gw 172.x.y.62 # external interface with external world IP address auto eth1:0 iface eth1:0 inet static address 1.2.3.1 netmask 255.255.255.128 network 1.2.3.0 broadcast 1.2.3.128 # dns on ensg dns dns-nameservers x.x.x.x dns-search mysite.org # multiple gateways are not allowed, so I try to add them like that: post-up route add default gw x.x.x.x metric 2 pre-down route del default gw x.x.x.x # internal network for my cluster auto eth0 iface eth0 inet static address 10.1.1.1 netmask 255.255.255.0 network 10.1.1.0 broadcast 10.1.1.255 gateway 10.1.1.1 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 10.1.1.1 127.0.0.1 dns-search cluster But when I try to bring up one interface I get: root@server:~# ifconfig eth1:0 up SIOCSIFFLAGS: Cannot assign requested address I cannot find a further solution on my own, does anyone have an idea? Thanks, best regards. SOLUTION: I have finally solved it like that: # The primary network interface auto eth1 iface eth1 inet static address a.b.c.1 netmask 255.255.255.128 network a.b.c.0 broadcast a.b.c.128 # this is the interface with the default gateway! gateway a.b.c.126 dns-nameservers a.d.e.f dns-search mysite.org auto eth1:0 iface eth1:0 inet static address 172.x.y.33 netmask 255.255.255.224 network 172.x.y.32 broadcast 172.x.y.63 # multiple gateways are not allowed, so we do it like that post-up route add -net 172.x.y.32 netmask 255.255.255.224 gw 172.x.y.62 pre-down route del -net 172.x.y.32 netmask 255.255.255.224 gw 172.x.y.62 auto eth0 iface eth0 inet static address 10.1.1.1 netmask 255.255.255.0 network 10.1.1.0 broadcast 10.1.1.255 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 10.1.1.1 127.0.0.1 dns-search cluster
This setup should not work since alias interfaces can´t have gateways on legacy mode(aka: /etc/network/interfaces: https://wiki.debian.org/NetworkConfiguration#Legacy_method An alias interface should not have "gateway" or "dns-nameservers"; dynamic IP assignment is permissible. What about if you use ip to define this route on a post-up? ip route add default via x.x.x.x dev eth0:1 The only problem here is that using iproute you will probably need to create 2 rules, one for each link, and set priorities while keeping the default table empty. LARC is your friend - http://www.lartc.org/howto/lartc.rpdb.multiple-links.html Why use iproute2 instead of route? Because route, arp, ifconfigand it´s friends are old tools and in proccess of being deprecated, but some distros still ships them.
multiple default gateways for alias interfaces
1,469,709,653,000
How do I check that packet socket support has been compiled into my kernel? I'm running Crunchbang, a Debian-based distribution.
Most Linux distributions include the config parameters used to compile the kernel in /boot/config-<kernel-version>. So grep -x 'CONFIG_PACKET=[ym]' "/boot/config-$(uname -r)" Should tell you if AF_PACKET socket support is included (m for as a module). Otherwise, you can just try and create a socket (using socket(2), see packet(7) for how to do it) in the AF_PACKET family and check if reports an error.
How do I check if I have packet socket support enabled in my distro's kernel?
1,469,709,653,000
What happens when I plug in a Ethernet cable? I want to be able to see what's happening on the Level 2/3 (I believe the protocols I'm trying to watch is Ethernet, IP (v4 and v6) and DHCP for IP connections). So, when I plug a cable and the connection is refused, can I try again seeing/debugging what really happen?
Bonsi Scott mentioned wireshark, which will allow you to observe ethernet packets, and all the protocol headers going up. It has a nice GUI interface too (the console version is 'tshark'). Wireshark is build on libpcap, which is fairly well documented and easy to use if you are into programming. Libpcap is also the basis of tcpdump which is similiar in purpose to wireshark.
What happens when I plug a Ethernet cable?
1,469,709,653,000
I want to make a cluster computer out of Raspberry Pis (with a network switch/hub, and mpiexec), and have run into the issue about how they will get internet access. Since it would be a hassle for all of them to have their own adapters and cables, I want to know if I can just put a wlan connection into the switch, or if it is more complex. If it is more complex, I was thinking that one of these computers could get internet access through this wifi adapter, and then share the connection to the rest of them. I saw this, but I want to get Kali 2.0 on these Pis, and still want to use mpiexec among all of them, and the accepted answer says the computers getting the internet won't be able to see the providers IP address without doing some DHCP server stuff. So, how would I manage to get computers connected to the same network switch/hub internet access?
Are you wanting all of the Raspberry Pi devices to be accessible from the internet, for example to run a web server cluster? Or are you just trying to be able to have the Raspberry Pi devices access the internet from behind a firewall? If you are just trying to give them access from behind a firewall then, just use a router instead of a switch. You would plug the internet connection into the WAN port on the router, and all of the raspberry pi devices would connect to the LAN port on the router. If there are not enough LAN ports on the router than you can make the local area network bigger with switches. Here is a picture of a typical LAN configuration: Most routers these days will handle DNS and DHCP for your local network, and generally also include some sort of NAT firewall. This will allow all of your raspberry pi devices to connect to the internet while preventing them from being accessed directly from the internet. On the other hand if you WANT the Raspberry Pi devices to all be publicly addressable from the internet (e.g. to run websites on the cluster), then your setup is a little more complicated, and there are a couple of approaches you could take. The first is to put the Raspberry Pi cluster into a DMZ that is separate from both the LAN and the WAN. Note however that you only have one publicly routable IP address with this setup so the cluster will need to be configured accordingly. The publicly routable IP address will be your WAN address, and you need to configure your WAN firewall / router to forward requests to the ports of interest to the machines of interest in the DMZ. Incoming response packets would be handled by NAT and redirected to the LAN or the DMZ depending on which local machine requested the resource. Here is a picture of a DMZ configuration. The other approach is to give each Raspberry Pi device a separate routable public IP address. This will also be the most expensive option since you will need to obtain these IP addresses from your Internet Service Provider. They will either run you separate lines for each IP address, or they will run you a single line (or fiber) and you will have to use a router and switches to break out that one line into many for your local WAN segment. The details will vary by ISP, how much bandwidth you require, and how many IP addresses you need.
How to give all computers connected to a network switch internet?
1,469,709,653,000
I recently installed debian on an old G4 iMac, and everything is working fine except that the console is constantly spammed with alternating eth0: switching to forced 10bt eth0: switching to forced 100bt messages. eth0 isn't configured at all in /etc/network/interfaces; I'm using the wireless interface on eth1 (which works fine). sudo ifconfig eth0 down doesn't give any message; the alternating messages just keep coming. Is there any way to get rid of them?
Try unloading the sungem kernel module (after ifconfig eth0 down to release the interface). If that works you can blacklist it to avoid it being loaded on next reboot.
PPC Debian: eth0: switching to forced 10bt / 100bt
1,469,709,653,000
I have various small NUCs with attached on each one some of this USB3 LAN adapters (because the NUCs have only one Ethernet, so I added extra ones with USB3 adapters). You can see an image of the product here. All of a sudden, probably due to an unattended automatic upgrade, these devices started getting random MAC addresses. Before: Each USB3 attached device had an address in the form: 00:0E:C6:XX:XX:XX Each one was distinct and always the same (stable), surviving reboots. Now they have address like: eth1 - be:7d:ee:6a:26:ab eth2 - be:7d:ee:6a:26:ab eth3 - be:7d:ee:6a:26:ab eth4 - be:7d:ee:6a:26:ab eth5 - be:7d:ee:6a:26:ab all sharing the same randomly picked address. In short, troubles: Each time the machine reboots, this random MAC address changes. They all share the same random MAC address.  Previously each one had a different and clearly distinct one. The devices are identified in lsusb as:    ASIX Electronics Corp. AX88179 Gigabit Ethernet I have no idea what happened since latest automatic update, it's matter of the latest 2 days, 1h ago everything was working OK, after all these devices started to have this weird behaviour. Could it be a problematic update?  Could it be a new driver been released that randomizes the MAC address each time?  Could it be a feature from the Linux kernel or the distro or GRUB setting where USB LAN devices now get random MAC address each time?  But in this case, why all of them share the same?  They should be totally random.... I am seeking help and willing to do tests... Regarding the OS: Debian Version: 12.5 Linux 6.1.0-20-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.85-1 (2024-04-11) x86_64 GNU/Linux Workarounds suggested so far, including the final one always working thanks to @A.B: Use parrent attribute "serial" in UDEV configuration to assign lan interface another name instead of relying on the mac address Use usb path of an usb nic address in udev rules in order to assign an interface name instead of mac address How to reset status of a network adapter before assigning the name in a udev ruleset?
This 6.8 kernel commit, backported to 6.1.x: net: usb: ax88179_178a: avoid two consecutive device resets intended to avoid a double reset on the AX88179-based NIC had as side effect to get a random MAC address for the NIC. There's a fix in the works for future 6.9 kernel, already backported to kernel 6.1.85+ which acknowledges the previous issue (and is supposed to fix it). Here's the acknowledge part: net: usb: ax88179_178a: avoid the interface always configured as random address After the commit d2689b6a86b9 ("net: usb: ax88179_178a: avoid two consecutive device resets"), reset is not executed from bind operation and mac address is not read from the device registers or the devicetree at that moment. Since the check to configure if the assigned mac address is random or not for the interface, happens after the bind operation from usbnet_probe, the interface keeps configured as random address, although the address is correctly read and set during open operation (the only reset now). The problem is that Debian's kernel 6.1.0-20-amd64 already uses upstream kernel 6.1.85 which includes the fix. From OP's comment this doesn't appear to work correctly, since OP is using kernel 6.1.0-20-amd64. What is guaranteed to work is to revert to the previous state: before the patch backported to 6.1.x on 2024-02-05. It appears that currently that means reverting TWO patches: net: usb: ax88179_178a: avoid the interface always configured as random address net: usb: ax88179_178a: avoid two consecutive device resets to be guaranteed to get it working as before (and getting the double-reset behavior back which didn't appear to be a problem then). I could verify in the past weeks that reverting net: usb: ax88179_178a: avoid two consecutive device resets made it work, I didn't verify how the newer state (eg: kernel 6.1.85 or Debian 6.1.0-20-amd64) behaves. OP's Q/A suggests that maybe the 2nd patch intended to fix the behavior caused after the 1st patch is not enough and possibly yet-an-other-fix has to be provided. To summarize, possible options today: keep an older kernel, such as Debian's 6.1.0-18-amd64 available from https://snapshot.debian.org/ there: linux-image-6.1.0-18-amd64 patch a kernel between 6.1.77 and 6.1.84 by reverting the first patch mentioned in this answer and recompile (tested working) check if a kernel 6.1.85 or newer works for you as is. either it works (nothing more to do) or it doesn't (OP's case) revert at least the first patch and recompile: net: usb: ax88179_178a: avoid the interface always configured as random address (optional, can be kept rather then be reverted) net: usb: ax88179_178a: avoid two consecutive device resets: (reverting this one is needed) or wait yet-a-future patch fixing this: UPDATE: this commit from 2024-04-18: net: usb: ax88179_178a: avoid writing the mac address before first reading fixes it (I tested it on a 6.8.x kernel). It should probably be included in next 6.1.x upstream kernel 6.1.88, and will be picked sooner or later by Debian. Added bonus: the reset appears to be made back at probe time and no more on interface UP. So the delay for transitions between down and up is now faster.
Debian 12 – All of a sudden my USB3 LAN adapter gets assigned random MAC address at each reboot
1,469,709,653,000
I just installed the Ubuntu Server 16.04.1 LTS and wanted to configure my ethernet connection. My /etc/network/interfaces file looks like this: source /etc/network/interfaces.d/* auto lo iface lo inet loopback auth eth0 iface eth0 inet static address 192.168.0.99 *whatever my ip is* netmask 255.255.255.0 network 192.168.0.0 broadcast 192.168.0.255 gateway 192.168.0.999 *my router's ip* post-up iptables-restore < /etc/iptables.up.rules dns-nameservers *my router's ip* 8.8.8.8 This gave my ethernet connections weird names such as emp2s0, virbr0 etc. Based on this post however biosdevname doesn't exist in my installation neither are any rules in /etc/udev/rules.d. What should I do to get an ethernet connection?
The easiest way for you now is simply replacing eth0 with the actual name Ubuntu gave your device (both lines). You mention emp2s0, but I suspect it should be enp2s0. Also, the auth should be auto If you really dislike the new naming scheme, you can follow the many different howto's, but this will solve your immediate issue. As clarification, this naming scheme is new in Ubuntu (since somewhere in 15) and doesn't occur on machines updated from 14, only on new installs
Ubuntu Server ethernet configuration naming error
1,469,709,653,000
I have a wlan1 connection that I want to share to other computers on my LAN (via Ethernet - eth0). As this is somehow a temporary solution, I want this to be done by a script, so that I do not touch the network configuration files of my host (i.e I'll run this script after each reboot if I want to). The problem is that I am unable to bridge wlan1 and eth0. sudo brctl addif br0 eth0 wlan1 I saw that one needs to enable 4addr: iw dev wlan1 set 4addr on Indeed, I can then add wlan1 to the bridge, but ... I lose the wifi connection! I saw this is also a common issue :( In 2, the solution says to do this iw dev wlan0 interface add wds.wlan0 type managed 4addr on ip link set dev wds.wlan0 addr $ADDR ip link set dev wds.wlan0 up where $ADDR is "WDS device address configured in the router". I don't understand what that is? The MAC address of my network card for wlan1? And how should I then create my bridge? The following is not working: sudo brctl addbr br0 sudo brctl addif br0 eth0 wds.wlan0 Or here, they suggest to install ebtables. But the page does not explain how I should create the bridge, and they modify /etc/network/interfaces which I do not want to do... So, can somebody please help me create that bridge correctly? So far, my wifi script is: #!/bin/bash # this is for wlan1 - wifi connection pkill dhclient pkill wpa_supplicant ip link set dev wlan1 down ip addr flush dev wlan1 iwconfig wlan1 essid "mywifi" iwconfig wlan1 frag 2432 iwconfig wlan1 rts 2432 ip link set dev wlan1 up iwconfig wlan1 rate 1M dhclient -v wlan1 # this is my IP address on my LAN ifconfig eth0 192.168.0.8 netmask 255.255.255.0 I am running a Linux Mint 17.1 host. I have installed bridge-utils.
Is it possible to bypass the bridging part and use iptables instead? If so, you can setup source NAT to masquerade traffic going out on the wlan interface. First you need to enable IP forwarding: echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward Next, you need to masquerade traffic going out: sudo iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j MASQUERADE Have the LAN connected hosts to use 192.168.0.8 as their default gateway and have your machine to use the wlan0 interface connected gateway as the default gateway.
Share wlan connection to ethernet using command line
1,469,709,653,000
I was putting somes static addresses to my interfaces then it shows me this: 172.16.1.0 overlaps with FastEthernet 0/0 What does it mean when two addresses overlaps and how can we avoid it? EDIT: The problem happens on the router (on Ubuntu server everything works well)
It means that you are using the same IP range on both interfaces, or overlapping IP ranges. For example: Interface IP Address Subnet Mask eth0 192.168.2.10 255.255.255.240 eth1 192.168.2.2 255.255.255.252 It causes an overlapping because, according to the subnet mask: eth0 is in the range 192.168.2.0 - 192.168.2.15 eth1 is in the range 192.168.2.0 - 192.168.2.3 The range of eth1 is contained inside the range of eth0.
Addresses overlaps
1,469,709,653,000
I have just installed ubuntu server edition in order to create a home network. But I am not able to find IP of the machine through ifconfig (showing only localhost). Then I tried lspci | grep -i ethernet output: 09:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8040 PCI-E Fast Ethernet Controller (rev 13) lshw -C Network Then output was *-network DISABLED
The command to list ip address associated with an interface was ifconfig, To activate an interface, use ifconfig XXX up, otherwise it would shown as DISABLED
Network Disabled
1,469,709,653,000
I am currently testing netfilter / nftables / nft. As a starting point, I have made a ruleset that drops nearly everything in and out, and have written the rules so that every dropped packet is logged. As always, and as it probably has to be, I don't understand the very first thing the machine tries to do and that I notice in the logs: ... IN= OUT=enp0s3 ARP HTYPE=37 PTYPE=0x90bd OPCODE=21 According to this document: Opcode 21 means MARS-Grouplist-Reply. Neither did I ever hear of it, nor did I find a single reference to it on the net, except in RFCs or IANA documents, but it is nowhere explained there. HTYPE 37 means HFI hardware. As with the opcode, I have never heard of such a thing, nor did I find any explanation on the net. I am pretty sure that I don't have that type of hardware. In this case, the networking hardware is a virtual NIC in QEMU. PTYPE 0x90bd: During today's research, I have seen a list of protocol types; unfortunately, I can't remember where. But anyway, 0x90bd for sure was not mentioned there. Could somebody please explain what the opcode, the hardware type and the protocol type mean, and why the system in question wants to send such packets? This happens in a vanilla debian Bullseye installation, up to date at the time of writing, in a virtual machine with virtualized standard x64 Intel hardware and virtio NIC.
This is a bug in Netfilter's ARP logs. There was a bug report about this problem. It was discovered that ARP didn't log using the correct data (it used data from link layer header instead of ARP's network layer). A patch was committed to fix this a few days later and appeared in kernel 5.19: netfilter: nf_log: incorrect offset to network header NFPROTO_ARP is expecting to find the ARP header at the network offset. In the particular case of ARP, HTYPE= field shows the initial bytes of the ethernet header destination MAC address. netdev out: IN= OUT=bridge0 MACSRC=c2:76:e5:71:e1:de MACDST=36:b0:4a:e2:72:ea MACPROTO=0806 ARP HTYPE=14000 PTYPE=0x4ae2 OPCODE=49782 NFPROTO_NETDEV egress hook is also expecting to find the IP headers at the network offset. Fixes: 35b9395104d5 ("netfilter: add generic ARP packet logger") Reported-by: Tom Yan Signed-off-by: Pablo Neira Ayuso It appears this fix was not backported to vanilla kernel 5.10, possibly because the file to patch was not yet consolidated elsewhere so was in a different place, or this patch was just missed for a backport. When fixed (eg: vanilla 5.19.17): ah = skb_header_pointer(skb, nhoff, sizeof(_arph), &_arph); When not fixed (eg: vanilla 5.10.174, so including Debian bullseye's unless patched): ah = skb_header_pointer(skb, 0, sizeof(_arph), &_arph); Someone has to make a bug report about it. Meanwhile you could try a bullseye-backports kernel (eg currently: 6.1.12-1~bpo11+1) which is guaranteed to not have it anymore. Tested affected on today's bullseye kernel (5.10.162). Just logging any ARP table arp t { chain cout { type filter hook output priority filter; policy accept; log } } will log HTYPE=65535 when trying to reach a non-existent IP address on the LAN because it incorrectly uses the start of the broadcast MAC address and that's what is used as described in the patch. The same test done with the kernel in package linux-image-6.1.0-0.deb11.5-amd64-unsigned logs instead HTYPE=1 as should be.
What are ARP hardware type 37, opcode 21 and protocol type 0x90bd?
1,469,709,653,000
I switched my whole desktop-setup from windows to GNU/Linux + Debian 10. I am able to run the debian netinstaller and connect the mainboard for internet-software-updates. But whenever I got the full setup up and running, Debian is not able to connect to the network via ethernet. Immediately after login the interface states, that the network is disconnected. After a motherboard change, I am fairly certain, that this is some kind of a software/driver problem. My hardware setup consists of: Asus ROG Crosshair Hero VI Nvidia GTX 670 in PCI1 Nvidia GTX 970 in PCI2 (aim is to passthrough in to a VM) Ryzen 7 2700X Samsung EVO SSD with encrypted LVM, no further partitions This question is similar to https://askubuntu.com/questions/1135412/updated-to-19-04-and-no-ethernet-now, but my setup is different and research on stackexchange etc. brought no help. Output of systemctl status NetworkManager: device (enp4s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed') device (enp4s0): state change: config -> ip-config (reason 'none', sys-iface-state:'managed') dhcp4 (enp4s0): activation: beginning transaction (timeout in 45 seconds) DHCPrequests dhcp4 (enp4s0): dhclient started with pid 1334 device (enp4s0): state change: ip-config -> unavailable (reason 'carrier-changed', sys-iface-state: 'managed') dhcp4 (enp4s0): canceled DHCP transaction, DHCP client pid 1334 dhcp4 (enp4s0): state changed unknown -> done manager: NetworkManager state is now DISCONNECTED Output of lspci | grep Ethernet: Ethernet controller: Intel Corporation I211 Gigabit Network Connection (rev 03) /etc/network/interfaces remained unchanged, changing it to hotplug or static IP-addresses doesn't help. Same for setting up static network settings in nmcli. Output of nmcli device show enp4s0: GENERAL.DEVICE: enp4s0 GENERAL.TYPE: ethernet GENERAL.HWADDR: 04:92:26:DA:16:CC GENERAL.MTU: 1500 GENERAL.STATE: 20 (unavailable) Output of uname -a: Linux NAMEOFPC 4.19.0-5-amd64 #1 SMP Debian 4.19.37-5+deb10u1 (2019-07-19) x86_64 GNU/Linux Output of Dmesg | grep enp4s0: 1.054338] igb 0000:04:00.0 enp4s0: renamed from eth0 [ 56.832109] IPv6: ADDRCONF(NETDEV_UP): enp4s0: link is not ready [ 56.857033] IPv6: ADDRCONF(NETDEV_UP): enp4s0: link is not ready [ 59.608583] igb 0000:04:00.0 enp4s0: igb: enp4s0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX [ 59.608829] IPv6: ADDRCONF(NETDEV_CHANGE): enp4s0: link becomes ready [ 83.708581] igb 0000:04:00.0 enp4s0: igb: enp4s0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX [ 147.966461] IPv6: ADDRCONF(NETDEV_UP): enp4s0: link is not ready [ 320.546500] IPv6: ADDRCONF(NETDEV_UP): enp4s0: link is not ready [ 323.280590] igb 0000:04:00.0 enp4s0: igb: enp4s0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX [ 323.280831] IPv6: ADDRCONF(NETDEV_CHANGE): enp4s0: link becomes ready [ 326.168592] igb 0000:04:00.0 enp4s0: igb: enp4s0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX Physically disconnecting is no solution, NetworkManager immediately notifies, that the physical connection is not down again. The only solution seems to be ip link set enp4s0 down followed by ip link set enp4s0 up. It would be ps I added nonfree repositorys as well - to no avail. The only solution I didn't try was the propietary intel I211 driver. But I don't know if this is the solution, since the mentioned askubuntu-post uses Kernel 5.x and a Realtek network card - with the same problems. Edit: Furthermore, this problem seems to be seldomly metioned and I assume you would find more posts regarding this problem, if the only solution is to compile a new driver into the kernelspace. Additionally, Intel states, that the IGP-linux driver for the I211 is made for Kernels 2.x and 3.x... Output of cat /sys/class/net/enp4s0/device/power/control: "on" A direct connection to the router enables a network connection immediately. Furthermore, the switch is indeed limited to 100mbps. I didn't have the time to install ethtool, yet. I will update when I had the time to do so. Are there any solutions to this problem? Maybe it is the message of NetworkManager "reason 'carrier-changed', sys-iface-state: 'managed'", which can give some hint to the problem? Maybe it is the fact, that encrypted LVMs remain in some kind of hibernating status after shudown? That's what the CLI tells you when shutting down and booting (e.g. resuming from hibernation).
Your integrated Intel NIC most likely supports Energy Efficient Ethernet (EEE): if a link is inactive for a while, it will drop to a lower speed level until there is traffic again. This is mostly important for gigabit links, but according to the messages, the interface is negotiating only a 100Mbps link, so perhaps the other end of the link does not support gigabit speeds and EEE. Or if the other end should definitely be gigabit-capable, then the fact that only a 100Mbps link is being negotiated indicates that the remote end might be getting confused by rapid switches between 100Mbps and gigabit modes caused by EEE. An unexpected or too slow switch from one mode to another might cause NetworkManager's carrier-changed state. So you might try switching EEE off: ethtool --set-eee enp4s0 eee off Or it might be similar to this bug: what does this command say? cat /sys/class/net/enp4s0/device/power/control If it says auto, try this: echo "on" > /sys/class/net/enp4s0/device/power/control That tells the kernel to keep the PCIe side of the network interface powered up, instead of possibly powering it down whenever the NIC seems to be not configured for use. Worst case, it might be a hardware compatibility issue between the NIC in your new motherboard and whatever is at the other end of the network cable. I once had a 8-port DLink 10/100Mbps switch that refused to work with some new gigabit NICs.
Network Manager unable to connect to network (Debian 10 / Kernel 4.19)
1,469,709,653,000
I have a newly built computer with MSI MEG X399 CREATION Motherboard, which includes two Ethernet ports with Intel i211 Gigabit Ethernet. I am running Debian 10, but the Ethernet doesn't work. I can't ping any host: sometimes the lights on the Ethernet plug become bright, sometimes they don't and I need to restart the router, I can never get a connection. At boot, only the enp8s0 interface is visible via ifconfig, and the enp9s0 isn't, although it can be put up with ifconfig enp9s0 up). I also have tried to live boot into Ubuntu 19.04 and Kali 19.3, but the LAN isn't working. Wifi is running ok. I also downloaded the igb driver from the Intel website and compiled it myself, but still no success.
Well, I could resolve the problem. Running sudo ethtool -s enp8s0 speed 10 duplex half autoneg off I was able to get a connection (although slow and unstable). I figured out the problem was an ancient long CAT5 cable in the wall and potentially also the low quality router.
Debian 10 intel i211 LAN not working
1,469,709,653,000
I'm working on a custom board equipped with a iMX28 module and the LAN9500A USB to Ethernet controller without EEPROM for the network interface. Operating system is Linux (kernel v3.16). The LAN9500A is connected to a RJ45 jack with integrated Magnetics and LEDs. I check the reference schematics of Microchip against my design. http://ww1.microchip.com/downloads/en/DeviceDoc/9500a_sch.pdf I can see the LAN9500A is detected and correct driver is loaded..., # dmesg | grep -i smsc [ 1.549126] usbcore: registered new interface driver smsc95xx [ 2.186356] smsc95xx v1.0.4 [ 2.258622] smsc95xx 1-1:1.0 eth2: register 'smsc95xx' at usb-ci_hdrc.1-1, smsc95xx USB 2.0 Ethernet, 62:94:6a:f1:ec:26 [ 9.588663] fec 800f0000.ethernet eth0: Freescale FEC PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=800f0000.etherne:00, irq=-1) After the system is turned on, the link and activity LEDs are lit ... # ifconfig eth2 up IPv6: ADDRCONF(NETDEV_UP): eth2: link is not ready root@imx28evk:~# IPv6: ADDRCONF(NETDEV_CHANGE): eth2: link becomes ready smsc95xx 1-1:1.0 eth2: link up, 100Mbps, full-duplex, lpa 0x4DE1 IPv6: eth2: IPv6 duplicate address fe80::fa:25ff:fe59:cf38 detected! # ifconfig eth2 down LEDs are still on ... # ifconfig eth2 up smsc95xx 1-1:1.0 eth2: link up, 100Mbps, full-duplex, lpa 0xC5E1 # ifconfig eth2 down LEDs are still on ... $ ifconfig eth2 up Now the LEDs are off ... # ethtool eth2 Settings for eth2: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supported pause frame use: No Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised pause frame use: Symmetric Receive-only Advertised auto-negotiation: Yes Speed: 10Mb/s Duplex: Half Port: MII PHYAD: 1 Transceiver: internal Auto-negotiation: on Supports Wake-on: pumbag Wake-on: d Current message level: 0x00000007 (7) drv probe link Link detected: no # mii-tool eth2 eth2: no link # ifconfig eth2 down $ ifconfig eth2 up smsc95xx 1-1:1.0 eth2: link up, 100Mbps, full-duplex, lpa 0xC5E1 LEDs light up ethtool eth2 Settings for eth2: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supported pause frame use: No Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised pause frame use: Symmetric Receive-only Advertised auto-negotiation: Yes Link partner advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Link partner advertised pause frame use: Symmetric Link partner advertised auto-negotiation: Yes Speed: 100Mb/s Duplex: Full Port: MII PHYAD: 1 Transceiver: internal Auto-negotiation: on Supports Wake-on: pumbag Wake-on: d Current message level: 0x00000007 (7) drv probe link Link detected: yes # mii-tool eth2 eth2: negotiated 1000baseT-HD flow-control, link ok Another issue is that when I unplug and plug the Ethernet cable from the RJ45 socket, Linux does not detect it, ... Has anyone else seen this? I really appreciate any help you can provide.
I realize this problem has been somewhat solved in Linux Kernel 3.16.48.
LAN9500A Linux USB Ethernet Driver Problem!
1,417,084,429,000
In my server-client architecture, I multicast 100 MB files to many clients from server via satellite link. Network traversal is through 5 hops. I have the 10Mbps ( i.e. 1250 Kilo Byte per second ) bandwidth link. When I multicast the first file to many client, first hop get the incoming speed is of ~9.0 mbps but the receiver end get the speed of only ~4.2 mbps. All clients are 10mb half duplex. I can see, there is low network usage; But I don't know where exactly. If server is sending at the speed of ~9.0 mbps, then client should got the same speed. I am using the reliable UDP for multicasting. Is there any way to find out, what is the incoming and outgoing bandwidth usage of each hop (for a particular port.) ? Is there exist any tool/utility/application who can serve the purpose. All the hops are at remote location, so that going over there is not possible.
Tools Is there any way to find out, what is the incoming and outgoing bandwidth usage of each hop (for a particular port.)? Unless you own the network element, or your third-party WAN provider discloses the information, you can only estimate end-to-end available ingress and egress bandwidth along a network path. See below. Is there exist any tool/utility/application who can serve the purpose. For path "available bandwidth estimation" that I mentioned above, you should review Sally Floyd's archive of end-to-end TCP/IP bandwidth estimation tools. I am most familiar with yaz, which is based on unicast UDP packets. To see whether you are dropping packets at any given router hop (which is your bottom-line problem), you can use mtr; there is also a win-mtr client, which supports Windows. To see a simple example of how I typically troubleshoot packet drops, see my answer on SuperUser. This technique is most effective at providing visibility to packet drops at the first point where they happen (since mtr doesn't give much visibility to downstream drops beyond that point until you correct the first). A simple technique to get a rough estimate of where your drops are is to install mtr on your server and then run an mtr session to trace packet loss to a single multicast client while you are transferring your 100M file. For more precise measurements you could use iperf to saturate the network instead of your 100M file (as long as you coordinate WAN downtime appropriately with other groups in the company). Diagram The rest of my answer is going to use the following diagram for reference: In the diagram: R1 through R5 are IP routers S1 and S5 are ethernet switches The blue server on 172.16.1.0/24 represents your multicast server. C51 through C55 are examples of multicast receivers (could be any number of receivers) The specifics of the WAN between R1 and R5 usually won't matter much, we just need a baseline topology so we're on the same page. From what I can tell, you're saying that R1's interface on 172.16.1.0/24 shows about 9Mbps while you are sending the 100MB file and R5's interface on 172.16.5.0/24 shows about 4.2Mbps when clients are receiving via reliable UDP multicast. When you say reliable, I assume that means there is some kind of packet sequencing built into the multicast service, and the client application knows how to request a retransmission from the server. Diagnosis If this description is correct, there are a few likely causes: Link congestion somewhere after R1, as you asserted in your question. Performance limitations of any Rx device in the path, including R1 and R5 (such as hitting a multicast replication performance limit) You're hitting a throughput limitation of 10M half-duplex ethernet. Causes 1 or 2 would be revealed by using mtr. However, cause 3 is worthy of a bit more discussion. 10M/half links provide a maximum of 10Mbps for a unidirectional transfer. If you are sending bi-directional traffic on a 10M/half link, you will typically see substantially less than 10Mbps because of ethernet's CSMA/CD dynamics. On a half-duplex link, ethernet cannot simultaneously transmit and receive; if stations try to do this, their frames will collide, and both stations will delay retransmission for a random time. I test networks for a living. When I have tested effective bi-directional throughput of 10M/half links, I generally see between 3Mbps and 4Mbps. The numbers you're sharing above sound very similar. I don't have enough evidence to make an accusation, but I would not be surprised if your 10M/half links are the problem; particularly if the link between R5 and S5 is 10M/half.
Network issue in vsat
1,417,084,429,000
We have a PCIX board (with MIPS CPU) from some vendor and it has an RJ-45 jack on the "board-side", where the cable has an RS-232 plug on the other side. The expected protocol is clearly the same as when using a nullmodem cable between two machines. Now I am wondering whether there is some Linux or *nix flavor that allows me to substitute the cable for a standard patch cable with RJ-45 connectors on both ends (not crossed for obvious reasons)? I read that someone suggested socat for some similar use-case, but it appears that the use case is so arcane that documentation is virtually non-existent on the topic. Of course it's well possible that I simply used the wrong search terms so far. Reasoning: it's almost hard to come by devices that have a COM port nowadays, but most have an ethernet port. Also, the board is in a rather inaccessible location, so to connect to it we've been using mobile devices. And then it's even harder to find machines with COM ports. NB: I'm aware of RS-232 to USB devices, but would prefer a solution as pointed out as it seems more universal.
It's not clear exactly what you want. If you want to use your existing Ethernet port, that won't be an option for many reasons; the most fundamental being that Ethernet requires precise termination and voltage levels, the hardware on the interface (the PHY) is made to deal with that. Ethernet uses strictly +/- 0.85V and 50ohm termination impedance; RS-232 uses at a minimum +/- 3V, and could be as high as +/-25V, typically +/-12V. I imagine if you did try to connect your Ethernet port to an RS-232 line, it would fry your network interface. Socat is a whole other level, and definitely is not useful here: it's a TCP/IP communication tool: it doesn't know anything about the electrical characteristics of the underlying hardware - it could talk over an RS232 line, but it'll be talking TCP, and you'd need to talk TCP on the other side for it to work. Now, if what you're doing is designing a board, you could put an RJ45 jack with traces to a serial I/O port, which is exactly what the makers of your PCIX board have done. I've also seen Cisco routers like this. The tool you really need is an RS232->USB converter.
RJ-45 <-> RS-232, can I substitute the RS-232 side and abuse my Ethernet port as COM port?
1,417,084,429,000
I've seen lots of examples that turn the bridging machine into another router with its own DHCP server, etc. But I want to use a wired device as if it were connected directly to the original router. The bridging machine has no trouble connecting to the WiFi on its own. This answer seems to be close to what I want, but it also says, The wlan0 interface also has to be condigured to connect to your remote AP so this configuration is not be used verbatim. True to the warning, it doesn't work on its own - can't find the WiFi adapter, so it can't connect - but it doesn't say how to reestablish the original, working connection. How do I do that? /etc/wpa_supplicant/wpa_supplicant.conf is: ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 country=US network={ ssid="MyNetwork" psk="MyPassword" key_mgmt=WPA-PSK } When the WiFi works, /etc/network/interfaces is the default: # interfaces(5) file used by ifup(8) and ifdown(8) # Please note that this file is written to be used with dhcpcd # For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf' # Include files from /etc/network/interfaces.d: source-directory /etc/network/interfaces.d And the result of ifconfig: pi@FCC-FOH:~ $ ifconfig eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether b8:27:eb:4c:6c:a7 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.43.35 netmask 255.255.255.0 broadcast 192.168.43.255 inet6 fe80::c39b:c8ac:86c9:1f0e prefixlen 64 scopeid 0x20<link> inet6 2600:100a:b02f:8196:b8ae:3d20:c4d0:817c prefixlen 64 scopeid 0x0<global> ether 00:f0:00:36:1f:1a txqueuelen 1000 (Ethernet) RX packets 17 bytes 1955 (1.9 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 52 bytes 7956 (7.7 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 pi@FCC-FOH:~ $ When I try to enable the bridge, /etc/network/interfaces is: # interfaces(5) file used by ifup(8) and ifdown(8) # Please note that this file is written to be used with dhcpcd # For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf' # Include files from /etc/network/interfaces.d: source-directory /etc/network/interfaces.d auto eth0 allow-hotplug eth0 iface eth0 inet manual auto wlan0 allow-hotplug wlan0 iface wlan0 inet manual auto br0 iface br0 inet dhcp bridge_ports eth0 wlan0 And the result of ifconfig: pi@FCC-FOH:~ $ ifconfig br0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether b8:27:eb:4c:6c:a7 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether b8:27:eb:4c:6c:a7 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether 00:f0:00:36:1f:1a txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 pi@FCC-FOH:~ $
I got it! Just needed some slight tweaking from this starting point, which appears to translate one direction, but not the other. Filling in the other direction made it "click". Apparently, you can't use DHCP through this kind of bridge for reasons I still don't fully understand (wired device onto a WiFi network), but if you're okay with static addresses for the bridge and for the device, it works. Here's how I did it: Add this in /etc/network/interfaces: auto eth0 auto lo wlan0 iface lo inet loopback # We're going to play router on this interface, so set that address iface eth0 inet static address 192.168.3.1 netmask 255.255.255.0 # Setup WiFi and take a static address, so we know the context allow-hotplug wlan0 iface wlan0 inet static wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf address 192.168.2.5 netmask 255.255.255.0 gateway 192.168.2.1 # Take a second address, so we can bridge it to the single device at 192.168.3.x iface wlan0 inet static address 192.168.2.6 Add this in /etc/rc.local: # Match settings in /etc/network/interfaces IP_THIS="192.168.2.6" IP_OTHR="192.168.3.6" # Actual work echo "1" > /proc/sys/net/ipv4/ip_forward iptables -t nat -A PREROUTING -d $IP_OTHR -i eth0 -j DNAT --to-destination $IP_THIS iptables -t nat -A PREROUTING -d $IP_THIS -i wlan0 -j DNAT --to-destination $IP_OTHR iptables -t nat -A POSTROUTING -s $IP_THIS -j SNAT --to-source $IP_OTHR iptables -t nat -A POSTROUTING -s $IP_OTHR -j SNAT --to-source $IP_THIS Make sure that /etc/wpa_supplicant/wpa_supplicant.conf includes this: network={ ssid="MyNetwork" psk="MyPassword" key_mgmt=WPA-PSK } It could be there already, if you're already connected through a graphical utility, but make sure anyway. Modify as needed for your network. Set the bridged device to be static: address: 192.168.3.6 netmask: 255.255.255.0 gateway: 192.168.3.1 and its targets, if any, on the 192.168.2.x network as if it were directly on that network. It seems odd to communicate with something outside of its own subnet, but when the bridge does its translation (iptables), it comes out right. Likewise, configure anything on the main network to use the bridge's second address, not the actual address, to talk to the bridged device. Use a crossover cable to connect the device to the bridge, and after rebooting the bridge, it should "just work". (or at least it did for me) The resulting structure is: Router: addr: 192.168.2.1 ssid: MyNetwork pass: MyPassword auth: WPA2 dhcp: 100+ Target for Bridged Device addr: 192.168.2.2 Bridge addr: 192.168.2.5 (WiFi primary - used for the Bridge Machine itself) addr: 192.168.2.6 (WiFi secondary - forwards to Bridged Device) addr: 192.168.3.1 (Wired - "plays router" for Bridged Device) Bridged Device addr: 192.168.3.6 Of course, you can change these addresses as needed, but be sure to keep them all straight.
Transparent Bridge from Existing WiFi to Ethernet?
1,417,084,429,000
Is there a way to send some (non-broadcast) packets out on an Ethernet interface that doesn't have an IP address assigned to it? Thus allowing me to see which light blinks on the network switch? The issue is I have a server with three network interfaces. I know which three switch ports they are connected to, but not which interface name goes with each physical jack on the server. If they all had addresses, I could just use ping, but I was hoping to figure out which is which before I configure them. The back of the server is tough to get to, too. I'd have to move the rack. Otherwise, I could just use ethtool -p. Edit: This is on a Linux server. Ubuntu, to be specific, though I imagine this wouldn't be distro-specific.
You can use arping (from the iputils-arping package, in Ubuntu): arping -I enp0s25 10.10.10.2 will ping 10.10.10.2 using ARP on interface enp0s25, even if the interface doesn’t yet have an IP address. If you use an IP address corresponding to a machine connected to another port on your switch, you can use that to identify which port each interface is connected to: arping will switch to unicast ARP as soon as it receives a reply.
How to identify the switch port an interface is connected to?
1,417,084,429,000
I know that I can poll the link state via the SIOCETHTOOL/ETHTOOL_GLINK ioctl but this would require to endlessly request the state. The same goes for parsing /var/log/messages. So my questin is, is there any way under Linux to wait on a state change of the ethernet cable from userspace?
How about ifplugd? ifplugd is a Linux daemon which will automatically configure your ethernet device when a cable is plugged in and automatically unconfigure it if the cable is pulled. This is useful on laptops with onboard network adapters, since it will only configure the interface when a cable is really connected. (There is also netplugd, but it was discontinued.)
Wait for ethernet cable plug-in/plug-out event under Linux?
1,417,084,429,000
On Linux, the command mii-tool displays the list of Ethernet interfaces and other information. What equivalent command existson Solaris? My goal is to view all LAN networks that my Solaris machine is connected to.
On Solaris 11: dladm show-phys On older releases: kstat -c net ":::link*"
Display all network interfaces on Solaris
1,417,084,429,000
Managing NIC ring buffer sizes with ethtool is simple, for example: ethtool -G eth0 rx 4096 tx 4096 (Or replace eth0 with whatever interface you need to manage.) Doing this live is easy. Trouble is, when you do this on each slave interface that's part of a bonded interface, you mess up the bond. (The aggregator IDs will in many cases not match up afterwards the way they do before.) EDIT: I have learned this is not expected behavior. (I may update when I learn more regarding why it happened in the case I observed.) In RHEL 7, you can set the ring buffer size to come up at boot time by setting the ETHTOOL_OPTS value in /etc/sysconfig/network-scripts/ifcfg-eth0 to (for example) ETHTOOL_OPTS="-G ${DEVICE} rx 4096 tx 4096" (as per the access Red Hat article). (Caveat: I have not tested that this actually avoids the aggregator ID mismatch mentioned above.) However, for Ubuntu 18.04, there is no such obvious easy place to look. I've delved through netplan documentation, systemd network documentation, and networkd-dispatcher. A colleague of mine came up with a solution using networkd-dispatcher that seems to work, but it's not clear whether there might still be race conditions involved such that it only happens to work, rather than being guaranteed to set the ring buffer sizes before the interface bond is set up. I'll post this below (later on), but I don't know if it is THE correct answer. (Also, it's not mentioned in any systemd documentation.) So the question is: What is the systemd native way to manage ring buffer sizes for ethernet interfaces at boot-up time before those interfaces are bonded?
The systemd native way to set parameters is with a .link file (see the systemd.link manpage, however it currently doesn't have a way to set the ring buffer parameters. So AFAIK there isn't a native systemd way to do this. This will change when a new systemd with Wildcard's feature request is released with RxBufferSize and TxBufferSize options. If you're actually using /etc/network/interfaces to configure, then just use a pre-up command there. This would be my preference instead of bothering with systemd-networkd. You could set up some udev rules to match the device when it appears, and run ethtool there. This should run before systemd is informed about the device (and this before it does anything with it). You could set up a systemd service (type oneshot, just exec ethtool) to run before whichever service sets up your bond device and after the device shows up, and use that. systemd makes .device units for Ethernet devices; use systemctl list-units | grep sys-subsystem-net to find the right one (so you can have your service be Wants/After it).
What is the systemd-native way to manage NIC ring buffer sizes before bonded interfaces are set up?
1,417,084,429,000
According to a computation I did on the data from ifconfig, my ethernet connection between my router and computer averages 1298 bytes/packet for TX (close to the MTU of 1500) and only 131 bytes/packet for RX. What could cause such a large discrepancy in the average TX vs. RX packet sizes?
One possibility is that if you are sending data out predominantly, most of the packets coming back to your system will be ACKs, and those are going to be much smaller than the PUSH you're sending.
What can cause a large TX vs. RX average bytes/packet discrepancy?
1,417,084,429,000
I've recently installed Linux Mint 18.1 and I'm very new to it. Everything is fine with wifi, but I cannot access the internet via ethernet cable. When I try to connect, Chromium just says that there is no internet connection. Output of sudo ifconfig -a: enp5s0 Link encap:Ethernet HWaddr 1c:75:08:26:90:db inet addr:192.168.0.100 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::1e75:8ff:fe26:90db/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:7381 errors:0 dropped:0 overruns:0 frame:0 TX packets:7203 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1278143 (1.2 MB) TX bytes:789190 (789.1 KB) Interrupt:18 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:2 errors:0 dropped:0 overruns:0 frame:0 TX packets:2 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:98 (98.0 B) TX bytes:98 (98.0 B) wlp4s0 Link encap:Ethernet HWaddr 00:26:c6:da:7e:30 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) output of iwconfig: lo no wireless extensions. enp5s0 no wireless extensions. wlp4s0 IEEE 802.11abgn ESSID:off/any Mode:Managed Access Point: Not-Associated Tx-Power=15 dBm Retry short limit:7 RTS thr:off Fragment thr:off Power Management:off Relevant output of lspci: 04:00.0 Network controller: Intel Corporation WiFi Link 5100 05:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5764M Gigabit Ethernet PCIe (rev 10) I tried adding the following lines to /etc/network/interfaces: auto enp5s0 iface enp5s0 inet dhcp but it doesn't work. I still can't connect to the internet. Output of dmesg | tail -n 20 after plugging in the network cable: [ 41.903417] ACPI Warning: \_SB_.PCI0.PEGP.VGA_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95) [ 41.903485] ACPI Warning: \_SB_.PCI0.PEGP.VGA_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95) [ 41.903552] ACPI Warning: \_SB_.PCI0.PEGP.VGA_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95) [ 41.904761] ACPI Warning: \_SB_.PCI0.PEGP.VGA_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95) [ 42.023873] iwlwifi 0000:04:00.0: RF_KILL bit toggled to enable radio. [ 42.025694] iwlwifi 0000:04:00.0: L1 Enabled - LTR Disabled [ 42.033148] iwlwifi 0000:04:00.0: L1 Enabled - LTR Disabled [ 42.033265] iwlwifi 0000:04:00.0: Radio type=0x1-0x2-0x0 [ 43.350521] iwlwifi 0000:04:00.0: L1 Enabled - LTR Disabled [ 43.354652] iwlwifi 0000:04:00.0: L1 Enabled - LTR Disabled [ 43.354750] iwlwifi 0000:04:00.0: Radio type=0x1-0x2-0x0 [ 43.395109] IPv6: ADDRCONF(NETDEV_UP): wlp4s0: link is not ready [ 43.489583] IPv6: ADDRCONF(NETDEV_UP): wlp4s0: link is not ready [ 2299.040250] CE: hpet increased min_delta_ns to 20115 nsec [ 4705.704005] tg3 0000:05:00.0 enp5s0: Link is down [ 4713.523072] tg3 0000:05:00.0 enp5s0: Link is up at 1000 Mbps, full duplex [ 4713.523093] tg3 0000:05:00.0 enp5s0: Flow control is off for TX and off for RX [ 4779.820050] tg3 0000:05:00.0 enp5s0: Link is down [ 4786.441835] tg3 0000:05:00.0 enp5s0: Link is up at 1000 Mbps, full duplex [ 4786.441856] tg3 0000:05:00.0 enp5s0: Flow control is off for TX and off for RX output of ping -c2 8.8.8.8 PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. --- 8.8.8.8 ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1007ms EDIT output of sudo iptables -vL Chain INPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination ONE MORE EDIT output from ipconfig on Windows (it's russian language, sorry) Настройка протокола IP для Windows Адаптер PPP Internet: DNS-суффикс подключения . . . . . : IPv4-адрес. . . . . . . . . . . . : 192.168.57.121 Маска подсети . . . . . . . . . . : 255.255.255.255 Основной шлюз. . . . . . . . . : 0.0.0.0 Ethernet adapter Tunngle: Состояние среды. . . . . . . . : Среда передачи недоступна. DNS-суффикс подключения . . . . . : Ethernet adapter Подключение по локальной сети 2: DNS-суффикс подключения . . . . . : Локальный IPv6-адрес канала . . . : fe80::d5fe:d1a2:2e54:eeeb%16 Автонастройка IPv4-адреса . . . . : 169.254.238.235 Маска подсети . . . . . . . . . . : 255.255.0.0 Основной шлюз. . . . . . . . . : Адаптер беспроводной локальной сети Беспроводное сетевое соединение 2: Состояние среды. . . . . . . . : Среда передачи недоступна. DNS-суффикс подключения . . . . . : Туннельный адаптер isatap.{7B8FAF91-9786-4E2C-A66F-3387471FD72B}: Состояние среды. . . . . . . . : Среда передачи недоступна. DNS-суффикс подключения . . . . . : Туннельный адаптер isatap.{FD3701FE-07FF-4726-ACD9-38B926C34CF5}: Состояние среды. . . . . . . . : Среда передачи недоступна. DNS-суффикс подключения . . . . . :
It turns out you need to run PPPoE to connect to the Internet. The easiest way to do that is to run pppoeconf and follow the prompts. If instead you want to instead configure it by hand, it'd be something like this (taken from a working config I have): /etc/network/interfaces auto enp5s0-ppp iface enp5s0-ppp inet ppp pre-up ip link set enp5s0 up mtu 1508 # if your ISP supports provider your-isp /etc/ppp/pap-secrets Obviously, use your actual ISP-provided username and password instead of the placeholders here. The * specifies which remote this applies to, easiest to use * if you've only got one remote. "your-username" * "your-password" /etc/ppp/peers/your-isp Note this one is a little different than my file—my config has static IP addresses, so there is a local-ip: line instead of noipdefault. noipdefault noauth persist maxfail 0 mtu 1500 mru 1500 noktune defaultroute ifname enp5s0-ppp noaccomp default-asyncmap plugin rp-pppoe.so enp5s0 user "your-username"
Linux Mint and wired connection problem
1,417,084,429,000
I have two PCs directly connected like this: PC1[eth1] <-> [eth0]PC2 MTU on eth1 interface in PC1 is 9000 bytes. MTU on eth0 interface in PC2 is 2000 bytes: root@PC2:~# ip -s link show dev eth0 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 2000 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 link/ether 80:97:41:ae:f7:c9 brd ff:ff:ff:ff:ff:ff RX: bytes packets errors dropped overrun mcast 170432 696 0 0 0 0 TX: bytes packets errors dropped carrier collsns 118126 274 0 0 0 0 root@PC2:~# ip addr show dev eth0 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 2000 qdisc pfifo_fast state UP group default qlen 1000 link/ether 80:97:41:ae:f7:c9 brd ff:ff:ff:ff:ff:ff inet 192.168.11.30/24 scope global eth0 valid_lft forever preferred_lft forever inet 10.11.12.2/24 scope global eth0:temporary valid_lft forever preferred_lft forever root@PC2:~# Weird thing is that if I execute ping -M do -s 4182 -c 1 10.11.12.2 in PC1, then this package is received by PC2 and fragmented replies are sent: root@PC1:~# ping -M do -s 4182 -c 1 10.11.12.2 PING 10.11.12.2 (10.11.12.2) 4182(4210) bytes of data. 4190 bytes from 10.11.12.2: icmp_seq=1 ttl=64 time=0.397 ms --- 10.11.12.2 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.397/0.397/0.397/0.000 ms root@PC1:~# I would expect PC2 to silently drop this frame as it exceeds its MTU. However, ping -M do -s 4183 -c 1 10.11.12.2 does not receive a reply. This looks like PC2 has an interface MTU of 4210(4182 + 8 ICMP header + 20 IPv4 header) bytes and not 2000 bytes. Kernel driver for eth0 in PC2 is e1000e. How to explain this behavior?
This is the difference between MTU (Maximum Transmission Unit) and MRU (Maximum Receive Unit). Normally one expects the MTU (and MRU) to be set the same across all of the members of a single broadcast domain and therefore the difference doesn't matter, but under your misconfigured setup, it does matter. I would expect PC2 to silently drop this frame as it exceeds its MTU. You've told PC2 not to exceed 2000-byte packets when transmitting, but that doesn't forbid it from receiving something larger. It's possible the Postel principle is at work here (it depends on how exactly the driver was designed). However, ping -M do -s 4183 -c 1 10.11.12.2 does not receive a reply. It sounds like this single extra byte puts it over its MRU. Since you have not configured any MRU explicitly, this size might be a hardware limitation or a result of how the network interface hardware's internal buffers are configured when the MTU is set to 2000. Configure your MTUs correctly across a single broadcast domain and you won't run into this issue. Some routing protocols, like IS-IS, intentionally pad their Hello messages up to the MTU to make sure that all the other speakers in the broadcast domain can actually receive this packet, thus preventing the adjacency from coming up at all in the case of a misconfiguration, thus allowing you to discover the problem more readily.
interface MTU different than seen in "ip link show" output
1,417,084,429,000
I'm trying to implement a way to prevent network scans from my notebook. One of the things I want is to allow arp request to specific hosts, like my gateway. I added some rules using arptables and they seem to work (at first) arptables -A OUTPUT -d 192.168.1.30 -j DROP arptables -A INPUT -s 192.168.1.30 -j DROP This is actually blocking arp requests to this host. If I run: tcpdump -n port not 22 and host 192.168.1.38 (target host) and run: arp -d 192.168.1.30; ping -c 1 192.168.1.30; arp -n (notebook) tcpdump shows no incoming packets on the target and arp -n on the notebook show (incomplete) But if I run nmap -sS 192.168.1.30 on my notebook I get on the target host: 22:21:12.548519 ARP, Request who-has 192.168.1.30 tell 192.168.1.38, length 46 22:21:12.548655 ARP, Reply 192.168.1.30 is-at xx:xx:xx:xx:xx:xx, length 28 22:21:12.728499 ARP, Request who-has 192.168.1.30 tell 192.168.1.38, length 46 22:21:12.728538 ARP, Reply 192.168.1.30 is-at xx:xx:xx:xx:xx:xx, length 28 but an arp -n on the notebook still shows incomplete, but the nmap detects the host. I also tried using nftables and ebtables with no success. How can I prevent nmap to send arp request and finding the host?
I'll complete OP's setup: address 192.168.1.38/24 on eth0 and a gateway (not really needed) 192.168.1.1. If the setup uses Wifi rather than actual Ethernet, the first method (bridge) won't be available without additional efforts (probably easy if Access Point, very difficult to impossible if not AP). nmap uses a packet socket (type AF_PACKET) to craft ARP requests, rather than using the kernel's network stack dealing with ARP cache and resolution. arping behave similarly (and will be used instead to simplify examples). tcpdump also uses AF_PACKET to capture. By contrast even other special tools such as ping, when they merely use AF_INET, SOCK_DGRAM, IPPROTO_IP or AF_INET, SOCK_RAW, IPPROTO_ICMP rather than AF_PACKET, will be filtered by iptables. Their methods can be verified using strace -e trace=%network (as root user) on these commands. As presented in Packet flow in Netfilter and General Networking: AF_PACKET happens before (at ingress) or after (at egress) most of Netfilter's subsystems, ebtables (bridge), arptables or iptables and their equivalent nftables tables: the firewall is bypassed. tcpdump (or nmap) is able to read incoming packets because it captures them before the firewall, nmap is able to send ARP packets because it injects them after the firewall. So with a standard setup, any packet generated by nmap or any other tool using AF_PACKET can't be filtered with arptables (or iptables). There are ways to overcome this. Old method: using a bridge and ebtables It's bridging, thus in most cases not compatible with Wifi. For ebtables (or nftables using bridge family) it's usually not a problem: when the ARP or IP packet that couldn't be filtered is turned into an Ethernet frame it re-enters the network stack at an other layer. Now it's within the network stack and will be affected by all the facilities there, including bridge firewall rules created with ebtables (or nftables with a bridge family). Using a bridge thus allows to overcome the firewall bypass. Create a bridge, set eth0 as bridge port and move the addresses and routes on br0 (of course this should be done by reconfiguring the adequate network tool in use and/or not done remotely because of the temporary loss of connectivity): ip link add name br0 up type bridge ip link set dev eth0 master br0 ip addr flush dev eth0 ip addr add 192.168.1.38/24 brd + dev br0 ip route add default via 192.168.1.1 # not needed for this problem Then transform the arptables rules into ebtables rules. They'll still use INPUT and OUTPUT because these are the chains between the routing stack and (for lack of better term) the bridge stack. ebtables -A OUTPUT -p ARP --arp-ip-dst 192.168.1.30 -j DROP ebtables -A INPUT -p ARP --arp-ip-src 192.168.1.30 -j DROP One roughly equivalent nftables ruleset could be (to load with nft -f somerulefile.nft): add table bridge t # for idempotence delete table bridge t # for idempotence table bridge t { chain out { type filter hook output priority 0; policy accept; arp daddr ip 192.168.1.30 drop } chain in { type filter hook input priority 0; policy accept; arp saddr ip 192.168.1.30 drop } } (Additional filtering to limit the affected interface should probably be added.) With one of these rules in place, running concurrently two tcpdump, one on br0 one on eth0 like this: tcpdump -l -n -e -s0 -i br0 arp & tcpdump -l -n -e -s0 -i eth0 arp & will show emission on br0 but not on eth0 anymore: the ARP packet which couldn't be blocked when injected is effectively blocked by the bridge layer. If the rules are removed, both interfaces will show traffic. Likewise for the reverse test from remote: the packet will be captured on eth0 but won't reach br0: blocked. New method: nftables with netdev family and egress hook ⚠: requires Linux kernel >= 5.16 which provides the egress hook, and nftables >= 1.0.1 to use it. ingress has been available since kernel 4.2. As there's no bridge involved, there's no change of network layout needed, and this will work the same for Ethernet or for Wifi. In particular this commit presents use cases: netfilter: Introduce egress hook Support classifying packets with netfilter on egress to satisfy user requirements such as: outbound security policies for containers (Laura) filtering and mangling intra-node Direct Server Return (DSR) traffic on a load balancer (Laura) filtering locally generated traffic coming in through AF_PACKET, such as local ARP traffic generated for clustering purposes or DHCP (Laura; the AF_PACKET plumbing is contained in a follow-up commit) [...] nftables provides access to additional Netfilter hooks (not described in previous schematic) in the netdev family working at the interface level: ingress and egress. These hooks are near AF_PACKET for ingress and egress (staying fuzzy because implementations details with regard to ingress/egress and capture/injection have some subtleties): egress is able to affect packets injected at AF_PACKET. Base chains in netdev family tables must be linked to (an) interface(s). Using OP's initial setup, the previous nftables ruleset can be rewritten using the netdev family's syntax like this: add table netdev t # for idempotence delete table netdev t # for idempotence table netdev t { chain out { type filter hook egress device eth0 priority 0; policy accept; arp daddr ip 192.168.1.30 drop } chain in { type filter hook ingress device eth0 priority 0; policy accept; arp saddr ip 192.168.1.30 drop } } tcpdump won't capture any injected ARP at egress: they were dropped before. Capture at ingress still happens first: tools relying on AF_PACKET (starting with tcpdump) can still capture them (but the firewall will drop them right after). Misc: There's also tc which is able to filter AF_PACKET sockets (if the tool doesn't use the option PACKET_QDISC_BYPASS). tc is more difficult to handle. Here's a Q/A with an answer of mine (at the time I wrote it my understanding and overall explanation was less acurate) having a simple example without filter.
arptables not working with nmap
1,417,084,429,000
I'm running Alpine Linux, which is based on Busybox and musl, on Raspberry Pi. When I run ifup eth0, it also starts udhcpc in the background for that interface. That means that if the ethernet cable is connected when I run ifup, it immediatelly obtains an IP address and if it's not connected, it will spin in the background until I connect it and then it receives an IP address. However this is a one time thing. If it obtains an IP address and then I unplug the cable, it retains the IP address and if I try to make some network request, like ping google.com, it happily tries to do it via this interface until it times out. This is particularly a problem if I have more than one network interface, in which case it will keep trying to use the first one and ignore the other one, which might have internet connection. What would be a proper lightweight solution to detect that cable was disconnected or that connection was lost and deconfigure the interface and then reconfigure it once it's connected again? Just in case, here's also my /etc/network/interfaces file auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp auto eth1 iface eth1 inet dhcp
On usual systems the command ip monitor link dev ethX could be used for an event-driven method reacting to changes to the carrier state (eg: NO-CARRIER). As it's not available with busybox's minimal implementation, as described in an answer I made to the Q/A The difference between ip link down and physical link absence, the carrier state of an interface called ethX is also available at: /sys/class/net/ethX/carrier 0 means no carrier ie the NO-CARRIER flag on the interface 1 means carrier This value is available only once the interface is up (using ip link set ethX up) else an error is returned when reading it. The carrier state and the operstate are equivalent in almost all setups (this case included, see previous link for details) so it's just easier to use operstate at /sys/class/net/ethX/operstate which can return: lowerlayerdown for no-carrier (with interface up), up for carrier, down when interface is administratively down. To replace ip monitor link dev ethX one can thus periodically poll /sys/class/net/ethX/operstate to retrieve the same same information, like in the shell function below which polls about every 2 seconds the interface given as parameter and will output only changes: stateevent () { local fileoperstate=/sys/class/net/"$1"/operstate local operstate oldoperstate=$(cat "$fileoperstate") while sleep 2; do operstate=$(cat "$fileoperstate") if [ "$oldoperstate" = "$operstate" ]; then continue fi oldoperstate="$operstate" echo "$operstate" done } OP's wish is in the end to lose the routes of the disconnected interface so there's no timeout, and no clash with the dual-homed RPi (there are solutions to have two default gateways handled each in its own routing table, but it's complex especially with integration with DHCP, and would require its own approach and still require anyway the handling of carrier loss). From a few tests, it's easier to lose the address (which will also lose the routes) than just the routes, or those routes (specifically the kernel's automatic LAN route) might not recover correctly later. That means that in the rare cases the RPi is client of itself, it should not connect to its own addresses that are set by DHCP but stick for example with addresses assigned on the lo interface like 127.0.0.1 or any additional address added there. Busybox' built-in udhcpc has an useful feature to help with all this easily: Signals: USR1 Renew lease USR2 Release lease So just ask the running udhcpc to do the work itself with a simple signal: release will remove the address (the DHCP server can't be informed since the interface was disconnected, but that's not an issue), renew will add it (and the routes) back. Here's an event loop function that will do this, with events coming from the output of the previous one: eventloop () { local intf=$1 local state while read -r state; do case "$state" in lowerlayerdown) pkill -USR2 -f "(^|/)udhcpc( | .* )-i $intf( |$)" ;; up) pkill -USR1 -f "(^|/)udhcpc( | .* )-i $intf( |$)" ;; down) ;; esac done } There's nothing to do if the interface was brought administratively down (even with just ip link set eth0 down): the routes are already removed by the kernel and the LAN routes will be added back by itself later, completed by the default route with the signal sent to udhcpc once the interface is back up. You can have a shell script called manageudhcpc.sh (starting with the usual #!/bin/sh,) including the two shell functions above and ending with: stateevent "$1" | eventloop "$1" and run it twice (it will never return, so fork it): ./manageudhcpc.sh eth0 & ./manageudhcpc.sh eth1 & I leave it up to OP to: integrate this script for boot see what to do at initial startup of the interfaces, since udhcpc could behave differently when it was just started with a non-connected interface, waiting for its initial lease. Notes: tested successfully on an Alpine 3.12 and also on an Alpine edge LXC containers with two interfaces set for DHCP on two networks, the very conservative extended regex used to find the correct udhcpc might have to be changed depending on the exact Alpine version (I had to change it between 3.12 and edge, so that it works for both). Its pidfile could be used instead.
How to deconfigure/reconfigure eth interface when cable is connected/disconnected with Busybox
1,417,084,429,000
I am using a new installation of Arch Linux and whenever I boot my system I have to wait for 90 seconds as there is a start job running for my network interfaces. I installed Arch yesterday and whenever I do ip a I get that ethernet interfaces is in DOWN state. I used a wired usb tether to complete the whole installation. I just want to remove that start job process while starting. I saw a solution somewhere in Arch community that I have to disable my interface using: # systemctl disable dhcpcd@interface_name I haven't done that yet. My question is if I disable that interface will that cause any problems in future? I am not using any LAN connections now. Will that cause any problems if in future I want to use a LAN or some kind of ethernet connection? Output of uname -a: [siddharth@brightprogrammer ~]$ uname -a Linux brightprogrammer 4.19.26-1-lts #1 SMP Wed Feb 27 16:06:52 CET 2019 x86_64 GNU/Linux Output of ip a: [siddharth@brightprogrammer ~]$ ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: enp1s0f1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000 link/ether 80:fa:5b:5b:9e:47 brd ff:ff:ff:ff:ff:ff 3: wlp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 94:b8:6d:c9:57:89 brd ff:ff:ff:ff:ff:ff inet 192.168.43.201/24 brd 192.168.43.255 scope global dynamic noprefixroute wlp2s0 valid_lft 2153sec preferred_lft 2153sec inet6 2405:205:a061:4977:348c:2fe2:102:47ac/64 scope global noprefixroute valid_lft forever preferred_lft forever inet6 fe80::614a:460c:ff14:9caa/64 scope link noprefixroute valid_lft forever preferred_lft forever Output of find /etc/systemd: [siddharth@brightprogrammer ~]$ find /etc/systemd /etc/systemd /etc/systemd/journald.conf /etc/systemd/coredump.conf /etc/systemd/sleep.conf[siddharth@brightprogrammer ~]$ systemd-analyze Startup finished in 5.369s (firmware) + 1.785s (loader) + 5.214s (kernel) + 1min 33.882s (userspace) = 1min 46.252s graphical.target reached after 1min 33.882s in userspace /etc/systemd/journal-remote.conf /etc/systemd/system.conf /etc/systemd/timesyncd.conf /etc/systemd/journal-upload.conf /etc/systemd/networkd.conf /etc/systemd/system /etc/systemd/system/getty.target.wants /etc/systemd/system/getty.target.wants/[email protected] /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service /etc/systemd/system/bluetooth.target.wants /etc/systemd/system/bluetooth.target.wants/bluetooth.service /etc/systemd/system/multi-user.target.wants /etc/systemd/system/multi-user.target.wants/NetworkManager.service /etc/systemd/system/multi-user.target.wants/[email protected] /etc/systemd/system/multi-user.target.wants/wicd.service /etc/systemd/system/multi-user.target.wants/[email protected] /etc/systemd/system/multi-user.target.wants/remote-fs.target /etc/systemd/system/network-online.target.wants /etc/systemd/system/network-online.target.wants/NetworkManager-wait-online.service /etc/systemd/system/dbus-org.bluez.service /etc/systemd/system/dbus-org.wicd.daemon.service /etc/systemd/system/display-manager.service /etc/systemd/system/dbus-org.freedesktop.NetworkManager.service /etc/systemd/logind.conf /etc/systemd/user /etc/systemd/user/sockets.target.wants /etc/systemd/user/sockets.target.wants/p11-kit-server.socket /etc/systemd/user/sockets.target.wants/pipewire.socket /etc/systemd/user/sockets.target.wants/gpg-agent.socket /etc/systemd/user/sockets.target.wants/dirmngr.socket /etc/systemd/user/sockets.target.wants/gpg-agent-extra.socket /etc/systemd/user/sockets.target.wants/gpg-agent-browser.socket /etc/systemd/user/sockets.target.wants/gpg-agent-ssh.socket /etc/systemd/user/sockets.target.wants/pulseaudio.socket /etc/systemd/user/default.target.wants /etc/systemd/user/default.target.wants/xdg-user-dirs-update.service /etc/systemd/user.conf /etc/systemd/network /etc/systemd/resolved.conf Output of systemd-analyze : [siddharth@brightprogrammer ~]$ systemd-analyze Startup finished in 5.369s (firmware) + 1.785s (loader) + 5.214s (kernel) + 1min 33.882s (userspace) = 1min 46.252s graphical.target reached after 1min 33.882s in userspace Output of systemd-analyze critical-analyze : [siddharth@brightprogrammer ~]$ systemd-analyze critical-chain The time after the unit is active or started is printed after the "@" character. graphical.target @1min 33.882s └─gdm.service @1min 33.615s +265ms └─systemd-user-sessions.service @1min 33.503s +110ms └─network.target @1min 33.501s └─wpa_supplicant.service @15.761s +638ms └─basic.target @11.036s └─sockets.target @11.036s └─dbus.socket @11.036s └─sysinit.target @11.028s └─systemd-backlight@backlight:intel_backlight.service @14.008s > └─system-systemd\x2dbacklight.slice @14.006s └─system.slice @2.915s └─-.slice @2.915s Output of systemd-analyze blame : [siddharth@brightprogrammer ~]$ systemd-analyze blame 11.692s [email protected] 11.692s [email protected] 6.472s lvm2-monitor.service 4.616s wicd.service 3.222s systemd-journal-flush.service 3.188s NetworkManager.service 2.719s bluetooth.service 2.711s systemd-logind.service 1.395s systemd-sysusers.service 1.216s systemd-udevd.service 1.213s ldconfig.service 981ms udisks2.service 971ms polkit.service 649ms [email protected] 638ms wpa_supplicant.service 600ms systemd-modules-load.service 526ms systemd-tmpfiles-setup.service 501ms systemd-tmpfiles-setup-dev.service 493ms upower.service 487ms systemd-udev-trigger.service 464ms systemd-journald.service 371ms systemd-journal-catalog-update.service 338ms systemd-sysctl.service 268ms colord.service 265ms gdm.service 260ms kmod-static-nodes.service 238ms dev-sda2.swap 236ms accounts-daemon.service 142ms systemd-random-seed.service 135ms systemd-backlight@backlight:intel_backlight.service 110ms systemd-user-sessions.service 91ms [email protected] 81ms systemd-update-utmp.service 54ms systemd-remount-fs.service 48ms sys-kernel-debug.mount 35ms systemd-tmpfiles-clean.service 28ms dev-hugepages.mount 26ms [email protected] 25ms sys-kernel-config.mount 16ms [email protected] 15ms dev-mqueue.mount 9ms rtkit-daemon.service 6ms systemd-update-done.service 4ms systemd-rfkill.service 3ms sys-fs-fuse-connections.mount 2ms tmp.mount Output of systemctl status [email protected] and dhcpcd@enp1s0f1 : [siddharth@brightprogrammer ~]$ sudo systemctl status [email protected] ● [email protected] - dhcpcd on eth0 Loaded: loaded (/usr/lib/systemd/system/[email protected]; enabled; vendor pre> Active: inactive (dead) Mar 05 09:42:42 brightprogrammer systemd[1]: Dependency failed for dhcpcd on eth0. Mar 05 09:42:42 brightprogrammer systemd[1]: [email protected]: Job [email protected]/start failed with result 'dependency'. [siddharth@brightprogrammer ~]$ sudo systemctl status [email protected] ● [email protected] - dhcpcd on enp1s0f1 Loaded: loaded (/usr/lib/systemd/system/[email protected]; disabled; vendor pr> Active: inactive (dead) I recently disabled enp1s0f1. That might be the reason it is disabled. I can also provide the output of journalctl -xe but that is very large! Also I suspect that dhcpcd is somehow confused between eth0 and my enp1s0f1
I'd say it's very likely the problem you're seeing is with the [email protected] that's configured on your system. So my recommendation would be to disable it, hopefully that's enough to make that timeout during boot disappear: $ sudo systemctl disable dhcpcd@eth0 I'll go over the evidence to support that claim. There's more troubleshooting that can be done here, I'll suggest some more steps (in case you want to look further, or troubleshoot similar issues in the future.) The main evidence of the issue is the message on output of systemctl status dhcpcd@eth0 which says: Mar 05 09:42:42 brightprogrammer systemd[1]: [email protected]: Job [email protected]/start failed with result 'dependency'. Failed with result "dependency" means, in this case, it was waiting for something else, that failed. This service will have a dependency on eth0.device and this device will not appear, so that's the probable source of the timeout. You can take a look at systemctl status eth0.device to see if anything else shows up, it's possible it will (but then, it's possible it won't.) Like you mentioned in your question, there's probably a mix up between eth0 and the actual device name of enp1s0f1 in your system. systemd (more specifically udevd) will rename network interfaces to give them a consistent name and this typically happens very early at boot (sometimes even before systemd comes up), so systemd will not really see the eth0 name anymore. If you want to enable DHCP on that interface in the future, enable dhcpcd@enp1s0f1 instead. The output of systemd-analyze critical-chain supports the hypothesis of timeout on that dhcpcd@eth0 service, which you can see from these two steps: └─network.target @1min 33.501s └─wpa_supplicant.service @15.761s +638ms The times after @ are the clock times right after boot. The wpa_supplicant service came up 13s after systemd started, but network.target was only reached at 1m33s (roughly the 90s you talk about.) You would probably had seen dhcpcd@eth0 here more explicitly, but the unit actually went into the "loaded"/"inactive" state, rather than "failed", so that's probably why it isn't listed prominently here (and in systemd-analyze blame), which would have helped point it out as the culprit. Finally, one step that's usually a great start when troubleshooting systemd boot issues is to start by looking at the bare systemctl status output, which will tell you whether the system is in "degraded" state, which indicates that something failed during boot. You want to ensure the system status will be "running", so investigating those failures will typically uncover issues such as timeouts, etc. You can proceed the investigation from that point by looking at output of systemctl, which will list all active units and their status, if you see problems there, look further by investigating specific units (with systemctl status <unit> or journalctl -u <unit>.) Command systemctl --state=failed is also useful to show only the failed units. Finally, checking the journal is really good to make correlations. Command journalctl -b shows the journal since the system booted, so it's great to look into issues during boot. As mentioned before, journalctl -u <unit> is useful to investigate logs for a single unit. Hopefully these tips will be helpful to you in digging deeper and understanding what is happening in your system. Also hoping that disabling that dhcpcd@eth0 is enough to solve the boot delay you're experiencing.
A start job is running for eth0
1,417,084,429,000
Sometimes network completely fails on my server for samba shares (e.g. I could'n connect to server via ssh and samba shares were unavailable). Since there is no working solution to fix it (full description here) I wrote small script which does network restart and I guess it would help to establish connection. In case If I do systemctl restart network it works. So I need that it has to restart network automatically. The logic is if gateway is unavailable for ping (*1.121) it will check another host within LAN. Then if it won't get back response from the second host it will execute systemctl restart network. Can some review and add/remove something or propose another way to handle it? #!/bin/bash ADDR1="192.168.1.101"; ADDR2="192.168.1.5"; ACCS1=$(ping -c 1 -s 1 -w 1 $ADDR1 | grep time | awk -F ',' '{print $2}' | awk '{print $1}'); ACCS2=$(ping -c 1 -s 1 -w 1 $ADDR2 | grep time | awk -F ',' '{print $2}' | awk '{print $1}'); if [[ $ACCS1 == 0* ]]; then if [[ $ACCS2 == 0* ]]; echo "Host $ADDR2 is unavailable" >> $HOME/blackout_time.log then systemctl restart network echo "Netwotk restart time by script1 - $(date +%Y-%m-%d_%k:%M:%S)" >> $HOME/blackout_time.log sleep 20 fi fi Thanks in advance
In one compact line: ping 192.168.1.121 -c1 -s1 -w1 -q || ping 192.168.1.189 -c1 -s1 -w1 -q || systemctl restart network
Script for network restart
1,417,084,429,000
I just installed Fedora 22 alongside Windows 10 on my desktop and I've been trying to get the Ethernet to work for a long time. There is no wireless and this is my only source of internet connection on linux. I have a Intel Gigabit Ethernet - "Intel(R) Ethernet Connection (2) I218-V" on my motherboard. I don't believe it is a driver issue. I'll post the output of some commands here: [nikhil@nikhil ~]$ dmesg | grep eth [ 1.060111] e1000e 0000:00:19.0 eth0: registered PHC clock [ 1.060114] e1000e 0000:00:19.0 eth0: (PCI Express:2.5GT/s:Width x1) d0:50:99:66:37:81 [ 1.060115] e1000e 0000:00:19.0 eth0: Intel(R) PRO/1000 Network Connection [ 1.060152] e1000e 0000:00:19.0 eth0: MAC: 11, PHY: 12, PBA No: FFFFFF-0FF [ 1.060680] e1000e 0000:00:19.0 enp0s25: renamed from eth0 [root@nikhil nikhil]# ifconfig enp0s25: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet6 fe80::d250:99ff:fe66:3781 prefixlen 64 scopeid 0x20<link> ether d0:50:99:66:37:81 txqueuelen 1000 (Ethernet) RX packets 115 bytes 11437 (11.1 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 245 bytes 32940 (32.1 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 20 memory 0xf7c00000-f7c20000 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 0 (Local Loopback) RX packets 157 bytes 14355 (14.0 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 157 bytes 14355 (14.0 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 [root@nikhil nikhil]# vi /etc/sysconfig/network-scripts/ifcfg-enp0s25 HWADDR="D0:50:99:66:37:81" TYPE="Ethernet" BOOTPROTO=dhcp DEFROUTE="yes" IPV4_FAILURE_FATAL="no" IPV6INIT="yes" IPV6_AUTOCONF="yes" IPV6_DEFROUTE="yes" IPV6_FAILURE_FATAL="no" NAME="enp0s25" UUID="7c57db7e-4bb3-473e-9dd6-ee548033bef8" ONBOOT="yes" PEERDNS=yes PEERROUTES=no IPV6_PEERDNS=yes IPV6_PEERROUTES=yes Running the command dhclient enp0s25 seems to just hang with no output. Any help would be appreciated.
I'm not sure the symptoms of your problem are the same, but I had some similar issues with dual booting recently. Is your network connection fine in Windows? I had issues where I would install Linux, network would be fine, then would reboot into Windows, network would be fine, then reboot into Linux, eth0 wouldn't connect. Turns out that Windows sets some wake on LAN properties of the Intel 1218-V network connection that confuses the e1000e module. I fixed my problem by disabling all the wake on LAN options for the network connection from within the driver properties dialog in Windows. Good luck! From here: https://bbs.archlinux.org/viewtopic.php?id=191981
Trying to get Ethernet working in Linux
1,417,084,429,000
I set up CentOS yet. it's no network connection. eth0 is not device list. I take a message network is unreachable while ping 192.168.0.1 the screen shot of device list How can I do reachable network?
Your Ethernet port is called enp2s0, not eth0. This naming system is called Predictable Network Interface Naming and details are available here. Check the file /etc/sysconfig/network-scripts/ifcfg-enp2s0, which should be similar to the following: DEVICE='enp2s0' TYPE=Ethernet BOOTPROTO=none ONBOOT='yes' IPADDR=a.b.c.d NETMASK=255.255.255.0 GATEWAY=a.b.c.1 NM_CONTROLLED='yes' DNS1=8.8.4.4 DNS2=8.8.8.8 (a.b.c.d is your IP address) Or, if you're using DHCP: DEVICE='enp2s0' TYPE=Ethernet BOOTPROTO=dhcp ONBOOT='yes' NM_CONTROLLED='yes' Once you've checked/edited the file above, restart networking with: systemctl restart network.service
eth0: ERROR while getting interface flags: No such device [duplicate]
1,417,084,429,000
I actually wanted to post the below as an answer to this question titled: ifup eth0 timeout during boot. But am not sure if this is right approach or it's a way of screwing up things badly. We can actually check if the network cable is connected to the machine, or not, by running the command, grep "" /sys/class/net/eth0/carrier When the network cable is plugged in, the output would be 1 for the above command and when it is not plugged in, the output would be 0 for the above command. I tested the above part in my system and it worked fine as expected. Now the question lies in how to include this condition on startup. We can include this in the network startup file, which can check this condition before bringing up the interfaces. In RHEL box the file /etc/sysconfig/network-scripts/ifcfg-eth0 is used to bring up the network interfaces. So, If I change the file to look like, cable=$(grep "" /sys/class/net/eth0/carrier) if $cable -eq 1 then #rest of the /etc/sysconfig/network-scripts/ifcfg-eth0 as it is. else break However, before proposing this method, or even trying on my machine, my question is: When the services are being brought up will the /sys/class/net/eth0/carrier be ready and available? Assuming this approach works, if I decide to use wireless network will there be a problem?
Unfortunately, the interface has to be up for the above suggested method to work. I made the changes in my file as I suggested in the question and ended up receiving the error as "Invalid argument". So, I believe the interface should be up to query if the wired connection is available or not. I also found more useful information for this answer: How to detect the physical connected state of a network cable/connector?. cat /sys/class/net/ethX is by far the easiest method. The interface has to be up though, else you will get an invalid argument error. So first: ifconfig ethX up Then: cat /sys/class/net/ethX
Check for plugged in network cable on startup
1,417,084,429,000
I have an acer aspire 7551 laptop running windows 7 and I've successfully used wubi to also install ubuntu (the latest release version). Wireless works fine on windows 7, but neither wireless nor ethernet works on ubuntu. In particular, the wireless icon shows up at the top-right (but no available connections show up when I click the icon). When I connect my ethernet cable (which works fine when I plug it into my PC) to my laptop when it's running ubuntu and click the wireless icon, auto-etho shows up as an option but when I click it, it works for a few seconds and then disconnects. (Note - ethernet also doesn't work in windows 7 even though all the latest drivers are installed) How can I get wireless and ethernet to work under ubuntu? Additional Info Ubuntu version: "Ubuntu 10.0 - the Maverick Meerkat" lspci output: 00:00.0 Host bridge: Advanced Micro Devices [AMD] RS780 Host Bridge Alternate 00:01.0 PCI bridge: Acer Incorporated [ALI] Device 9602 00:04.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (PCIE port 0) 00:05.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (PCIE port 1) 00:11.0 SATA controller: ATI Technologies Inc SB700/SB800 SATA Controller [AHCI mode] 00:12.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller 00:12.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller 00:13.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller 00:13.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller 00:14.0 SMBus: ATI Technologies Inc SBx00 SMBus Controller (rev 41) 00:14.1 IDE interface: ATI Technologies Inc SB700/SB800 IDE Controller (rev 40) 00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA) (rev 40) 00:14.3 ISA bridge: ATI Technologies Inc SB700/SB800 LPC host controller (rev 40) 00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge (rev 40) 00:18.0 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor HyperTransport Configuration 00:18.1 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Address Map 00:18.2 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor DRAM Controller 00:18.3 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Miscellaneous Control 00:18.4 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Link Control 01:05.0 VGA compatible controller: ATI Technologies Inc M880G [Mobility Radeon HD 4200] 01:05.1 Audio device: ATI Technologies Inc RS880 Audio Device [Radeon HD 4200] 03:00.0 Ethernet controller: Broadcom Corporation NetLink BCM57780 Gigabit Ethernet PCIe (rev 01) 06:00.0 Network controller: Broadcom Corporation BCM43225 802.11b/g/n (rev 01) ifconfig -a output: eth0 Link encap:Ethernet HWaddr 20:6a:8a:1c:70:0e UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:16 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:76 errors:0 dropped:0 overruns:0 frame:0 TX packets:76 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:5840 (5.8 KB) TX bytes:5840 (5.8 KB)
I have the same network hardware in my laptop running Ubuntu 10.10 Maverick. For the wireless adapter, you need the binary Broadcom STA proprietary drivers. Ubuntu should prompt you to install them when you first start, but if you're lacking a network connection, that might be why it's not working. Fortunately, the stuff you need is on the 10.10 installation disk. Here are the simplest gui steps: 1) insert the disk, and navigate to it in the file browser (nautilus) 2) navigate into the folder called pool, and then go into main, and then d. Install dkms_2.1.1.2-3ubuntu1_all.deb from the dmks folder, by double-clicking on it. 3) install /pool/main/p/patch/patch_2.6-2ubuntu1_amd64.deb by the same process 4) install /pool/main/f/fakeroot/fakeroot_1.14.4-1ubuntu1_amd64.deb 5) finally, install /pool/restricted/b/bcmwl/bcmwl-kernel-source_5.60.48.36+bdcom-0ubuntu5_amd64.deb if you restart, you should (fingers crossed!) be okay now. The wired ethernet not working is odd - never seen that. If it doesn't work under Windows either, I'd suggest a hardware problem is likely there. edit: the deb filenames above are for the 64bit version. For the i386 ones, just replace _amd64 with _i386. You'll find the files you're looking for :)
How can I get wireless and ethernet to work with ubuntu?
1,417,084,429,000
For processor usage, we can use top or htop. For internet status, I would like to know the current TX/RX status, any command/tool to use?
Use nload. From its manpage: nload is a console application which monitors network traffic and bandwidth usage in real time. It visualizes the in- and outgoing traffic using two graphs and provides additional info like the total amount of transfered data and min/max network usage. Another tool that you could find useful is iptraf. From Wikipedia: [...] IPTraf has the following characteristics: IP traffic monitor displays information about network traffic. General statistics Interfaces. LAN statistics module that discovers host and displays data about their activity. Monitor TCP, UDP account showing the network packets for port connections of applications. Use the "raw socket interface" that takes kernel allowing it to be used by a wide range of "network cards". [sic]
What tool can check internet TX/RX status as top/htop?
1,543,697,175,000
I want to assign multiple IP4 addresses to a USB->Ethernet adapter in an Ubuntu 18.04 LTS system. I have removed netplan, since I find the yaml-based configuration even more obscure than the traditional way of configuring the network. Since I want the extra addresses to be permanent, I put them into /etc/network/interfaces, as described here as "Legacy method". Adding extra IP4 addresses to a "fixed" ethernet interface works, but the same doesn't work with the USB-to-Ethernet dongle. I'm puzzled as to what the difference is. EDIT: I was asked to share my interfaces file. Here it is: auto lo iface lo inet loopback auto eno1 iface eno1 inet static address 192.168.2.6 netmask 255.255.255.0 broadcast 192.168.2.255 offload-gro off offload-gso off offload-tso off auto enx000ec6fe56fb iface enx000ec6fe56fb inet static address 192.168.31.6 netmask 255.255.255.0 broadcast 192.168.31.255 gateway 192.168.31.1 offload-gro off offload-gso off offload-tso off auto enx000ec6fe56fb:0 iface enx000ec6fe56fb:0 inet static address 192.168.31.4 netmask 255.255.255.0 auto eno1:0 iface eno1:0 inet static address 192.168.2.4 netmask 255.255.255.0 As you can see, I introduce a virtual IP interface for each of the real interfaces. eno1 is a plain Ethernet interface on the mainboard, while enx000ec6fe56fb is a USB-to-Ethernet dongle. The virtual interface for eno1 works, the other doesn't.
Because ifupdown is deprecated since the Ubuntu 17.10 release (the /etc/network/interfaces file is used by ifupdown), you should reinstall netplan on your system and remove the ifupdown package. There is how to configure a multiple IP address for a network interface using the following example from the official website :Multiple addresses on an interface. sudo nano /etc/netplan/your-config-file.yaml : network: version: 2 renderer: NetworkManager ethernets: enp3s0: addresses: - 10.100.1.38/24 - 10.100.1.39/24 gateway4: 10.100.1.1 Test and apply the new configuration: sudo netplan generate sudo netplan try sudo netplan apply See: MigratingToNetplan Deprecate ifupdown in Ubuntu for the 17.10 release.
Can't permanently assign additional IP addresses to USB ethernet adapter via /etc/network/interfaces. Why?
1,543,697,175,000
I connect my Linux laptop to an Onkyo P-3000R (a USB DAC) using a 10 meter USB cable. I would like to replace that long USB cable with a WiFi connection, if possible. I could connect my Onkyo USB device to a WiFi router using a short cable. I could also possibly connect the USB device to a server on my LAN using USB over IP. On my laptop I'm using PulseAudio and I manage my audio devices using Phonon on KDE. My initial research turned up this Linux project: usbip What are the steps required to use usbip to accomplish my goal?
You need to install the usbip server on the computer the real USB device is connected to. If that is your Wifi router, you need to be root on the router, and you need to be able to install custom software (or have installed a firmware which provides the usual Linux software as packages, e.g. OpenWRT, DD-WRT etc. This is probably easier then messing with a rooted proprietary firmware.). On the laptop, you need to install the usbip client. The Onkyo will than show up as USB device on the laptop, so it doesn't matter how you manage audio devices. More detailed installation instructions shouldn't be hard to find with a bit of googling. If you get stuck, edit the question and describe what you've done and where you got stuck. Another option is to install Pulseaudio on the Wifi-Router (again, that needs open firmware), configure it to use the Onkyo, and also configure one of the various Pulseaudio ways for remote audio access (RTP, RAOP, whatever; see Pulseaudio modules. In a similar way, configure Pulseaudio on your laptop. Then you'll have an additional "remote" sink on your Laptop, which you can use like a local sink.
Share USB audio device over Ethernet [closed]
1,543,697,175,000
I have a Debian workstation with two interfaces: the ethernet jack attached to the motherboard (eth0), and a USB to ethernet adapter (eth6). eth0 connects to the internet, while eth6 connects to some special equipment only accessible over ethernet. When the workstation starts, it connects to eth6 by default; when this happens the workstation cannot reach the internet and I must choose to connect to eth0 from the network manager. I would like it to connect to eth0 by default. How can I do this?
You just need to set the default gateway to the correct interface. It should be configured in your GUI (Network Manager for example) or if you feel a bit geeky, you can configure it in your /etc/network/interfaces This is a minimal configuration example for your /etc/network/interfaces file: auto eth0 iface eth0 inet static address 192.168.0.100 netmask 255.255.255.0 gateway 192.168.0.1 dns-nameserver 192.168.0.1 8.8.8.8 You need to replace the values with your personal network settings. Make sure not to set two gateways at the same time. This will cause problems and is only possible if you use different routing tables. Edit: Don't use DHCP on eth6 should work as well. Configure just an IP address in your Network Manager and leave eth0 as it is.
Setting default network interface?
1,543,697,175,000
I have a computer running centOS 7 and Gnome 3.2 and everytime the computer boots it boots with airplane mode enabled and the ethernet interface disabled. I've been looking for a solution but I cannot find a proper way to disable it. I've noticed that both the Airplane mode and the ethernet interfaced can be enabled at the same time. Basically what I want is for my computer to be connected to the internet as soon as it boots. Thanks for the help.
This helps in debian gsettings set org.gnome.settings-daemon.plugins.rfkill active false
Permanently disable airplane mode gnome 3.2
1,543,697,175,000
I have two Ethernet-wired connected devices. I gave to both of them address from same sub-network. As result I can see second device in arp-table of the first. $ arp -a ? (128.247.77.90) at 10:60:4b:4b:29:50 [ether] on eth0 But ping always fails. $ ping 128.247.77.90 PING 128.247.77.90 (128.247.77.90) 56(84) bytes of data. From 128.247.77.158 icmp_seq=9 Destination Host Unreachable First device is a laptop. It's a host. Second is a tablet under u-boot. I have to get a file from a host via TFTP. This protocol fails too because of ICMP. Here are all packets that Wireshark caught. What is the reason of this problem?
The problem was with configuration of tftpd-hpa server on host. According to guide the file /etc/default/tftpd-hpa must be something like: TFTP_USERNAME="tftp" TFTP_DIRECTORY="/home/bogdan_liulko/tftp" TFTP_ADDRESS="0.0.0.0:69" TFTP_OPTIONS="--secure --create" RUN_DAEMON="yes" My problem was that my file didn't contain --create parameter in TFT_OPTIONS. And right after all steps from guide were done everything started work properly.
ICMP - Destination unreachable (Port unreachable)
1,543,697,175,000
I have to transition between different networks quite often using a laptop and various docking stations. If I remove my laptop from a certain network and place it again on the same network then no issues arise. It is when I move to a different network that I have problems. Although not in any way a dire issue, I just find it moderately annoying. The problem: When I migrate to a different network I must bring down my Ethernet interface and then immediately bring it back up in order for Network Manager to properly perform DHCP transactions. Can anything be done to configure Network Manager in such a way that it does this automatically, or must I resort to a script that is run upon connecting to a new network? If the latter, how can this event be captured? EDIT Further details: The docking station is this one. The Ethernet port is on the dock itself and I think the interface is a PCI bus. I am not sure if the Ethernet interface in the dock is independent of the one on the laptop (i.e. an independent NIC -- how can I verify this?; Dmesg seems to indicate this), but this may be the source of the problem. If this is true, perhaps the independent NIC connection and removal is not handled in the same way as connecting and disconnecting of just the Ethernet cable? I imagine this can be handled with a simple udev rule per the comments below, but any details of Network Manager's handling of this event is helpful. Dmesg dump of an ejection and reconnection to the docking station: [28240.030058] pci_bus 0000:03: Allocating resources [28240.030232] pci_bus 0000:04: Allocating resources [28240.030403] pci_bus 0000:05: Allocating resources [28240.030488] pci_bus 0000:06: Allocating resources [28240.030577] pci_bus 0000:0e: Allocating resources [28240.030721] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28240.031797] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28240.032764] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28240.033674] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28240.035654] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28240.036365] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28240.037290] acpi device:41: Cannot transition to power state D3cold for parent in (unknown) [28240.037931] pci_bus 0000:01: Allocating resources [28240.038001] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28240.039031] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28240.040743] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28242.258694] iwlwifi 0000:03:00.0: RF_KILL bit toggled to enable radio. [28243.951117] usb 3-13: new high-speed USB device number 35 using xhci_hcd [28244.041718] atkbd serio0: Spurious ACK on isa0060/serio0. Some program might be trying to access hardware directly. [28244.111432] usb 3-13: New USB device found, idVendor=413c, idProduct=2513 [28244.111442] usb 3-13: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [28244.112626] hub 3-13:1.0: USB hub found [28244.112707] hub 3-13:1.0: 3 ports detected [28244.351559] usb 3-4: new high-speed USB device number 36 using xhci_hcd [28244.479863] usb 3-4: New USB device found, idVendor=413c, idProduct=2513 [28244.479871] usb 3-4: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [28244.481083] hub 3-4:1.0: USB hub found [28244.481346] hub 3-4:1.0: 3 ports detected [28244.752072] usb 3-4.1: new low-speed USB device number 37 using xhci_hcd [28244.843741] usb 3-4.1: New USB device found, idVendor=0461, idProduct=4d81 [28244.843753] usb 3-4.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0 [28244.843782] usb 3-4.1: Product: USB Optical Mouse [28244.844395] usb 3-4.1: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes [28244.848841] input: USB Optical Mouse as /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4.1/3-4.1:1.0/0003:0461:4D81.000C/input/input31 [28244.849518] hid-generic 0003:0461:4D81.000C: input,hidraw3: USB HID v1.11 Mouse [USB Optical Mouse] on usb-0000:00:14.0-4.1/input0 [28244.936269] usb 3-4.2: new low-speed USB device number 38 using xhci_hcd [28245.047569] usb 3-4.2: New USB device found, idVendor=413c, idProduct=2003 [28245.047583] usb 3-4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [28245.047588] usb 3-4.2: Product: Dell USB Keyboard [28245.047613] usb 3-4.2: Manufacturer: Dell [28245.048142] usb 3-4.2: ep 0x81 - rounding interval to 128 microframes, ep desc says 192 microframes [28245.054933] input: Dell Dell USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4.2/3-4.2:1.0/0003:413C:2003.000D/input/input32 [28245.055824] hid-generic 0003:413C:2003.000D: input,hidraw4: USB HID v1.10 Keyboard [Dell Dell USB Keyboard] on usb-0000:00:14.0-4.2/input0 [28247.729209] e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx [28249.870893] acpi PNP0401:00: Already enumerated [28250.807344] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28250.807904] pci_bus 0000:02: Allocating resources [28250.807917] pci_bus 0000:03: Allocating resources [28250.807962] pci_bus 0000:04: Allocating resources [28250.807972] pci_bus 0000:05: Allocating resources [28250.807982] pci_bus 0000:06: Allocating resources [28250.807993] pci_bus 0000:0e: Allocating resources [28250.808003] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28250.808210] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28250.808378] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28250.808547] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28250.808851] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28250.808988] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28250.809166] acpi device:41: Cannot transition to power state D3cold for parent in (unknown) [28250.809259] pci_bus 0000:01: Allocating resources [28250.809295] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28250.809423] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28250.809660] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28250.851406] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28250.851931] pci_bus 0000:02: Allocating resources [28250.851945] pci_bus 0000:03: Allocating resources [28250.851983] pci_bus 0000:04: Allocating resources [28250.851992] pci_bus 0000:05: Allocating resources [28250.852002] pci_bus 0000:06: Allocating resources [28250.852011] pci_bus 0000:0e: Allocating resources [28250.852021] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28250.852209] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28250.852374] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28250.852532] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28250.852809] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28250.852943] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28250.853077] acpi device:41: Cannot transition to power state D3cold for parent in (unknown) [28250.853158] pci_bus 0000:01: Allocating resources [28250.853195] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28250.853315] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28250.853530] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28250.895446] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28250.895962] pci_bus 0000:02: Allocating resources [28250.895974] pci_bus 0000:03: Allocating resources [28250.896011] pci_bus 0000:04: Allocating resources [28250.896021] pci_bus 0000:05: Allocating resources [28250.896030] pci_bus 0000:06: Allocating resources [28250.896039] pci_bus 0000:0e: Allocating resources [28250.896049] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28250.896229] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28250.896384] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28250.896533] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28250.896807] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28250.896935] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28250.897067] acpi device:41: Cannot transition to power state D3cold for parent in (unknown) [28250.897143] pci_bus 0000:01: Allocating resources [28250.897177] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28250.897295] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28250.897506] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment [28252.727010] iwlwifi 0000:03:00.0: RF_KILL bit toggled to disable radio.
Appearantly ifpugd doesn't really look for the interface hardware being removed. I noticed the device in enumerated as eth0 when you plug the dock in. New udev policies should prevent different devices from showing up as the same name. http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/ I would guess that if Predictable Network Interface names are enabled, the network manager would see you are on a different network and take appropriate action. The alternative is to dump udev / uevents and set up a custom rules based on the new ethernet iterface coming up.
Network Manager does not handle switching between networks by default
1,543,697,175,000
I am installed Manjaro Linux 15.09 which is based on Arch Linux, but Ethernet is not working, although WIFI is. How can I solve this problem? Information of my system: output of lspci Output of uname -r: 4.1.8-1-MANJARO output of lsusb Please tell me if you need more information... my laptop is = Lenovo Z50-70, but Ethernet works fine on Ubuntu 15.10
I found the package in extra repo of Manjaro Linux called linux41-r8168 for R8168 driver pacman -S linux41-r8168
unable to connect ethernet on manjaro linux
1,543,697,175,000
I'm looking if it's possible to give rights, to only allow the use of one network interface to a specific user on a Linux distribution. My use case: I want, for my studies, testing the interconnection between about 30 servers, all listening on the same port. For now, I can only launch 7-8 VM and on them my server scripts due to physical material limitations. Even if I'm using a low resource consumption Linux distribution (like SliTaz). The scripts are requiring that I have multiple interfaces because they listening all on the same port. What I think it can be possible to do, is duplicate an Ethernet interface on a single VM (30 times), create 30 different users, set for each user a different Ethernet interface and launch my server script on each user. Script will listen on each interface available, either a single interface available per user. My script is about 5Mo in RAM, so I don't have to launch 30*128Mo of VM and I can more easily create users, than duplicate VM, set MAC address and IPs on each VM. I did see that it's possible to create multiple interfaces. How can I set rights on anetwork interface for a specific user? Or is there a better solution for this problem?
You should consider the possibility of using less resource-intensive virtualization options. The one I have in mind for your problem is the "network namespace", for which you find a simple yet sufficient introduction here. With this minimalistic virtualization scheme, you endow each shell with exactly one (virtual!) NIC, no more no less. The overhead is the creation of a new shell per user, and you maintain the availability of all of your programs. You can then start different instances of the same program listening on the same port, of different interfaces.
Multiple Lan interfaces on one VM rather than multiple VM
1,543,697,175,000
I installed Scientific Linux 6.2 x86 in VirtualBox on Windows 7 x64. The adapter is Adapter 1: Paravirtualized Network (Bridged adapter, Marvell Yukon 88E8056 PCI-E Gigabit Ethernet Controller) promiscuous mode: Deny But this adapter does not get ip address. [root@server ~]# ifconfig -a eth1 Link encap:Ethernet HWaddr 00:40:5A:33:F2:92 inet6 addr: fe80::240:5aff:fe33:f292/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:5 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:398 (398.0 b) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:16 errors:0 dropped:0 overruns:0 frame:0 TX packets:16 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:960 (960.0 b) TX bytes:960 (960.0 b) The list of /etc/sysconfig/network-scripts [root@server network-scripts]# ls ifcfg-eth0 ifdown-eth ifdown-ppp ifup-aliases ifup-isdn ifup-routes net.hotplug ifcfg-eth1 ifdown-ippp ifdown-routes ifup-bnep ifup-plip ifup-sit network-functions ifcfg-lo ifdown-ipv6 ifdown-sit ifup-eth ifup-plusb ifup-tunnel network-functions-ipv6 ifdown ifdown-isdn ifdown-tunnel ifup-ippp ifup-post ifup-wireless ifdown-bnep ifdown-post ifup ifup-ipv6 ifup-ppp init.ipv6-global And ifcfg-eth1 is DEVICE=eth1 HWADDR=00:40:5a:33:f2:92 NM_CONTROLLED=yes ONBOOT=no BOOTPROTO=dhcp TYPE=Ethernet USERCTL=no PEERDNS=yes IPV6INIT=no Please let me know how to get eth1's IP address 192.168.0.x.
Well, just enter the IP address yourself: ifconfig eth1 192.168.0.x If it doesn't work, go into the setting of the specific virtual drive and enable your network option through one of your virtual adapters.
Configure a bridged Ethernet adapter in a VirtualBox guest running Scientific Linux
1,543,697,175,000
I tried to tap into Belkin Home Base (model #F5L049au) print server. I want to access a printer hosted by it. I set it up as a CUPs printer with the below specifications: Description: Via Belkin @ 192.168.1.10 Location: Peter's Bedroom Driver: Brother HL-4050CDN BR-Script3 (color, 2-sided printing) Connection: socket://192.168.1.10 Defaults: job-sheets=none, none media=iso_a4_210x297mm sides=one-sided I attempt to print and get an error: 'Printer may not be connected' But it definitely is connected and I just printed from a Windows machine elsewhere on the network. (Aside: On Windows, the Belkin print server-hosted resources are managed in a dedicated control panel, which obviously is not made to work with Linux.) If you require other information, tell me what and how to retrieve it and it shall be posted in this space also. Please help me to access the printer Brother HL-4050CDN via the Belkin print server. 192.168.1.10 appears to be the print server's address, so in my failed attempt to set up the printer above I use IPP protocol. The print server has 4 ports, so the 4 variations below are an attempt to contact the printer on all 4 ports. I'm not even sure which port the printer is occupying in terms of 9100, 9101, 9102 or 9103. The print server itself responds to pings: peter@Peter-OldPC:~$ ping 192.168.1.10:9100 ping: unknown host 192.168.1.10:9100 peter@Peter-OldPC:~$ ping 192.168.1.10:9101 ping: unknown host 192.168.1.10:9101 peter@Peter-OldPC:~$ ping 192.168.1.10:9102 ping: unknown host 192.168.1.10:9102 peter@Peter-OldPC:~$ ping 192.168.1.10:9103 ping: unknown host 192.168.1.10:9103 peter@Peter-OldPC:~$ ping 192.168.1.10 PING 192.168.1.10 (192.168.1.10) 56(84) bytes of data. 64 bytes from 192.168.1.10: icmp_seq=1 ttl=64 time=7.73 ms 64 bytes from 192.168.1.10: icmp_seq=2 ttl=64 time=1.37 ms 64 bytes from 192.168.1.10: icmp_seq=3 ttl=64 time=1.32 ms 64 bytes from 192.168.1.10: icmp_seq=4 ttl=64 time=1.29 ms 64 bytes from 192.168.1.10: icmp_seq=5 ttl=64 time=1.32 ms 64 bytes from 192.168.1.10: icmp_seq=6 ttl=64 time=1.51 ms ... @Caleb
Based on comments, it looks like you are using the wrong printer driver. Your are printing to a Belkin F5L049au print server, but you are trying to talk to it as if it understood the custom Brother language. The print server is doing some magic to convert your documents to print over USB to whatever device you have connected. You could probably fix this using a generic postscript driver instead of the Brother custom one so that the print server understood the instructions. However I would suggest that you've made the situation move complex than it needs to be. Your printer already has a network interface and does not need a print server device at all. Simply connect the printer directly to the network and let Linux and Windows both print to it directly over the network. You will be able to use all the custom Brother functions like settings for the duplexer from both Operating Systems and there will be no driver funkiness because of the protocol translation happening at the middle-man print-server.
Cannot connect to printer hosted on a Belkin print server
1,543,697,175,000
I have a linux box and has ethernet, wlan STA/client and wlan Access Point. It's a internet connection via ethernet and I can log in to the box via ssh. But I wish to use the box like a wireless router and be able to connect to internet by using for example a smart phone. I can connect my phone to wifi but it has no internet access. Here are my interfaces: eth0 is Ethernet eth1 and eth2 is WLAN # ifconfig br0 Link encap:Ethernet HWaddr 00:15:BC:22:17:20 inet addr:10.10.1.116 Bcast:10.10.1.255 Mask:255.255.255.0 inet6 addr: fe80::215:bcff:fe22:1720/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6377 errors:0 dropped:608 overruns:0 frame:0 TX packets:615 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:865911 (845.6 KiB) TX bytes:59751 (58.3 KiB) eth0 Link encap:Ethernet HWaddr 00:15:BC:22:17:20 inet6 addr: fe80::215:bcff:fe22:1720/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6417 errors:0 dropped:6 overruns:0 frame:0 TX packets:623 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:985364 (962.2 KiB) TX bytes:60399 (58.9 KiB) eth1 Link encap:Ethernet HWaddr 00:15:BC:22:17:21 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) eth2 Link encap:Ethernet HWaddr 02:15:BC:22:17:21 inet addr:192.168.2.10 Bcast:192.168.2.255 Mask:255.255.255.0 inet6 addr: fe80::15:bcff:fe22:1721/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:502 errors:0 dropped:3 overruns:0 frame:0 TX packets:236 errors:0 dropped:8 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:44998 (43.9 KiB) TX bytes:24874 (24.2 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:164 errors:0 dropped:0 overruns:0 frame:0 TX packets:164 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:13525 (13.2 KiB) TX bytes:13525 (13.2 Ki B) And here is /etc/network/interfaces file: auto lo iface lo inet loopback iface eth0 inet manual iface eth1 inet dhcp iface eth2 inet dhcp iface br0 inet dhcp hostname gw-143A bridged_ports eth0 Wireless: # iwconfig tap0 no wireless extensions. lo no wireless extensions. br0 no wireless extensions. eth2 IEEE 802.11-bgn Mode:Master Frequency:2.457 GHz eth1 IEEE 802.11-bgn ESSID:"" Mode:Managed Frequency:2.437 GHz Access Point: Not-Associated Bit Rate:0 kb/s RTS thr:off Fragment thr:off Encryption key:9F64-0D78-CCAB-A8 [3] Power Management:off Link Quality:0 Signal level:0 Noise level:0 Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0 sit0 no wireless extensions. eth0 no wireless extensions.
In order for your linux box to act as a WLAN access point, you will need to: make sure your wireless NICs use a driver which supports AP. Output of lsmod | grep 80211 usually helps. If your driver doesn't support AP mode, you'll have to get a new WLAN adapter which does. make sure your kernels supports IP forwarding and enable it. This is usually done by running echo 1 > /proc/sys/net/ipv4/ip_forward as root. configure routing tables to forward network packets from br0 to eth2: sudo iptables -t nat -A POSTROUTING -o br0 -j MASQUERADE sudo iptables -A FORWARD -i br0 -o eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT sudo iptables -A FORWARD -i eth2 -o br0 -j ACCEPT install and configure an access point management software. configure a DHCP server which would assign your phone an IP address, if this is not already done.
WLAN connected but no internet access
1,543,697,175,000
I've got an embedded/headless Debian Linux box which boots from a read-only filesystem image. The configuration is set up so that I can (seemingly) write to the filesystem, but any changes to the filesystem do not actually get written to the flash device and thus do not survive a reboot. This box has an on-motherboard Ethernet interface (Intel 82571EB) that uses the e1000e Linux driver: root@embedded:~# lspci -v [...] 07:00.0 Ethernet controller: Intel Corporation 82571EB Gigabit Ethernet Controller (rev 06) Subsystem: Intel Corporation PRO/1000 PT Dual Port Server Adapter Flags: bus master, fast devsel, latency 0, IRQ 45 Memory at fc600000 (32-bit, non-prefetchable) [size=128K] I/O ports at 4000 [size=32] Capabilities: [c8] Power Management version 2 Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+ Capabilities: [e0] Express Endpoint, MSI 00 Kernel driver in use: e1000e [...] As a way to understand the e1000e driver a bit better (and perhaps find and fix a bug that I suspect might be lurking in it), I've compiled my own instrumented version of the e1000e.ko kernel extension file and I would like to try it out. I can scp my e1000e_instrumented.ko file to the Linux box, but I'm not sure what the proper way is to disassociate the OS's built-in e1000e driver from the 82571EB Ethernet controller and then tell Linux to use my custom .ko file instead. (If it was a desktop-style Linux PC, I think I could do it by copying my file over the existing /lib/modules/3.8.13/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko file and then rebooting... but on this machine any changes I make will go away when I reboot the machine, so I think I need a technique that does not involve a reboot) What is the proper way to do this in Debian Linux? As an initial test, I tried: modprobe -r e1000e ; modprobe e1000e ... just to see if I could remove the built-in driver and then re-load it again, but doing that just kills the networking on the Linux box and doesn't bring it back.
You need to run ifup -a to bring up the network interfaces after modprobing e1000e. Adding some small delays with sleep 2 won't hurt either. So, try: ifdown -a ; sleep 2 ; modprobe -r e1000e ; sleep 2; modprobe e1000e ; sleep 2; ifup -a
How to swap out the driver of a network device on a running Debian Linux box?
1,543,697,175,000
I would like to add a virtual IP address, something you normal do with: ifconfig eth0:0 192.168.1.1 (or via /etc/network/interfaces). But, I'd like to do it from the kernel command-line, which has the command format: ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>:<dns0-ip>:<dns1-ip> However, the format for virtual IP names uses a colon, which is in conflict with the kernel command-line format. So for example, the following non-virtual device eth0 works: ip=192.168.1.1:::::eth0::: But if I want to use the virtual device eth0:0, the following does not work: ip=192.168.1.1:::::eth0:0::: (and I wouldn't expect it to, as the extra colon mucks with the format). Note: doesn't work in this case means it still configures the eth0 device, not the eth0:0 device. Is there any way to do this?
It doesn't seem possible. The kernel documentation for the ip parameter says the syntax is ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>:<dns0-ip>:<dns1-ip> with only one client-ip. The Linux IP-Aliasing doc says that the colon form is deprecated. And the ip option simply treats : as a word separator without providing any special way to escape a literal :. https://github.com/torvalds/linux/blob/master/net/ipv4/ipconfig.c#L1614
How do you add a virtual network IP address from the kernel command-line?
1,543,697,175,000
When I create a VLAN sub-interface in Linux, then it gets the same MAC address as its parent interface. For example with ip link add link eth0 name eth0.333 type vlan id 333 command, the eth0.333 gets the same MAC as eth0. Am I correct that server identifies received frames based on VLAN tag or if the VLAN tag is missing, then the frame from the switch is to eth0 itself?
The default behavior is to add a interface that will only accept packets where the 802.1q field is the same as the vlan id to this given interface. In a very simplified way, the Mac address will be the same as the parent, so the packet is delivered to the phy interface, and processed by the kernel, searching for a 802.1q Tag field that is right after the source mac address field. This field will be identified with the 0x8100 EtherType. The last 12 bits define the vlan id. This Ethernet frame will have the tag removed and delivered to the vlan interface. You can double-check this using tcpdump on both interfaces and pinging an ip address of eth0.333. You shall see output only on eth0: # tcpdump -ni eth0 vlan 333 # tcpdump -ni eth0.333 vlan 333 The default behavior on the opposite traffic direction will be tag and deliver(can be configured). If you want to create virtual interfaces with a Mac Address that is different from the parent, you will have to use the macvlan option of iputils2. Remember that your switches could have some mac related restrictions and block traffic from this newly created interface. And yes, you are correct. If there is no tag the traffic will be delivered to your physical interface. Your configurations will define if the packet will be accepted.
How does server identify frames in case of multiple VLAN sub-interfaces?
1,543,697,175,000
I have an odd problem that seems simple enough but has evaded me thus far. I am attempting to support a legacy application that has a hard-coded ethernet device name ("eth0"). This hard-coding, I am told, will not change. Now, we are attempting to bring this software in a much more modern OS (Fedora 17) that uses persistent device naming and, as such, has no "eth0" interface. Furthermore, this effort requires that I use the loopback interface for communication to another module as part of a virtualization effort (there is actually a LOT more going on here, but that would take way too long to describe). I am aware that it is possible to create an alias of the form "lo:0", however the software is explicitly looking for "eth0" and my research and testing thus far has indicated that the "iface:N" naming scheme is the only one supported. So, in short: Is there any way to create a virtual interface named "eth0" that communicates over lo?
There may be a simpler way. But if compiling your own kernel is an option, you could create a driver based on the existing loopback driver, change the name (line 193 in that version), and load the module. You'd have a second loopback interface with the name you want. Edit: To be more specific, I mean adding another loopback driver, not replacing the existing one. After copying drivers/net/loopback.c to drivers/net/loopback2.c, apply the following patch (done on top of 3.8): diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 335db78..cba692f 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -13,7 +13,7 @@ obj-$(CONFIG_MACVLAN) += macvlan.o obj-$(CONFIG_MACVTAP) += macvtap.o obj-$(CONFIG_MII) += mii.o obj-$(CONFIG_MDIO) += mdio.o -obj-$(CONFIG_NET) += Space.o loopback.o +obj-$(CONFIG_NET) += Space.o loopback.o loopback2.o obj-$(CONFIG_NETCONSOLE) += netconsole.o obj-$(CONFIG_PHYLIB) += phy/ obj-$(CONFIG_RIONET) += rionet.o diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 9ef07d0..ed9d82d 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -2718,6 +2718,7 @@ static inline bool netif_supports_nofcs(struct net_device *dev) } extern struct pernet_operations __net_initdata loopback_net_ops; +extern struct pernet_operations __net_initdata loopback2_net_ops; /* Logging, debugging and troubleshooting/diagnostic helpers. */ diff --git a/net/core/dev.c b/net/core/dev.c index f64e439..7c1cffb 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -6834,6 +6834,9 @@ static int __init net_dev_init(void) if (register_pernet_device(&loopback_net_ops)) goto out; + if (register_pernet_device(&loopback2_net_ops)) + goto out; + if (register_pernet_device(&default_device_ops)) goto out; I'm realizing that simply loading the module won't be sufficient, as this modifies code in net/core/dev.c. You'll also have the install the patched kernel.
Creating an Alias to Loopback Interface with an Arbitrary Name
1,543,697,175,000
I am currently running a webserver with Debian 5.0.2. It has been working (more or less) fine for the past 2-3 years but recently it went down due to some power-outage. Ever since I have brought it back online it has been unable to connect to the network. I have disabled and re-enabled the ethernet port but still can't connect. Here is the following information when running ifconfig eth0: Link encap: Ethernet HWaddr:00:02:a5:95:e6:21 inet6 addr:fe80::202:a5ff:fe95:e621/64 scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:255593 errors:0 droped:0 overruns:0 frame:0 TX packets: 15 errors:0 droped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:21904751 (20.8MiB) TX bytes:5821 (5.6KiB) As well, in the etc/network/interfaces file I do have the line: iface eth0 inet dhcp I am afraid I am stumped as to why it will not connect. I understand that there is still a value missing for the inet address, but it should be getting this from the network (and before anyone asks; everything is fine with the network, it is a university wide network) yet it cannot connect to it... The Ethernet port and cable are also functioning correctly.
Could be that your DHCP client isn't starting for some reason. Maybe a bad lease file, or a pid file is hanging around making it think it's still running. I'm not familiar with Debian so I'm not sure where it keeps its application files, but try deleting /var/run/dhclient* to get rid of any extra pid files, and rm /var/lib/dhcp/dhclient* to get rid of lease files, then reboot the server.
Connecting Debian webserver to network
1,543,697,175,000
I have a laptop running hostapd, phpd, and mysql. This laptop uses an Ethernet connection to connect to the internet and acts as a wireless access point for my workplace's wifi devices. After installing some software and reconnecting my Ethernet elsewhere, my "em1" device is no longer present and wirelessly connected devices can no longer reach the internet. The software I recently installed is: pptp, pptpd, and updated some fedora libraries. I have also recently moved my desk and laptop to another location and thus had to reconnect the Ethernet elsewhere. Wifi devices no longer have access to the internet. Wirelessly connected devices are able to successfully log into the laptop, showing full strength, correct SSID, and uses the proper password. However, when I tried to connect to a site like google, the request times out. The device "em1" also no longer appears on my machine. Running: # ifup em1 will give me the following output: ERROR : [/etc/sysconfig/network-scripts/ifup-eth] Device em1 does not seem to be present, delaying initialization. And running: # dhclient em1 has the following output: Cannot find device "em1" When I run # dmesg|grep renamed, I get the following: renamed network interface eth0 to p4p1. I've tried to connect to the internet through p4p1 and was successful. However, my wireless devices connected to my laptop are no longer able to connect to the internet. I have uninstalled pptp and pptpd using # yum erase ... but the problem still persists. To install pptp I used: # yum install pptp To install pptpd I did the following: # rpm -Uvh http://poptop.sourceforge.net/yum/stable/fc15/pptp-release-current.noarch.rpm # yum install pptpd To update my fedora libraries I used: # yum check-update # yum update EDIT: Running # route produces the following results: Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 10.11.200.1 0.0.0.0 UG 0 0 0 p4p1 10.11.200.0 * 255.255.252.0 U 0 0 0 p4p1 172.16.100.0 * 255.255.255.0 U 0 0 0 wlan0
I opted to solve this issue by starting from scratch. I installed Fedora 17, hostapd, dnsmasq, iptables, and community drivers. The drivers I used were compatible with my hardware and the instructions for installing them are here: http://linuxwireless.org/en/users/Drivers/b43. dnsmasq was used to host a dhcp server which will assign IPs to connected devices. iptables was used to enable NAT forwarding through my ethernet interface. hostapd was used to manage the wifi connection and security. The following is a script I made to start a working access point: #!/bin/bash echo 1 > /proc/sys/net/ipv4/ip_forward # Clear iptables Rules iptables -F iptables -t nat -F # iptables Rules iptables -A FORWARD -d 192.168.1.0/24 -o wlan0 -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A FORWARD -s 192.168.1.0/24 -i wlan0 -j ACCEPT iptables -t nat -A POSTROUTING -o p4p1 -j MASQUERADE # Set wlan0 IP ip addr add 192.168.1.1/24 broadcast 192.168.1.255 dev wlan0 ip link set wlan0 up # Set DHCP dnsmasq -C /dev/null >/dev/null 2>&1 --listen-address=192.168.1.1 --dhcp-range=192.168.1.2,192.168.1.200,12h # hostapd hostapd /etc/hostapd/hostapd.conf The content of hostapd.conf is the following: ctrl_interface=/var/run/hostapd ctrl_interface_group=wheel macaddr_acl=0 auth_algs=1 ignore_broadcast_ssid=0 wpa=3 wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP rsn_pairwise=CCMP wpa_passphrase=testomesto driver=nl80211 interface=wlan0 hw_mode=g channel=1 ssid=osumi-0
Fedora 15: em1 recently dissapeared and hostapd no longer serves internet to wirelessly connected devices
1,543,697,175,000
Yesterday, I installed Fedora 16 and found no wireless connection available. Then I found the ar81family driver But it seems like it does not work with kernel 3. I changed the makefile to ignore the kernel version, but it doesn't compile. It complains: asm/linkage.h not found How can I compile this module for my kernel?
In general Linux drivers needs to closely match the version of the kernel they were developed for. The driver API changes frequently. It's one of the many reasons Linux kernel developers very strongly encourage people to submit their drivers. Usually it's not too hard to update the driver to match the current kernel, especially if the version difference isn't too big. It does require some knowledge of C though. The easiest solution will be to find out what kernel version the driver was intended to work with and use that one.
Atheros ar8151 driver for kernel 3.x (fedora 16)
1,543,697,175,000
I have an Intel dual port 10GB NIC. Operating System: Debian GNU/Linux 9 (stretch) Kernel: Linux 4.9.0-7-amd64 01:00.0 Ethernet controller: Intel Corporation Ethernet Controller 10-Gigabit X540-AT2 (rev 01) One port is configured with a static IP, 1000 Mb/s connected to a Cisco switch and works fine. (I've removed the mac info) 3: enp1s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether xxxxxxxxxxxxxxx brd ff:ff:ff:ff:ff:ff inet 192.168.69.224/24 brd 192.168.69.255 scope global enp1s0f0 valid_lft forever preferred_lft forever inet6 xxxxxxxxxxxxxx scope link valid_lft forever preferred_lft forever I'm working on the other as a 10000Mb/s though a different switch, but in the same network. This is to take advantage of the higher speed, on which other 10000Mb/s devices will be installed. The 10Gb/s switch HAS NOT BEEN CONNECTED to the LAN as of yet. It too has a static IP that I set via command line command. ip addr add 192.168.69.6/24 dev enp1s0f1 4: enp1s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether xxxxxxxxxxxxxxx brd ff:ff:ff:ff:ff:ff inet 192.168.69.6/24 scope global enp1s0f1 valid_lft forever preferred_lft forever inet6 xxxxxxxxxxxxxxxxxx scope link valid_lft forever preferred_lft forever Here's the unexpected part. I can ping the IP address of the 10Gb/s from my laptop on the production network (see below). I have seen this kind of situation with other Debian systems using two ports/multiple connections but never looked into it due to not enough time, and as long as bother ports are connected everything works. Maybe I'm mistaken, and only one port of the other Debian compuyers actually work. In this case, because the 10 Gb/s port is being connected with a different speed and switch, it is an issue. Pinging 192.168.69.6 with 32 bytes of data: Reply from 192.168.69.6: bytes=32 time<1ms TTL=64 Reply from 192.168.69.6: bytes=32 time<1ms TTL=64 Reply from 192.168.69.6: bytes=32 time<1ms TTL=64 Reply from 192.168.69.6: bytes=32 time<1ms TTL=64 Ping statistics for 192.168.69.6: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms Thanks for any assistance.
Here's the unexpected part. I can ping the IP address of the 10Gb/s from my laptop on the production network (see below). That's not unexpected: Both IP addresses are in the same subnet, so any ARP request for 192.168.69.224 in "production network" behind enp1s0f1 will get broadcast to this address, and the Linux kernel will answer this for any local IP addresses. If you really want to keep the networks behind both ports separate, you need different subnet ranges for them (but you didn't describe the topology of the rest of your network). If you put them into the same subnet, that's the same as stating your intent "I want both addresses to be reached from this subnet, through whatever switch gets their first".
Appears a Dual Interface Network Card is assigning two addresses to the same port rather that one per port
1,515,013,550,000
I have two laptops both of which are running CentOS 7. Both are connected to a wireless access point for Internet connectivity. I also have connected them to each other through a switch as a lab for my RHCSA exam. The problem is that whenever I connect them through the switch, they lose internet connectivity. The wireless connection is working, they have their IP addresses but no internet connectivity. To bring back the internet connectivity I have to disable the Ethernet adapters through nmcli command. I just have started using LINUX so I must be missing something. EDIT: This is the kernel routing table while the problem exists: # route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default gateway 0.0.0.0 UG 100 0 0 enp0s25 default gateway 0.0.0.0 UG 600 0 0 wlo1 10.10.10.0 0.0.0.0 255.255.255.0 U 100 0 0 enp0s25 192.168.43.0 0.0.0.0 255.255.255.0 U 600 0 0 wlo1
The problem is that your kernel routes IP packets by default to the other laptop instead of through the Wi-Fi card. Your routing table has two default routes (i.e. paths any IP packet may take to any destination): Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default gateway 0.0.0.0 UG 100 0 0 enp0s25 default gateway 0.0.0.0 UG 600 0 0 wlo1 So, both the enp0s25 (Ethernet, cable) and the wlo1 (Wi-Fi) are available for arbitrary destinations. Which one should the kernel send the packet to? It will try the one with the smaller metric number first. That way, your Ethernet card (and thereby, the other laptop) gets the packages destined to the Internet. Solution: Remove the default route to enp0s25, by using a command like: sudo route del -net 0.0.0.0 netmask 0.0.0.0 enp0s25 The other route (wlo1) needs to stay untouched. The existing 10.10.10.0 route will still force IP packets to the other laptop to use the Ethernet interface. Hope I got the syntax of route correct. Please try and let me know!
Wireless stop working after enabling Ethernet adapter
1,515,013,550,000
Why no enp1s0 ethernet interface in my os? ip -brief link |cut -d" " -f1 lo enp6s0 Why can't get the result ? ip -brief link |cut -d" " -f1 lo enp1s0
The ethernet interface name enp6s0 means the PCI bus location (as indicated by e.g. the lspci command) of that NIC is 06:00.0. If you don't have a network card at PCI bus location 01:00.0, you won't get interface name enp1s0. On many desktop motherboards, the PCI bus location 01:00.0 refers to the first long (16x) PCIe slot, which is the recommended installation location of the first add-on GPU card. Of course, if you set custom names for your network interfaces, you can name them anything you like, but if you deliberately break the relationship between the enp* names and the corresponding PCI bus locations without a very good reason, you would just cause confusion for yourself (and potentially other administrators of the system) in the future.
The name of ethernet interface for my network
1,515,013,550,000
I do not need some kind of realtime visual status of my ethernet - I want to run my script when last five minutes I uploaded less than X. So I need to get only one number from some command. What can you recommend? I use Ubuntu 14.04.
ifconfig <interface> gives you throughput of a specific interface. For example, root@trinity:~# ifconfig eth0 eth0 Link encap:Ethernet HWaddr 28:92:4a:32:0c:43 inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::2a92:4aff:fe32:c43/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1554100056 errors:0 dropped:3528 overruns:0 frame:15941 TX packets:570492690 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:2186365577866 (1.9 TiB) TX bytes:180850207310 (168.4 GiB) Interrupt:18 Just read the TX bytes bit and do the maths. You'll need to track it in a file somewhere so you can work out the differential. The ifconfig command is being deprecated, and people will suggest using ip. The relevant command with ip is, root@trinity:~# ip -s link ls eth0 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT qlen 1000 link/ether 28:92:4a:32:0c:43 brd ff:ff:ff:ff:ff:ff RX: bytes packets errors dropped overrun mcast 2186366161514 1554101939 0 3197 15941 9994871 TX: bytes packets errors dropped carrier collsns 180850392034 570493984 0 0 0 0
How much was uploaded in the last five minutes?
1,515,013,550,000
I need to create local loopback as shown herein: Performing Loopback Testing for Fast Ethernet and Gigabit Ethernet Interfaces. Excerpt Configure a Local Loopback Action To configure a local loopback without physically connecting the transmit port to the receive port, follow these steps: In configuration mode, go to the following hierarchy level: [edit] user@host# edit interfaces interface-name (fastether-options | gigether-options) Configure the local loopback: [edit interfaces interface-name (fastether-options | gigether-options)] user@host# set loopback
Here is their documentation on interface creation, titled: Red Hat Enterprise Linux 3: Reference Guide - Chapter 8. Network Interfaces. Add this line if it does not exist to /etc/hosts 127.0.0.1 localhost localhost.localdomain run the following commands as root # ifconfig lo 127.0.0.1 # route add 127.0.0.1 Test the interface # ifconfig lo lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:3924 Metric:1 RX packets:60 errors:0 dropped:0 overruns:0 frame:0 TX packets:60 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 # ping localhost PING localhost (127.0.0.1): 56 data bytes 64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=0.3 ms 64 bytes from 127.0.0.1: icmp_seq=1 ttl=255 time=0.2 ms 64 bytes from 127.0.0.1: icmp_seq=2 ttl=255 time=0.1 ms 64 bytes from 127.0.0.1: icmp_seq=3 ttl=255 time=0.1 ms 64 bytes from 127.0.0.1: icmp_seq=4 ttl=255 time=0.2 ms 64 bytes from 127.0.0.1: icmp_seq=5 ttl=255 time=0.1 ms --- localhost ping statistics --- 6 packets transmitted, 6 packets received, 0% packet loss round-trip min/avg/max = 0.1/0.1/0.3 ms
How can I create Local Loopback on Linux?
1,515,013,550,000
Running Ubuntu 22.04.3 LTS on top of WSL2 Output of ifconfig: eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1492 inet 172.28.193.11 netmask 255.255.240.0 broadcast 172.28.207.255 inet6 fe80::215:5dff:fe3e:7ffa prefixlen 64 scopeid 0x20<link> ether 00:15:5d:3e:7f:fa txqueuelen 1000 (Ethernet) RX packets 1402 bytes 590609 (590.6 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 163 bytes 52446 (52.4 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 Output of ipconfig /all from PowerShell (pardon my machine's French): Configuration IP de Windows Nom de l’hôte . . . . . . . . . . : Zenbook-OZ Suffixe DNS principal . . . . . . : Type de noeud. . . . . . . . . . : Hybride Routage IP activé . . . . . . . . : Non Proxy WINS activé . . . . . . . . : Non Liste de recherche du suffixe DNS.: Speedport_W_724V_01011603_07_008 Carte réseau sans fil Connexion au réseau local* 1 : Statut du média. . . . . . . . . . . . : Média déconnecté Suffixe DNS propre à la connexion. . . : Description. . . . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter Adresse physique . . . . . . . . . . . : 3E-55-76-BE-66-95 DHCP activé. . . . . . . . . . . . . . : Oui Configuration automatique activée. . . : Oui Carte réseau sans fil Connexion au réseau local* 2 : Statut du média. . . . . . . . . . . . : Média déconnecté Suffixe DNS propre à la connexion. . . : Description. . . . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter #2 Adresse physique . . . . . . . . . . . : 3E-55-76-BE-76-85 DHCP activé. . . . . . . . . . . . . . : Oui Configuration automatique activée. . . : Oui Carte réseau sans fil Wi-Fi : Suffixe DNS propre à la connexion. . . : Speedport_W_724V_01011603_07_008 Description. . . . . . . . . . . . . . : MediaTek Wi-Fi 6E MT7922 (RZ616) 160MHz Wireless LAN Card Adresse physique . . . . . . . . . . . : 3C-55-76-BE-46-B5 DHCP activé. . . . . . . . . . . . . . : Oui Configuration automatique activée. . . : Oui Adresse IPv6. . . . . . . . . . . . . .: 2003:c5:c715:bad9:aa0e:5e09:f399:6903(préféré) Adresse IPv6 temporaire . . . . . . . .: 2003:c5:c715:bad9:fc98:b63c:31e6:1374(préféré) Adresse IPv6. . . . . . . . . . . . . .: 2003:c5:c715:badb:904b:d90b:7543:f858(déprécié) Adresse IPv6 de liaison locale. . . . .: fe80::f215:b016:e094:6711%13(préféré) Adresse IPv4. . . . . . . . . . . . . .: 192.168.2.106(préféré) Masque de sous-réseau. . . . . . . . . : 255.255.255.0 Bail obtenu. . . . . . . . . . . . . . : mercredi 13 mars 2024 01:52:12 Bail expirant. . . . . . . . . . . . . : jeudi 4 avril 2024 00:38:51 Passerelle par défaut. . . . . . . . . : fe80::1%13 192.168.2.1 Serveur DHCP . . . . . . . . . . . . . : 192.168.2.1 IAID DHCPv6 . . . . . . . . . . . : 121394550 DUID de client DHCPv6. . . . . . . . : 00-01-00-01-2C-2A-D6-E9-00-4C-E0-86-43-54 Serveurs DNS. . . . . . . . . . . . . : fe80::1%13 192.168.2.1 NetBIOS sur Tcpip. . . . . . . . . . . : Activé Carte Ethernet Connexion réseau Bluetooth : Statut du média. . . . . . . . . . . . : Média déconnecté Suffixe DNS propre à la connexion. . . : Description. . . . . . . . . . . . . . : Bluetooth Device (Personal Area Network) Adresse physique . . . . . . . . . . . : 3C-55-76-BE-46-B6 DHCP activé. . . . . . . . . . . . . . : Oui Configuration automatique activée. . . : Oui Carte Ethernet vEthernet (WSL (Hyper-V firewall)) : Suffixe DNS propre à la connexion. . . : Description. . . . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter Adresse physique . . . . . . . . . . . : 00-15-5D-AE-85-70 DHCP activé. . . . . . . . . . . . . . : Non Configuration automatique activée. . . : Oui Adresse IPv6 de liaison locale. . . . .: fe80::5516:60d0:65b2:eb67%35(préféré) Adresse IPv4. . . . . . . . . . . . . .: 172.28.192.1(préféré) Masque de sous-réseau. . . . . . . . . : 255.255.240.0 Passerelle par défaut. . . . . . . . . : IAID DHCPv6 . . . . . . . . . . . : 587208029 DUID de client DHCPv6. . . . . . . . : 00-01-00-01-2C-2A-D6-E9-00-4C-E0-86-43-54 NetBIOS sur Tcpip. . . . . . . . . . . : Activé My question: I don't understand where the IP address 172.28.193.11 (assigned to eth0 in the output ifconfig) comes from. The MAC address 00:15:5d:3e:7f:fa associated to eth0 in ifconfig does not appear anywhere in the output of ipconfig /all on PowerShell. To what network interface does the MAC address 00:15:5d:3e:7f:fa correspond?
A few notes, starting with the suggestion to use the ip command and its subcommands. This replaces the deprecated ifconfig command. I'll use ip commands for any examples in this answer. As mentioned in the other answer, WSL2 by default Footnote uses a virtual network interface. As for "where the ... address ... comes from", there's a Hyper-V virtual switch that interfaces between WSL and your computer. You can see that virtual switch if you have both Windows Professional (or higher) and the Hyper-V Manager feature installed, by selecting the Virtual Switch Manager... action in the right-hand pane. However, I generally recommend you not make any modifications to it unless you are really certain you have the expertise. That virtual switch also handed out the IP address you see for the WSL (Hyper-V firewall) interface in your ifconfig output. In WSL, run ip route to show that the traffic is routing to the IP address of the WSL switch in Windows. In your output, that was 172.28.192.1, so you should see: $ ip route default via 172.28.192.1 dev eth0 proto kernel Footnote: Mirrored Mode The (WSL (Hyper-V firewall)) in your ipconfig output in Windows tells me that you are running a fairly recent release of WSL2 that includes a new networking mode. As mentioned above, the default networking mode in WSL2 is NAT. Up until fairly recently (September 2023), this was the only networking mode available to WSL2. However, release 2.0.0 of WSL2 brought several new "experimental" features, including "Mirrored" networking mode, where Windows network interfaces are mirrored into WSL2 instead of being NAT'd. That feature has been promoted, and is no longer experimental in the latest production WSL2 release. If you were to have Mirrored mode enabled in your .wslconfig, then the IP addresses and interfaces you see with ifconfig/ip addr would generally match up with what you see in the Windows ipconfig /all command.
Machine MAC address with Ubuntu on top of WSL2
1,515,013,550,000
Given: Ubuntu laptop with dynamic ip. Raspberry pi headless with static ip. A single Ethernet cable (can be normal or crossover). How can I ssh into the Pi from the laptop?
You have (at least) a couple of choices Run a DHCP server on your Pi. This will assign addresses to clients that connect to it. (Even if there's only one client - your laptop.) As an example this could be dnsmasq or udhcpd. Assuming your Pi has an address 192.168.1.1 with a typical 24 bit subnet you add an address from that subnet to the laptop's ethernet interface: ip addr add 192.168.1.2/24 dev eth0 Either of these operations should give you network connectivity between the two systems. Having done that, you need to ensure your Pi is actually running an ssh server by enabling it in raspi-config.
Communicate between two machines without a switch
1,515,013,550,000
I have 2 similar dual-port NICs here. Both are made by Intel but one in branded HP and the other one is branded Intel. The vendor/device ID for both are different. I can get the device ID using: lspci -nn -vvv | grep Ethernet BUT I do not know how to associate a particular device ID to a network interface. I know I can uninstall 1 card and let the other remain but still woulnd't help me when both cards are installed. I've searched the net and I didn't see anything useful. Thanks example: eth2 belongs to 04:00.0 Ethernet controller [0200]: Intel Corporation 82571EB Gigabit Ethernet Controller (Copper) [8086:10bc] (rev 06) Subsystem: Intel Corporation 82571EB Gigabit Ethernet Controller (Copper) [8086:000a] eth3 belongs to 04:00.1 Ethernet controller [0200]: Intel Corporation 82571EB Gigabit Ethernet Controller [8086:105e] (rev 06) Subsystem: Intel Corporation 82571EB Gigabit Ethernet Controller [8086:000a]
I have 2 ethernet ports from 2 devices with the same vendor/device id. I can match the pci slot to the interface name by comparing the interrupt assignment. I'm not sure you will be able to do this as you seem to have a multi-function device which might share an interrupt. In my case: $ lspci -s 03:00.0 -vv | grep Interrupt Interrupt: pin A routed to IRQ 31 $ lspci -s 05:00.0 -vv | grep Interrupt Interrupt: pin A routed to IRQ 32 And the matching interface p4p1 or p4p2 is found in the first and last columns of: $ cat /proc/interrupts CPU0 CPU1 31: 47757902 108675810 PCI-MSI 1572864-edge p4p1 32: 25923809 86364594 PCI-MSI 2621440-edge p4p2
how do I get the device ID for a specific network interface?
1,515,013,550,000
If I connect a straight Ethernet cable where a crossover cable should be used. Can I get the behaviour that it works occassionally, once in a while? Too me it seems it would either work or not, not occassionaly -is this correct? I have a situation where Ethernet sometimes work, and sometimes after reboot it stops working. The question is then -can crossover wiring be the culprit or not? One end is not auto MDI-X but the other probably is. It would seem it would rather have something to do with speed negotiation or so but I don't know.
Normally it either works or doesn't, but your described behavior can happen if there is a short circuit between some wire(s) or the wires are not connected properly to its connector (inconsistent contact). I would try out another cable and see if this behavior can be reproduced again. If not, the problem was the cable.
(Ethernet cables): Can a straight wire work (slightly) where a crossover-wire is necessary (without MDX)?
1,515,013,550,000
When using: /etc/network/interfaces auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp auto wlan0 allow-hotplug wlan0 iface wlan0 inet dhcp wpa-ssid "<myssid>" wpa-psk "<mypasswd>" why is the boot blocked for more than 1 minute if no ethernet cable is connected? Why doesn't it go to the next lines and use wlan0 instead ? I would like that if no ethernet cable is connected, the system doesn't wait so long, and try with wlan0 instead. How to do that? I'm using Debian Jessie with networking.service.
You should change auto eth0 to allow-hotplug eth0 in your /etc/network/interfaces. This would keep your system away from trying to get address by DHCP when interface isn't connected. This should fix the problem. Also, you can set lower timeout to DHCP client. You may set timeout 3; in /etc/dhcp/dhclient.conf. It will set 3 seconds timeout for getting IP over DHCP. Longer time should make process more reliable on slower networks, but takes more time. Shorter time could left you without an address when network is on load.
Two networking interfaces trying to get an IP via DHCP
1,515,013,550,000
I'm using an old kernel, 2.6.32, and I would like to boot the kernel over TFTP and mount the filesystem over NFS. Mounting the kernel over TFTP is a plus, but mounting the filesystem over NFS is a must. I would like to drop the ethernet connection on the board, being forced to use the USB for this. How can I understand what USB to Ethernet adapters are suitable for this kernel, if any? Thank you.
In general linux has very good support for network devices. If the device will work with your version of linux it will allow setup of nfs root with the appropriate initrd. so the problem with root over nfs is that you have to make an initrd that will accommodate it. NFS root without initrd may still work, but will not work with usb ethernet adapters as they are all hotplugged. Initrd modification is not for the faint of heart. Loading the kernel and initrd over the network link is another order of difficulty. Firstly until the kernel takes over it does not matter if linux supports the device, only boot loader support matters at this point. The two bootloaders which may at some point do what you want are grub and ipxe. (there are other network bootloaders, but as far as I know none support usb.) ipxe usb support has not made it into the main development branch yet. grub has recently released support for usb keyboards and disk drives at the same time. usb networking has not been publicly discussed as a possibility yet. the only remaining option is a kexec, but that is done from a running linux. In all such cases there is still the question of which device would you load the bootloader from as I have not yet found any system roms that would allow booting from a usb network adapter.
How do I understand if an USB Ethernet adapter is compatible with a certain kernel version to use it to load kernel/filesystem?
1,515,013,550,000
On a device with Debian 10, I want to make a permanent change to the IP via modifying /etc/network/interfaces . Hence, I modify it as follows : auto lo iface lo inet loopback auto eth0 #iface eth0 inet dhcp iface eth0 inet static address 192.168.109.11 netmask 255.255.255.0 gateway 192.168.109.254 and after that I perform the following : ifdown eth0 && ifup eth0 but at this point it returns the following error : root@var-som-mx6:~# ifdown eth0 && ifup eth0 --verbose ifdown: interface eth0 not configured ifup: configuring interface eth0=eth0 (inet) /bin/run-parts --exit-on-error --verbose /etc/network/if-pre-up.d run-parts: executing /etc/network/if-pre-up.d/hostapd run-parts: executing /etc/network/if-pre-up.d/wpasupplicant /sbin/ip addr add 192.168.109.12/255.255.255.0 broadcast 192.168.109.255 dev eth0 label eth0 /sbin/ip link set dev eth0 up /sbin/ip route add default via 192.168.109.254 dev eth0 onlink RTNETLINK answers: Invalid argument ifup: failed to bring up eth0 ifconfig tells me the following : root@var-som-mx6:~# ifconfig eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.109.11 netmask 255.255.255.0 broadcast 192.168.109.255 inet6 fe80::fadc:7aff:fe3e:8dbb prefixlen 64 scopeid 0x20<link> ether f8:dc:7a:3e:8d:bb txqueuelen 1000 (Ethernet) RX packets 35999 bytes 8217478 (7.8 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 5137 bytes 1559379 (1.4 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1 (Local Loopback) RX packets 2837 bytes 258173 (252.1 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 2837 bytes 258173 (252.1 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 What am I doing wrong?
ifdown and ifup seem to be not the best way to operate on network interfaces due to lots of pseudo-errors with RTNETLINK (Linux routing socket) that will go away only via system reboot, which may not be ideal. IMHO, main way to handle this is via ifconfig commands (please also consider that ifconfig is deprecated and is replaced by the ip command) : root@var-som-mx6:~# ifconfig eth0 down ** now, update /etc/network/interfaces.. ** root@var-som-mx6:~# ifconfig eth0 up 192.168.109.11 netmask 255.255.255.0 root@var-som-mx6:~# route add default gw 192.168.109.254 Note that you should update the /etc/network/interfaces after the ifconfig eth0 down BTW, if you got your reasons to use ifdown and ifup, you can solve this as following : root@var-som-mx6:~# ifdown --force eth0 ** now, update /etc/network/interfaces.. ** root@var-som-mx6:~# ifup --force eth0 root@var-som-mx6:~# route add default gw 192.168.109.254 where --force will force configuration or deconfiguration of the interface (source), in particular : The program keeps records of whether network interfaces are up or down. Under exceptional circumstances these records can become inconsistent with the real states of the interfaces. For example, an interface that was brought up using ifup and later deconfigured using ifconfig will still be recorded as up. To fix this you can use the --force option to force ifup or ifdown to run configuration or deconfiguration commands despite what it considers the current state of the interface to be. If you also prefer to have all in one command line, the correct one-liner is the following : root@var-som-mx6:~# ifdown eth0 --force && ip addr flush dev eth0 && route add default gw 192.168.109.254 && ifup eth0 --force where ip addr flush dev eth0 is crucial. This solutions solve also the "RTNETLINK answers: File exists" error.
'RTNETLINK answers: Invalid argument' after ifup ethX
1,515,013,550,000
I recently installed Debian 10.6 on my desktop computer, and discovered that I have a problem with my ethernet network connection after waking the computer from sleep mode. Specifically, after waking the computer from sleep mode, I have no ethernet network connection. After rebooting the computer, the connection is restored. My Linux kernel version is 4.19.0-11-amd64. Any ideas how to solve this strange problem? Following the suggestion from A.B, here is the output from lspci -k | grep -A3 Ethernet: 02:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8071 PCI-E Gigabit Ethernet Controller (rev 16) Subsystem: Acer Incorporated [ALI] 88E8071 PCI-E Gigabit Ethernet Controller Kernel driver in use: sky2 Kernel modules: sky2 03:00.0 FireWire (IEEE 1394): JMicron Technology Corp. IEEE 1394 Host Controller I don't know if it helps, but I have now also added some relevant lines from running dmesg below: After waking from sleep: [ 7544.632643] ata3.00: configured for UDMA/133 [ 7544.935093] IPv6: ADDRCONF(NETDEV_UP): enp2s0: link is not ready [ 7544.937339] sky2 0000:02:00.0 enp2s0: enabling interface [ 7544.937528] IPv6: ADDRCONF(NETDEV_UP): enp2s0: link is not ready [ 7547.437266] do_IRQ: 2.34 No irq handler for vector After rebooting: [ 19.698910] IPv6: ADDRCONF(NETDEV_UP): enp2s0: link is not ready [ 19.701050] sky2 0000:02:00.0 enp2s0: enabling interface [ 19.701183] IPv6: ADDRCONF(NETDEV_UP): enp2s0: link is not ready [ 22.187327] sky2 0000:02:00.0 enp2s0: Link is up at 1000 Mbps, full duplex, flow control both [ 22.187359] IPv6: ADDRCONF(NETDEV_CHANGE): enp2s0: link becomes ready [ 53.492928] fuse init (API version 7.27) [ 60.534172] rfkill: input handler disabled
It turned out that the problem in my case had to do with the following line in the output from dmesg: [ 7547.437266] do_IRQ: 2.34 No irq handler for vector This problem is addressed in the following post on askubuntu: https://askubuntu.com/questions/1029620/ubuntu-18-04-lts-sky2-ethernet-stops-working-after-system-resume-from-suspend#comment1956841_1094045. Many thanks to user A.B for pointing out this post to me! I did the following to solve the problem: Add the line GRUB_CMDLINE_LINUX_DEFAULT="quiet splash sky2.disable_msi=1" to the file /etc/default/grub Run the command update-grub. Note: I had to do su - root rather than just su in order to be able to run update-grub. Reboot the computer.
Network (via ethernet) does not work after sleep mode
1,515,013,550,000
I have a router that provides internet access. Connected to this router is a desktop PC that has working eth0 (static IP address) and wlan0. Also connected to the router is a laptop which I use to access the desktop over eth0 via SSH: Desktop(wlan0,eth0) ---- Router(internet) ---- Laptop(ssh to Dekstop via eth0) // wlan0 should get internet access through eth0 and act as DHCP AP How do I have to configure (in /etc/network/interfaces) the bridge on the desktop PC, so that I can keep eth0 static (same IP address for SSH), but have wlan0 act as an internet-providing DHCP access point (an access point that dynamically hands out IP addresses to connected devices)? I know how to configure hostapd and have bridge-utils installed. But I did not fully understand how a bridge works. Does the bridge "replace" all bridged interfaces (as seen from "the outside")? If I bridge, what does my router "see" (eth0 or the bridge)?
If I understand correctly what you're asking the closer you can get to what you're describing is by doing this: On the desktop create a bridge (br0) that includes wlan0 and eth0 Assign the static IP address that you now have on eth0 to br0 Setup a dhcp server on br0 The above will place everyone connecting to the AP (Desktop) on the same network as eth0 and the router.
Ho to bridge wlan0 in AP mode and eth0 so that eth0 is static and wlan0 uses DHCP?
1,515,013,550,000
I have an Arris cable modem, and my laptop has a JMC250 PCI Express Gigabit Ethernet Controller. I'm unable to connect to its wired network either with NetworkManager, Wicd, or the command-line on Debian Stable. I have tried also running a Porteus (Slackware based) LiveCD, but the result was the same. I have tried also many times unloading the jme module and reloading it, with no options, and also with the options force_pseudohp=1, no_pseudohp=1, and no_extplug=1, but to no avail. I have also tried turning off the rfkill switch, because I can connect to the Wifi without any problems using NetworkManager. Here is the log from when trying to connect with the NetworkManager: Feb 5 15:38:50 localhost NetworkManager[2225]: <info> enable requested (sleeping: no enabled: no) Feb 5 15:38:50 localhost NetworkManager[2225]: <info> waking up and re-enabling... Feb 5 15:38:50 localhost NetworkManager[2225]: <info> (wlan0): now managed Feb 5 15:38:50 localhost NetworkManager[2225]: <info> (wlan0): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2] Feb 5 15:38:50 localhost NetworkManager[2225]: <info> (wlan0): bringing up device. Feb 5 15:38:50 localhost NetworkManager[2225]: <info> (wlan0): deactivating device (reason 'managed') [2] Feb 5 15:38:50 localhost NetworkManager[2225]: <info> (eth0): now managed Feb 5 15:38:50 localhost NetworkManager[2225]: <info> (eth0): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2] Feb 5 15:38:50 localhost NetworkManager[2225]: <info> (eth0): preparing device. Feb 5 15:38:50 localhost NetworkManager[2225]: <info> (eth0): deactivating device (reason 'managed') [2] The log from Wicd (which uses standard command-line tools): 2014/02/05 15:35:50 :: Executing /etc/network/if-down.d/upstart with params 2014/02/05 15:35:50 :: /etc/network/if-down.d/upstart returned 0 2014/02/05 15:35:50 :: Executing /etc/network/if-down.d/wpasupplicant with params 2014/02/05 15:35:50 :: /etc/network/if-down.d/wpasupplicant returned 0 2014/02/05 15:35:50 :: attempting to set hostname with dhclient 2014/02/05 15:35:50 :: using dhcpcd or another supported client may work better 2014/02/05 15:35:50 :: /sbin/dhclient -v -r wlan0 2014/02/05 15:35:50 :: ifconfig wlan0 0.0.0.0 2014/02/05 15:35:50 :: /sbin/ip route flush dev wlan0 2014/02/05 15:35:50 :: ifconfig wlan0 down 2014/02/05 15:35:50 :: ifconfig wlan0 up 2014/02/05 15:35:50 :: Executing /etc/network/if-post-down.d/wireless-tools with params 2014/02/05 15:35:50 :: /etc/network/if-post-down.d/wireless-tools returned 0 2014/02/05 15:35:50 :: Executing /etc/network/if-post-down.d/wpasupplicant with params 2014/02/05 15:35:50 :: /etc/network/if-post-down.d/wpasupplicant returned 0 2014/02/05 15:35:50 :: wpa_cli -i wlan0 terminate 2014/02/05 15:35:50 :: Executing /etc/network/if-down.d/upstart with params 2014/02/05 15:35:50 :: /etc/network/if-down.d/upstart returned 0 2014/02/05 15:35:50 :: Executing /etc/network/if-down.d/wpasupplicant with params 2014/02/05 15:35:50 :: /etc/network/if-down.d/wpasupplicant returned 0 2014/02/05 15:35:50 :: attempting to set hostname with dhclient 2014/02/05 15:35:50 :: using dhcpcd or another supported client may work better 2014/02/05 15:35:50 :: /sbin/dhclient -v -r eth0 2014/02/05 15:35:50 :: ifconfig eth0 0.0.0.0 2014/02/05 15:35:50 :: /sbin/ip route flush dev eth0 2014/02/05 15:35:50 :: ifconfig eth0 down 2014/02/05 15:35:50 :: ifconfig eth0 up 2014/02/05 15:35:50 :: Executing /etc/network/if-post-down.d/wireless-tools with params 2014/02/05 15:35:50 :: /etc/network/if-post-down.d/wireless-tools returned 0 2014/02/05 15:35:50 :: Executing /etc/network/if-post-down.d/wpasupplicant with params 2014/02/05 15:35:50 :: /etc/network/if-post-down.d/wpasupplicant returned 0 2014/02/05 15:35:50 :: wpa_cli -i eth0 terminate 2014/02/05 15:35:50 :: found lastused in configuration True 2014/02/05 15:35:50 :: Executing /etc/network/if-pre-up.d/ethtool with params 2014/02/05 15:35:50 :: /etc/network/if-pre-up.d/ethtool returned 0 2014/02/05 15:35:50 :: Executing /etc/network/if-pre-up.d/wireless-tools with params 2014/02/05 15:35:50 :: /etc/network/if-pre-up.d/wireless-tools returned 0 2014/02/05 15:35:50 :: Executing /etc/network/if-pre-up.d/wpasupplicant with params 2014/02/05 15:35:50 :: /etc/network/if-pre-up.d/wpasupplicant returned 0 2014/02/05 15:35:50 :: Putting interface down 2014/02/05 15:35:50 :: ifconfig eth0 down 2014/02/05 15:35:50 :: Releasing DHCP leases... 2014/02/05 15:35:50 :: attempting to set hostname with dhclient 2014/02/05 15:35:50 :: using dhcpcd or another supported client may work better 2014/02/05 15:35:50 :: /sbin/dhclient -v -r eth0 2014/02/05 15:35:50 :: Setting false IP... 2014/02/05 15:35:50 :: ifconfig eth0 0.0.0.0 2014/02/05 15:35:50 :: Stopping wpa_supplicant 2014/02/05 15:35:50 :: wpa_cli -i eth0 terminate 2014/02/05 15:35:50 :: Flushing the routing table... 2014/02/05 15:35:50 :: /sbin/ip route flush dev eth0 2014/02/05 15:35:50 :: Putting interface up... 2014/02/05 15:35:50 :: ifconfig eth0 up 2014/02/05 15:35:52 :: Running DHCP with hostname localhost 2014/02/05 15:35:52 :: attempting to set hostname with dhclient 2014/02/05 15:35:52 :: using dhcpcd or another supported client may work better 2014/02/05 15:35:52 :: /sbin/dhclient -v eth0 2014/02/05 15:35:52 :: Internet Systems Consortium DHCP Client 4.2.2 2014/02/05 15:35:52 :: Copyright 2004-2011 Internet Systems Consortium. 2014/02/05 15:35:52 :: All rights reserved. 2014/02/05 15:35:52 :: For info, please visit https://www.isc.org/software/dhcp/ 2014/02/05 15:35:52 :: 2014/02/05 15:35:52 :: Listening on LPF/eth0/80:ee:73:1f:6d:47 2014/02/05 15:35:52 :: Sending on LPF/eth0/80:ee:73:1f:6d:47 2014/02/05 15:35:52 :: Sending on Socket/fallback 2014/02/05 15:35:52 :: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8 2014/02/05 15:36:00 :: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 14 2014/02/05 15:36:14 :: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 15 2014/02/05 15:36:29 :: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 17 2014/02/05 15:36:46 :: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7 2014/02/05 15:36:53 :: No DHCPOFFERS received. 2014/02/05 15:36:53 :: No working leases in persistent database - sleeping. 2014/02/05 15:36:53 :: DHCP connection failed 2014/02/05 15:36:53 :: exiting connection thread 2014/02/05 15:36:53 :: Sending connection attempt result dhcp_failed 2014/02/05 15:36:53 :: ifconfig eth0 2014/02/05 15:36:53 :: ifconfig wlan0 2014/02/05 15:36:53 :: Forced disconnect on 2014/02/05 15:36:53 :: iwconfig wlan0 2014/02/05 15:36:53 :: Executing /etc/network/if-down.d/upstart with params 2014/02/05 15:36:53 :: /etc/network/if-down.d/upstart returned 0 2014/02/05 15:36:53 :: Executing /etc/network/if-down.d/wpasupplicant with params 2014/02/05 15:36:53 :: /etc/network/if-down.d/wpasupplicant returned 0 2014/02/05 15:36:53 :: attempting to set hostname with dhclient 2014/02/05 15:36:53 :: using dhcpcd or another supported client may work better 2014/02/05 15:36:53 :: /sbin/dhclient -v -r wlan0 2014/02/05 15:36:53 :: ifconfig wlan0 0.0.0.0 2014/02/05 15:36:53 :: /sbin/ip route flush dev wlan0 2014/02/05 15:36:53 :: ifconfig wlan0 down 2014/02/05 15:36:53 :: ifconfig wlan0 up 2014/02/05 15:36:53 :: Executing /etc/network/if-post-down.d/wireless-tools with params 2014/02/05 15:36:53 :: /etc/network/if-post-down.d/wireless-tools returned 0 2014/02/05 15:36:53 :: Executing /etc/network/if-post-down.d/wpasupplicant with params 2014/02/05 15:36:53 :: /etc/network/if-post-down.d/wpasupplicant returned 0 2014/02/05 15:36:53 :: wpa_cli -i wlan0 terminate 2014/02/05 15:36:53 :: Executing /etc/network/if-down.d/upstart with params 2014/02/05 15:36:53 :: /etc/network/if-down.d/upstart returned 0 2014/02/05 15:36:53 :: Executing /etc/network/if-down.d/wpasupplicant with params 2014/02/05 15:36:53 :: /etc/network/if-down.d/wpasupplicant returned 0 2014/02/05 15:36:53 :: attempting to set hostname with dhclient 2014/02/05 15:36:53 :: using dhcpcd or another supported client may work better 2014/02/05 15:36:53 :: /sbin/dhclient -v -r eth0 2014/02/05 15:36:53 :: ifconfig eth0 0.0.0.0 2014/02/05 15:36:53 :: /sbin/ip route flush dev eth0 2014/02/05 15:36:53 :: ifconfig eth0 down 2014/02/05 15:36:53 :: ifconfig eth0 up 2014/02/05 15:36:53 :: Executing /etc/network/if-post-down.d/wireless-tools with params 2014/02/05 15:36:53 :: /etc/network/if-post-down.d/wireless-tools returned 0 2014/02/05 15:36:53 :: Executing /etc/network/if-post-down.d/wpasupplicant with params 2014/02/05 15:36:53 :: /etc/network/if-post-down.d/wpasupplicant returned 0 2014/02/05 15:36:53 :: wpa_cli -i eth0 terminate Some other info: $ sudo ethtool eth0 Settings for eth0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full Supported pause frame use: No Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full Advertised pause frame use: Symmetric Receive-only Advertised auto-negotiation: Yes Speed: 10Mb/s Duplex: Half Port: MII PHYAD: 1 Transceiver: internal Auto-negotiation: on Supports Wake-on: pg Wake-on: g Current message level: 0x000020c6 (8390) probe link rx_err tx_err hw Link detected: no $ sudo nm-tool NetworkManager Tool State: disconnected - Device: eth0 ----------------------------------------------------------------- Type: Wired Driver: jme State: unavailable Default: no HW Address: 80:EE:73:1F:6D:47 Capabilities: Carrier Detect: yes Wired Properties Carrier: off
Thanks God I insisted on this :) Taken from the Ubuntu forums: sudo ethtool -s eth0 autoneg off speed 100 duplex full Results after running this command: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full Supported pause frame use: No Supports auto-negotiation: Yes Advertised link modes: Not reported Advertised pause frame use: No Advertised auto-negotiation: No Speed: 100Mb/s Duplex: Full Port: MII PHYAD: 1 Transceiver: internal Auto-negotiation: off Supports Wake-on: pg Wake-on: g Current message level: 0x000020c6 (8390) probe link rx_err tx_err hw Link detected: yes
Cannot connect to ethernet on a cable modem
1,515,013,550,000
First of all I am running a CentOS 6.4 installation. My computer is a laptop and I am trying to install the drivers for my ethernet card, because this week end I lost my ability to connect to the Internet. So I downloaded the driver : jmebp-1.0.8.5 I installed gcc, kernel-devel and since it wasn't working I finally installed the group Development Tools (in case I had forgot something). When I make install I get this error : *** No rule to make target `internet/jmebp-1.0.8.5'. Stop. Leaving directory `/lib/modules/2.6.32-358.6.1.el6.x86_64/build' My makefile is : MODNAME := jme obj-m := $(MODNAME).o ifneq ($(KERNELRELEASE),) ######################### # kbuild part of makefile ######################### EXTRA_CFLAGS += -Wall -O3 #EXTRA_CFLAGS += -DTX_DEBUG #EXTRA_CFLAGS += -DREG_DEBUG else ######################### # Normal Makefile ######################### TEMPFILES := $(MODNAME).o $(MODNAME).mod.c $(MODNAME).mod.o Module.symvers .$(MODNAME).*.cmd .tmp_versions modules.order Module.markers Modules.symvers ifeq (,$(KVER)) KVER=$(shell uname -r) endif KSRC ?= /lib/modules/$(KVER)/build MINSTDIR ?= /lib/modules/$(KVER)/kernel/drivers/net all: modules @rm -rf $(TEMPFILES) modules: @$(MAKE) -C $(KSRC) M=$(shell pwd) modules checkstack: modules objdump -d $(obj-m) | perl $(KSRC)/scripts/checkstack.pl $(shell uname -m) @rm -rf $(TEMPFILES) namespacecheck: modules perl $(KSRC)/scripts/namespace.pl @rm -rf $(TEMPFILES) install: modules install -m 644 $(MODNAME).ko $(MINSTDIR) depmod -a $(KVER) patch: @/usr/bin/diff -uar -X dontdiff ../../trunc ./ > bc.patch || echo > /dev/null buildtest: SRCDIRS=`find ~/linux-src -mindepth 1 -maxdepth 1 -type d -name 'linux-*' | sort -r -n`; \ SRCDIRS="$${SRCDIRS} `find ~/linux-src/centos -mindepth 2 -maxdepth 2 -type d -name 'linux-*' | sort -r -n`"; \ SRCDIRS="$${SRCDIRS} `find ~/linux-src/fedora -mindepth 2 -maxdepth 2 -type d -name 'linux-*' | sort -r -n`"; \ for d in $${SRCDIRS}; do \ $(MAKE) clean && $(MAKE) -C . KSRC=$${d} modules; \ if [ $$? != 0 ]; then \ exit $$?; \ fi; \ done $(MAKE) clean clean: @rm -rf $(MODNAME).ko $(TEMPFILES) %:: $(MAKE) -C $(KSRC) M=`pwd` $@ endif Any suggestions ?
First Issue You're missing the kernel-headers package. You need these to compile kernel modules. yum install kernel-headers Assuming this where you downloaded the drivers from. When I unpacked them on a CentOS 6.4 system I got the following error: $ cd jmebp-1.0.8.5 $ ls CHANGELOG jme.c jme.h Makefile scripts $ make make: *** /lib/modules/2.6.32-279.14.1.el6.x86_64/build: No such file or directory. Stop. make: *** [modules] Error 2 After installing the kernel-headers package, I ran make a second time: $ make make: *** /lib/modules/2.6.32-279.14.1.el6.x86_64/build: No such file or directory. Stop. make: *** [modules] Error 2 Still a problem? Debugging it further I figured out my other problem, which you might encounter as well, so I'm documenting it below, just in case. Second Issue The link in the kernel directory appeared to be broken. $ pwd /lib/modules/2.6.32-279.14.1.el6.x86_64 $ ls -l | grep build lrwxrwxrwx 1 root root 51 Dec 15 14:49 build -> ../../../usr/src/kernels/2.6.32-279.14.1.el6.x86_64 lrwxrwxrwx 1 root root 5 Dec 15 14:50 source -> build $ ls -l build/ ls: cannot access build/: No such file or directory Whoops, wrong version of the kernel-headers and kernel-devel for our kernel version. We're currently running this version of the kernel: $ uname -r 2.6.32-279.14.1.el6.x86_64 But we just installed the kernel-headers and kernel-devel packages for this version: 2.6.32-358.6.1.el6.x86_64 So let's install that version of the kernel as well and reboot so we can use the newer kernel: $ yum update kernel After our reboot everything looks much better: $ ls CHANGELOG jme.c jme.h Makefile scripts $ make make[1]: Entering directory `/usr/src/kernels/2.6.32-358.6.1.el6.x86_64' CC [M] /home/sam/jmebp/jmebp-1.0.8.5/jme.o Building modules, stage 2. MODPOST 1 modules CC /home/sam/jmebp/jmebp-1.0.8.5/jme.mod.o LD [M] /home/sam/jmebp/jmebp-1.0.8.5/jme.ko.unsigned NO SIGN [M] /home/sam/jmebp/jmebp-1.0.8.5/jme.ko make[1]: Leaving directory `/usr/src/kernels/2.6.32-358.6.1.el6.x86_64' $ ls CHANGELOG jme.c jme.h jme.ko jme.ko.unsigned Makefile scripts Now we see the jme.ko kernel module. To install it: make install
Problem compiling a driver : "No rule to make target"
1,515,013,550,000
I'm trying to filter traffic by src ether host to see all devices with a specific MAC prefix. If this were like IP, it might filter with src ether host aa:bb:cc:00:00:00/24 to see OUI's matching aa:bb:cc...but it doesn't like that. Is there a way to match by MAC prefix or mask? In case it matters: This is for Wi-Fi, so technically it's an SA address that you can see if you scroll to the right (tcpdump puts that in the src ether host field). 13:12:48.139316 1.0 Mb/s 2412 MHz 11b -41dBm signal -41dBm signal antenna 0 0us BSSID:ff:ff:ff:ff:ff:ff DA:ff:ff:ff:ff:ff:ff SA:aa:bb:cc:84:05:7c Probe Request (emporia) [5.5* 11.0* 1.0* 2.0* 6.0 12.0 24.0 48.0 Mbit]
The names (host, src host, ether, ether src,...) are basically shortcuts to specific bytes in the corresponding tcp od ip packets. There are no wildcards allowed in tcpdump-filters, so one has to dig deeper into the tcp-packets themselves. The ethernet src-address is in the 6 bytes starting at ether[6], the ethernet dest-address is in the 6 bytes starting at ether[0]. So if one wants to filter for three bytes of the src-address, one has to filter for the bytes 6,7 and 8. Since one can't filter for tree bytes ("tcpdump: data size must be 1, 2, or 4") the filter has to be broken into two parts. bytes 6 and 7: ether[6:2], byte 8: ether[8:1] Which means, the filter would look like: ether[6:2]==0xaabb and ether[8:1]==0xcc
Can `tcpdump ether host` filter with a mask to get, for example, hosts with a specific OUI?
1,515,013,550,000
My laptop has a single Ethernet port and a Realtek Ethernet controller: $ ip -brief addr lo UNKNOWN 127.0.0.1/8 ::1/128 enp2s0f0 DOWN enp5s0 UP 192.168.50.83/24 fe80::3af3:abff:fe0c:886f/64 wlp3s0 UP 192.168.50.127/24 fe80::6dc5:4c36:33c3:2795/64 $ lspci | grep -i ethernet 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0e) 05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15) What confuses me is that I got two Ethernet devices: enp2s0f0 (down) and enp5s0 (up). I've been trying to figure out why this is. My best guess is that this is the result of a firmware update (because the rev numbers are different) but I suspect there's something quite basic I don't quite understand. The laptop is a Thinkpad P14S running AlmaLinux 9. Update The laptop is sometimes connected to a docking station. Here's the ip addr output when it's connected to the dock: $ ip -brief addr lo UNKNOWN 127.0.0.1/8 ::1/128 enp2s0f0 DOWN enp5s0 DOWN wlp3s0 UP 192.168.50.127/24 fe80::6dc5:4c36:33c3:2795/64 enp7s0f3u1u1 UP 192.168.50.121/24 fe80::e9ba:6cf3:d104:781/64 $ lspci | grep -i ethernet 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0e) 05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15) # lshw -class network -short H/W path Device Class Description ==================================================================== /0/100/2.2/0 enp2s0f0 network RTL8111/8168/8411 PCI Express Gigabit Ethernet /0/100/2.3/0 wlp3s0 network Wi-Fi 6 AX200 /0/100/2.6/0 enp5s0 network RTL8111/8168/8411 PCI Express Gigabit Ethernet /c enp7s0f3u1u1 network Ethernet interface And this is the output of lspci -t: # lspci -t -[0000:00]-+-00.0 +-00.2 +-01.0 +-02.0 +-02.1-[01]----00.0 +-02.2-[02]--+-00.0 | +-00.1 | +-00.2 | +-00.3 | \-00.4 +-02.3-[03]----00.0 +-02.4-[04]----00.0 +-02.6-[05]----00.0 +-02.7-[06]----00.0 +-08.0 +-08.1-[07]--+-00.0 | +-00.1 | +-00.2 | +-00.3 | +-00.4 | +-00.5 | \-00.6 +-14.0 +-14.3 +-18.0 +-18.1 +-18.2 +-18.3 +-18.4 +-18.5 +-18.6 \-18.7 Another update This might be more readable: # lspci -tv -[0000:00]-+-00.0 Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne Root Complex +-00.2 Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne IOMMU +-01.0 Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge +-02.0 Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge +-02.1-[01]----00.0 SK hynix Gold P31 SSD +-02.2-[02]--+-00.0 Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller | +-00.1 Realtek Semiconductor Co., Ltd. RTL8111xP UART #1 | +-00.2 Realtek Semiconductor Co., Ltd. RTL8111xP UART #2 | +-00.3 Realtek Semiconductor Co., Ltd. RTL8111xP IPMI interface | \-00.4 Realtek Semiconductor Co., Ltd. RTL811x EHCI host controller +-02.3-[03]----00.0 Intel Corporation Wi-Fi 6 AX200 +-02.4-[04]----00.0 Genesys Logic, Inc GL9750 SD Host Controller +-02.6-[05]----00.0 Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller +-02.7-[06]----00.0 Renesas Technology Corp. uPD720202 USB 3.0 Host Controller +-08.0 Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge +-08.1-[07]--+-00.0 Advanced Micro Devices, Inc. [AMD/ATI] Renoir | +-00.1 Advanced Micro Devices, Inc. [AMD/ATI] Renoir Radeon High Definition Audio Controller | +-00.2 Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor | +-00.3 Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne USB 3.1 | +-00.4 Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne USB 3.1 | +-00.5 Advanced Micro Devices, Inc. [AMD] ACP/ACP3X/ACP6x Audio Coprocessor | \-00.6 Advanced Micro Devices, Inc. [AMD] Family 17h/19h HD Audio Controller +-14.0 Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller +-14.3 Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge +-18.0 Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 0 +-18.1 Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 1 +-18.2 Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 2 +-18.3 Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 3 +-18.4 Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 4 +-18.5 Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 5 +-18.6 Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 6 \-18.7 Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 7```
According to the Archlinux Wikipage: https://wiki.archlinux.org/title/Lenovo_ThinkPad_T14_(AMD)_Gen_2 enp5s0 is the RJ45 port. enp2s0f0 is the proprietary connector next to the 2nd USB Type-C port for use in the Lenovo ThinkPad Ultra Docking Station or with a Lenovo ThinkPad Ethernet Extension Cable Gen 2 cable. Your Dockings Station seems to be a USB-C Docking station
Why does my Ethernet adapter have two devices?
1,655,319,444,000
I have the following Ethernet to USB-C adapter: $ lsusb | grep Ethernet Bus 002 Device 003: ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet Currently it is not working when plugged into the USB-C port, in dmesg I get: [23552.344134] ax88179_178a 2-1:2.1 eth1: Failed to read reg index 0x0000: -32 (However, it works on a different machine, but the error is still shown, and the transfer rate seems limited.) I am wondering if I have the correct driver installed. I've seen that axge seems to be the correct driver, but it does not show up in lsmod. What is the correct driver to use for AX88179, how to check if it is installed, and how to install it otherwise? I am currently using Linux Mint 20.3.
The axge driver you linked is for the FreeBSD version of Ubuntu. The corresponding Linux driver seems to be named ax88179_178a. It should be included in the standard kernels of all modern distributions, as the copyright marking in the source code is from year 2013. Here it is in kernel version 4.9.318, the oldest kernel currently in long-term support by the kernel developers.
Driver for AX88179 Gigabit Ethernet
1,655,319,444,000
I have a pcap file and need to send it to specific interface. How can I do it?
You can do this with Tcpreplay. The interface to use can be specified with the --intf1 option.
How to send pcap file to ethernet
1,655,319,444,000
I am trying to test the NAPI functionalities on embedded linux environment. I used 'pktgen' to generate the large number of packets and tried to verify the interrupt count of my network interface at /proc/interrupts. I found out that interrupt count is comparatively less than the packets generated. Also I am trying to tune the 'netdev_budget' value from 1 to 1000(default is 300) so that I can observe the reduction in interrupt count when netdev_budget is increased. However increasing the netdev_budget doesn't seems to help. The interrupt is similar to that of interrupt count observed with netdev_budget set to 300. So here are my queries: What is the effect of 'netdev_budget' on NAPI? What other parameters I can/should tune to observe the changes in interrupt count? Is there any other way I can use to test the NAPI functionality on Linux?(Apart from directly looking at the network driver code) Any help is much appreciated. Thanks in advance.
I wrote a comprehensive blog post about Linux network tuning which explains everything about monitoring, tuning, and optimizing the Linux network stack (including the NAPI weight). Take a look. Keep in mind: some drivers do not disable IRQs from the NIC when NAPI starts. They are supposed to, but some simply do not. You can verify this by examining the hard IRQ handler in the driver to see if hard IRQs are being disabled. Note that hard IRQs are re-enabled in some cases as mentioned in the blog post and below. As far as your questions: Increasing netdev_budget increases the number of packets that the NET_RX softirq can process. The number of packaets that can be processed is also limited by a time limit, which is not tunable. This is to prevent the NET_RX softirq from eating 100% of CPU usage. If the device does not receive enough packets to process during its time allocation, hardirqs are reneabled and NAPI is disabled. You can also try modifying your IRQ coalescing settings for the NIC, if it is supported. See the blog post above for more information on how to do this and what this means, exactly. You should add monitoring to your /proc/net/softnet_stat file. The fields in this file can help you figure out how many packets are being processed, whether you are running out of time, etc. A question for you to consider, if I may: Why does your hardirq rate matter? It probably doesn't matter, directly. The hardirq handler in your NIC driver should do as little work as possible, so it executing a lot is probably not a problem for your system. If it is, you should carefully measure that as it seems very unlikely. Nevertheless, you can adjust IRQ coalescing settings and IRQ CPU affinity to distribute processing to alter the number of hardirqs generated by the NIC and processed by a particular CPU, respectively. You should consider whether you probably are more interested in packet processing throughput or packet processing latency. Depending on which is the concern, you can tune your network stack appropriately. Remember: to completely tune and optimize your Linux networking stack, you have to monitor and tune each component. They are all intertwined and it is difficult (and often incorrect) to monitor and tune just a single aspect of the stack.
How to test linux NAPI feature?
1,655,319,444,000
Yesterday I updated my Arch Linux after 2 Months with sudo pacman -Syu and after the reboot I don't get any connection with the Internet neither from Browser nor with Skype, etc. When I try to ping google.com I get ~]# ping google.com ping: unkown host google.com When I check the ethernet-connection: ip link 1: ..... 2: enps2o: ... state UP ... and with ´ip addr´ i also see that I still have my regular IP addres. After restarting the dhcp-service I got the same IP from the DHCP-server in our university, but still no internet connection. So I'll have a look to set up all my ethernet settings new, maybe there's something broken after the update. After pulling out my ethernet-cable I had for about 2s connecting to the internet, but than it disconnected again Here is the requested update log, and sorry I did the last update on the 15. of July so its only 2 Weeks away :) [2015-07-15 09:42] [PACMAN] Running 'pacman -S banshee' [2015-07-15 09:42] [ALPM] transaction started [2015-07-15 09:42] [ALPM] installed libgdiplus (3.12-1) [2015-07-15 09:42] [ALPM] installed mono (4.0.2.5-1) [2015-07-15 09:42] [ALPM] installed gtk-sharp-2 (2.12.22-1) [2015-07-15 09:42] [ALPM] installed mono-addins (1.1-1) [2015-07-15 09:42] [ALPM] installed dbus-sharp (0.8.1-1) [2015-07-15 09:42] [ALPM] installed dbus-sharp-glib (0.6.0-1) [2015-07-15 09:42] [ALPM] installed gdata-sharp (1.7.0.1-3) [2015-07-15 09:42] [ALPM] installed taglib-sharp (2.1.0.0-2) [2015-07-15 09:42] [ALPM] installed gudev-sharp (0.1-3) [2015-07-15 09:42] [ALPM] installed gkeyfile-sharp (0.1-3) [2015-07-15 09:42] [ALPM] installed gconf-sharp (2.24.2-4) [2015-07-15 09:42] [ALPM] installed mono-zeroconf (0.9.0-4) [2015-07-15 09:42] [ALPM] installed mono-upnp (0.1.2-2) [2015-07-15 09:42] [ALPM] installed gvfs (1.24.1-2) [2015-07-15 09:42] [ALPM] installed banshee (2.6.2-7) [2015-07-15 09:42] [ALPM] transaction completed [2015-08-04 14:42] [PACMAN] Running 'pacman -S jdk8-openjdk' [2015-08-04 14:42] [PACMAN] Running 'pacman -Syu' [2015-08-04 14:42] [PACMAN] synchronizing package lists [2015-08-04 14:42] [PACMAN] starting full system upgrade [2015-08-04 14:44] [ALPM] transaction started [2015-08-04 14:44] [ALPM] removed eclipse (4.4.2-1) [2015-08-04 14:44] [ALPM] upgraded gcc-libs (5.1.0-5 -> 5.2.0-1) [2015-08-04 14:44] [ALPM] upgraded sqlite (3.8.10.2-1 -> 3.8.11.1-1) [2015-08-04 14:44] [ALPM] upgraded libdbus (1.8.18-1 -> 1.8.20-1) [2015-08-04 14:44] [ALPM] upgraded dbus (1.8.18-1 -> 1.8.20-1) [2015-08-04 14:44] [ALPM] upgraded libsystemd (221-2 -> 224-1) [2015-08-04 14:44] [ALPM] upgraded systemd (221-2 -> 224-1) [2015-08-04 14:45] [ALPM] upgraded llvm-libs (3.6.1-1 -> 3.6.2-2) [2015-08-04 14:45] [ALPM] upgraded mesa (10.6.2-1 -> 10.6.3-1) [2015-08-04 14:45] [ALPM] upgraded mesa-libgl (10.6.2-1 -> 10.6.3-1) [2015-08-04 14:45] [ALPM] upgraded hicolor-icon-theme (0.13-1 -> 0.15-1) [2015-08-04 14:45] [ALPM] upgraded harfbuzz (0.9.41-1 -> 1.0.1-1) [2015-08-04 14:45] [ALPM] upgraded qt4 (4.8.7-1 -> 4.8.7-2) [2015-08-04 14:45] [ALPM] upgraded akonadi (1.13.0-4 -> 1.13.0-6) [2015-08-04 14:45] [ALPM] upgraded gnutls (3.4.2-1 -> 3.4.3-1) [2015-08-04 14:45] [ALPM] installed libsoxr (0.1.1-3) [2015-08-04 14:45] [ALPM] upgraded libssh (0.7.0-2 -> 0.7.1-1) [2015-08-04 14:45] [ALPM] upgraded libx264 (2:144.20150223-1 -> 2:148.20150725-1) [2015-08-04 14:45] [ALPM] upgraded ffmpeg (1:2.7.1-1 -> 1:2.7.2-2) [2015-08-04 14:45] [ALPM] upgraded exiv2 (0.24-1 -> 0.25-1) [2015-08-04 14:45] [ALPM] upgraded strigi (0.7.8-6 -> 0.7.8-7) [2015-08-04 14:45] [ALPM] upgraded libdatrie (0.2.8-1 -> 0.2.9-1) [2015-08-04 14:45] [ALPM] upgraded libthai (0.1.21-1 -> 0.1.22-1) [2015-08-04 14:45] [ALPM] upgraded kfilemetadata4 (4.14.3-1 -> 4.14.3-2) [2015-08-04 14:45] [ALPM] upgraded mpfr (3.1.3-1 -> 3.1.3.p4-1) [2015-08-04 14:45] [ALPM] upgraded baloo4-widgets (4.14.3-1 -> 4.14.3-2) [2015-08-04 14:45] [ALPM] upgraded binutils (2.25-5 -> 2.25.1-1) [2015-08-04 14:45] [ALPM] upgraded cabextract (1.4-3 -> 1.6-1) [2015-08-04 14:45] [ALPM] upgraded cairomm (1.10.0-3 -> 1.11.2-1) [2015-08-04 14:45] [ALPM] upgraded ceph (0.94.2-1 -> 0.94.2-2) [2015-08-04 14:45] [ALPM] upgraded cmake (3.2.3-1 -> 3.3.0-1) [2015-08-04 14:45] [ALPM] upgraded colord (1.2.9-3 -> 1.2.11-1) [2015-08-04 14:45] [ALPM] upgraded libcups (2.0.3-1 -> 2.0.4-1) [2015-08-04 14:45] [ALPM] upgraded cups (2.0.3-1 -> 2.0.4-1) [2015-08-04 14:45] [ALPM] upgraded device-mapper (2.02.123-1 -> 2.02.125-1) [2015-08-04 14:45] [ALPM] upgraded dhcpcd (6.9.0-1 -> 6.9.1-1) [2015-08-04 14:45] [ALPM] upgraded jre7-openjdk-headless (7.u79_2.5.5-1 -> 7.u85_2.6.1-1) [2015-08-04 14:45] [ALPM] upgraded jre7-openjdk (7.u79_2.5.5-1 -> 7.u85_2.6.1-1) [2015-08-04 14:45] [ALPM] upgraded jdk7-openjdk (7.u79_2.5.5-1 -> 7.u85_2.6.1-1) [2015-08-04 14:45] [ALPM] upgraded libsecret (0.18.2-1 -> 0.18.3-1) [2015-08-04 14:45] [ALPM] upgraded harfbuzz-icu (0.9.41-1 -> 1.0.1-1) [2015-08-04 14:45] [ALPM] upgraded libepoxy (1.2-2 -> 1.3.1-1) [2015-08-04 14:45] [ALPM] upgraded gdk-pixbuf2 (2.31.4-1 -> 2.31.5-1) [2015-08-04 14:45] [ALPM] upgraded gtk-update-icon-cache (3.16.5-1 -> 3.16.6-1) [2015-08-04 14:45] [ALPM] upgraded gtk3 (3.16.5-1 -> 3.16.6-1) [2015-08-04 14:45] [ALPM] upgraded libmm-glib (1.4.8-2 -> 1.4.10-2) [2015-08-04 14:45] [ALPM] upgraded libnm-glib (1.0.2-4 -> 1.0.4-1) [2015-08-04 14:45] [ALPM] installed webkitgtk (2.4.9-1) [2015-08-04 14:45] [ALPM] installed eclipse-common (4.5.0-3) [2015-08-04 14:45] [ALPM] installed eclipse-java (4.5.0-3) [2015-08-04 14:45] [ALPM] upgraded file (5.23-2 -> 5.24-1) [2015-08-04 14:45] [ALPM] upgraded firefox-adblock-plus (2.6.8-1 -> 2.6.9-1) [2015-08-04 14:45] [ALPM] upgraded flashplugin (11.2.202.481-1 -> 11.2.202.491-1) [2015-08-04 14:45] [ALPM] upgraded gcc (5.1.0-5 -> 5.2.0-1) [2015-08-04 14:45] [ALPM] upgraded git (2.4.5-1 -> 2.5.0-1) [2015-08-04 14:45] [ALPM] upgraded gst-plugins-ugly (1.4.5-2 -> 1.4.5-3) [2015-08-04 14:45] [ALPM] upgraded gstreamer0.10-ugly (0.10.19-14 -> 0.10.19-15) [2015-08-04 14:45] [ALPM] upgraded gstreamer0.10-ugly-plugins (0.10.19-14 -> 0.10.19-15) [2015-08-04 14:45] [ALPM] upgraded libinput (0.19.0-1 -> 0.21.0-1) [2015-08-04 14:45] [ALPM] upgraded kfilemetadata (5.9.2-1 -> 5.9.2-2) [2015-08-04 14:45] [ALPM] upgraded kdeclarative (5.12.0-1 -> 5.12.0-2) [2015-08-04 14:45] [ALPM] upgraded gwenview (15.04.3-1 -> 15.04.3-2) [2015-08-04 14:45] [ALPM] upgraded libtool (2.4.6-2 -> 2.4.6-3) [2015-08-04 14:45] [ALPM] upgraded talloc (2.1.2-1 -> 2.1.3-1) [2015-08-04 14:45] [ALPM] upgraded kdebase-runtime (15.04.3-3 -> 15.04.3-4) [2015-08-04 14:45] [ALPM] upgraded lib32-libldap (2.4.40-1 -> 2.4.41-1) [2015-08-04 14:45] [ALPM] upgraded lib32-curl (7.42.1-1 -> 7.43.0-1) [2015-08-04 14:45] [ALPM] upgraded lib32-gcc-libs (5.1.0-5 -> 5.2.0-1) [2015-08-04 14:45] [ALPM] upgraded lib32-gnutls (3.4.2-1 -> 3.4.3-1) [2015-08-04 14:45] [ALPM] upgraded lib32-libdbus (1.8.18-1 -> 1.8.20-1) [2015-08-04 14:45] [ALPM] upgraded lib32-libtiff (4.0.3-3 -> 4.0.4-1) [2015-08-04 14:45] [ALPM] upgraded lib32-llvm-libs (3.6.1-1 -> 3.6.2-1) [2015-08-04 14:45] [ALPM] upgraded lib32-systemd (221-1 -> 224-1) [2015-08-04 14:45] [ALPM] upgraded lib32-mesa (10.6.2-1 -> 10.6.3-1) [2015-08-04 14:45] [ALPM] upgraded lib32-mesa-libgl (10.6.2-1 -> 10.6.3-1) [2015-08-04 14:45] [ALPM] upgraded lib32-sqlite (3.8.10.2-1 -> 3.8.11.1-1) [2015-08-04 14:45] [ALPM] upgraded libgphoto2 (2.5.7-1 -> 2.5.8-1) [2015-08-04 14:45] [ALPM] upgraded libkexiv2 (15.04.3-1 -> 15.04.3-2) [2015-08-04 14:45] [ALPM] upgraded libkolabxml (1.1.0-2 -> 1.1.1-1) [2015-08-04 14:45] [ALPM] upgraded libnice (0.1.10-1 -> 0.1.13-1) [2015-08-04 14:45] [ALPM] upgraded libteam (1.14-2 -> 1.17-1) [2015-08-04 14:45] [ALPM] upgraded libunistring (0.9.5-1 -> 0.9.6-1) [2015-08-04 14:45] [ALPM] warning: directory permissions differ on /var/lib/libvirt/qemu/ filesystem: 755 package: 770 [2015-08-04 14:45] [ALPM] upgraded libvirt (1.2.17-1 -> 1.2.18-1) [2015-08-04 14:45] [ALPM-SCRIPTLET] >>> You may need to run 'rm -rf ~/.libvirt' [2015-08-04 14:45] [ALPM] upgraded linux-firmware (20150527.3161bfa-1 -> 20150722.e10097a-1) [2015-08-04 14:45] [ALPM] upgraded linux (4.0.7-2 -> 4.1.4-1) [2015-08-04 14:45] [ALPM-SCRIPTLET] >>> Updating module dependencies. Please wait ... [2015-08-04 14:45] [ALPM-SCRIPTLET] >>> Generating initial ramdisk, using mkinitcpio. Please wait... [2015-08-04 14:45] [ALPM-SCRIPTLET] ==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default' [2015-08-04 14:45] [ALPM-SCRIPTLET] -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img [2015-08-04 14:45] [ALPM-SCRIPTLET] ==> Starting build: 4.1.4-1-ARCH [2015-08-04 14:45] [ALPM-SCRIPTLET] -> Running build hook: [base] [2015-08-04 14:45] [ALPM-SCRIPTLET] -> Running build hook: [udev] [2015-08-04 14:45] [ALPM-SCRIPTLET] -> Running build hook: [autodetect] [2015-08-04 14:45] [ALPM-SCRIPTLET] -> Running build hook: [modconf] [2015-08-04 14:45] [ALPM-SCRIPTLET] -> Running build hook: [block] [2015-08-04 14:45] [ALPM-SCRIPTLET] -> Running build hook: [filesystems] [2015-08-04 14:45] [ALPM-SCRIPTLET] -> Running build hook: [keyboard] [2015-08-04 14:45] [ALPM-SCRIPTLET] -> Running build hook: [fsck] [2015-08-04 14:45] [ALPM-SCRIPTLET] ==> Generating module dependencies [2015-08-04 14:45] [ALPM-SCRIPTLET] ==> Creating gzip-compressed initcpio image: /boot/initramfs-linux.img [2015-08-04 14:45] [ALPM-SCRIPTLET] ==> Image generation successful [2015-08-04 14:45] [ALPM-SCRIPTLET] ==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback' [2015-08-04 14:45] [ALPM-SCRIPTLET] -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect [2015-08-04 14:45] [ALPM-SCRIPTLET] ==> Starting build: 4.1.4-1-ARCH [2015-08-04 14:45] [ALPM-SCRIPTLET] -> Running build hook: [base] [2015-08-04 14:45] [ALPM-SCRIPTLET] -> Running build hook: [udev] [2015-08-04 14:45] [ALPM-SCRIPTLET] -> Running build hook: [modconf] [2015-08-04 14:45] [ALPM-SCRIPTLET] -> Running build hook: [block] [2015-08-04 14:45] [ALPM-SCRIPTLET] ==> WARNING: Possibly missing firmware for module: aic94xx [2015-08-04 14:45] [ALPM-SCRIPTLET] ==> WARNING: Possibly missing firmware for module: wd719x [2015-08-04 14:45] [ALPM-SCRIPTLET] -> Running build hook: [filesystems] [2015-08-04 14:45] [ALPM-SCRIPTLET] -> Running build hook: [keyboard] [2015-08-04 14:45] [ALPM-SCRIPTLET] -> Running build hook: [fsck] [2015-08-04 14:45] [ALPM-SCRIPTLET] ==> Generating module dependencies [2015-08-04 14:45] [ALPM-SCRIPTLET] ==> Creating gzip-compressed initcpio image: /boot/initramfs-linux-fallback.img [2015-08-04 14:45] [ALPM-SCRIPTLET] ==> Image generation successful [2015-08-04 14:45] [ALPM] upgraded linux-headers (4.0.7-2 -> 4.1.4-1) [2015-08-04 14:45] [ALPM] upgraded lvm2 (2.02.123-1 -> 2.02.125-1) [2015-08-04 14:46] [ALPM] upgraded man-pages (4.00-1 -> 4.01-1) [2015-08-04 14:46] [ALPM] upgraded maven (3.3.3-1 -> 3.3.3-2) [2015-08-04 14:46] [ALPM] upgraded mercurial (3.4.2-1 -> 3.5-1) [2015-08-04 14:46] [ALPM] upgraded mplayer (37379-3 -> 37379-4) [2015-08-04 14:46] [ALPM] upgraded netctl (1.10-2 -> 1.11-1) [2015-08-04 14:46] [ALPM] upgraded networkmanager (1.0.2-4 -> 1.0.4-1) [2015-08-04 14:46] [ALPM] warning: directory permissions differ on /usr/lib/node_modules/npm/node_modules/.bin/ filesystem: 777 package: 755 [2015-08-04 14:46] [ALPM] upgraded npm (2.13.0-1 -> 2.13.2-1) [2015-08-04 14:46] [ALPM] upgraded openjdk7-doc (7.u79_2.5.5-1 -> 7.u85_2.6.1-1) [2015-08-04 14:46] [ALPM] upgraded openjdk7-src (7.u79_2.5.5-1 -> 7.u85_2.6.1-1) [2015-08-04 14:46] [ALPM] upgraded openjdk8-doc (8.u45-1 -> 8.u51-1) [2015-08-04 14:46] [ALPM] upgraded openjdk8-src (8.u45-1 -> 8.u51-1) [2015-08-04 14:46] [ALPM] upgraded openssh (6.9p1-1 -> 6.9p1-2) [2015-08-04 14:46] [ALPM] warning: /etc/pacman.d/mirrorlist installed as /etc/pacman.d/mirrorlist.pacnew [2015-08-04 14:46] [ALPM] upgraded pacman-mirrorlist (20150713-1 -> 20150731-1) [2015-08-04 14:46] [ALPM] upgraded pacman (4.2.1-1 -> 4.2.1-2) [2015-08-04 14:46] [ALPM] upgraded perl-dbi (1.633-2 -> 1.634-1) [2015-08-04 14:46] [ALPM] upgraded perl-uri (1.68-1 -> 1.69-1) [2015-08-04 14:46] [ALPM] upgraded perl-http-message (6.08-1 -> 6.10-1) [2015-08-04 14:46] [ALPM] upgraded sip (4.16.8-1 -> 4.16.9-1) [2015-08-04 14:46] [ALPM] upgraded python2-sip (4.16.8-1 -> 4.16.9-1) [2015-08-04 14:46] [ALPM] upgraded qjackctl (0.3.13-1 -> 0.4.0-2) [2015-08-04 14:46] [ALPM] upgraded speech-dispatcher (0.8.3-2 -> 0.8.3-5) [2015-08-04 14:46] [ALPM] warning: /etc/sudoers installed as /etc/sudoers.pacnew [2015-08-04 14:46] [ALPM] upgraded sudo (1.8.13-1 -> 1.8.14.p3-2) [2015-08-04 14:46] [ALPM] upgraded systemd-sysvcompat (221-2 -> 224-1) [2015-08-04 14:46] [ALPM] upgraded virtualbox-host-modules (4.3.28-2 -> 5.0.0-2) [2015-08-04 14:46] [ALPM-SCRIPTLET] In order to use the new version, reload all virtualbox modules manually. [2015-08-04 14:46] [ALPM] upgraded virtualbox (4.3.28-1 -> 5.0.0-1) [2015-08-04 14:46] [ALPM-SCRIPTLET] 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% [2015-08-04 14:46] [ALPM] upgraded virtualbox-ext-vnc (4.3.28-1 -> 5.0.0-1) [2015-08-04 14:46] [ALPM-SCRIPTLET] 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% [2015-08-04 14:46] [ALPM] upgraded virtualbox-guest-iso (4.3.28-1 -> 5.0.0-1) [2015-08-04 14:46] [ALPM] upgraded virtualbox-guest-modules (4.3.28-2 -> 5.0.0-2) [2015-08-04 14:46] [ALPM] upgraded xorg-server-common (1.17.2-2 -> 1.17.2-4) [2015-08-04 14:46] [ALPM] upgraded xorg-server (1.17.2-2 -> 1.17.2-4) [2015-08-04 14:46] [ALPM] upgraded virtualbox-guest-utils (4.3.28-1 -> 5.0.0-1) [2015-08-04 14:46] [ALPM] upgraded wine (1.7.47-1 -> 1.7.48-1) [2015-08-04 14:46] [ALPM] installed l-smash (2.3.0-2) [2015-08-04 14:46] [ALPM] upgraded x264 (2:144.20150223-1 -> 2:148.20150725-1) [2015-08-04 14:46] [ALPM] upgraded xf86-video-intel (1:2.99.917+364+gb24e758-1 -> 1:2.99.917+381+g5772556-1) [2015-08-04 14:46] [ALPM] transaction completed Console-Output: [sebastian@ulbp2681 ~]$ ip addr 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 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether 4c:72:b9:4b:08:09 brd ff:ff:ff:ff:ff:ff inet 141.35.23.78/22 brd 141.35.23.255 scope global enp2s0 valid_lft forever preferred_lft forever inet6 fe80::856b:fd54:837f:38d/64 scope link valid_lft forever preferred_lft forever [sebastian@ulbp2681 ~]$ ip route default via 141.35.20.1 dev enp2s0 metric 202 141.35.20.0/22 dev enp2s0 proto kernel scope link src 141.35.23.78 metric 202 [sebastian@ulbp2681 ~]$ journalctl -b _SYSTEMD_UNIT=NetworkManager.service -- No entries -- after I was checking my syslog I fpund that: Aug 06 06:45:23 ulbp2681 kernel: alx 0000:02:00.0 enp2s0: fatal interrupt 0x400, resetting Aug 06 06:45:23 ulbp2681 kernel: alx 0000:02:00.0 enp2s0: NIC Up: 1 Gbps Full Aug 06 06:45:23 ulbp2681 dhcpcd[1226]: enp2s0: carrier lost Aug 06 06:45:23 ulbp2681 dhcpcd[1226]: enp2s0: deleting default route via 141.35.20.1 Aug 06 06:45:23 ulbp2681 avahi-daemon[455]: Withdrawing address record for 141.35.23.78 on enp2s0. Aug 06 06:45:23 ulbp2681 avahi-daemon[455]: Leaving mDNS multicast group on interface enp2s0.IPv4 with address 141.35.23.78. Aug 06 06:45:23 ulbp2681 avahi-daemon[455]: Interface enp2s0.IPv4 no longer relevant for mDNS. Aug 06 06:45:23 ulbp2681 dhcpcd[1226]: enp2s0: carrier acquired Aug 06 06:45:23 ulbp2681 dhcpcd[1226]: enp2s0: rebinding lease of 141.35.23.78 Aug 06 06:45:25 ulbp2681 ntpd[491]: Deleting interface #84 enp2s0, 141.35.23.78#123, interface stats: received=4, sent=36, dropped=0, active_time=713 secs Aug 06 06:45:25 ulbp2681 ntpd[491]: 5.9.159.253 local addr 141.35.23.78 -> <null> Aug 06 06:45:25 ulbp2681 ntpd[491]: 144.76.96.7 local addr 141.35.23.78 -> <null> Aug 06 06:45:25 ulbp2681 ntpd[491]: 129.70.132.35 local addr 141.35.23.78 -> <null> Aug 06 06:45:25 ulbp2681 ntpd[491]: 85.10.246.226 local addr 141.35.23.78 -> <null> Aug 06 06:45:29 ulbp2681 dhcpcd[1226]: enp2s0: leased 141.35.23.78 for 691200 seconds Aug 06 06:45:29 ulbp2681 avahi-daemon[455]: Joining mDNS multicast group on interface enp2s0.IPv4 with address 141.35.23.78. Aug 06 06:45:29 ulbp2681 dhcpcd[1226]: enp2s0: adding route to 141.35.20.0/22 Aug 06 06:45:29 ulbp2681 avahi-daemon[455]: New relevant interface enp2s0.IPv4 for mDNS. Aug 06 06:45:29 ulbp2681 dhcpcd[1226]: enp2s0: adding default route via 141.35.20.1 Aug 06 06:45:29 ulbp2681 avahi-daemon[455]: Registering new address record for 141.35.23.78 on enp2s0.IPv4. Aug 06 06:45:29 ulbp2681 NetworkManager[453]: <info> Policy set 'enp2s0' (enp2s0) as default for IPv4 routing and DNS. Aug 06 06:45:29 ulbp2681 dhcpcd[1226]: enp2s0: removing route to 141.35.20.0/22 Aug 06 06:45:31 ulbp2681 ntpd[491]: Listen normally on 85 enp2s0 141.35.23.78:123 Aug 06 06:45:31 ulbp2681 ntpd[491]: new interface(s) found: waking up resolver Aug 06 06:55:47 ulbp2681 kernel: alx 0000:02:00.0 enp2s0: fatal interrupt 0x400, resetting Aug 06 06:55:47 ulbp2681 kernel: alx 0000:02:00.0 enp2s0: NIC Up: 1 Gbps Full .... SO how could I solve this bug in the kernel? I tried a rollback to the pivious kernel, but this didn't work eather maybe I did it wrong?
It seems to be a bug the kernel. After rollback and downgrade of all updated network packages it works again this was the command i used: [root@ulbp2681 ~]# cd /var/cache/pacman/pkg [root@ulbp2681 pkg]# pacman -U linux-4.0.7-2-x86_64.pkg.tar.xz linux-headers-4.0.7-2-x86_64.pkg.tar.xz dhcpcd-6.9.0-1-x86_64.pkg.tar.xz netctl-1.10-2-any.pkg.tar.xz networkmanager-1.0.2-4-x86_64.pkg.tar.xz 2 things I needed to find the solution: journalsctl -b for systemlog after current boot pacman-logfiles to see what has been updated
Arch-Linux after system-update no internet connection but connection lan
1,655,319,444,000
I have a Toshiba Satellite PSAG8U-04001W. No eth* interface shows up on ifconfig. $ ifconfig -a lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:32 errors:0 dropped:0 overruns:0 frame:0 TX packets:32 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2544 (2.4 KiB) TX bytes:2544 (2.4 KiB) wlan2 Link encap:Ethernet HWaddr 00:21:6b:d3:1b:dc inet addr:192.168.1.83 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::221:6bff:fed3:1bdc/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:27901 errors:0 dropped:0 overruns:0 frame:0 TX packets:18098 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:20958957 (19.9 MiB) TX bytes:3551000 (3.3 MiB) Even more surprinsingly, neither lshw nor lspci shows anything related to wired ethernet controller/adapter: lshw: $lshw -C network *-network description: Wireless interface product: WiFi Link 5100 vendor: Intel Corporation physical id: 0 bus info: pci@0000:03:00.0 logical name: wlan2 version: 00 serial: 00:21:6b:d3:1b:dc width: 64 bits clock: 33MHz capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless configuration: broadcast=yes driver=iwlwifi driverversion=3.2.0-4-amd64 firmware=8.83.5.1 build 33692 ip=192.168.1.83 latency=0 link=yes multicast=yes wireless=IEEE 802.11abgn resources: irq:45 memory:d4600000-d4601fff lspci: $lspci -nnk 00:00.0 Host bridge [0600]: Intel Corporation Mobile 4 Series Chipset Memory Controller Hub [8086:2a40] (rev 07) Subsystem: Toshiba America Info Systems Device [1179:ff1e] Kernel driver in use: agpgart-intel 00:02.0 VGA compatible controller [0300]: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller [8086:2a42] (rev 07) Subsystem: Toshiba America Info Systems Device [1179:ff1e] Kernel driver in use: i915 00:02.1 Display controller [0380]: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller [8086:2a43] (rev 07) Subsystem: Toshiba America Info Systems Device [1179:ff1e] 00:1a.0 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 [8086:2937] (rev 03) Subsystem: Toshiba America Info Systems Device [1179:ff1e] Kernel driver in use: uhci_hcd 00:1a.1 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 [8086:2938] (rev 03) Subsystem: Toshiba America Info Systems Device [1179:ff1e] Kernel driver in use: uhci_hcd 00:1a.7 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 [8086:293c] (rev 03) Subsystem: Toshiba America Info Systems Device [1179:ff1e] Kernel driver in use: ehci_hcd 00:1b.0 Audio device [0403]: Intel Corporation 82801I (ICH9 Family) HD Audio Controller [8086:293e] (rev 03) Subsystem: Toshiba America Info Systems Device [1179:ff1e] Kernel driver in use: snd_hda_intel 00:1c.0 PCI bridge [0604]: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 [8086:2940] (rev 03) Kernel driver in use: pcieport 00:1c.1 PCI bridge [0604]: Intel Corporation 82801I (ICH9 Family) PCI Express Port 2 [8086:2942] (rev 03) Kernel driver in use: pcieport 00:1c.4 PCI bridge [0604]: Intel Corporation 82801I (ICH9 Family) PCI Express Port 5 [8086:2948] (rev 03) Kernel driver in use: pcieport 00:1d.0 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 [8086:2934] (rev 03) Subsystem: Toshiba America Info Systems Device [1179:ff1e] Kernel driver in use: uhci_hcd 00:1d.1 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 [8086:2935] (rev 03) Subsystem: Toshiba America Info Systems Device [1179:ff1e] Kernel driver in use: uhci_hcd 00:1d.2 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 [8086:2936] (rev 03) Subsystem: Toshiba America Info Systems Device [1179:ff1e] Kernel driver in use: uhci_hcd 00:1d.3 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 [8086:2939] (rev 03) Subsystem: Toshiba America Info Systems Device [1179:ff1e] Kernel driver in use: uhci_hcd 00:1d.7 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 [8086:293a] (rev 03) Subsystem: Toshiba America Info Systems Device [1179:ff1e] Kernel driver in use: ehci_hcd 00:1e.0 PCI bridge [0604]: Intel Corporation 82801 Mobile PCI Bridge [8086:2448] (rev 93) 00:1f.0 ISA bridge [0601]: Intel Corporation ICH9M LPC Interface Controller [8086:2919] (rev 03) Subsystem: Toshiba America Info Systems Device [1179:ff1e] 00:1f.2 SATA controller [0106]: Intel Corporation 82801IBM/IEM (ICH9M/ICH9M-E) 4 port SATA Controller [AHCI mode] [8086:2929] (rev 03) Subsystem: Toshiba America Info Systems Device [1179:ff1e] Kernel driver in use: ahci 00:1f.3 SMBus [0c05]: Intel Corporation 82801I (ICH9 Family) SMBus Controller [8086:2930] (rev 03) Subsystem: Toshiba America Info Systems Device [1179:ff1e] Kernel driver in use: i801_smbus 03:00.0 Network controller [0280]: Intel Corporation WiFi Link 5100 [8086:4232] Subsystem: Intel Corporation WiFi Link 5100 AGN [8086:1201] Kernel driver in use: iwlwifi 04:06.0 FireWire (IEEE 1394) [0c00]: Ricoh Co Ltd R5C832 IEEE 1394 Controller [1180:0832] (rev 05) Subsystem: Toshiba America Info Systems Device [1179:ff1e] Kernel driver in use: firewire_ohci 04:06.1 SD Host controller [0805]: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter [1180:0822] (rev 22) Subsystem: Toshiba America Info Systems Device [1179:ff1e] Kernel driver in use: sdhci-pci 04:06.2 System peripheral [0880]: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter [1180:0592] (rev 12) Subsystem: Toshiba America Info Systems Device [1179:ff1e] Kernel driver in use: r592 04:06.3 System peripheral [0880]: Ricoh Co Ltd xD-Picture Card Controller [1180:0852] (rev 12) Subsystem: Toshiba America Info Systems Device [1179:ff1e] Kernel driver in use: r852 Why is my laptop's wired ethernet not showing? How can I debug this? The installation of Debian wasn't originally on this system: it was on an older laptop whose motherboard fried, so I rescued the hard drive as well as the Debian installation. However, I doubt this should have anything to do with lspci not even detecting the wired eth controller.
Make sure that the wired network card hasn't been disabled in the BIOS.
wired ethernet interface not detected by lshw, lspci
1,655,319,444,000
I just installed FreeBSD 9 on a new laptop and I'm having some trouble getting the network cards to work. Presumably the file representing the cards is in /dev, but where would the configuration files be? In /etc? Any tutorial or guidance in this matter would be greatly appreciated.
First of all, run ifconfig to get a list of all interfaces known to the kernel. In FreeBSD, interfaces are named after the driver module that controls them, so you might see em0, rl0, or any number of other things. Once you know the name of the interface, you need a few settings in /etc/rc.conf. If you want to use dhcp, it's simple. (I will assume you have an Intel PRO/1000 card, which uses the em driver). ifconfig_em0="DHCP" That should be enough to get you on the network. If you use static IP addresses, you'll need something like this, substituting suitable values, instead: ifconfig_em0="inet 192.168.0.34 netmask 255.255.255.0" defaultrouter="192.168.0.1" You can then either reboot the machine and let the startup process start the network card, or you can run /etc/rc.d/netif start to do it immediately.
Setting up network cards on FreeBSD
1,655,319,444,000
I've working on Arch Linux and in 99% of time I connect to internet by WLAN but sometimes I need to use ethernet connection, so today I see something strange. My eth0 device is down, and I can't get it up. I tried # ip link set eth0 up # ifconfig eth0 up But after any of above commands ip link shows: 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN mode DEFAULT link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT qlen 1000 link/ether 8c:a9:82:01:13:6e brd ff:ff:ff:ff:ff:ff 5: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT qlen 1000 link/ether 14:da:e9:0c:a9:d6 brd ff:ff:ff:ff:ff:ff Output of lspci -v: 08:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06) Subsystem: ASUSTeK Computer Inc. U6V/U31J laptop Flags: bus master, fast devsel, latency 0, IRQ 48 I/O ports at 8000 [size=256] Memory at d3804000 (64-bit, prefetchable) [size=4K] Memory at d3800000 (64-bit, prefetchable) [size=16K] Capabilities: <access denied> Kernel driver in use: r8168 Output of dmesg | grep r8168: [ 7.642820] r8168 Gigabit Ethernet driver 8.032.00-NAPI loaded [ 7.642964] r8168 0000:08:00.0: irq 48 for MSI/MSI-X [ 7.798226] r8168: This product is covered by one or more of the following patents: US5,307,459, US5,434,872, US5,732,094, US6,570,884, US6,115,776, and US6,327,625. [ 7.798232] r8168 Copyright (C) 2012 Realtek NIC software team <[email protected]> [ 19.263312] r8168: eth0: link down [ 404.826781] r8168 Gigabit Ethernet driver 8.032.00-NAPI loaded [ 404.827275] r8168 0000:08:00.0: irq 48 for MSI/MSI-X [ 404.981486] r8168: This product is covered by one or more of the following patents: US5,307,459, US5,434,872, US5,732,094, US6,570,884, US6,115,776, and US6,327,625. [ 404.981491] r8168 Copyright (C) 2012 Realtek NIC software team <[email protected]> [ 405.011797] r8168: eth0: link down Output of dmesg | grep eth0: [ 7.798230] eth0: Identified chip type is 'RTL8168E/8111E'. [ 19.263312] r8168: eth0: link down [ 19.263709] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready [ 404.981490] eth0: Identified chip type is 'RTL8168E/8111E'. [ 405.011797] r8168: eth0: link down [ 405.012293] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Seems RealTek 8168B has problems on Debian Squeeze. Try those: If you have problems with the network interface not going up with RealTek 8168, this may help and provide insight (ie. realtek firmware problem): https://serverfault.com/questions/384165/after-installing-debian-squeeze-ethernet-does-not-come-up If you have problems with the kernel not even loading the correct module = drivers for RealTek 8168, this may provide necessary insight (ie. hardware detection problem): http://djlab.com/2010/10/fixing-rtl8111-8168b-driver-debian-ubuntu/
Cannot get Realtek r8168 ethernet card up