Toggle navigation
All Forums
Recent Posts
Sign In
Configuring network-settings in the shell
whyatt thrash
Posted:
September 12, 2002 4:01AM
in
Genius Bar
edited January 2014
How is it done? What commands do I use to print out my current network settings like IP and Name-servers, and what commands do I use to edit them from the terminal?
Comments
Reply 1 of 2
dobby
Posts:
797
member
September 12, 2002 6:21AM
$ ifconfig -a (shows your NICs and ip/mask/broadcast)
$ netstat -rn (shows routes including default)
$ nslookup
> set all (prints out DNS details if entered)
> exit
$ ifconfig en0 10.10.10.20 netmask 255.255.255.128 broadcast 10.10.10.127 (this will config your NIC to the ip address 10.10.10.20 with a 25bit mask).
Dobby.
[ 09-12-2002: Message edited by: dobby ]</p>
Reply 2 of 2
defiant
Posts:
4,876
member
September 12, 2002 7:17AM
also look at the man pages: (
just type in the text below an hit return
)
[code]man ifconfig
man netstat
man nslookup</pre><hr></blockquote>
Sign In
or
Register
to comment.
Comments
$ netstat -rn (shows routes including default)
$ nslookup
> set all (prints out DNS details if entered)
> exit
$ ifconfig en0 10.10.10.20 netmask 255.255.255.128 broadcast 10.10.10.127 (this will config your NIC to the ip address 10.10.10.20 with a 25bit mask).
Dobby.
[ 09-12-2002: Message edited by: dobby ]</p>
[code]man ifconfig
man netstat
man nslookup</pre><hr></blockquote>