replace ifconfig to ip
I have used ifconfig when configure network interfaces. But, my colleague recommends ip command. So I note the basic procedure how to configure ethernet by ip command.
- ip link set $ETHER_NAME up
- ip addr add $IP_ADDRESS/$SUBNET brd + dev $ETHER_NAME
- ip addr del $IP_ADDRESS/$SUBNET dev $ETHER_NAME
- ip link set $ETHER_NAME down
- ip link show up