User Tools

Site Tools


old:netzwerk:ip

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
old:netzwerk:ip [2019/05/06 14:31] – external edit 127.0.0.1old:netzwerk:ip [2023/01/11 20:29] (current) – external edit 127.0.0.1
Line 19: Line 19:
 ''ip link set dev eth0 address <new_mac_addr>''\\ ''ip link set dev eth0 address <new_mac_addr>''\\
 \\ \\
 +<code>
 +# ip cheat sheet
 +# display IP address
 +ip a
 +ip a s dev eth0
 +
 +# link
 +ip l
 +ip link show dev eth0
 +
 +# link statistics
 +ip -s l
 +ip -s link show dev eth0
 +
 +# show arp
 +ip n
 +ip neigh show dev eth0
 +
 +# modify addresses
 +ip addr add 192.168.1.1/24 dev eth0
 +ip addr del 192.168.1.1/24 dev eth0
 +
 +ip link set eth0 up
 +ip link set eth0 down
 +ip link set eth0 mtu 9000
 +ip link set eth0 promisc on          # enable promiscuous mode
 +
 +# routing
 +ip r
 +
 +ip route add default via 192.168.1.1 dev eth0
 +ip route add 192.168.1.0/24 via 192.168.1.1
 +ip route add 192.168.1.0/24 dev eth0
 +
 +ip route del default
 +ip route delete 192.168.1.0/24 via 192.168.1.1
 +
 +ip route replace 192.168.1.0/24 dev eth0
 +
 +ip route get 192.168.1.5
 +
 +# managing arp table
 +ip neigh add 192.168.1.1 lladdr 1:2:3:4:5:6 dev eth0
 +ip neigh del 192.168.1.1 dev eth0
 +ip neigh replace 192.168.1.1 lladdr 1:2:3:4:5:6 dev eth0
 +
 +# misc
 +arping -I eth0 192.168.1.1       # Send ARP request to 192.168.1.1 via interface eth0
 +arping -D -I eth0 192.168.1.1    # Check for duplicate MAC addresses at 192.168.1.1 on eth0
 +
 +ethtool -g eth0                  # Display ring buffer for eth0
 +ethtool -i eth0                  # Display driver information for eth0
 +ethtool -p eth0                  # Identify eth0 by sight, typically by causing LEDs to blink on the network port
 +ethtool -S eth0                  # Display network and driver statistics for eth0
 +
 +ss -a                            # Show all sockets (listening and non-listening)
 +ss -e                            # Show detailed socket information
 +ss -o                            # Show timer information
 +ss -n                            # Do not resolve addresses
 +ss -p                            # Show process using the socket
 +</code>
old/netzwerk/ip.1557145894.txt.gz · Last modified: 2023/01/11 20:30 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki