Shammer's Philosophy

My private adversaria

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.

  1. ip link set $ETHER_NAME up
  2. ip addr add $IP_ADDRESS/$SUBNET brd + dev $ETHER_NAME
  3. ip addr del $IP_ADDRESS/$SUBNET dev $ETHER_NAME
  4. ip link set $ETHER_NAME down
  5. ip link show up