1. To View Existing IP, Gateway and SubnetMask
netstat -rn
ifconfig -a
cat /etc/hosts
cat /etc/netmasks
cat /etc/defaultrouter
2. Make changes using vi
/etc/hosts
/etc/netmasks
/etc/defaultrouter
To Edit file using vi
vi /etc/hosts
vi /etc/netmasks
vi /etc/defaultrouter
To Save and quit from vi
(Esc Then :)
wq!
================================
Another Way to change Gateway
Remove Existing Default Gateway
#route delete default <IP>
Add New Default Gateway
#route add default <ip>
================================
3. Making Setting Effective Without reboot
svcadm restart network/physical
netstat -rn
ifconfig -a
cat /etc/hosts
cat /etc/netmasks
cat /etc/defaultrouter
2. Make changes using vi
/etc/hosts
/etc/netmasks
/etc/defaultrouter
To Edit file using vi
vi /etc/hosts
vi /etc/netmasks
vi /etc/defaultrouter
To Save and quit from vi
(Esc Then :)
wq!
================================
Another Way to change Gateway
Remove Existing Default Gateway
#route delete default <IP>
Add New Default Gateway
#route add default <ip>
================================
3. Making Setting Effective Without reboot
svcadm restart network/physical
Comments
Post a Comment