Tag Info

Hot answers tagged

19

Setting up a dummy interface If you want to create network interfaces, but lack a physical NIC to back it, you can use the dummy link type. You can read more about them here: iproute2 Wikipedia page. Creating eth10 To make this interface you'd first need to make sure that you have the dummy kernel module loaded. You can do this like so: $ sudo lsmod | ...


13

This is one of those things that surprises people because it goes against what they've been taught. 2 machines with the same hardware mac address on the same broadcast domain can talk to each other just fine as long as they have different IP addresses (and the switching gear plays nice). Lets start with a test setup: VM1 $ ip addr show dev enp0s8 3: ...


11

ifconfig will output information about your interfaces, including the MAC address: $ ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:11:22:33:44:55 inet addr:10.0.0.1 Bcast:10.0.0.255 Mask:255.0.0.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:289748093 errors:0 dropped:0 overruns:0 frame:0 ...


10

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 ...


9

The articles you found are somewhat outdated. There is now an easy method to assign names to network interfaces, through Udev. On Debian and derivatives (including Ubuntu), look out for a file called /etc/udev/rules.d/70-persistent-net.rules. This file is created by /lib/udev/rules.d/75-persistent-net-generator.rules with the help of the script ...


9

cat /sys/class/net/eth0/carrier is by far the easiest method.


9

That's a change in how now udevd assigns names to ethernet devices. Now your devices use the "Predictable Interface Names", which are based on (and quoting the sources): Names incorporating Firmware/BIOS provided index numbers for on-board devices (example: eno1) Names incorporating Firmware/BIOS provided PCI Express hotplug slot index numbers ...


8

Yes. By putting network interfaces into promiscuous mode, tcpdump is able to see exactly what is going out (and in) the network interface. tcpdump operates at layer2 +. it can be used to look at Ethernet, FDDI, PPP & SLIP, Token Ring, and any other protocol supported by libpcap, which does all of tcpdump's heavy lifting. Have a look at the ...


8

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 ...


8

Those are network interfaces, not IP addresses. A network interface can have packets from any protocol exchanged on them, including IPv4 or IPv6, in which case they can be given one or more IP addresses. virbr are bridge interfaces. They are virtual in that there's no network interface card associated to them. Their role is to act like a real bridge or ...


8

The 2 methods I've seen used predominately are to use ethtool or to manually parse the contents of /sys. ethtool For example if your interface is eth0 you can query it using ethtool and then parse for the line, "Link detected". Example $ sudo ethtool eth0 Settings for eth0: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full ...


7

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.


7

Each network adapter on linux has a sysctl boolean parameter accept_local (/proc/sys/net/ipv4/conf/eth0/accept_local). Try setting it to 0 for all adapters involved (additionally, you may need to modify your routing table to suit your test setup). Also, make sure that rp_filter (/proc/sys/net/ipv4/conf/eth0/rp_filter) is enabled (not 0). Reference: ...


7

you want tcpdump not nc, and the syntax would be tcpdump -i eth0 netcat is only for basic TCP/IP testing. tcpdump utilizes the libpcap library which allows for lowlevel interactions with packets and the likes


6

It's pretty easy. You need to connect PC to notebook. Configure eth0 on PC (set for example ip = 192.168.2.3 and default gateway 192.168.2.2 and dns server to 8.8.8.8). That's all you need to do on PC. On notebook you need to set up the internet connection as usual and configure eth0 with the following way: set ip address to 192.168.2.2, enable net ...


6

Just remove the IPv4 and IPv6 addresses with ip addr flush dev eth1 and ip -6 addr flush dev eth1.


6

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: ...


5

Many devices use nonstandard connectors for serial ports. RJ-45 is probably the most common connector used for RS-232 serial after DB-9, but unlike with DB-9, there aren't even de facto standards for the pinout. I'm aware of 4 different RJ-45 RS-232 pinouts, and there are probably others I haven't seen yet. None of this means that people are somehow ...


5

If you want that information and more in handy little commands: mii-tool eth0 ethtool eth0 might do the job.


5

I have read a similar story from GeNUA. Their workaround was to restart the network driver (OpenBSD). On Linux this would translate to: ifdown eth3 && rmmod bnx2 && modprobe bnx2 && ifup eth3. The core problem was an internal coding problem with pointers on a PAE system in conjunction with the broadcom-driver.


5

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 ...


5

In my situation, I changed the network adapter configuration of my hypervisor after the installation of CentOS. What happened in this case is that the old interface eth0 no longer existed but a new one called eth1 did. ls /sys/class/net eth1 lo I changed the network config /etc/sysconfig/network-scripts/ifcfg-eth0 to use DEVICE=eth1 and it worked again.


5

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 ...


5

This is as simple as it could be. You do not need any bridging. Just MASQUERADE your local network on RPi: iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE Enable forwarding of traffic: echo 1 > /proc/sys/net/ipv4/ip_forward RPi will not work as invisible bump-on-the-wire but will need a network setup between it and your private router – which ...


5

Please do not get discouraged by the overwhelming amount of information in setting up of samba. It's pretty simple as discussed here. If you do not believe, these are the steps I did in my machine and it took me just couple of minutes to access the mount point of my RHEL machine on the Windows machine. I assume the RHEL and Windows machine are available in ...


4

Here's a modern Linux method: ip -o link show dev eth0 | grep -Po 'ether \K[^ ]*' It's modern in that ifconfig has long been deprecated in favour of ip from the iproute2 package, and that grep has the -P option for perl regular expressions for the zero-width positive look-behind assertion. grep -o is nice for text extraction. sed is traditionally used ...


4

#! /bin/sh /sbin/ifconfig eth0 | perl -ne 'print "$1\n" if /HWaddr\s+(\S+)/' >file There are other tools that could cut the MAC address out of ifconfig's output, of course. I just like Perl.


4

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.


4

ip link show , by default shows all the interfaces, use ip link show up to show only the running interfaces. You could use filters to get the difference.


4

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 ...



Only top voted, non community-wiki answers of a minimum length are eligible