# ifconfig
Sample output:
lo0: flags=8049 mtu 33224 groups: lo inet 127.0.0.1 netmask 0xff000000 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 pcn0: flags=8843 mtu 1500 lladdr 00:0c:29:7a:b5:ce groups: egress media: Ethernet autoselect (autoselect) inet 74.86.49.141 netmask 0xfffffff0 broadcast 74.86.49.143 inet6 fe80::20c:29ff:fe7a:b5ce%pcn0 prefixlen 64 scopeid 0x1 pflog0: flags=0<> mtu 33224 enc0: flags=0<> mtu 1536
Daftar Isi
Task: View pcn0 interface TCP / IP configuration
Type the following command:
# cat /etc/hostname.pcn0
Sample output:
inet 74.86.49.141 255.255.255.240 NONE
Task: Change IP configuration
To set new IP address open interface configuration file /etc/hostname.pcn0
# vi /etc/hostname.pcn0
Append/modify configuration:
inet 192.168.1.5 255.255.255.0 NONE
How do I restart or update networking configuration
To reset or restart an existing interface to its default state or update state, by invoking the following, where pnc0 is the interface name:
# sh /etc/netstart pnc0
Gateway :
vi /etc/mygate
192.168.1.1
# sh /etc/netstart
(Visited 37 times, 1 visits today)