Created
September 5, 2013 16:45
-
-
Save simple/6452813 to your computer and use it in GitHub Desktop.
ip & dig usage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat > /dev/null <<EOF | |
Extracted from [Obsolete tools: nslookup & ifconfig](http://blog.christian-stankowic.de/?p=5319&lang=en) | |
Task ifconfig/route ip | |
------------------------------------------------------------------------------------- | |
Show all NICs ifconfig ip addr show | |
Show specific NIC ifconfig eth0 ip addr show eth0 | |
Disable NIC ifconfig eth0 down ip link set eth0 down | |
Enable NIC ifconfig eth0 up ip link set eth0 up | |
Assign IP ifconfig eth0 [IP] netmask [NM] ip addr [IP]/[CIDR] dev eth0 | |
Show routing table route | netstat -r ip route | |
Set standard route route add default gw [IP] eth0 ip route add default via [IP] | |
Task nslookup dig | |
------------------------------------------------------------------------------------- | |
Forward lookup nslookup google.de dig google.de | |
dig +short google.de | |
Reverse lookup nslookup [IP] dig -x [IP] | |
dig +short -x [IP] | |
Use specific nslookup google.de [DNS] dig @[DNS] google.de | |
DNS server dig @[DNS] +short google.de | |
Ask for MX records nslookup -query=mx google.de dig google.de MX | |
dig +short google.de MX | |
Specific timeout nslookup -timeout=42 google.de dig google.de +time=42 | |
dig +short google.de +time=42 | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment