ifconfig and other network syntax
Strange huh, why should I write about ifconfig syntax.
Yes, it is weird. But I guess, not all people know how to set up ip, gateway and dns manually.
- ifconfig
Display current configuration for all NIC’s. - ifconfig eth0
Display current configuration for eth0. - ifconfig eth0 192.168.1.2
Assign IP address 192.168.1.2 to eth0. - ifconfig eth0:0 192.168.1.2
Assign multiple IP’s to eth0. - ifconfig eth0:1 192.168.1.3
Assign second IP address to eth0:1 - route add default gw 192.168.1.1
Assign default gateway. - ifconfig eth0 192.168.1.2 netmask 255.255.255.0
Assign IP/Subnet to eth0. - route / route -n
View current routing table. - traceroute www.domainnameyahoo.info
Trace network route from desktop to www.domainnameyahoo.info - tracepath www.domainnameyahoo.info
Trace network path from desktop to www.domainnameyahoo.info - host www.domainnameyahoo.info
DNS test using www.domainnameyahoo.info - host 209.250.240.98
Reverse host lookup by IP address. - dig -x 209.250.240.98
Advanced reverse DNS lookup by IP address.
Don’t forget to add the syntax in rc.local if you use multiple ipadrress.
No Comments »
No comments yet.